1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-03-17 20:58:13 +02:00

more specific 'Granted' messages

This commit is contained in:
danielmartin0 2022-06-02 16:11:45 +01:00
parent a170a05bc9
commit 84e98435d3
5 changed files with 12 additions and 7 deletions

View File

@ -122,9 +122,14 @@ recover_offline_player_items=Offline player's items recovered to cabin.
death_froze=__1__ froze to death.
death_pushed_into_water_by_cannon=__1__ was pushed into water by a cannon.
granted_1=Granted: __1__.
granted_2=Granted: __1__, __2__.
granted_3=Granted: __1__, __2__, __3__.
granted_rocket_launch=Rocket launched.
granted_kraken_kill=Kraken killed.
granted_periodic_barrel=
granted_quest_complete=Quest completed.
granted_1=__1__ Granted: __2__.
granted_2=__1__ Granted: __2__, __3__.
granted_3=__1__ Granted: __2__, __3__, __4__.
approaching_destination=Approaching destination __1__, __2__.
loading_destination=Loading destination __1__, __2__.

View File

@ -1613,7 +1613,7 @@ local function event_on_rocket_launched(event)
end
local force = memory.force
local message = {'pirates.granted_2', Math.floor(Balance.rocket_launch_coin_reward/100)/10 .. 'k [item=coin]', Math.floor(destination.dynamic_data.rocketcoalreward/100)/10 .. 'k [item=coal]'}
local message = {'pirates.granted_2', {'pirates.granted_rocket_launch'}, Math.floor(Balance.rocket_launch_coin_reward/100)/10 .. 'k [item=coin]', Math.floor(destination.dynamic_data.rocketcoalreward/100)/10 .. 'k [item=coal]'}
Common.notify_force_light(force,message)
if destination.dynamic_data.quest_type == Quest.enum.TIME and (not destination.dynamic_data.quest_complete) then

View File

@ -286,7 +286,7 @@ function Public.periodic_free_resources(tickinterval)
Common.give_items_to_crew{{name = 'sulfuric-acid-barrel', count = count}}
local force = memory.force
if not (force and force.valid) then return end
local message = {'pirates.granted_1', count .. ' [item=sulfuric-acid-barrel]'}
local message = {'pirates.granted_1', {'pirates.granted_periodic_barrel'}, count .. ' [item=sulfuric-acid-barrel]'}
Common.notify_force_light(force, message)
end
end

View File

@ -241,7 +241,7 @@ function Public.try_resolve_quest()
local force = memory.force
if not (force and force.valid) then return end
Common.notify_force_light(force, {'pirates.granted_1', destination.dynamic_data.quest_reward.display_amount .. destination.dynamic_data.quest_reward.chat_name})
Common.notify_force_light(force, {'pirates.granted_1', {'pirates.granted_quest_complete'}, destination.dynamic_data.quest_reward.display_amount .. destination.dynamic_data.quest_reward.chat_name})
local name = destination.dynamic_data.quest_reward.name
local count = destination.dynamic_data.quest_reward.count

View File

@ -303,7 +303,7 @@ function Public.kraken_die(kraken_id)
local reward_fuel = Balance.kraken_kill_reward_fuel()
memory.stored_fuel = memory.stored_fuel + reward_fuel
local message = {'pirates.granted_3', Math.floor(reward_items[2].count/100)/10 .. 'k [item=coin]', reward_fuel .. ' [item=coal]', reward_items[1].count .. ' [item=sulfuric-acid-barrel]'}
local message = {'pirates.granted_3', {'pirates.granted_kraken_kill'}, Math.floor(reward_items[2].count/100)/10 .. 'k [item=coin]', reward_fuel .. ' [item=coal]', reward_items[1].count .. ' [item=sulfuric-acid-barrel]'}
Common.notify_force_light(memory.force,message)
memory.playtesting_stats.coins_gained_by_krakens = memory.playtesting_stats.coins_gained_by_krakens + reward_items[2].count