Skip to content

Commit

Permalink
Merge pull request #442 from ComfyFactory/journey_1.9.4
Browse files Browse the repository at this point in the history
Journey 1.9.4
  • Loading branch information
hanakocz authored Nov 23, 2023
2 parents 37fe9a3 + e1702e8 commit d92574c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
25 changes: 23 additions & 2 deletions maps/journey/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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!',
Expand All @@ -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'
}
}
Expand Down
1 change: 0 additions & 1 deletion maps/journey/unique_modifiers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,6 @@ Public.railworld = {

local delivery_options = {
'solar-panel',
'rocket-part',
'beacon',
'assembling-machine-3',
'low-density-structure',
Expand Down

0 comments on commit d92574c

Please sign in to comment.