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

discord bugfix

This commit is contained in:
danielmartin0 2022-07-31 21:13:14 +01:00
parent c535696c7a
commit 9a920ef0e4
4 changed files with 9 additions and 7 deletions

View File

@ -1245,10 +1245,12 @@ local function event_on_research_finished(event)
Memory.set_working_id(crew_id)
local memory = Memory.get_crew_memory()
-- using a localised string means we have to write this out (recall that "" signals concatenation)
memory.force.print({"", '>> ', {'pirates.research_notification', research.localised_name}}, CoreData.colors.notify_force_light)
Server.to_discord_embed_raw({'', '[' .. memory.name .. '] ', {'pirates.research_notification', game.technology_prototypes[research.name].localised_name}}, true)
if (not (memory.game_lost)) then --this condition should prevent discord messages being fired when the crew disbands and gets reset
-- using a localised string means we have to write this out (recall that "" signals concatenation)
memory.force.print({"", '>> ', {'pirates.research_notification', research.localised_name}}, CoreData.colors.notify_force_light)
Server.to_discord_embed_raw({'', '[' .. memory.name .. '] ', {'pirates.research_notification', game.technology_prototypes[research.name].localised_name}}, true)
end
Public.apply_flamer_nerfs()
Public.research_apply_buffs(event) -- this is broken right now

View File

@ -849,6 +849,7 @@ function Public.reset_crew_and_enemy_force(id)
crew_force.laboratory_productivity_bonus = 0
crew_force.ghost_time_to_live = 12 * 60 * 60
crew_force.worker_robots_speed_modifier = 0.5
crew_force.research_queue_enabled = true
for k, v in pairs(Balance.player_ammo_damage_modifiers()) do
crew_force.set_ammo_damage_modifier(k, v)

View File

@ -126,7 +126,6 @@ local function on_init()
local crew_force = game.create_force(Common.get_crew_force_name(id))
Crew.reset_crew_and_enemy_force(id)
crew_force.research_queue_enabled = true
end
-- Delay.global_add(Delay.global_enum.PLACE_LOBBY_JETTY_AND_BOATS)

View File

@ -44,7 +44,7 @@ local RADIOACTIVE = Surfaces.Island.enum.RADIOACTIVE
local HORSESHOE = Surfaces.Island.enum.HORSESHOE
local STANDARD_VARIANT = Surfaces.Island.enum.STANDARD_VARIANT
local A = {NIL, NIL, STANDARD_VARIANT, RED_DESERT, HORSESHOE, WALKWAYS}
local A = {STANDARD_VARIANT, RED_DESERT, HORSESHOE, WALKWAYS}
local B = {NIL, NIL, NIL, STANDARD, STANDARD_VARIANT, RED_DESERT, HORSESHOE, WALKWAYS}
local C = {STANDARD, STANDARD_VARIANT, RED_DESERT, HORSESHOE, WALKWAYS}
local D = {NIL, NIL, NIL, STANDARD, STANDARD_VARIANT, RED_DESERT, HORSESHOE, WALKWAYS, SWAMP}
@ -54,7 +54,7 @@ local destinationScheme = {
[1] = {HORSESHOE, HORSESHOE, HORSESHOE}, --map where you break rocks
[2] = {STANDARD_VARIANT, STANDARD_VARIANT, STANDARD_VARIANT}, --aesthetically different to previous map
[3] = {DOCK, NIL, NIL},
[4] = {A, A, A},
[4] = {A, A, NIL},
[5] = {STANDARD, STANDARD, STANDARD}, --biter boats appear. large island works well so players run off
[6] = {MAZE, MAZE, MAZE},
[7] = {DOCK, B, B},