From 26ba5478b232ea60a480b2f08f04a4f832e88039 Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Sat, 7 Sep 2024 17:37:24 +0100 Subject: [PATCH] welcome modal --- control.lua | 2 +- locale/en/pirates.cfg | 59 +++++++++++++------------- locale/ru/pirates.cfg | 1 - maps/pirates/api_events.lua | 3 +- maps/pirates/balance.lua | 2 - maps/pirates/common.lua | 1 - maps/pirates/coredata.lua | 2 +- maps/pirates/gui/gui.lua | 4 +- maps/pirates/gui/info.lua | 6 +-- maps/pirates/gui/welcome.lua | 75 ++++++++++++++++++++++++++++++++++ maps/pirates/main.lua | 12 +----- maps/pirates/player_colors.lua | 3 -- 12 files changed, 117 insertions(+), 53 deletions(-) create mode 100644 maps/pirates/gui/welcome.lua diff --git a/control.lua b/control.lua index 89a7bec1..ab308e2d 100644 --- a/control.lua +++ b/control.lua @@ -100,7 +100,7 @@ require 'utils.remote_chunks' --require 'maps.chronosphere.main' --![[Adventure as a crew of pirates]]-- ---require 'maps.pirates.main' +require 'maps.pirates.main' --![[Launch rockets in increasingly harder getting worlds.]]-- --require 'maps.journey.main' diff --git a/locale/en/pirates.cfg b/locale/en/pirates.cfg index 238bd67e..c4d57be5 100644 --- a/locale/en/pirates.cfg +++ b/locale/en/pirates.cfg @@ -4,7 +4,7 @@ softmod_info_header_after_version_number= === softmod_info_body_1=News and chat: getcomfy.eu/discord softmod_info_game_description_1=Game Description -softmod_info_game_description_2=Set sail in this multiplayer scenario. Collect resources and fuel the ship in order to survive as many leagues as possible. The ship moves with code magic. Each crew has a captain, who performs actions such as deciding when the boat leaves. Doubloons can be spent at various markets throughout the game.\n\nGame progression is significantly slowed the smaller the crew.\n\n[font=default-bold]Win condition:[/font] Travel 1000 leagues.\n[font=default-bold]Lose condition:[/font] The ship runs out of fuel, or a cannon is destroyed. +softmod_info_game_description_2=Set sail in this multiplayer scenario. Collect resources and fuel the ship in order to survive as many leagues as possible. Each crew has a captain, who performs actions such as deciding when the boat leaves. Doubloons can be spent at various markets throughout the game. Game progression is slower for smaller crews. Mysteries await!\n\n[font=default-bold]Win condition:[/font] Travel 1000 leagues.\n[font=default-bold]Lose condition:[/font] The ship runs out of fuel, or a cannon is destroyed. # softmod_info_bugs_1=Known issues # softmod_info_bugs_2=• @@ -16,12 +16,12 @@ 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 50 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• 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.5.2\n• Elite biters now also appear in Easy/Normal difficulties from league 800.\n• Elite biters now also spawn 4 non-elite biters on death.\n• When player rejoins the game within 1 minute, he will spawn where he was when he left, instead of on the boat.\n• "Kovarex-enrichment-process" recipe is now researched by default\n• Bugfixes.\n\nv1.5.1\n• Greatly increased biter wave sizes on harder difficulties.\n• Reduced amount of resources and rewards that can be acquired. However all rewards (such as plates from chests and coin rewards from launching rocket) now scale with leagues.\n• Possible fix for some desync cases.\n• Bugfixes. +softmod_info_updates_2=v1.6.0\n• TBC\n\nv1.5.2\n• Elite biters now also appear in Easy/Normal difficulties from league 800.\n• Elite biters now also spawn 4 non-elite biters on death.\n• When player rejoins the game within 1 minute, he will spawn where he was when he left, instead of on the boat.\n• "Kovarex-enrichment-process" recipe is now researched by default\n• Bugfixes.\n\nv1.5.1\n• Greatly increased biter wave sizes on harder difficulties.\n• Reduced amount of resources and rewards that can be acquired. However all rewards (such as plates from chests and coin rewards from launching rocket) now scale with leagues.\n• Possible fix for some desync cases.\n• Bugfixes. 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 +softmod_info_credits_2=Designed and developed by thesixthroc. Updates from Piratux. Comfy codebase and help from Gerkiz, Hanakocz and Mew @ Comfy Industries (https://getcomfy.eu). 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 softmod_info_credits_2_old=Softmod designed and written by thesixthroc. Comfy codebase help from Gerkiz, Hanakocz and Mew @ Comfy Industries (https://getcomfy.eu). Some island structure blueprints were contributed by Mattisso. Gold sprite by Clint Bellanger. Parrot sprites by @pixelthen.\n\n"Those white gloves. I'll never forget them 'till the day I die." - Dr. John -thesixthroc_support_toast=Support Pirate Ship scenario design at ko-fi.com/thesixthroc +thesixthroc_support_toast=Support Pirate Ship at ko-fi.com/thesixthroc softmod_info_body_promote=by thesixthroc softmod_info_body_promote_old2=patreon.com/thesixthroc @@ -76,9 +76,9 @@ parrot_cave_tip_1=That island looks suspiciously dark... I'm scared! Squawk! parrot_captain_first_time_in_cabin_hint=Squawk! Captains and officers can buy rail signals to steer the ship! parrot_cliff_explosive_tip=Cliff explosives? These look so powerful, they could blow away those annoying chests in the hold. Squawk! parrot_buried_treasure_tip=Squawk! If X marks the spot - use an item to dig with! -parrot_captain_left_protected_run=Uh oh, looks like the captain left. Since this is protected run, the captain role will not be redistributed. -parrot_player_joins_protected_run_with_no_captain=This run has captain protection turned on, so you will have to wait for captain to come back to control the ship. -parrot_create_new_crew_tip=You can always join/create another run from the lobby by exiting current run by clicking red flag on top then clicking Quit Crew. +parrot_captain_left_protected_run=Uh oh, looks like the captain left. Since this is protected crew, the captain role will not be redistributed. +parrot_player_joins_protected_run_with_no_captain=This crew has captain protection turned on, so you will have to wait for captain to come back to control the ship. +parrot_create_new_crew_tip=You can always join/create another crew from the lobby by exiting current crew by clicking red flag on top then clicking Quit Crew. difficulty_easy=Easy difficulty_normal=Normal @@ -107,8 +107,8 @@ victory_continue_reminder=If you wish to continue the game, click up top. crew_disband_tick_message=The crew will disband in 20 seconds. -protected_run_lock_expired=Protection of __1__ run has expired. Captain role will not be locked anymore when the captain leaves. -private_run_lock_expired=Private lock of __1__ run has expired. Anyone can join this crew now. +protected_run_lock_expired=Protection of __1__ crew has expired. Captain role will not be locked anymore when the captain leaves. +private_run_lock_expired=Private lock of __1__ crew has expired. Anyone can join this crew now. plank=__1__ planked __2__! plank_error_invalid_player=Command error: Player is not a crewmember. @@ -331,14 +331,15 @@ warn_nearly_afk_captain=Note: If you go idle as captain for too long, the role p # error_class_assign_unavailable_class=Class error: No spare class of that type is available. - +welcome_main_1=You've spawned in the lobby. +welcome_main_2=To board an existing crew (or create a new one), click 'Crews' in the top-left. +welcome_end=Click to dismiss. personal_join_string_1=You have joined the crew '__1__' [Capacity __2__]. personal_join_string_2=You have joined the crew '__1__' [Capacity __2__, Difficulty [color=__3__,__4__,__5__] __6__[/color]]. -player_join_game_info=Welcome! You're currently in the lobby. To hop into action, you can click "Crews" button up top to create a crew or choose an existing crew to join. -player_joins_protected_run_with_no_captain=This run has captain protection turned on, so you will have to wait for captain to come back to control the ship. -create_new_crew_tip=You can always join/create another run from the lobby by exiting current run by clicking red flag on top then clicking Quit Crew. +player_joins_protected_run_with_no_captain=This crew has captain protection turned on, so you will have to wait for captain to come back to control the ship. +create_new_crew_tip=You can always join/create another crew from the lobby by exiting current crew by clicking red flag on top then clicking Quit Crew. goto_oldest_crew_with_large_capacity=There are multiple crews on this server. You have been placed in the oldest crew with large capacity. goto_oldest_crew=There are multiple crews on this server. You have been placed in the oldest. @@ -358,8 +359,8 @@ crew_leave=__1__ left the crew. crew_launch=[__1__] Launched. crew_disband=[__1__] Disbanded after __2__. -proposal_propose=__1__ proposed the run __2__ [Capacity __3__]. -proposal_propose_private=__1__ proposed the private run __2__ [Capacity __3__]. +proposal_propose=__1__ proposed the crew __2__ [Capacity __3__]. +proposal_propose_private=__1__ proposed the private crew __2__ [Capacity __3__]. proposal_retracted=Proposal __1__ retracted. proposal_abandoned=Proposal __1__ abandoned. @@ -508,9 +509,9 @@ gui_progress_leagues=__1__ leagues gui_progress_current_location=Current location: __1__ gui_progress_time_of_day=Time of day: __1__ -gui_runs_play=Play -gui_runs_ongoing_runs=Ongoing Runs -gui_runs_ongoing_runs_helpful_tip=To join a run, first select it in the table below. +gui_runs_play=Crews +gui_runs_ongoing_runs=Ongoing Crews +gui_runs_ongoing_runs_helpful_tip=To join a crew, first select it in the table below. gui_runs_ongoing_runs_spectate=Spectate gui_runs_ongoing_runs_join_crew=Join Crew gui_runs_ongoing_runs_return_to_lobby=Return to Lobby @@ -528,32 +529,32 @@ gui_runs_proposal_maker_no_limit=No limit gui_runs_proposal_maker_protected=Protected gui_runs_proposal_maker_protected_tooltip=Enables captain protection, which locks captain role when captain leaves or becomes afk (unless there are officers) instead of distributing the role to random crew member.\nCaptain protection expires if the crew is empty or inactive for __1__ hours. gui_runs_proposal_maker_private=Private -gui_runs_proposal_maker_private_tooltip=Sets your run to private, which protects the run by password.\nOnce the run has launched, only people who know password will be able to join the crew.\nPrivate run becomes public if the crew is empty or inactive for __1__ hours. +gui_runs_proposal_maker_private_tooltip=Sets your crew to private, which protects the crew by password.\nOnce the crew has launched, only people who know password will be able to join the crew.\nPrivate crew becomes public if the crew is empty or inactive for __1__ hours. gui_runs_proposal_maker_password=Password gui_runs_proposal_maker_confirm_password=Confirm Password -gui_runs_proposal_maker_error_protected_run_limit=All protected run slots are occupied. Wait until protected run slots free up to create your own. -gui_runs_proposal_maker_error_private_run_limit=All private run slots are occupied. Wait until private run slots free up to create your own. +gui_runs_proposal_maker_error_protected_run_limit=All protected crew slots are occupied. Wait until protected crew slots free up to create your own. +gui_runs_proposal_maker_error_private_run_limit=All private crew slots are occupied. Wait until private crew slots free up to create your own. gui_runs_proposal_maker_error_private_run_password_no_match=Passwords do not match. gui_runs_proposal_maker_error_private_run_password_empty=Passwords can't be empty. -gui_join_protected_run_info=This run is protected.\nThis means when captain leaves the game, other members won't get the captain role (unless there are officers).\nCaptain protection expires in __1__:__2__:__3__ -gui_join_private_run_info=This run is private.\nPlease enter a password to join the crew.\nThis run will become public in __1__:__2__:__3__ +gui_join_protected_run_info=This crew is protected.\nThis means when captain leaves the game, other members won't get the captain role (unless there are officers).\nCaptain protection expires in __1__:__2__:__3__ +gui_join_private_run_info=This crew is private.\nPlease enter a password to join the crew.\nThis crew will become public in __1__:__2__:__3__ gui_join_private_run_error_wrong_password=The password you've entered is incorrect. -gui_runs_launch=Launch run +gui_runs_launch=Launch crew gui_runs_launch_error_1=Gather endorsements from more pirates. -gui_runs_launch_error_2=The number of concurrent runs on the server has reached the cap set by the admins. -gui_runs_launch_error_3=Can't launch; at least one run needs high player capacity. -gui_runs_launch_error_4=No sloops available. Join an existing run instead. -gui_runs_launch_error_5=Can't create the proposal, because there are too many crews. Join some existing crew run instead. +gui_runs_launch_error_2=The number of concurrent crews on the server has reached the cap set by the admins. +gui_runs_launch_error_3=Can't launch; at least one crew needs high player capacity. +gui_runs_launch_error_4=No sloops available. Join an existing crew instead. +gui_runs_launch_error_5=Can't create the proposal, because there are too many crews. Join some existing crew crew instead. gui_runs_wait_to_join=Wait to join... __1__ gui_info_main_tooltip=Notes and updates on Pirate Ship. gui_crews=Crews -gui_crews_main_tooltip=View the ongoing runs, and make proposals for new ones. +gui_crews_main_tooltip=View the ongoing crews, and make proposals for new ones. gui_minimap_main_tooltip=View the outside world. diff --git a/locale/ru/pirates.cfg b/locale/ru/pirates.cfg index 842df419..1233e331 100644 --- a/locale/ru/pirates.cfg +++ b/locale/ru/pirates.cfg @@ -246,7 +246,6 @@ warn_nearly_afk_captain=Примечание: если вы слишком до # error_class_assign_unavailable_class=Ошибка класса: нет запасного класса такого типа. personal_join_string_1=Вы присоединились к команде '__1__' [Вместимость __2__]. personal_join_string_2=Вы присоединились к команде '__1__' [Вместимость __2__, Сложность [color=__3__,__4__,__5__] __6__[/color]]. -player_join_game_info=Добро пожаловать! Вы сейчас находитесь в лобби. Чтобы приступить к делу, вы можете нажать кнопку «Команды» вверху, чтобы создать команду, или выбрать существующую команду, к которой вы хотите присоединиться. player_joins_protected_run_with_no_captain=В этом заплыве включена защита капитана, поэтому вам придётся подождать, пока капитан вернётся, чтобы управлять кораблём. create_new_crew_tip=Вы всегда можете присоединиться/создать другой заплыв из лобби, выйдя из текущего заплыва, щёлкнув красный флажок вверху, а затем нажав «Выйти из команды». goto_oldest_crew_with_large_capacity=На этом сервере несколько команд. Вы были помещены в старейший экипаж с большой вместимостью. diff --git a/maps/pirates/api_events.lua b/maps/pirates/api_events.lua index 34e1467b..b48ca2ac 100644 --- a/maps/pirates/api_events.lua +++ b/maps/pirates/api_events.lua @@ -38,6 +38,7 @@ local Ores = require 'maps.pirates.ores' local Server = require 'utils.server' -- local Modifers = require 'player_modifiers' +local GuiWelcome = require 'maps.pirates.gui.welcome' local tick_tack_trap = require 'maps.pirates.locally_maintained_comfy_forks.tick_tack_trap' --'enemy' force, but that's okay @@ -1534,7 +1535,7 @@ local function event_on_player_joined_game(event) Common.ensure_chunks_at(surface, spawnpoint, 5) end - Common.notify_player_expected(player, { 'pirates.player_join_game_info' }) + GuiWelcome.show_welcome_window(player) player.force = Common.lobby_force_name diff --git a/maps/pirates/balance.lua b/maps/pirates/balance.lua index dc5633d4..32c4d52d 100644 --- a/maps/pirates/balance.lua +++ b/maps/pirates/balance.lua @@ -12,8 +12,6 @@ local Common = require 'maps.pirates.common' local IslandEnum = require 'maps.pirates.surfaces.islands.island_enum' --- this file is an API to all the balance tuning knobs - -- Kraken related parameters Public.biter_swim_speed = 1.5 diff --git a/maps/pirates/common.lua b/maps/pirates/common.lua index 91bbab90..5adbf8b1 100644 --- a/maps/pirates/common.lua +++ b/maps/pirates/common.lua @@ -426,7 +426,6 @@ function Public.is_officer(player_index) end end --- lifted shamelessly from biter battles, since I haven't done balancing work on this: function Public.surplus_evo_biter_damage_modifier(surplus_evo) return Math.floor(surplus_evo / 2 * 1000) / 1000 --is this floor needed? end diff --git a/maps/pirates/coredata.lua b/maps/pirates/coredata.lua index 0952639d..b375d173 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.5.2' --major.minor.patch versioning, to match factorio mod portal +Public.version_string = '1.6.0' --major.minor.patch versioning, to match factorio mod portal Public.blueprint_library_allowed = true Public.blueprint_importing_allowed = true diff --git a/maps/pirates/gui/gui.lua b/maps/pirates/gui/gui.lua index 8b7a235f..ad325f51 100644 --- a/maps/pirates/gui/gui.lua +++ b/maps/pirates/gui/gui.lua @@ -28,6 +28,7 @@ local Event = require 'utils.event' local CustomEvents = require 'maps.pirates.custom_events' local IslandEnum = require 'maps.pirates.surfaces.islands.island_enum' local Kraken = require 'maps.pirates.surfaces.sea.kraken' +local GuiWelcome = require 'maps.pirates.gui.welcome' local ComfyGui = require 'utils.gui' ComfyGui.set_disabled_tab('Scoreboard', true) @@ -1263,13 +1264,14 @@ local function on_gui_click(event) -- Public.fuel.toggle_window(player) -- Public.fuel.full_update(player) else + if GuiWelcome.handle_click then GuiWelcome.handle_click(event) end if GuiRuns.click then GuiRuns.click(event) end if GuiCrew.click then GuiCrew.click(event) end if GuiClasses.click then GuiClasses.click(event) end if GuiFuel.click then GuiFuel.click(event) end if GuiMinimap.click then GuiMinimap.click(event) end if GuiInfo.click then GuiInfo.click(event) end - end + end end local function on_gui_location_changed(event) diff --git a/maps/pirates/gui/info.lua b/maps/pirates/gui/info.lua index e68f6220..0610747d 100644 --- a/maps/pirates/gui/info.lua +++ b/maps/pirates/gui/info.lua @@ -17,7 +17,7 @@ local Public = {} local window_name = 'info' -local width = 430 +local width = 400 @@ -225,9 +225,9 @@ function Public.full_update(player) local flow2 = flow -- warning, if you make these too small, it loses 'Click to dismiss.' - -- This is really really dumb, to have to change these manually. But sadly I couldn't get the window to look like that and also be expandable. + -- This is really really dumb, to have to change these manually. But sadly we couldn't get the window to look like that and also be expandable. if flow2.selected_tab_index == 1 then - flow2.style.height = 400 + flow2.style.height = 360 elseif flow2.selected_tab_index == 2 then flow2.style.height = 490 elseif flow2.selected_tab_index == 3 then diff --git a/maps/pirates/gui/welcome.lua b/maps/pirates/gui/welcome.lua new file mode 100644 index 00000000..ce11390e --- /dev/null +++ b/maps/pirates/gui/welcome.lua @@ -0,0 +1,75 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + +local Public = {} + +function Public.show_welcome_window(player) + if player.gui.center['welcome_window'] then player.gui.center['welcome_window'].destroy() end + + local frame = player.gui.center.add{ + type = 'frame', + name = 'welcome_window', + direction = 'vertical' + } + frame.style.width = 240 + -- frame.style.color = {r = 0.5, g = 0, b = 0, a = 0.5} + + local title_flow = frame.add{type = 'flow', direction = 'horizontal'} + title_flow.style.horizontal_align = 'center' + title_flow.style.top_margin = 10 + title_flow.style.width = 220 + + local colors = { + {r=1, g=0.5, b=0.5}, + {r=1, g=0.7, b=0.5}, + {r=1, g=1, b=0.5}, + {r=0.7, g=1, b=0.5}, + {r=0.5, g=0.7, b=1}, + {r=0.7, g=0.5, b=1} + } + + -- Todo: Localize + local welcome = {'W', 'E', 'L', 'C', 'O', 'M', 'E', '!'} + + for i, letter in ipairs(welcome) do + local label = title_flow.add{type = 'label', caption = letter} + label.style.font = 'default-large-bold' + label.style.font_color = colors[(i-1) % #colors + 1] + end + + local message = frame.add{type = 'label', caption = {'pirates.welcome_main_1'}} + message.style.font = 'default' + message.style.horizontal_align = 'center' + message.style.single_line = false + message.style.top_margin = 12 + message.style.width = 220 + message.style.rich_text_setting = defines.rich_text_setting.enabled + + local message = frame.add{type = 'label', caption = {'pirates.welcome_main_2'}} + message.style.font = 'default' + message.style.horizontal_align = 'center' + message.style.single_line = false + message.style.top_margin = 10 + message.style.width = 220 + message.style.rich_text_setting = defines.rich_text_setting.enabled + + local close_instruction = frame.add{type = 'label', caption = {'pirates.welcome_end'}} + close_instruction.style.font = 'default-small' + close_instruction.style.horizontal_align = 'center' + close_instruction.style.top_margin = 20 + close_instruction.style.width = 220 +end + +function Public.handle_click(event) + if event.element and event.element.valid then + local player = game.players[event.player_index] + if player.gui.center['welcome_window'] then + if event.element.name == 'welcome_window' or event.element.parent.name == 'welcome_window' then + player.gui.center['welcome_window'].destroy() + return true + end + end + end + return false +end + +return Public \ No newline at end of file diff --git a/maps/pirates/main.lua b/maps/pirates/main.lua index a734d40f..d102222b 100644 --- a/maps/pirates/main.lua +++ b/maps/pirates/main.lua @@ -15,10 +15,6 @@ The scenario is quite complex, but there are ways to get started, even if you do • Make sure to use debug=true in control.lua ]] ---[[ - personal note for thesixthroc looking at this in XX years: my design notes are all in Obsidian (edit: mostly moved to Github Projects) -]] - --[[ Convention for Factorio blueprints in this folder: Use Snap to grid -> Relative, Offset of zeroes. We record tiles and entities separately. For tiles, we use the factorio dev approved 'concrete trick', painting each tile type separately as concrete. The concrete BP will typically need an offset, since it doesn't remember the center of the entities BP — we configure this offset in the Lua rather than the BP itself, since it's easier to edit that way. @@ -28,9 +24,7 @@ The scenario is quite complex, but there are ways to get started, even if you do -- require 'modules.biters_yield_coins' require 'modules.biter_noms_you' require 'modules.no_deconstruction_of_neutral_entities' - require 'maps.pirates.custom_events' --probably do this before anything else - require 'utils.server' local _inspect = require 'utils.inspect'.inspect -- local Modifers = require 'player_modifiers' @@ -38,11 +32,8 @@ local BottomFrame = require 'utils.gui.bottom_frame' local Autostash = require 'modules.autostash' local AntiGrief = require 'utils.antigrief' require 'modules.inserter_drops_pickup' - - local PiratesApiOnTick = require 'maps.pirates.api_on_tick' local ClassPiratesApiOnTick = require 'maps.pirates.roles.tick_functions' - require 'maps.pirates.commands' require 'maps.pirates.math' local Memory = require 'maps.pirates.memory' @@ -76,7 +67,7 @@ local Math = require 'maps.pirates.math' local Public = {} --- parrot sprites from https://elthen.itch.io/2d-pixel-art-parrot-sprites, licensed appropriately +-- parrot sprites from https://elthen.itch.io/2d-pixel-art-parrot-sprites local jetty_delayed = Token.register( -- function(data) @@ -84,6 +75,7 @@ local jetty_delayed = Token.register( Surfaces.Lobby.place_lobby_jetty_and_boats() end ) + local function on_init() Memory.global_reset_memory() local global_memory = Memory.get_global_memory() diff --git a/maps/pirates/player_colors.lua b/maps/pirates/player_colors.lua index ab39bd34..c9c635d6 100644 --- a/maps/pirates/player_colors.lua +++ b/maps/pirates/player_colors.lua @@ -1,7 +1,5 @@ -- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. ---compiled by thesixthroc, plz credit if copied - local Public = {} Public.colors = { @@ -1272,7 +1270,6 @@ Public.colors = { ["zomp"] = {r = 0.22, g = 0.65, b = 0.56}, } --- used a brightness formula to pick these out, ask me if you want it Public.bright_color_names = {"acid", "acid green", "aero", "aero blue", "alabaster", "algae", "algae green", "alice blue", "alloy orange", "almond", "amaranth", "amaranth pink", "amaranth purple", "amaranth red", "amber", "amethyst", "android green", "antique brass", "antique fuchsia", "antique white", "apple", "apple green", "apricot", "aqua", "aqua blue", "aqua green", "aqua marine", "aquamarine", "arctic lime", "artichoke", "arylide yellow", "ash gray", "asparagus", "atomic tangerine", "aureolin", "avocado green", "azul", "azure", "baby blue", "baby blue eyes", "baby green", "baby pink", "baby powder", "baby purple", "baker miller pink", "banana", "banana yellow", "barbie pink", "barney", "barney purple", "battleship grey", "beau blue", "beaver", "beige", "bisque", "bistre brown", "bitter lemon", "bitter lime", "bittersweet", "bittersweet shimmer", "black shadows", "blanched almond", "bland", "blast off bronze", "blizzard blue", "blond", "blood orange", "blue", "blue bell", "bluegrey", "blue jeans", "bluetiful", "blue violet", "blue yonder", "blurple", "blush", "blush pink", "bone", "boring green", "brick orange", "brick red", "bright aqua", "bright blue", "bright cyan", "bright green", "bright lavender", "bright light blue", "bright light green", "bright lilac", "bright lime", "bright lime green", "bright magenta", "bright maroon", "bright navy blue", "bright olive", "bright orange", "bright pink", "bright purple", "bright red", "bright sea green", "bright sky blue", "bright teal", "bright turquoise", "bright violet", "bright yellow", "brilliant rose", "brink pink", "bronze", "brown sugar", "bubblegum", "bubble gum pink", "bubblegum pink", "bud green", "buff", "burlywood", "burnished brown", "burnt orange", "burnt siena", "burnt sienna", "burnt yellow", "burple", "butter", "butterscotch", "butter yellow", "byzantine", "cadet blue", "cadet grey", "cadmium orange", "cadmium red", "cadmium yellow", "café au lait", "cambridge blue", "camel", "cameo pink", "camo", "canary", "canary yellow", "candy apple red", "candy pink", "capri", "caramel", "cardinal", "caribbean green", "carnation", "carnation pink", "carolina blue", "carrot orange", "cedar chest", "celadon", "celadon blue", "celadon green", "celery", "celeste", "celtic blue", "cement", "cerise", "cerulean", "cerulean blue", "cerulean frost", "cg blue", "cg red", "champagne", "champagne pink", "charm pink", "chartreuse", "cherry", "cherry blossom pink", "cherry red", "chili red", "china pink", "china rose", "chrome yellow", "cinereous", "cinnabar", "cinnamon", "cinnamon satin", "citrine", "citron", "clay", "clay brown", "clear blue", "cloudy blue", "cocoa brown", "cool blue", "cool green", "cool grey", "copper", "copper penny", "copper red", "copper rose", "coquelicot", "coral", "coral pink", "corn", "cornflower", "cornflower blue", "cornsilk", "cosmic latte", "cotton candy", "cream", "creme", "crimson", "crystal", "cultured", "custard", "cyan", "cyber yellow", "cyclamen", "dandelion", "deep cerise", "deep champagne", "deep chestnut", "deep lavender", "deep lilac", "deep orange", "deep pink", "deep rose", "deep saffron", "deep sky blue", "denim", "desert", "desert sand", "dirt", "dodger blue", "dogwood rose", "drab", "drab green", "duck egg blue", "dull blue", "dull brown", "dull green", "dull orange", "dull pink", "dull purple", "dull red", "dull teal", "dull yellow", "dusky pink", "dusky purple", "dusky rose", "dust", "dusty blue", "dusty green", "dusty lavender", "dusty orange", "dusty pink", "dusty purple", "dusty red", "dusty rose", "dusty teal", "dutch white", "earth", "earth yellow", "easter green", "easter purple", "ecru", "egg shell", "eggshell", "eggshell blue", "electric blue", "electric green", "electric indigo", "electric lime", "electric pink", "electric purple", "electric violet", "emerald", "erin", "eton blue", "faded blue", "faded green", "faded orange", "faded pink", "faded purple", "faded red", "faded yellow", "fallow", "fandango", "fandango pink", "fashion fuchsia", "fawn", "fern", "fiery rose", "fire engine red", "fire opal", "flame", "flat blue", "flat green", "flax", "flirt", "floral white", "fluorescent blue", "fluorescent green", "fluro green", "foam green", "fresh green", "frog green", "frostbite", "fuchsia", "fuchsia purple", "fuchsia rose", "fulvous", "gainsboro", "gamboge", "ghost white", "glaucous", "glossy grape", "go green", "gold", "golden", "golden brown", "golden poppy", "golden rod", "goldenrod", "golden yellow", "gold fusion", "granny smith apple", "grapefruit", "grass", "gray", "green", "green apple", "green lizard", "green sheen", "green teal", "grey", "grullo", "hansa yellow", "harlequin", "harvest gold", "hazel", "heather", "heat wave", "heliotrope", "heliotrope gray", "highlighter green", "hollywood cerise", "honeydew", "hospital green", "hot green", "hot magenta", "hot pink", "hot purple", "ice", "iceberg", "ice blue", "icky green", "icterine", "illuminating emerald", "inchworm", "international orange", "iris", "irresistible", "isabelline", "ivory", "jade", "jade green", "jasmine", "jonquil", "june bud", "jungle green", "kelly green", "keppel", "kermit green", "key lime", "khaki", "khaki green", "kiwi", "kiwi green", "kobi", "languid lavender", "laser lemon", "laurel green", "lava", "lavender", "lavender blue", "lavender blush", "lavender gray", "lavender pink", "lawn green", "leaf", "leaf green", "leafy green", "leather", "lemon", "lemon chiffon", "lemon curry", "lemon glacier", "lemon green", "lemon lime", "lemon meringue", "lemon yellow", "liberty", "lichen", "lilac", "lilac luster", "liliac", "lime", "lime green", "lime yellow", "linen", "lion", "lipstick", "lipstick red", "liseran purple", "little boy blue", "liver chestnut", "livid", "macaroni and cheese", "madder lake", "magenta", "magenta haze", "magic mint", "magnolia", "mahogany", "maize", "majorelle blue", "malachite", "manatee", "mandarin", "mango", "mango tango", "manilla", "mantis", "marigold", "maroon", "mauve", "mauvelous", "mauve taupe", "maximum blue", "maximum blue green", "maximum blue purple", "maximum green yellow", "maximum red", "maximum red purple", "maximum yellow", "maximum yellow red", "maya blue", "medium aquamarine", "medium blue", "medium candy apple red", "medium carmine", "medium champagne", "medium green", "medium grey", "medium orchid", "medium pink", "medium purple", "medium sea green", "medium slate blue", "medium spring green", "medium turquoise", "medium violet red", "mellow apricot", "mellow yellow", "melon", "metallic blue", "metallic gold", "metallic seaweed", "metallic sunburst", "mid blue", "mid green", "mikado yellow", "mimi pink", "mindaro", "minion yellow", "mint", "mint cream", "mint green", "minty green", "misty moss", "misty rose", "mocha", "mode beige", "morning blue", "moss", "moss green", "mountain meadow", "mountbatten pink", "muddy yellow", "mulberry", "mushroom", "mustard", "mustard brown", "mustard green", "mustard yellow", "muted blue", "muted green", "muted pink", "muted purple", "mystic", "mystic maroon", "nadeshiko pink", "naples yellow", "nasty green", "neon blue", "neon carrot", "neon fuchsia", "neon green", "neon pink", "neon purple", "neon red", "neon yellow", "new york pink", "nice blue", "nickel", "non photo blue", "nyanza", "ocean", "ocean blue", "ocean green", "ocher", "ochre", "ocre", "off blue", "off green", "off white", "off yellow", "old gold", "old lace", "old lavender", "old pink", "old rose", "old silver", "olive", "olive drab", "olive green", "olive yellow", "olivine", "opal", "opera mauve", "orange", "orange peel", "orangered", "orange soda", "orchid", "orchid pink", "outrageous orange", "pacific blue", "pale", "paolo veronese green", "papaya whip", "paradise pink", "parchment", "paris green", "pastel blue", "pastel green", "pastel orange", "pastel pink", "pastel purple", "pastel red", "pastel yellow", "pea", "peach", "peach puff", "peachy pink", "pea green", "pear", "pearly purple", "pea soup", "pea soup green", "periwinkle", "periwinkle blue", "permanent geranium lake", "perrywinkle", "persian green", "persian orange", "persian pink", "persian red", "persian rose", "persimmon", "pewter blue", "phlox", "pictorial carmine", "piggy pink", "pig pink", "pink", "pink flamingo", "pink lace", "pink lavender", "pink red", "pink sherbet", "pinky", "pinky purple", "pinky red", "pistachio", "platinum", "plum", "plump purple", "poison green", "polished pine", "pomp and power", "popstar", "powder blue", "powder pink", "primary blue", "process yellow", "psychedelic purple", "puce", "pumpkin", "pumpkin orange", "pure blue", "purple mountain majesty", "purple pizzazz", "purple plum", "purpureus", "putty", "queen blue", "queen pink", "quick silver", "radical red", "radioactive green", "rajah", "raspberry", "raspberry glace", "raspberry rose", "raw sienna", "razzle dazzle rose", "razzmatazz", "razzmic berry", "really light blue", "red", "red salsa", "redwood", "rhythm", "rich blue", "robin egg blue", "robin's egg", "robin's egg blue", "rocket metallic", "roman silver", "rosa", "rose", "rose bonbon", "rose dust", "rose madder", "rose pink", "rose pompadour", "rose quartz", "rose red", "rose taupe", "rose vale", "rosso corsa", "rosy brown", "rosy pink", "royal purple", "royal yellow", "ruber", "rubine red", "ruby", "rust", "rust orange", "rusty orange", "rusty red", "safety orange", "safety yellow", "saffron", "sage", "sage green", "salmon", "salmon pink", "sand", "sand brown", "sand dune", "sandstone", "sandy", "sandy brown", "sand yellow", "sapphire", "sapphire blue", "satin sheen gold", "scarlet", "schauss pink", "school bus yellow", "screamin' green", "sea", "sea blue", "seafoam", "seafoam blue", "seafoam green", "seashell", "seaweed", "seaweed green", "selective yellow", "shadow", "shadow blue", "shamrock", "shamrock green", "sheen green", "shimmering blush", "shiny shamrock", "shocking pink", "silver", "silver chalice", "silver pink", "silver sand", "sinopia", "sizzling red", "sizzling sunrise", "sky", "sky blue", "sky magenta", "slate blue", "slate gray", "slate green", "slime green", "smitten", "snow", "soft blue", "soft green", "soft pink", "soft purple", "sonic silver", "spearmint", "spring bud", "spring frost", "spring green", "squash", "star command blue", "steel", "steel blue", "steel grey", "steel pink", "steel teal", "stil de grain yellow", "stone", "stormy blue", "straw", "strawberry", "strawberry blonde", "strong blue", "strong pink", "sugar plum", "sunflower", "sunflower yellow", "sunglow", "sunny yellow", "sunray", "sunset", "sunshine yellow", "sun yellow", "super pink", "syracuse orange", "tan", "tan brown", "tangerine", "tango pink", "tan green", "tart orange", "taupe gray", "tawny", "tea", "tea green", "teal blue", "teal green", "tea rose", "telemagenta", "terracota", "terra cotta", "terracotta", "thistle", "thulian pink", "tickle me pink", "tiffany blue", "timberwolf", "titanium yellow", "tomato", "tomato red", "topaz", "toupe", "toxic green", "true blue", "tufts blue", "tumbleweed", "turquoise", "turquoise blue", "turquoise green", "turtle green", "tuscan", "tuscan tan", "tuscany", "ua red", "ultramarine blue", "ultra pink", "ultra red", "unbleached silk", "unmellow yellow", "uranian blue", "vanilla", "vanilla ice", "vegas gold", "venetian red", "verdigris", "vermilion", "vermillion", "veronica", "vibrant blue", "vibrant green", "vibrant purple", "violet", "violet blue", "violet pink", "violet red", "viridian green", "vivid blue", "vivid green", "vivid purple", "vivid sky blue", "vivid tangerine", "vivid violet", "volt", "warm blue", "warm grey", "warm pink", "warm purple", "washed out green", "water blue", "watermelon", "weird green", "wheat", "white", "wild blue yonder", "wild orchid", "wild strawberry", "wild watermelon", "windows blue", "windsor tan", "wintergreen", "wintergreen dream", "winter sky", "wisteria", "wood brown", "xanadu", "xanthic", "xanthous", "yellow", "yellow ochre", "yellow sunshine", "zomp"} return Public \ No newline at end of file