diff --git a/locale/en/pirates.cfg b/locale/en/pirates.cfg index 077e1485..f9df01f6 100644 --- a/locale/en/pirates.cfg +++ b/locale/en/pirates.cfg @@ -16,7 +16,7 @@ softmod_info_tips_1=Features of the game that are hard to work out alone softmod_info_tips_2=• The captain can steer the boat from the crow's nest by placing 100 rail signals in one of the blue boxes.\n• Resources granted to the ship appear in the captain's cabin.\n• Charging a silo drains power from everything else on its network.\n• The quantity of ore available on an island is independent of the order in which you break rocks.\n• Passive pollution ramps up over time on each island.\n• The strength of attacks is proportional to the number of remaining nests. (The time-based rate of evolution is proportional to nests too, but destroying a nest will immediately jump evolution by most of the amount it 'would have' made had it survived.)\n• Lab productivity increases with each league.\n• item-on-ground entities on the deck are moved to the cabin when the boat moves, for performance reasons.\n• Commands: /ccolor gives you a fun color. /classinfo {classname} gives the description of the named class. To manage your class, use /take {classname} or /giveup. softmod_info_updates_1=Significant recent changes -softmod_info_updates_2=v1.3.1-v1.3.3\n• Bugfixes.\n• Rebalancings, including: iron ore amounts buffed; kraken reward improved; final resource requirement increased; overall difficulty reduced.\n• An officer will now be prioritised for the captain role if the captain DC's.\n\nv1.3\n• Hold chests are now destructible.\n• Fluid is now transportable between decks.\n• New classes, and new 'Class Window'.\n• Other improvements, small features, and balance changes.\n\nv1.2\n• Mod portal release. +softmod_info_updates_2=v1.3.1-v1.3.4\n• Bugfixes.\n• Rebalancings, including: iron ore amounts buffed; kraken reward improved; final resource requirement increased; overall difficulty reduced.\n• An officer will now be prioritised for the captain role if the captain disconnects.\n\nv1.3\n• Hold chests are now destructible.\n• Fluid is now transportable between decks.\n• New classes, and new 'Class Window'.\n• Other improvements, small features, and balance changes.\n\nv1.2\n• Mod portal release. softmod_info_credits_1=Credits softmod_info_credits_2=Pirate Ship designed and coded by thesixthroc. Updates from Piratux. Comfy codebase and help from Gerkiz, Hanakocz and Mew @ Comfy Industries (https://getcomfy.eu). Some island structure blueprints contributed by Mattisso.\n\nCome chat with us: https://getcomfy.eu/discord\n\n"Those white gloves. I'll never forget them 'till the day I die." - Dr. John @@ -101,6 +101,8 @@ ship_set_off_to_next_island=[font=heading-1]Ship set sail[/font] for the next de crew_continue_on_freeplay=The run now continues on 'Freeplay'. victory_continue_reminder=If you wish to continue the game, click up top. +crew_disband_tick_message=The crew will disband in 20 seconds. + plank=__1__ planked __2__! plank_error_invalid_player=Command error: Player is not a crewmember. plank_error_self=Command error: Can't plank yourself. diff --git a/maps/pirates/api_events.lua b/maps/pirates/api_events.lua index ab20af5d..bc2745cf 100644 --- a/maps/pirates/api_events.lua +++ b/maps/pirates/api_events.lua @@ -1246,7 +1246,9 @@ local function event_on_research_finished(event) 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', event.research.localised_name}}, CoreData.colors.notify_force_light) + 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) Public.apply_flamer_nerfs() Public.research_apply_buffs(event) -- this is broken right now diff --git a/maps/pirates/api_on_tick.lua b/maps/pirates/api_on_tick.lua index 9532db53..8f3d7c11 100644 --- a/maps/pirates/api_on_tick.lua +++ b/maps/pirates/api_on_tick.lua @@ -1017,8 +1017,6 @@ function Public.loading_update(tickinterval) local eta_ticks = total - (memory.loadingticks - (memory.extra_time_at_sea or 0)) - -- log(_inspect{eta_ticks, (memory.active_sea_enemies.krakens and #memory.active_sea_enemies.krakens or 'nil'), memory.loadingticks}) - if eta_ticks < 60*20 and memory.active_sea_enemies and memory.active_sea_enemies.kraken_count and diff --git a/maps/pirates/coredata.lua b/maps/pirates/coredata.lua index 5aec0878..0552cec7 100644 --- a/maps/pirates/coredata.lua +++ b/maps/pirates/coredata.lua @@ -7,7 +7,7 @@ local _inspect = require 'utils.inspect'.inspect local Public = {} Public.scenario_id_name = 'pirates' -Public.version_string = '1.3.3' --major.minor.patch versioning, to match factorio mod portal +Public.version_string = '1.3.4' --major.minor.patch versioning, to match factorio mod portal Public.blueprint_library_allowed = true Public.blueprint_importing_allowed = true diff --git a/maps/pirates/crew.lua b/maps/pirates/crew.lua index d3d48184..398df2ff 100644 --- a/maps/pirates/crew.lua +++ b/maps/pirates/crew.lua @@ -125,7 +125,8 @@ function Public.try_lose(loss_reason) if (not memory.game_lost) then -- if (not memory.game_lost) and (not memory.game_won) then memory.game_lost = true - memory.crew_disband_tick = game.tick + 360 + memory.crew_disband_tick_message = game.tick + 60*10 + memory.crew_disband_tick = game.tick + 60*35 local playtimetext = Utils.time_longform((memory.age or 0)/60) diff --git a/maps/pirates/main.lua b/maps/pirates/main.lua index 69b4bbf6..61c1a05e 100644 --- a/maps/pirates/main.lua +++ b/maps/pirates/main.lua @@ -67,6 +67,7 @@ require 'maps.pirates.shop.shop' require 'maps.pirates.boat_upgrades' local Token = require 'utils.token' local Task = require 'utils.task' +local Server = require 'utils.server' require 'utils.profiler' @@ -274,12 +275,23 @@ local function crew_tick() PiratesApiOnTick.loading_update(Common.loading_interval) end + if memory.crew_disband_tick_message then + if memory.crew_disband_tick_message < tick then + memory.crew_disband_tick_message = nil + + local message1 = {'pirates.crew_disband_tick_message', 25} + + Common.notify_force(memory.force, message1) + + Server.to_discord_embed_raw({'', '[' .. memory.name .. '] ', message1}, true) + end + end + if memory.crew_disband_tick then if memory.crew_disband_tick < tick then memory.crew_disband_tick = nil Crew.disband_crew() end - return end end diff --git a/maps/pirates/overworld.lua b/maps/pirates/overworld.lua index fb3aa84a..6618a193 100644 --- a/maps/pirates/overworld.lua +++ b/maps/pirates/overworld.lua @@ -71,7 +71,7 @@ local destinationScheme = { [18] = {C, C, C}, --first showing of robot frame cost [19] = {DOCK, B, B}, [20] = {NIL, NIL, NIL}, - [21] = {WALKWAYS, WALKWAYS, WALKWAYS}, --rocket launch cost + [21] = {WALKWAYS, WALKWAYS, WALKWAYS}, --rocket launch cost begins [22] = {SWAMP, RED_DESERT, STANDARD_VARIANT}, -- uniquely, this has a rocket launch cost, but still has an auto-undock timer [23] = {C, C, C}, [24] = {MAZE, MAZE, MAZE}, -- current 'boss map' diff --git a/maps/pirates/roles/classes.lua b/maps/pirates/roles/classes.lua index 3996a69e..45689575 100644 --- a/maps/pirates/roles/classes.lua +++ b/maps/pirates/roles/classes.lua @@ -190,10 +190,8 @@ Public.class_purchase_requirement = { function Public.initial_class_pool() return { - enum.DECKHAND, enum.DECKHAND, --good for afk players enum.SHORESMAN, - enum.SHORESMAN, enum.QUARTERMASTER, enum.FISHERMAN, enum.SCOUT, diff --git a/maps/pirates/roles/roles.lua b/maps/pirates/roles/roles.lua index 9a940ec4..2f7d19be 100644 --- a/maps/pirates/roles/roles.lua +++ b/maps/pirates/roles/roles.lua @@ -348,7 +348,7 @@ function Public.assign_captain_based_on_priorities(excluded_player_index) local captain_name = nil -- Prefer officers for a captain (if there are any) - for _, player_index in pairs(memory.officers_table) do + for player_index, _ in pairs(memory.officers_table) do local player = game.players[player_index] local player_active = Utils.contains(Common.crew_get_nonafk_crew_members(), player) diff --git a/maps/pirates/surfaces/sea/kraken.lua b/maps/pirates/surfaces/sea/kraken.lua index 97aaed16..09e0015a 100644 --- a/maps/pirates/surfaces/sea/kraken.lua +++ b/maps/pirates/surfaces/sea/kraken.lua @@ -266,7 +266,7 @@ end function Public.overall_kraken_tick() local memory = Memory.get_crew_memory() - if memory.active_sea_enemies and memory.active_sea_enemies.krakens and #memory.active_sea_enemies.krakens > 0 then + if memory.active_sea_enemies and memory.active_sea_enemies.kraken_count and memory.active_sea_enemies.kraken_count > 0 then local evo_increase = Balance.kraken_evo_increase_per_second() if evo_increase > 0 then if not memory.dynamic_kraken_evo then memory.dynamic_kraken_evo = 0 end