1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-01 13:08:05 +02:00

discord embed, small fixes

This commit is contained in:
hanakocz 2023-11-24 00:16:25 +01:00
parent 37fe9a3378
commit e1702e8570
2 changed files with 23 additions and 3 deletions

View File

@ -443,6 +443,7 @@ function Public.import_journey(journey)
return
else
Server.try_get_data('scenario_settings', 'journey_data', journey.import)
Server.set_data('scenario_settings', 'journey_updating', false)
end
end
@ -1209,6 +1210,16 @@ function Public.notify_discord(journey)
return
end
local caption = 'World ' .. journey.world_number .. ' | ' .. Constants.unique_world_traits[journey.world_trait].name
local modifier_message = ''
for _, mod in pairs(journey.world_selectors[journey.selected_world].modifiers) do
local sign = ''
if mod.value > 0 then sign = '+' end
modifier_message = modifier_message .. sign .. mod.value .. '% ' .. mod.name .. '\n'
end
local capsules = ''
for _, cap in pairs(journey.world_selectors[journey.selected_world].bonus_goods) do
capsules = capsules .. cap[2] .. 'x ' .. cap[1] .. '\n'
end
local message = {
title = 'World advanced',
description = 'Arriving at target destination!',
@ -1224,8 +1235,18 @@ function Public.notify_discord(journey)
inline = 'true'
},
field3 = {
text1 = 'Fuel cells in mothership cargo:',
text2 = journey.mothership_cargo['uranium-fuel-cell'],
text1 = 'Satellites in mothership cargo:',
text2 = journey.mothership_cargo['satellite'] .. ' / ' .. journey.mothership_cargo_space['satellite'],
inline = 'false'
},
field4 = {
text1 = 'Modifiers changed:',
text2 = modifier_message,
inline = 'false'
},
field5 = {
text1 = 'Capsules gained:',
text2 = capsules,
inline = 'false'
}
}

View File

@ -565,7 +565,6 @@ Public.railworld = {
local delivery_options = {
'solar-panel',
'rocket-part',
'beacon',
'assembling-machine-3',
'low-density-structure',