From fc08a81da3c179f527aa523d5aee11ad895f7606 Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Mon, 30 May 2022 16:51:08 +0100 Subject: [PATCH 01/20] locale fix, improvements - reorder lines in locale file for clarity - localise a few additional renderings - players in the cabin now see the large 'outside world minimap' rather than the small spontaneous camera - play sounds along with error messages - correctly print info message when player joins a game with _DEBUG=true --- locale/en/pirates.cfg | 415 ++++++++++++--------- maps/pirates/api_events.lua | 8 +- maps/pirates/api_on_tick.lua | 3 +- maps/pirates/common.lua | 13 +- maps/pirates/coredata.lua | 48 ++- maps/pirates/crew.lua | 12 +- maps/pirates/gui/common.lua | 2 +- maps/pirates/gui/crew.lua | 2 +- maps/pirates/gui/gui.lua | 4 +- maps/pirates/gui/minimap.lua | 12 +- maps/pirates/gui/runs.lua | 2 +- maps/pirates/highscore.lua | 4 +- maps/pirates/main.lua | 4 - maps/pirates/noise_pregen/noise_pregen.lua | 1 + maps/pirates/player_colors.lua | 1 + maps/pirates/progression.lua | 6 +- maps/pirates/quest.lua | 6 +- maps/pirates/structures/structures.lua | 1 + maps/pirates/surfaces/cabin.lua | 2 +- maps/pirates/surfaces/crowsnest.lua | 2 +- maps/pirates/surfaces/hold.lua | 52 +-- maps/pirates/surfaces/surfaces.lua | 6 +- 22 files changed, 344 insertions(+), 262 deletions(-) diff --git a/locale/en/pirates.cfg b/locale/en/pirates.cfg index 3006dd9e..302f12a6 100644 --- a/locale/en/pirates.cfg +++ b/locale/en/pirates.cfg @@ -28,111 +28,34 @@ softmod_info_body_promote_old2=patreon.com/thesixthroc softmod_info_body_clicky=Click to dismiss. + separator_1=, separator_2= and - - -market_event_sell=__1__ sold __2__ for __3__. -market_event_trade=__1__ traded away __2__ for __3__. -market_event_buy=__1__ bought __2__ for __3__. - -extra_time_at_sea=extra time at sea - -market_error_not_captain=Purchase error: You need to be a captain or officer to buy this. -market_error_not_captain_or_officer=Purchase error: You need to be a captain or officer to buy this. -market_error_maximum_loading_time=Purchase error: Reached the maximum allowed loading time. - -repaired_cannons=[font=heading-1]__1__ repaired the ship's cannons.[/font] - - -proposal_displayform=__1__ — __2__ -run_displayform= __2__ -crewmember_displayform=[color=__2__,__3__,__4__]__5__[/color] [color=1,1,1]__6__[/color] -capacity_tooltip=Capacity. Sets the maximum number of crewmembers allowed. -difficulty_tooltip=Difficulty.\n\nHigher difficulties have higher pollution and evo, higher biter damage, lower gold loot, but higher chest loot, along with small effects on the time per island, quest requirements, and silo position.\n\nDifficulty also determines the material the ship is made out of. -mode_tooltip=Mode. - -auto_undock_tooltip=The maximum time to stay at this location.\n\nOnce this time is reached, the boat undocks automatically. The captain can choose to leave earlier by pressing this button. -atsea_loading_tooltip=The next destination is loading. -leave_anytime_tooltip=The captain chooses when to undock the ship.\n\nThey can undock by pressing this button. - -resources_needed_tooltip_0=At the next destination, these resources will be needed in order to undock. -resources_needed_tooltip_1=At the next destination, these resources will be needed in order to undock early.\n\nFewer resources will be needed the longer you stay, eventually dropping to zero. -resources_needed_tooltip_2=The captain can undock early by clicking this button, but only if enough resources have been stored in the captain's cabin.\n\nCost on arrival: __1__\nLeaving now will spend: __2__ -resources_needed_tooltip_3=The captain can undock by clicking this button, but only if enough resources are stored in the captain's cabin. - -resources_needed_tooltip_0_rocketvariant=At the next destination, these resources will be needed in order to undock.\n\nThe silo represents a rocket launch rather than a resource. -resources_needed_tooltip_1_rocketvariant=At the next destination, these resources will be needed in order to undock early.\n\nFewer resources will be needed the longer you stay, eventually dropping to zero.\n\nThe silo represents a rocket launch rather than a resource. -resources_needed_tooltip_2_rocketvariant=The captain can undock early by clicking this button, but only if enough resources have been stored in the captain's cabin.\n\nThe silo represents a rocket launch rather than a resource.\n\nnCost on arrival: __1__\nLeaving now will spend: __2__ -resources_needed_tooltip_3_rocketvariant=The captain can undock by clicking this button, but only if enough resources are stored in the captain's cabin.\n\nThe silo represents a rocket launch rather than a resource. -fuel_tooltip=Stored fuel: __1__.\n\nTo store more, send it to the captain's cabin. If the ship runs out of fuel, the crew loses. - -loading_new_game=Loading new game... - -choose_chat_color=__1__ chose the color __2__ -randomize_chat_color=__1__'s color randomized to __2__ notify_whisper=[Whisper] notify_parrot=Parrot: -silo_destroyed=The silo was destroyed. - -granted_1=Granted: __1__. -granted_2=Granted: __1__, __2__. -granted_3=Granted: __1__, __2__, __3__. - -death_froze=__1__ froze to death. -death_pushed_into_water_by_cannon=__1__ was pushed into water by a cannon. - -approaching_destination=Approaching destination __1__, __2__. -loading_destination=Loading destination __1__, __2__. - -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. - -research_notification=__1__ researched. - -victory=Victory, on v__1__, __2__, capacity __3__. Playtime: [font=default-large-semibold]__4__[/font] since 1st island. Crewmembers: __5__. - -loss_cannon_destroyed=Game over — cannon destroyed. -loss_out_of_fuel=Game over — out of fuel. -loss_silo_destroyed=Game over — silo destroyed. -loss_silo_destroyed_before_necessary_launch=Game over — silo destroyed before a necessary launch. -loss_rest_of_message_long=Playtime: __1__ since 1st island. Crewmembers: __2__ -loss_rest_of_message_short=Playtime: __1__ since 1st island. - -error_build_undergrounds_on_boat=Build error: Undergrounds can't be built on the boat, due to conflicts with the boat movement code. -error_cant_carry_barrels=Recipe error: Barrels are too heavy to carry back to the ship. Try another way. -error_disembark=Now is no time to disembark. - -destroyed_all_nests=All biter bases destroyed — escape cost removed. - -recover_offline_player_items=Offline player's items recovered to cabin. - -warn_nearly_afk_captain=Note: If you go idle as captain for too long, the role passes to another crewmember. - -respawn_speed_bonus_removed=Respawn speed bonus removed. -respawn_speed_bonus_applied=Respawn speed bonus applied. - -find_map=__1__ found a map. Treasure location revealed. -find_ghost=__1__ found a ghost. - -steer_left=Steering portside... -steer_right=Steering starboard... - -upgrade_hold=[font=heading-1]__1__ upgraded the ship's hold.[/font] -upgrade_power=[font=heading-1]__1__ upgraded the ship's power.[/font] -upgrade_merchants=[font=heading-1]__1__ unlocked merchant ships at future islands.[/font] -upgrade_rockets=[font=heading-1]__1__ unlocked the sale of rockets at future quest markets.[/font] - -notify_difficulty_vote=__1__ voted [color=__2__,__3__,__4__]for difficulty __5__[/color] -notify_difficulty_change=Difficulty [color=__1__,__2__,__3__]changed to __4__[/color] -role_officer=Officer -role_officer_description=Assigned by the captain, officers can use the Captain's shop and access privileged chests. -role_captain=Captain -role_captain_description=Has executive power to undock the ship, purchase items, and various other special actions. When the game assigns a captain, it gives priority to those who have been playing the longest as a non-captain. + +location_displayname_first_1=Fledgling Vale +location_displayname_horseshoe_1=Shark Keys +location_displayname_horseshoe_2=Little Keys +location_displayname_horseshoe_3=Little Keys +location_displayname_maze_1=Bewildering Maze +location_displayname_radioactive_1=Abandoned Labs +location_displayname_red_desert_1=Sandworm Caldera +location_displayname_standard_1=Isle of Buried Treasure +location_displayname_standard_variant_1=Secluded Dells +location_displayname_swamp_1=Poisonous Fen +location_displayname_walkways_1=Frozen Pools +location_displayname_sea_1= +location_displayname_dock_1=Dock +location_displayname_lobby_1=Starting Dock + + + + parrot_hard_praise=Steel chests for steel players! Squawk! @@ -148,6 +71,134 @@ parrot_radioactive_tip_2=The biters don't care if we pollute here, but they evol parrot_maze_tip_1=Something seems wrong with our minimap. parrot_captain_first_time_in_cabin_hint=The captain can buy items in the cabin, such as rail signals to steer the ship. + + + +difficulty_easy=Easy +difficulty_normal=Normal +difficutly_hard=Hard +difficulty_nightmare=Nightmare + +notify_difficulty_vote=__1__ voted [color=__2__,__3__,__4__]for difficulty __5__[/color] +notify_difficulty_change=Difficulty [color=__1__,__2__,__3__]changed to __4__[/color] + + +daynightcycle_static=Static +daynightcycle_slowcyclic=Slow Cyclic +daynightcycle_cyclic=Cyclic +daynightcycle_fastcyclic=Fast Cyclic +daynightcycle_rapidcyclic=Rapid Cyclic + + + +ship_undocked_1=[font=heading-1]Ship undocked[/font] by captain. +ship_undocked_2=[font=heading-1]Ship auto-undocked[/font]. Return to ship. +ship_undocked_3=[font=heading-1]Ship auto-undocked[/font]. + +plank=__1__ planked __2__! +plank_error_invalid_player=Command error: Player is not a crewmember. +plank_error_self=Command error: Can't plank yourself. + +tax=The captain taxed __1__. +tax_error_nothing=Tax error: No coins or game-critical items found in crewmates' inventories or cursor stacks. + +respawn_speed_bonus_removed=Respawn speed bonus removed. +respawn_speed_bonus_applied=Respawn speed bonus applied. + +find_map=__1__ found a map. Treasure location revealed. +find_ghost=__1__ found a ghost. + +silo_destroyed=The silo was destroyed. + +research_notification=__1__ researched. + +destroyed_all_nests=All biter bases destroyed — escape cost removed. + +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__. + +approaching_destination=Approaching destination __1__, __2__. +loading_destination=Loading destination __1__, __2__. + +steer_left=Steering portside... +steer_right=Steering starboard... + + + + +error_undock_too_early=Undock error: Can't undock in the first 10 seconds. +error_undock_insufficient_resources=Undock error: Not enough resources stored in the captain's cabin. + +error_cabin_full=Sadly, there wasn't space in the cabin for all of your reward. + +error_build_undergrounds_on_boat=Build error: Undergrounds can't be built on the boat, due to conflicts with the boat movement code. +error_cant_carry_barrels=Recipe error: Barrels are too heavy to carry back to the ship. Try another way. +error_disembark=Now is no time to disembark. + + + + +quest_structure_market_1=Requires __1__x +quest_structure_market_2=(item components will be +quest_structure_market_3=refunded upon completion) + +quest_structure_furnace_1=Requires +quest_structure_furnace_2=(the furnace breaks +quest_structure_furnace_3=delivered items down +quest_structure_furnace_4=into components) + + + +market_description_upgrade_power=Upgrade the ship's passive power generators. +market_description_upgrade_hold=Purchase an extra hold. +market_description_upgrade_merchants=Unlock merchant ships on future islands. +market_description_upgrade_rockets=Unlock the sale of rockets at island markets. +market_description_purchase_class=Purchase the class __1__. +market_description_extra_time_at_sea=Relax at sea for an extra minute: Increase the next destination's loading time by 60 seconds. + + +market_event_sell=__1__ sold __2__ for __3__. +market_event_trade=__1__ traded away __2__ for __3__. +market_event_buy=__1__ bought __2__ for __3__. + +extra_time_at_sea=extra time at sea + +market_error_not_captain=Purchase error: You need to be a captain or officer to buy this. +market_error_not_captain_or_officer=Purchase error: You need to be a captain or officer to buy this. +market_error_maximum_loading_time=Purchase error: Reached the maximum allowed loading time. + +repaired_cannons=[font=heading-1]__1__ repaired the ship's cannons.[/font] +upgrade_hold=[font=heading-1]__1__ upgraded the ship's hold.[/font] +upgrade_power=[font=heading-1]__1__ upgraded the ship's power.[/font] +upgrade_merchants=[font=heading-1]__1__ unlocked merchant ships at future islands.[/font] +upgrade_rockets=[font=heading-1]__1__ unlocked the sale of rockets at future quest markets.[/font] + + + + +hold_connections_label_inactive=inactive +hold_connections_label_to=to -__1__ +hold_connections_label_from=from -__1__ + +surface_label_cabin=Captain's Cabin +surface_label_crowsnest=Crow's Nest +surface_label_hold_nth=Ship's Hold: -__1__ +surface_label_hold=Ship's Hold + + + + +role_officer=Officer +role_officer_description=Assigned by the captain, officers can use the Captain's shop and access privileged chests. +role_captain=Captain +role_captain_description=Has executive power to undock the ship, purchase items, and various other special actions. When the game assigns a captain, it gives priority to those who have been playing the longest as a non-captain. + class_deckhand=Deckhand class_deckhand_explanation=They move faster and generate ore for the cabin whilst onboard above deck. class_fisherman=Fisherman @@ -185,49 +236,13 @@ class_smoldering_explanation=They periodically convert wood into coal, if they h class_gourmet=Gourmet class_gourmet_explanation=They generate ore for the cabin by eating fish in fancy locations. + class_explanation=__1__: __2__ class_explanation_upgraded_class=__1__: An upgrade of __2__. __3__ class_purchase=__1__ bought the class __2__. ([font=scenario-message-dialog]__3__[/font]) class_upgrade=__1__ upgraded their class from __2__ to __3__ ([font=scenario-message-dialog]__4__[/font]). -crew_to_spectator=__1__ left the crew to become a spectator. -lobby_to_spectator=__1__ joined as a spectator. -lobby_to_spectator_2=__1__ left the lobby to spectate __2__. -spectator_to_lobby=__1__ stopped spectating and returned to the lobby. -lobby_to_crew=__1__ joined the crew. -lobby_to_crew_2=__1__ left the lobby to join __2__. -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_retracted=Proposal __1__ retracted. -proposal_abandoned=Proposal __1__ abandoned. - -crew_summon=Crew summoned. -crew_continue_on_freeplay=The run now continues on 'Freeplay'. -crew_disbanded=__1__ disbanded __2__ after __3__. - -ship_undocked_1=[font=heading-1]Ship undocked[/font] by captain. -ship_undocked_2=[font=heading-1]Ship auto-undocked[/font]. Return to ship. -ship_undocked_3=[font=heading-1]Ship auto-undocked[/font]. - -error_undock_too_early=Undock error: Can't undock in the first 10 seconds. -error_undock_insufficient_resources=Undock error: Not enough resources stored in the captain's cabin. - -error_cabin_full=Sadly, there wasn't space in the cabin for all of your reward. - -plank=__1__ planked __2__! -plank_error_invalid_player=Command error: Player is not a crewmember. -plank_error_self=Command error: Can't plank yourself. - -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]]. - -error_class_assign_redundant=Class error: You're already a __1__. -error_class_assign_unavailable_class=Class error: No spare class of that type is available. class_take_spare=__1__ took the spare class __2__. ([font=scenario-message-dialog]__3__[/font]) class_give_spare=A spare __1__ class with given to __2__. ([font=scenario-message-dialog]__3__[/font]) @@ -258,19 +273,95 @@ roles_unmake_officer_error_2=Command error: Player isn't a crewmember. roles_resign_officer=__1__ resigned from officer status. roles_notify_looking_for_captain=Looking for a suitable captain... -tax=The captain taxed __1__. -tax_error_nothing=No coins or game-critical found in crewmates' inventories or cursor stacks. +warn_nearly_afk_captain=Note: If you go idle as captain for too long, the role passes to another crewmember. + +error_class_assign_redundant=Class error: You're already a __1__. +error_class_assign_unavailable_class=Class error: No spare class of that type is available. -market_description_upgrade_power=Upgrade the ship's passive power generators. -market_description_upgrade_hold=Purchase an extra hold. -market_description_upgrade_merchants=Unlock merchant ships on future islands. -market_description_upgrade_rockets=Unlock the sale of rockets at island markets. -market_description_purchase_class=Purchase the class __1__. -market_description_extra_time_at_sea=Relax at sea for an extra minute: Increase the next destination's loading time by 60 seconds. +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]]. + +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. + + +choose_chat_color=__1__ chose the color __2__ +randomize_chat_color=__1__'s color randomized to __2__ + + +crew_to_spectator=__1__ left the crew to become a spectator. +lobby_to_spectator=__1__ joined as a spectator. +lobby_to_spectator_2=__1__ left the lobby to spectate __2__. +spectator_to_lobby=__1__ stopped spectating and returned to the lobby. +lobby_to_crew=__1__ joined the crew. +lobby_to_crew_2=__1__ left the lobby to join __2__. +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_retracted=Proposal __1__ retracted. +proposal_abandoned=Proposal __1__ abandoned. + +loading_new_game=Loading new game... + +crew_summon=Crew summoned. +crew_continue_on_freeplay=The run now continues on 'Freeplay'. +crew_disbanded=__1__ disbanded __2__ after __3__. + + +victory=Victory, on v__1__, __2__, capacity __3__. Playtime: [font=default-large-semibold]__4__[/font] since 1st island. Crewmembers: __5__. + +loss_cannon_destroyed=Game over — cannon destroyed. +loss_out_of_fuel=Game over — out of fuel. +loss_silo_destroyed=Game over — silo destroyed. +loss_silo_destroyed_before_necessary_launch=Game over — silo destroyed before a necessary launch. +loss_rest_of_message_long=Playtime: __1__ since 1st island. Crewmembers: __2__ +loss_rest_of_message_short=Playtime: __1__ since 1st island. + + + + + + + +highscore_heading_crew=Crew +highscore_heading_captain=Captain +highscore_heading_captain_tooltip=The player who spent the longest as captain between leagues 0 and 1000 (exclusive). +highscore_heading_completion=Completion +highscore_heading_leagues=Leagues +highscore_heading_version=Version +highscore_heading_difficulty=Difficulty +highscore_heading_peak_players=PeakPlayers + + +proposal_displayform=__1__ — __2__ +run_displayform= __2__ +crewmember_displayform=[color=__2__,__3__,__4__]__5__[/color] [color=1,1,1]__6__[/color] +capacity_tooltip=Capacity. Sets the maximum number of crewmembers allowed. +difficulty_tooltip=Difficulty.\n\nHigher difficulties have higher pollution and evo, higher biter damage, lower gold loot, but higher chest loot, along with small effects on the time per island, quest requirements, and silo position.\n\nDifficulty also determines the material the ship is made out of. +mode_tooltip=Mode. + +auto_undock_tooltip=The maximum time to stay at this location.\n\nOnce this time is reached, the boat undocks automatically. The captain can choose to leave earlier by pressing this button. +atsea_loading_tooltip=The next destination is loading. +leave_anytime_tooltip=The captain chooses when to undock the ship.\n\nThey can undock by pressing this button. + +resources_needed_tooltip_0=At the next destination, these resources will be needed in order to undock. +resources_needed_tooltip_1=At the next destination, these resources will be needed in order to undock early.\n\nFewer resources will be needed the longer you stay, eventually dropping to zero. +resources_needed_tooltip_2=The captain can undock early by clicking this button, but only if enough resources have been stored in the captain's cabin.\n\nCost on arrival: __1__\nLeaving now will spend: __2__ +resources_needed_tooltip_3=The captain can undock by clicking this button, but only if enough resources are stored in the captain's cabin. + +resources_needed_tooltip_0_rocketvariant=At the next destination, these resources will be needed in order to undock.\n\nThe silo represents a rocket launch rather than a resource. +resources_needed_tooltip_1_rocketvariant=At the next destination, these resources will be needed in order to undock early.\n\nFewer resources will be needed the longer you stay, eventually dropping to zero.\n\nThe silo represents a rocket launch rather than a resource. +resources_needed_tooltip_2_rocketvariant=The captain can undock early by clicking this button, but only if enough resources have been stored in the captain's cabin.\n\nThe silo represents a rocket launch rather than a resource.\n\nnCost on arrival: __1__\nLeaving now will spend: __2__ +resources_needed_tooltip_3_rocketvariant=The captain can undock by clicking this button, but only if enough resources are stored in the captain's cabin.\n\nThe silo represents a rocket launch rather than a resource. +fuel_tooltip=Stored fuel: __1__.\n\nTo store more, send it to the captain's cabin. If the ship runs out of fuel, the crew loses. + + gui_crew_window_buttons_quit_crew=Quit Crew gui_crew_window_buttons_quit_crew_tooltip=Return to the lobby. gui_crew_window_buttons_quit_spectators=Return to Lobby @@ -359,7 +450,7 @@ gui_runs_proposal_maker_propose=Propose gui_runs_proposal_maker_no_limit=No limit gui_runs_launch=Launch run -gui_runs_launch_error_1=Gather support from more pirates. +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. @@ -404,40 +495,4 @@ gui_questframe_nodamage=Island Quest: No Damage\n\nLaunch a rocket without the s gui_crew_tooltip_1=Your Crew\n\nPerform crew actions, such as selecting a class if any are available. gui_crew_tooltip_2=Your Crew\n\nYou're a free agent, so there's nothing to do here. -gui_progress_tooltip=Progress: __1__ leagues.\n\nTravel __2__ leagues to win the game. - - -location_displayname_first_1=Fledgling Vale -location_displayname_horseshoe_1=Shark Keys -location_displayname_horseshoe_2=Little Keys -location_displayname_horseshoe_3=Little Keys -location_displayname_maze_1=Bewildering Maze -location_displayname_radioactive_1=Abandoned Labs -location_displayname_red_desert_1=Sandworm Caldera -location_displayname_standard_1=Isle of Buried Treasure -location_displayname_standard_variant_1=Secluded Dells -location_displayname_swamp_1=Poisonous Fen -location_displayname_walkways_1=Frozen Pools -location_displayname_sea_1= -location_displayname_dock_1=Dock -location_displayname_lobby_1=Starting Dock - - -quest_structure_market_1=Requires __1__x -quest_structure_market_2=(item components will be -quest_structure_market_3=refunded upon completion) - -quest_structure_furnace_1=Requires -quest_structure_furnace_2=(the furnace breaks -quest_structure_furnace_3=delivered items down -quest_structure_furnace_4=into components) - - -highscore_heading_crew=Crew -highscore_heading_captain=Captain -highscore_heading_captain_tooltip=The player who spent the longest as captain between leagues 0 and 1000 (exclusive). -highscore_heading_completion=Completion -highscore_heading_leagues=Leagues -highscore_heading_version=Version -highscore_heading_difficulty=Difficulty -highscore_heading_peak_players=PeakPlayers \ No newline at end of file +gui_progress_tooltip=Progress: __1__ leagues.\n\nTravel __2__ leagues to win the game. \ No newline at end of file diff --git a/maps/pirates/api_events.lua b/maps/pirates/api_events.lua index b9ab959b..f067816b 100644 --- a/maps/pirates/api_events.lua +++ b/maps/pirates/api_events.lua @@ -285,9 +285,9 @@ local function damage_to_players_changes(event) -- damage_multiplier = damage_multiplier * 1.10 elseif class and class == Classes.enum.SAMURAI then damage_multiplier = damage_multiplier * (1 - Balance.samurai_resistance) - elseif class and class == Classes.enum.HATAMOTO then --lethal damage needs to be unaffected + elseif class and class == Classes.enum.HATAMOTO then damage_multiplier = damage_multiplier * (1 - Balance.hatamoto_resistance) - elseif class and class == Classes.enum.IRON_LEG then --lethal damage needs to be unaffected + elseif class and class == Classes.enum.IRON_LEG then if memory.class_auxiliary_data[player_index] and memory.class_auxiliary_data[player_index].iron_leg_active then damage_multiplier = damage_multiplier * (1 - Balance.iron_leg_resistance) end @@ -1182,6 +1182,10 @@ local function event_on_player_joined_game(event) if (not Server.get_current_time()) then -- don't run this on servers because I'd need to negotiate that with the rest of Comfy player.print('Support Pirate Ship scenario design at ko-fi.com/thesixthroc', {r=1, g=0.4, b=0.9}) end + + if _DEBUG then + game.print('Debug mode on. Use /go to get started') + end local crew_to_put_back_in = nil for _, mem in pairs(global_memory.crew_memories) do diff --git a/maps/pirates/api_on_tick.lua b/maps/pirates/api_on_tick.lua index 990a754e..02306570 100644 --- a/maps/pirates/api_on_tick.lua +++ b/maps/pirates/api_on_tick.lua @@ -1133,7 +1133,7 @@ end -- Delay.move_tasks_to_buffer() -- end -function Public.Kraken_Destroyed_Backup_check(tickinterval) -- a server became bugged when the kraken spawner entity disappeared but the kraken_die had not fired, and I'm not sure why, so this is a backup checker for that case +function Public.Kraken_Destroyed_Backup_check(tickinterval) -- a server became stuck when the kraken spawner entity disappeared but the kraken_die had not fired, and I'm not sure why, so this is a backup checker for that case local memory = Memory.get_crew_memory() local boat = memory.boat @@ -1160,7 +1160,6 @@ function Public.Kraken_Destroyed_Backup_check(tickinterval) -- a server became b end end end - end end end diff --git a/maps/pirates/common.lua b/maps/pirates/common.lua index 92c8b799..5fd5c34e 100644 --- a/maps/pirates/common.lua +++ b/maps/pirates/common.lua @@ -15,7 +15,6 @@ local _inspect = require 'utils.inspect'.inspect local Public = {} ---@TODO: decide on snakecase vs camelcase -- Public.active_crews_cap = 1 Public.activeCrewsCap = 2 Public.minimumCapacitySliderValue = 1 @@ -147,11 +146,13 @@ end function Public.notify_force_error(force, message, color_override) color_override = color_override or CoreData.colors.notify_error force.print({"", '>> ', message}, color_override) + force.play_sound{path = "utility/cannot_build"} end function Public.notify_player_error(player, message, color_override) color_override = color_override or CoreData.colors.notify_error player.print({"", '## ', {'pirates.notify_whisper'}, ' ', message}, color_override) + player.play_sound{path = "utility/cannot_build"} end function Public.notify_player_expected(player, message, color_override) @@ -220,6 +221,9 @@ end -- {20, 0, 1, false, 'flying-robot-frame', 20, 35}, -- } + + +--@TODO: Replace this old function with the newer code in raffle.lua function Public.raffle_from_processed_loot_data(processed_loot_data, how_many, game_completion_progress) local ret = {} @@ -406,6 +410,7 @@ end -- -- return Math.floor(surplus_evo*3*1000)/1000 -- end + function Public.set_biter_surplus_evo_modifiers() local memory = Memory.get_crew_memory() local enemy_force = memory.enemy_force @@ -788,8 +793,7 @@ function Public.spawner_count(surface) local memory = Memory.get_crew_memory() local spawners = surface.find_entities_filtered({type = 'unit-spawner', force = memory.enemy_force_name}) - local spawnerscount = #spawners or 0 - return spawnerscount + return #spawners or 0 end @@ -989,7 +993,7 @@ function Public.add_tiles_from_blueprint(tilesTable, bp_string, tile_name, offse end function Public.tile_positions_from_blueprint(bp_string, offset) - -- May '22 change: There seems to be a base game bug(?) which causes the tiles to be offset. We now correct for that. + -- May '22 change: There seems to be a base game bug(?) which causes the tiles to be offset. We now correct for that (with ` - (max_x - min_x)/2` and ` - (max_y - min_y)/2`). local bp_entity = game.surfaces['nauvis'].create_entity{name = 'item-on-ground', position = {x = 158.5, y = 158.5}, stack = 'blueprint'} bp_entity.stack.import_stack(bp_string) @@ -1034,6 +1038,7 @@ function Public.tile_positions_from_blueprint(bp_string, offset) end function Public.tile_positions_from_blueprint_arrayform(bp_string, offset) + -- does not include the above May '22 fix yet, so may give different results local bp_entity = game.surfaces['nauvis'].create_entity{name = 'item-on-ground', position = {x = 158.5, y = 158.5}, stack = 'blueprint'} bp_entity.stack.import_stack(bp_string) diff --git a/maps/pirates/coredata.lua b/maps/pirates/coredata.lua index 7cd1fee7..75d79b80 100644 --- a/maps/pirates/coredata.lua +++ b/maps/pirates/coredata.lua @@ -5,7 +5,7 @@ local _inspect = require 'utils.inspect'.inspect local Public = {} Public.scenario_id_name = 'pirates' -Public.version_string = '1.2.8' --will now try to stick to major.minor.patch versioning, to match factorio mod portal +Public.version_string = '1.2.9' --major.minor.patch versioning, to match factorio mod portal Public.blueprint_library_allowed = true Public.blueprint_importing_allowed = true @@ -107,25 +107,41 @@ Public.capacity_options = { {value = 999, icon = 'virtual-signal/signal-white', text = 'Inf.', text2 = '', text3 = 'Inf'}, -- {value = 64, icon = 'item/storage-tank', text = '64'}, } + Public.difficulty_options = { -- The difficulty values we currently offer --For the value of Easy difficulty, we are pulled in two directions: We wish to make the game comfy to play for those who haven't played it, but we also wish to represent the game mechanics faithfully so that Normal is not a crazy distance away. - {value = 0.6, icon = 'item/firearm-magazine', text = 'Easy', associated_color = {r = 50, g = 255, b = 50}}, - {value = 1.0, icon = 'item/piercing-rounds-magazine', text = 'Normal', associated_color = {r = 255, g = 255, b = 50}}, - {value = 1.4, icon = 'item/uranium-rounds-magazine', text = 'Hard', associated_color = {r = 255, g = 50, b = 50}}, - {value = 2.1, icon = 'item/atomic-bomb', text = 'Nightmare', associated_color = {r = 120, g = 35, b = 35}}, + {value = 0.6, icon = 'item/firearm-magazine', text = {'pirates.difficulty_easy'}, associated_color = {r = 50, g = 255, b = 50}}, + + {value = 1.0, icon = 'item/piercing-rounds-magazine', text = {'pirates.difficulty_normal'}, associated_color = {r = 255, g = 255, b = 50}}, + + {value = 1.45, icon = 'item/uranium-rounds-magazine', text = {'pirates.difficutly_hard'}, associated_color = {r = 255, g = 50, b = 50}}, + + {value = 2.1, icon = 'item/atomic-bomb', text = {'pirates.difficulty_nightmare'}, associated_color = {r = 170, g = 60, b = 60}}, } -function Public.get_difficulty_name_from_value(difficulty_value) - -- Functions will reference this when given a difficulty value and want to present a difficulty name to the player; just make it consistent with the above +function Public.get_difficulty_option_from_value(difficulty_value) + -- given a difficulty value, key in to the closesy entry in the above table. (organising things this way allows us to make changes to the 'value' keys in the above table) if difficulty_value <= 0.7 then - return 'Easy' + return 1 elseif difficulty_value < 1.2 then - return 'Normal' + return 2 elseif difficulty_value <= 2 then - return 'Hard' + return 3 else - return 'Nightmare' + return 4 + end +end +function Public.get_difficulty_option_informal_name_from_value(difficulty_value) + -- given a difficulty value, provide a simple named description of the difficulty + if difficulty_value <= 0.7 then + return 'easy' + elseif difficulty_value < 1.2 then + return 'normal' + elseif difficulty_value <= 2 then + return 'hard' + else + return 'nightmare' end end @@ -135,11 +151,11 @@ end -- } Public.daynightcycle_types = { - {displayname = 'Static', 0}, - {displayname = 'Slow Cyclic', ticksperday = 100000}, - {displayname = 'Cyclic', ticksperday = 80000}, - {displayname = 'Fast Cyclic', ticksperday = 60000}, - {displayname = 'Rapid Cyclic', ticksperday = 40000}, + {displayname = {'pirates.daynightcycle_static'}, 0}, + {displayname = {'pirates.daynightcycle_slowcyclic'}, ticksperday = 100000}, + {displayname = {'pirates.daynightcycle_cyclic'}, ticksperday = 80000}, + {displayname = {'pirates.daynightcycle_fastcyclic'}, ticksperday = 60000}, + {displayname = {'pirates.daynightcycle_rapidcyclic'}, ticksperday = 40000}, } Public.ore_types = { diff --git a/maps/pirates/crew.lua b/maps/pirates/crew.lua index d89d804a..87a582a4 100644 --- a/maps/pirates/crew.lua +++ b/maps/pirates/crew.lua @@ -32,13 +32,16 @@ Public.enum = enum function Public.difficulty_vote(player_index, difficulty_id) local memory = Memory.get_crew_memory() + if not (memory.difficulty_votes) then memory.difficulty_votes = {} end local player = game.players[player_index] if not (player and player.valid) then return end + if memory.difficulty_votes[player_index] and memory.difficulty_votes[player_index] == difficulty_id then return nil else + log(_inspect(CoreData.difficulty_options)) local option = CoreData.difficulty_options[difficulty_id] if not option then return end @@ -77,10 +80,11 @@ function Public.update_difficulty() local color = CoreData.difficulty_options[modal_id].associated_color local message1 = {'pirates.notify_difficulty_change', color.r, color.g, color.b, CoreData.difficulty_options[modal_id].text} + Common.notify_force(memory.force, message1) - local message2 = 'Difficulty changed to ' .. CoreData.difficulty_options[modal_id].text .. '.' - Server.to_discord_embed_raw(CoreData.comfy_emojis.kewl .. '[' .. memory.name .. '] ' .. message2) + -- local message2 = 'Difficulty changed to ' .. CoreData.difficulty_options[modal_id].text .. '.' + Server.to_discord_embed_raw({'', CoreData.comfy_emojis.kewl .. '[' .. memory.name .. '] ', message1}, true) memory.difficulty_option = modal_id memory.difficulty = CoreData.difficulty_options[modal_id].value @@ -151,7 +155,7 @@ function Public.try_win() memory.game_won = true -- memory.crew_disband_tick = game.tick + 1200 - Server.to_discord_embed_raw(CoreData.comfy_emojis.goldenobese .. '[' .. memory.name .. '] Victory, on v' .. CoreData.version_string .. ', ' .. CoreData.difficulty_options[memory.difficulty_option].text .. ', capacity ' .. CoreData.capacity_options[memory.capacity_option].text3 .. '. Playtime: ' .. speedrun_time_str .. ' since 1st island. Crewmembers: ' .. Public.get_crewmembers_printable_string()) + Server.to_discord_embed_raw({'', CoreData.comfy_emojis.goldenobese .. '[' .. memory.name .. '] Victory, on v' .. CoreData.version_string .. ', ', CoreData.difficulty_options[memory.difficulty_option].text, ', capacity ' .. CoreData.capacity_options[memory.capacity_option].text3 .. '. Playtime: ' .. speedrun_time_str .. ' since 1st island. Crewmembers: ' .. Public.get_crewmembers_printable_string()}, true) Common.notify_game({'','[' .. memory.name .. '] ',{'pirates.victory',CoreData.version_string, CoreData.difficulty_options[memory.difficulty_option].text, CoreData.capacity_options[memory.capacity_option].text3, speedrun_time_str, Public.get_crewmembers_printable_string()}}, CoreData.colors.notify_victory) @@ -875,7 +879,7 @@ function Public.reset_crew_and_enemy_force(id) crew_force.technologies['automobilism'].enabled = false - crew_force.technologies['toolbelt'].enabled = false --trying this. we don't actually want players to carry things manually, and in fact in a resource-tight scenario that's problematic + crew_force.technologies['toolbelt'].enabled = false --trying this. we don't actually want players to carry too many things manually, and in fact in a resource-tight scenario that's problematic -- note: many of these recipes are overwritten after tech researched!!!!!!! like pistol. check elsewhere in code diff --git a/maps/pirates/gui/common.lua b/maps/pirates/gui/common.lua index 2d32e05e..63428e00 100644 --- a/maps/pirates/gui/common.lua +++ b/maps/pirates/gui/common.lua @@ -68,7 +68,7 @@ function Public.new_window(player, name) flow.style.maximal_width = 270 flow.style.minimal_height = 80 flow.style.natural_height = 80 - flow.style.maximal_height = 700 + flow.style.maximal_height = 760 flow.style.padding = 10 return flow diff --git a/maps/pirates/gui/crew.lua b/maps/pirates/gui/crew.lua index aa8139e9..8d374455 100644 --- a/maps/pirates/gui/crew.lua +++ b/maps/pirates/gui/crew.lua @@ -574,7 +574,7 @@ function Public.click(event) end if string.sub(eventname, 1, 18) and string.sub(eventname, 1, 18) == 'difficulty_option_' then - Crew.difficulty_vote(player.index, string.sub(eventname, 19, -1)) + Crew.difficulty_vote(player.index, tonumber(string.sub(eventname, 19, -1))) return end diff --git a/maps/pirates/gui/gui.lua b/maps/pirates/gui/gui.lua index 90b3ee90..b55ec4ff 100644 --- a/maps/pirates/gui/gui.lua +++ b/maps/pirates/gui/gui.lua @@ -1080,7 +1080,7 @@ function Public.update_gui(player) flow1 = pirates_flow.minimap_piratebutton_frame if flow1 then - if bools.in_hold_bool then + if bools.in_hold_bool or bools.in_cabin_bool then flow1.visible = true else flow1.visible = false @@ -1127,7 +1127,7 @@ function Public.update_gui(player) flow1.style.minimal_height = 384 flow1.style.minimal_width = 384 flow1.position = {x=memory.overworldx,y=memory.overworldy} - elseif bools.in_cabin_bool or bools.in_crowsnest_bool then + elseif bools.in_crowsnest_bool then flow1.visible = true flow1.surface_index = game.surfaces[memory.boat.surface_name].index flow1.zoom = 0.09 diff --git a/maps/pirates/gui/minimap.lua b/maps/pirates/gui/minimap.lua index a32d5d82..a8f5d99a 100644 --- a/maps/pirates/gui/minimap.lua +++ b/maps/pirates/gui/minimap.lua @@ -201,8 +201,8 @@ function Public.click(event) elseif size == 440 then size = 560 elseif size == 560 then - size = 700 - elseif size == 700 then + size = 660 + elseif size == 660 then size = 280 else size = 340 @@ -227,14 +227,14 @@ local function on_player_changed_surface(event) local window = player.gui.screen[window_name .. '_piratewindow'] - local from_hold_bool = string.sub(game.surfaces[event.surface_index].name, 9, 12) == 'Hold' - local to_hold_bool = string.sub(player.surface.name, 9, 12) == 'Hold' + local from_hold_or_cabin_bool = string.sub(game.surfaces[event.surface_index].name, 9, 12) == 'Hold' or string.sub(game.surfaces[event.surface_index].name, 9, 13) == 'Cabin' + local to_hold_or_cabin_bool = string.sub(player.surface.name, 9, 12) == 'Hold' or string.sub(player.surface.name, 9, 13) == 'Cabin' - if from_hold_bool and (not to_hold_bool) then + if from_hold_or_cabin_bool and (not to_hold_or_cabin_bool) then if window then Public.toggle_window(player) end - elseif to_hold_bool and (not from_hold_bool) then + elseif to_hold_or_cabin_bool and (not from_hold_or_cabin_bool) then local global_memory = Memory.get_global_memory() local gui_memory = global_memory.player_gui_memories[player.index] diff --git a/maps/pirates/gui/runs.lua b/maps/pirates/gui/runs.lua index e72af423..2079e7f7 100644 --- a/maps/pirates/gui/runs.lua +++ b/maps/pirates/gui/runs.lua @@ -499,7 +499,7 @@ function Public.full_update(player) elseif mem.crewplayerindices then count = #mem.crewplayerindices end - wrappedmemories[#wrappedmemories + 1] = {'pirates.run_displayform', mem.id, mem.name .. ', ' .. CoreData.difficulty_options[mem.difficulty_option].text .. ', [item=light-armor]' .. count .. CoreData.capacity_options[mem.capacity_option].text2 .. ', [item=rail] ' .. (mem.overworldx or 0)} + wrappedmemories[#wrappedmemories + 1] = {'pirates.run_displayform', mem.id, {'', mem.name .. ', ', CoreData.difficulty_options[mem.difficulty_option].text, ', [item=light-armor]' .. count .. CoreData.capacity_options[mem.capacity_option].text2 .. ', [item=rail] ' .. (mem.overworldx or 0)}} -- wrappedmemories[#wrappedmemories + 1] = {'pirates.run_displayform', mem.id, mem.name, Utils.spritepath_to_richtext(CoreData.difficulty_options[mem.difficulty_option].icon), count, CoreData.capacity_options[mem.capacity_option].text2, ' [item=rail] ', mem.overworldx or 0} end GuiCommon.update_listbox(flow.ongoing_runs.body.ongoing_runs_listbox, wrappedmemories) diff --git a/maps/pirates/highscore.lua b/maps/pirates/highscore.lua index 5ed3514f..dcf0f968 100644 --- a/maps/pirates/highscore.lua +++ b/maps/pirates/highscore.lua @@ -496,7 +496,7 @@ local function score_gui(data) local n = entry.completion_time > 0 and Utils.time_mediumform(entry.completion_time or 0) or 'N/A' local l = entry.leagues_travelled > 0 and entry.leagues_travelled or '?' local v = entry.version and entry.version or '?' - local d = entry.difficulty > 0 and CoreData.get_difficulty_name_from_value(entry.difficulty) or '?' + local d = entry.difficulty > 0 and CoreData.difficulty_options[CoreData.get_difficulty_option_from_value(entry.difficulty)].text or '?' local c = entry.max_players > 0 and entry.max_players or '?' local line = { {caption = entry.name, color = special_color}, @@ -504,7 +504,7 @@ local function score_gui(data) {caption = tostring(n)}, {caption = tostring(l)}, {caption = tostring(v)}, - {caption = tostring(d)}, + {caption = d}, {caption = tostring(c)}, } local default_color = {r = 0.9, g = 0.9, b = 0.9} diff --git a/maps/pirates/main.lua b/maps/pirates/main.lua index 056d7563..6f18df0b 100644 --- a/maps/pirates/main.lua +++ b/maps/pirates/main.lua @@ -129,10 +129,6 @@ local function on_init() -- Delay.global_add(Delay.global_enum.PLACE_LOBBY_JETTY_AND_BOATS) Task.set_timeout_in_ticks(2, jetty_delayed, {}) - if _DEBUG then - game.print('Debug mode on. Use /go to get started (sometimes crashes)') - end - end local event = require 'utils.event' diff --git a/maps/pirates/noise_pregen/noise_pregen.lua b/maps/pirates/noise_pregen/noise_pregen.lua index a4a2ec01..dca38ef8 100644 --- a/maps/pirates/noise_pregen/noise_pregen.lua +++ b/maps/pirates/noise_pregen/noise_pregen.lua @@ -1,6 +1,7 @@ local Public = {} +-- no longer using the below code Public.encoding = [[!#$%&'()*+'-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ/^_`abcdefghijklmnopqrstuvwxyz{}|~]] Public.encoding_length = 91 Public.enc = {} diff --git a/maps/pirates/player_colors.lua b/maps/pirates/player_colors.lua index 175e7225..8045818d 100644 --- a/maps/pirates/player_colors.lua +++ b/maps/pirates/player_colors.lua @@ -1270,6 +1270,7 @@ 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 diff --git a/maps/pirates/progression.lua b/maps/pirates/progression.lua index 7d9fbc73..e15bb48a 100644 --- a/maps/pirates/progression.lua +++ b/maps/pirates/progression.lua @@ -538,14 +538,14 @@ function Public.go_from_currentdestination_to_sea() if memory.overworldx == 0 and memory.boat then - local difficulty_name = CoreData.get_difficulty_name_from_value(memory.difficulty) - if difficulty_name == CoreData.difficulty_options[#CoreData.difficulty_options].text then + local difficulty_name = CoreData.get_difficulty_option_informal_name_from_value(memory.difficulty) + if difficulty_name == 'nightmare' then Boats.upgrade_chests(boat, 'steel-chest') Hold.upgrade_chests(1, 'steel-chest') Crowsnest.upgrade_chests('steel-chest') Common.parrot_speak(memory.force, {'pirates.parrot_hard_praise'}) - elseif difficulty_name ~= CoreData.difficulty_options[1].text then + elseif difficulty_name ~= 'easy' then Boats.upgrade_chests(boat, 'iron-chest') Hold.upgrade_chests(1, 'iron-chest') Crowsnest.upgrade_chests('iron-chest') diff --git a/maps/pirates/quest.lua b/maps/pirates/quest.lua index 8345d3c3..48fea5eb 100644 --- a/maps/pirates/quest.lua +++ b/maps/pirates/quest.lua @@ -210,10 +210,10 @@ function Public.initialise_worms_quest() if Common.difficulty_scale() < 1 then needed = Math.max(1, needed - 3) end if Common.difficulty_scale() > 1 then needed = Math.max(1, needed + 2) end - local difficulty_name = CoreData.get_difficulty_name_from_value(Common.difficulty_scale()) - if difficulty_name == CoreData.difficulty_options[1].text then + local difficulty_name = CoreData.get_difficulty_option_informal_name_from_value(Common.difficulty_scale()) + if difficulty_name == 'easy' then needed = Math.max(1, needed - 3) - elseif difficulty_name ~= CoreData.difficulty_options[2].text then + elseif difficulty_name ~= 'normal' then needed = Math.max(1, needed + 2) end diff --git a/maps/pirates/structures/structures.lua b/maps/pirates/structures/structures.lua index 26a6e812..20ed32ce 100644 --- a/maps/pirates/structures/structures.lua +++ b/maps/pirates/structures/structures.lua @@ -7,6 +7,7 @@ local Loot = require 'maps.pirates.loot' -- local Utils = require 'maps.pirates.utils_local' local _inspect = require 'utils.inspect'.inspect +--@add stuff from new quest structures to this file? local Public = {} local enum = { BOATS = 'Boats', diff --git a/maps/pirates/surfaces/cabin.lua b/maps/pirates/surfaces/cabin.lua index 3c265849..4c338e4e 100644 --- a/maps/pirates/surfaces/cabin.lua +++ b/maps/pirates/surfaces/cabin.lua @@ -264,7 +264,7 @@ function Public.create_cabin_surface() end rendering.draw_text{ - text = 'Captain\'s Cabin', + text = {'pirates.surface_label_cabin'}, surface = surface, target = Public.Data.surfacename_rendering_pos, color = CoreData.colors.renderingtext_yellow, diff --git a/maps/pirates/surfaces/crowsnest.lua b/maps/pirates/surfaces/crowsnest.lua index 9ae4b31a..5da33a9c 100644 --- a/maps/pirates/surfaces/crowsnest.lua +++ b/maps/pirates/surfaces/crowsnest.lua @@ -250,7 +250,7 @@ function Public.create_crowsnest_surface() -- end memory.crowsnest_surfacename_rendering = rendering.draw_text{ - text = 'Crow\'s Nest', + text = {'pirates.surface_label_crowsnest'}, surface = surface, target = Public.Data.surfacename_rendering_pos, color = CoreData.colors.renderingtext_yellow, diff --git a/maps/pirates/surfaces/hold.lua b/maps/pirates/surfaces/hold.lua index 0ee9bbd6..1b5343e2 100644 --- a/maps/pirates/surfaces/hold.lua +++ b/maps/pirates/surfaces/hold.lua @@ -171,7 +171,7 @@ function Public.create_hold_surface(nth) scale = 1, font = 'default-game', alignment = alignment, - text = 'inactive', + text = {'pirates.hold_connections_label_inactive'}, } end @@ -209,10 +209,10 @@ function Public.create_hold_surface(nth) end if subtype == enum.SECONDARY then - local difficulty_name = CoreData.get_difficulty_name_from_value(memory.difficulty) - if difficulty_name == CoreData.difficulty_options[#CoreData.difficulty_options].text then + local difficulty_name = CoreData.get_difficulty_option_informal_name_from_value(memory.difficulty) + if difficulty_name == 'nightmare' then Public.upgrade_chests(nth, 'steel-chest') - elseif difficulty_name ~= CoreData.difficulty_options[1].text then + elseif difficulty_name ~= 'easy' then Public.upgrade_chests(nth, 'iron-chest') end @@ -221,7 +221,7 @@ function Public.create_hold_surface(nth) if nth==1 then memory.shiphold_rendering_1 = rendering.draw_text{ - text = 'Ship\'s Hold', + text = {'pirates.surface_label_hold'}, surface = surface, target = Public.Data.surfacename_rendering_pos, color = CoreData.colors.renderingtext_yellow, @@ -236,7 +236,7 @@ function Public.create_hold_surface(nth) end end rendering.draw_text{ - text = 'Ship\'s Hold: -' .. nth, + text = {'pirates.surface_label_hold_nth', nth}, surface = surface, target = Public.Data.surfacename_rendering_pos, color = CoreData.colors.renderingtext_yellow, @@ -339,10 +339,10 @@ function Public.nth_hold_connect_linked_belts(nth) --assumes both are in standar b1.connect_linked_belts(b2) end - rendering.set_text(boat.hold_helper_renderings[nth][3], 'from -' .. nth-1) - rendering.set_text(boat.hold_helper_renderings[nth-1][3], 'to -' .. nth) - rendering.set_text(boat.hold_helper_renderings[nth][4], 'from -' .. nth-1) - rendering.set_text(boat.hold_helper_renderings[nth-1][4], 'to -' .. nth) + rendering.set_text(boat.hold_helper_renderings[nth][3], {'pirates.hold_connections_label_from', nth-1}) + rendering.set_text(boat.hold_helper_renderings[nth-1][3], {'pirates.hold_connections_label_to', nth}) + rendering.set_text(boat.hold_helper_renderings[nth][4], {'pirates.hold_connections_label_from', nth-1}) + rendering.set_text(boat.hold_helper_renderings[nth-1][4], {'pirates.hold_connections_label_to', nth}) else connections = { {5,5}, @@ -356,10 +356,10 @@ function Public.nth_hold_connect_linked_belts(nth) --assumes both are in standar b1.connect_linked_belts(b2) end - rendering.set_text(boat.hold_helper_renderings[nth][3], 'from -' .. nth-1) - rendering.set_text(boat.hold_helper_renderings[nth-1][3], 'to -' .. nth) - rendering.set_text(boat.hold_helper_renderings[nth][4], 'from -' .. nth-1) - rendering.set_text(boat.hold_helper_renderings[nth-1][4], 'to -' .. nth) + rendering.set_text(boat.hold_helper_renderings[nth][3], {'pirates.hold_connections_label_from', nth-1}) + rendering.set_text(boat.hold_helper_renderings[nth-1][3], {'pirates.hold_connections_label_to', nth}) + rendering.set_text(boat.hold_helper_renderings[nth][4], {'pirates.hold_connections_label_from', nth-1}) + rendering.set_text(boat.hold_helper_renderings[nth-1][4], {'pirates.hold_connections_label_to', nth}) end connections = { {1,9}, @@ -373,10 +373,10 @@ function Public.nth_hold_connect_linked_belts(nth) --assumes both are in standar b1.connect_linked_belts(b2) end - rendering.set_text(boat.hold_helper_renderings[nth][1], 'to -' .. 1) - rendering.set_text(boat.hold_helper_renderings[1][1], 'from -' .. nth) - rendering.set_text(boat.hold_helper_renderings[nth][2], 'to -' .. 1) - rendering.set_text(boat.hold_helper_renderings[1][2], 'from -' .. nth) + rendering.set_text(boat.hold_helper_renderings[nth][1], {'pirates.hold_connections_label_to', 1}) + rendering.set_text(boat.hold_helper_renderings[1][1], {'pirates.hold_connections_label_from', nth}) + rendering.set_text(boat.hold_helper_renderings[nth][2], {'pirates.hold_connections_label_to', 1}) + rendering.set_text(boat.hold_helper_renderings[1][2], {'pirates.hold_connections_label_from', nth}) else connections = { {1,1}, @@ -390,10 +390,10 @@ function Public.nth_hold_connect_linked_belts(nth) --assumes both are in standar b1.connect_linked_belts(b2) end - rendering.set_text(boat.hold_helper_renderings[nth][1], 'from -' .. nth-1) - rendering.set_text(boat.hold_helper_renderings[nth-1][1], 'to -' .. nth) - rendering.set_text(boat.hold_helper_renderings[nth][2], 'from -' .. nth-1) - rendering.set_text(boat.hold_helper_renderings[nth-1][2], 'to -' .. nth) + rendering.set_text(boat.hold_helper_renderings[nth][1], {'pirates.hold_connections_label_from', nth-1}) + rendering.set_text(boat.hold_helper_renderings[nth-1][1], {'pirates.hold_connections_label_to', nth}) + rendering.set_text(boat.hold_helper_renderings[nth][2], {'pirates.hold_connections_label_from', nth-1}) + rendering.set_text(boat.hold_helper_renderings[nth-1][2], {'pirates.hold_connections_label_to', nth}) connections = { {5,9}, @@ -407,10 +407,10 @@ function Public.nth_hold_connect_linked_belts(nth) --assumes both are in standar b1.connect_linked_belts(b2) end - rendering.set_text(boat.hold_helper_renderings[nth][3], 'to -' .. 1) - rendering.set_text(boat.hold_helper_renderings[1][1], 'from -' .. nth) - rendering.set_text(boat.hold_helper_renderings[nth][4], 'to -' .. 1) - rendering.set_text(boat.hold_helper_renderings[1][2], 'from -' .. nth) + rendering.set_text(boat.hold_helper_renderings[nth][3], {'pirates.hold_connections_label_to', 1}) + rendering.set_text(boat.hold_helper_renderings[1][1], {'pirates.hold_connections_label_from', nth}) + rendering.set_text(boat.hold_helper_renderings[nth][4], {'pirates.hold_connections_label_to', 1}) + rendering.set_text(boat.hold_helper_renderings[1][2], {'pirates.hold_connections_label_from', nth}) end end end diff --git a/maps/pirates/surfaces/surfaces.lua b/maps/pirates/surfaces/surfaces.lua index 8e4c0379..f993cf42 100644 --- a/maps/pirates/surfaces/surfaces.lua +++ b/maps/pirates/surfaces/surfaces.lua @@ -169,14 +169,14 @@ function Public.destination_on_collide(destination) local playercount = Common.activecrewcount() local max_evo - local difficulty_name = CoreData.get_difficulty_name_from_value(Common.difficulty_scale()) - if difficulty_name == CoreData.difficulty_options[1].text then + local difficulty_name = CoreData.get_difficulty_option_informal_name_from_value(Common.difficulty_scale()) + if difficulty_name == 'easy' then if memory.overworldx/40 < 20 then max_evo = 0.9 - (20 - memory.overworldx/40) * 1/100 else max_evo = 0.91 + (memory.overworldx/40 - 20) * 0.25/100 end - elseif difficulty_name == CoreData.difficulty_options[2].text then + elseif difficulty_name == 'normal' then if memory.overworldx/40 < 15 then max_evo = 0.9 - (15 - memory.overworldx/40) * 0.5/100 else From e1faf0a5d8a051e372a87c2e789d6deb44f9f477 Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Mon, 30 May 2022 16:52:55 +0100 Subject: [PATCH 02/20] luacheck --- maps/pirates/api_events.lua | 2 +- maps/pirates/crew.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/maps/pirates/api_events.lua b/maps/pirates/api_events.lua index f067816b..c1f91c46 100644 --- a/maps/pirates/api_events.lua +++ b/maps/pirates/api_events.lua @@ -1182,7 +1182,7 @@ local function event_on_player_joined_game(event) if (not Server.get_current_time()) then -- don't run this on servers because I'd need to negotiate that with the rest of Comfy player.print('Support Pirate Ship scenario design at ko-fi.com/thesixthroc', {r=1, g=0.4, b=0.9}) end - + if _DEBUG then game.print('Debug mode on. Use /go to get started') end diff --git a/maps/pirates/crew.lua b/maps/pirates/crew.lua index 87a582a4..c616278b 100644 --- a/maps/pirates/crew.lua +++ b/maps/pirates/crew.lua @@ -80,7 +80,7 @@ function Public.update_difficulty() local color = CoreData.difficulty_options[modal_id].associated_color local message1 = {'pirates.notify_difficulty_change', color.r, color.g, color.b, CoreData.difficulty_options[modal_id].text} - + Common.notify_force(memory.force, message1) -- local message2 = 'Difficulty changed to ' .. CoreData.difficulty_options[modal_id].text .. '.' From 2f80f42c051d0de4a799143e3e1ce1fc8035e271 Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Mon, 30 May 2022 17:33:49 +0100 Subject: [PATCH 03/20] helpful rearrangement of zh-CN locale to the new ordering --- locale/zh-CN/pirates.cfg | 414 ++++++++++++++++++++++----------------- 1 file changed, 235 insertions(+), 179 deletions(-) diff --git a/locale/zh-CN/pirates.cfg b/locale/zh-CN/pirates.cfg index edc94706..cb715e40 100644 --- a/locale/zh-CN/pirates.cfg +++ b/locale/zh-CN/pirates.cfg @@ -28,111 +28,34 @@ softmod_info_body_promote_old2=patreon.com/thesixthroc softmod_info_body_clicky=点击关闭。 + separator_1=, separator_2= 和 - - -market_event_sell=__1__ 以 __2__ 的价格售出 __3__. -market_event_trade=__1__ 用 __2__ 换取 __3__. -market_event_buy=__1__ 以 __2__ 的价格购买 __3__. - -extra_time_at_sea=海上加时 - -market_error_not_captain=购买错误:您需要成为船长或军官才能购买。 -market_error_not_captain_or_officer=购买错误:您需要成为船长或军官才能购买。 -market_error_maximum_loading_time=P购买错误:已达到最大允许加载时间。 - -repaired_cannons=[font=heading-1]__1__ 修复了船上的大炮。[/font] - - -proposal_displayform=__1__ — __2__ -run_displayform= __2__ -crewmember_displayform=[color=__2__,__3__,__4__]__5__[/color] [color=1,1,1]__6__[/color] -capacity_tooltip=容量。设置允许的最大乘员人数。 -difficulty_tooltip=难度。\n\n更高的难度有更高的污染和进化,更多的虫子,更少的金币战利品,但更高的宝箱战利品,并且对每个岛屿的时间、任务要求和发射井位置有些许影响。\n\n难度还决定了造船的材料。 -mode_tooltip=模式. - -auto_undock_tooltip=在这个位置停留的最长时间。\n\n一旦达到这个时间,船就会自动离岸。船长可以通过按此按钮选择提前离开。 -atsea_loading_tooltip=下一个目的地正在加载。 -leave_anytime_tooltip=船长选择何时启航。\n\n他们可以通过按此按钮离开船坞。 - -resources_needed_tooltip_0=在下一个目的地,需要这些资源才能出坞。 -resources_needed_tooltip_1=在下一个目的地,需要这些资源才能提前出坞。\n\n您停留的时间越长,所需的资源就越少,最终降至零。 -resources_needed_tooltip_2=船长可以通过单击此按钮提前撤离,但前提是船长舱内储存了足够的资源。\n\n到达成本: __1__\n现在离开将花费: __2__ -resources_needed_tooltip_3=船长可以通过单击此按钮来提前出坞,但前提是船长舱内储存了足够的资源。 - -resources_needed_tooltip_0_rocketvariant=下一个目的地,需要这些资源才能出坞。\n\n发射井代表火箭发射而不是资源。 -resources_needed_tooltip_1_rocketvariant=在下一个目的地,将需要这些资源以便提前撤离。\n\n您停留的时间越长,所需的资源就越少,最终降至零。\n\n发射井代表火箭发射而不是资源。 -resources_needed_tooltip_2_rocketvariant=船长可以通过单击此按钮提前撤离,但前提是船长舱内已储存了足够的资源。\n\n发射井代表火箭发射而不是资源。\n\nn到达成本: __1__\n现在离开将花费: __2__ -resources_needed_tooltip_3_rocketvariant=T船长可以通过单击此按钮提前撤离,但前提是船长舱内已储存了足够的资源。\n\n发射井代表火箭发射而不是资源。 -fuel_tooltip=储存的燃料: __1__.\n\n要储存更多,请将其送到船长舱。如果船用完燃料,团队就会失败。 - -loading_new_game=正在加载新游戏... - -choose_chat_color=__1__ 选择了颜色 __2__ -randomize_chat_color=__1__的颜色随机成了 __2__ notify_whisper=[私信] notify_parrot=鹦鹉: -silo_destroyed=发射井被摧毁。 - -granted_1=赠予: __1__. -granted_2=赠予: __1__, __2__. -granted_3=赠予: __1__, __2__, __3__. - -death_froze=__1__ 被冻死了。 -death_pushed_into_water_by_cannon=__1__ 被重炮推入了水中。 - -approaching_destination=接近目的地 __1__, __2__. -loading_destination=加载目的地 __1__, __2__. - -goto_oldest_crew_with_large_capacity=这台服务器上有多个团队。您已被安置在容量最大,创建最早的团队中。 -goto_oldest_crew=这台服务器上有多个团队。您已被安置在创建最早的团队中。 - -research_notification=__1__ 研究完成。 - -victory=胜利, 在 v__1__, __2__, 容量 __3__. 游戏时间: [font=default-large-semibold]__4__[/font] 从第一个岛开始。 船员: __5__. - -loss_cannon_destroyed=游戏结束 — 重炮被摧毁。 -loss_out_of_fuel=游戏结束 — 燃料耗尽 -loss_silo_destroyed=游戏结束 — 发射井被摧毁 -loss_silo_destroyed_before_necessary_launch=游戏结束 — 发射井在必要的发射前被摧毁。 -loss_rest_of_message_long=游戏时间: __1__ 自从第一个岛开始。船员: __2__ -loss_rest_of_message_short=游戏时间: __1__ 自从第一个岛开始。 - -error_build_undergrounds_on_boat=建造错误:由于与船移动代码冲突,无法在船上建造地下。 -error_cant_carry_barrels=配方错误:桶太重,无法运回船上。尝试另一种方式。 -error_disembark=现在不是下船的时间。 - -destroyed_all_nests=所有的虫巢被摧毁——逃生费用被移除。 - -recover_offline_player_items=离线玩家的物品被回收到机舱。 - -warn_nearly_afk_captain=注意:如果您作为船长闲置的时间过长,该职业会转移给其他船员。 - -respawn_speed_bonus_removed=重生速度加成结束。 -respawn_speed_bonus_applied=重生速度加成生效。 - -find_map=__1__ 找到了一张地图。宝藏位置已揭晓。 -find_ghost=__1__ 发现了一个幽灵。 - -steer_left=左舷转向... -steer_right=转向右舷... - -upgrade_hold=[font=heading-1]__1__ 升级了船舱.[/font] -upgrade_power=[font=heading-1]__1__ 升级了船的动力。[/font] -upgrade_merchants=[font=heading-1]__1__ 解锁未来岛屿上的商船。[/font] -upgrade_rockets=[font=heading-1]__1__ 解锁了未来任务市场的火箭销售。[/font] - -notify_difficulty_vote=__1__ 投了 [color=__2__,__3__,__4__]难度 __5__[/color] -notify_difficulty_change=难度 [color=__1__,__2__,__3__]更改为 __4__[/color] -role_officer=军官 -role_officer_description=由船长任命,军官可以使用船长的商店并访问特权宝箱。 -role_captain=船长 -role_captain_description=拥有驶出船坞、购买物品和其他各种特殊行动的执行权。游戏在指定队长时,会优先考虑那些作为非队长出场时间最长的人。 + +location_displayname_first_1=羽翼未丰的山谷 +location_displayname_horseshoe_1=鲨鱼钥匙 +location_displayname_horseshoe_2=小钥匙 +location_displayname_horseshoe_3=小钥匙 +location_displayname_maze_1=迷惑迷宫 +location_displayname_radioactive_1=废弃实验室 +location_displayname_red_desert_1=沙虫火山口 +location_displayname_standard_1=埋藏宝藏岛 +location_displayname_standard_variant_1=僻静的戴尔 +location_displayname_swamp_1=毒沼泽 +location_displayname_walkways_1=冰冻水池 +location_displayname_sea_1= +location_displayname_dock_1=码头 +location_displayname_lobby_1=初始码头 + + + + parrot_hard_praise=钢铁玩家的钢铁箱子!嘎嘎! @@ -148,6 +71,134 @@ parrot_radioactive_tip_2=虫子不在乎我们是否污染这里,但污染使 parrot_maze_tip_1=我们的小地图似乎有问题。 parrot_captain_first_time_in_cabin_hint=船长可以在船舱内购买物品,例如用于驾驶船只的铁路信号灯。 + + + +difficulty_easy=Easy +difficulty_normal=Normal +difficutly_hard=Hard +difficulty_nightmare=Nightmare + +notify_difficulty_vote=__1__ 投了 [color=__2__,__3__,__4__]难度 __5__[/color] +notify_difficulty_change=难度 [color=__1__,__2__,__3__]更改为 __4__[/color] + + +daynightcycle_static=Static +daynightcycle_slowcyclic=Slow Cyclic +daynightcycle_cyclic=Cyclic +daynightcycle_fastcyclic=Fast Cyclic +daynightcycle_rapidcyclic=Rapid Cyclic + + + +ship_undocked_1=[font=heading-1]船舶出坞[/font] 由船长决定 +ship_undocked_2=[font=heading-1]船舶自动出坞[/font]。速回。 +ship_undocked_3=[font=heading-1]船舶自动出坞[/font]。 + +plank=跳甲板 (放逐为观众) +plank_error_invalid_player=命令错误:玩家不是船员。 +plank_error_self=命令错误:不能让自己跳甲板。 + +tax=征税 +tax_error_nothing=在队友的物品栏或光标堆栈中找不到硬币或游戏关键。 + +respawn_speed_bonus_removed=重生速度加成结束。 +respawn_speed_bonus_applied=重生速度加成生效。 + +find_map=__1__ 找到了一张地图。宝藏位置已揭晓。 +find_ghost=__1__ 发现了一个幽灵。 + +silo_destroyed=游戏结束 — 发射井被摧毁 + +research_notification=__1__ 研究完成。 + +destroyed_all_nests=所有的虫巢被摧毁——逃生费用被移除。 + +recover_offline_player_items=离线玩家的物品被回收到机舱。 + +death_froze=__1__ 被冻死了。 +death_pushed_into_water_by_cannon=__1__ 被重炮推入了水中。 + +granted_1=赠予: __1__. +granted_2=赠予: __1__, __2__. +granted_3=赠予: __1__, __2__, __3__. + +approaching_destination=接近目的地 __1__, __2__. +loading_destination=加载目的地 __1__, __2__. + +steer_left=左舷转向... +steer_right=转向右舷... + + + + +error_undock_too_early=出坞错误:前 10 秒内无法出坞。 +error_undock_insufficient_resources=出坞错误: 船长舱没有足够的资源存储。 + +error_cabin_full=很遗憾,机舱内没有空间来盛放您所有的奖励。 + +error_build_undergrounds_on_boat=建造错误:由于与船移动代码冲突,无法在船上建造地下。 +error_cant_carry_barrels=配方错误:桶太重,无法运回船上。尝试另一种方式。 +error_disembark=现在不是下船的时间。 + + + + +quest_structure_market_1=需要__1__x +quest_structure_market_2=(物品组件将是 +quest_structure_market_3=完成后退款) + +quest_structure_furnace_1=需要 +quest_structure_furnace_2=(熔炉可以将 +quest_structure_furnace_3=已交付物品 +quest_structure_furnace_4=拆分成组件) + + + +market_description_upgrade_power=升级船舶的被动发电机。 +market_description_upgrade_hold=购买额外的船舱。 +market_description_upgrade_merchants=解锁未来岛屿上的商船。 +market_description_upgrade_rockets=在岛屿市场解锁火箭销售。 +market_description_purchase_class=购买职业 __1__。 +market_description_extra_time_at_sea=在海上多放松一分钟:将下一个目的地的加载时间增加 60 秒。 + + +market_event_sell=__1__ 以 __2__ 的价格售出 __3__. +market_event_trade=__1__ 用 __2__ 换取 __3__. +market_event_buy=__1__ 以 __2__ 的价格购买 __3__. + +extra_time_at_sea=在海上多放松一分钟:将下一个目的地的加载时间增加 60 秒。 + +market_error_not_captain=购买错误:您需要成为船长或军官才能购买。 +market_error_not_captain_or_officer=购买错误:您需要成为船长或军官才能购买。 +market_error_maximum_loading_time=P购买错误:已达到最大允许加载时间。 + +repaired_cannons=[font=heading-1]__1__ 修复了船上的大炮。[/font] +upgrade_hold=购买额外的船舱。 +upgrade_power=升级船舶的被动发电机。 +upgrade_merchants=解锁未来岛屿上的商船。 +upgrade_rockets=在岛屿市场解锁火箭销售。 + + + + +hold_connections_label_inactive=inactive +hold_connections_label_to=to -__1__ +hold_connections_label_from=from -__1__ + +surface_label_cabin=Captain's Cabin +surface_label_crowsnest=Crow's Nest +surface_label_hold_nth=Ship's Hold: -__1__ +surface_label_hold=Ship's Hold + + + + +role_officer=军官 +role_officer_description=由船长任命,军官可以使用船长的商店并访问特权宝箱。 +role_captain=船长 +role_captain_description=拥有驶出船坞、购买物品和其他各种特殊行动的执行权。游戏在指定队长时,会优先考虑那些作为非队长出场时间最长的人。 + class_deckhand=水手 class_deckhand_explanation=他们在甲板上的时候移动得更快并且为船舱生成矿石。 class_fisherman=渔夫 @@ -192,43 +243,6 @@ class_explanation_upgraded_class=__1__: 的升级 __2__. __3__ class_purchase=__1__ 购买了职业 __2__. ([font=scenario-message-dialog]__3__[/font]) class_upgrade=__1__ 将他们的职业从 __2__ 升级到了 __3__ ([font=scenario-message-dialog]__4__[/font]). -crew_to_spectator=__1__ 离开团队成为观众。 -lobby_to_spectator=__1__ 作为旁观者加入。 -lobby_to_spectator_2=__1__ 离开了大厅观看 __2__. -spectator_to_lobby=__1__ 停止观看并返回大厅。 -lobby_to_crew=__1__ 加入团队 -lobby_to_crew_2=__1__ 离开大厅加入 __2__. -crew_leave=__1__离开了团队。 - - -crew_launch=[__1__] 发射 -crew_disband=[__1__] 在 __2__后解散。 -proposal_propose=__1__ 提议运行 __2__ [Capacity __3__]。 -proposal_retracted=提案 __1__ 撤回 -proposal_abandoned=提案 __1__ 废除 - -crew_summon=船员召唤。 -crew_continue_on_freeplay=现在继续在“Freeplay”上运行。 -crew_disbanded=__1__ 在 __3__ 后解散 __2__ 。 - -ship_undocked_1=[font=heading-1]船舶出坞[/font] 由船长决定 -ship_undocked_2=[font=heading-1]船舶自动出坞[/font]。速回。 -ship_undocked_3=[font=heading-1]船舶自动出坞[/font]。 - -error_undock_too_early=出坞错误:前 10 秒内无法出坞。 -error_undock_insufficient_resources=出坞错误: 船长舱没有足够的资源存储。 - -error_cabin_full=很遗憾,机舱内没有空间来盛放您所有的奖励。 - -plank=__1__ 命令 __2__跳甲板! -plank_error_invalid_player=命令错误:玩家不是船员。 -plank_error_self=命令错误:不能让自己跳甲板。 - -personal_join_string_1=你已加入团队 '__1__' [容量 __2__]. -personal_join_string_2=你已加入团队 '__1__' [容量 __2__, 难度 [color=__3__,__4__,__5__] __6__[/color]]. - -error_class_assign_redundant=职业错误: 你已经是 __1__了。 -error_class_assign_unavailable_class=职业错误:没有空闲职位 class_take_spare=__1__ 获得了空闲职业 __2__. ([font=scenario-message-dialog]__3__[/font]) class_give_spare=一个空闲的 __1__ 职业授予 __2__。 ([font=scenario-message-dialog]__3__[/font]) @@ -259,16 +273,93 @@ roles_unmake_officer_error_2=命令错误:玩家不是船员。 roles_resign_officer=__1__ 辞去了军官。 roles_notify_looking_for_captain=正在寻找合适的船长... -tax=船长征税 __1__。 -tax_error_nothing=在队友的物品栏或光标堆栈中找不到硬币或游戏关键。 +warn_nearly_afk_captain=注意:如果您作为船长闲置的时间过长,该职业会转移给其他船员。 + +error_class_assign_redundant=职业错误: 你已经是 __1__了。 +error_class_assign_unavailable_class=职业错误:没有空闲职位 -market_description_upgrade_power=升级船舶的被动发电机。 -market_description_upgrade_hold=购买额外的船舱。 -market_description_upgrade_merchants=解锁未来岛屿上的商船。 -market_description_upgrade_rockets=在岛屿市场解锁火箭销售。 -market_description_purchase_class=购买职业 __1__。 -market_description_extra_time_at_sea=在海上多放松一分钟:将下一个目的地的加载时间增加 60 秒。 + + + +personal_join_string_1=你已加入团队 '__1__' [容量 __2__]. +personal_join_string_2=你已加入团队 '__1__' [容量 __2__, 难度 [color=__3__,__4__,__5__] __6__[/color]]. + +goto_oldest_crew_with_large_capacity=这台服务器上有多个团队。您已被安置在容量最大,创建最早的团队中。 +goto_oldest_crew=这台服务器上有多个团队。您已被安置在创建最早的团队中。 + + +choose_chat_color=__1__ 选择了颜色 __2__ +randomize_chat_color=__1__的颜色随机成了 __2__ + + +crew_to_spectator=__1__ 离开团队成为观众。 +lobby_to_spectator=__1__ 作为旁观者加入。 +lobby_to_spectator_2=__1__ 离开了大厅观看 __2__. +spectator_to_lobby=__1__ 停止观看并返回大厅。 +lobby_to_crew=__1__ 加入团队 +lobby_to_crew_2=__1__ 离开大厅加入 __2__. +crew_leave=__1__离开了团队。 + +crew_launch=[__1__] 发射 +crew_disband=[__1__] 在 __2__后解散。 +proposal_propose=__1__ 提议运行 __2__ [Capacity __3__]。 +proposal_retracted=提案 __1__ 撤回 +proposal_abandoned=提案 __1__ 废除 + +loading_new_game=正在加载新游戏... + +crew_summon=船员召唤。 +crew_continue_on_freeplay=现在继续在“Freeplay”上运行。 +crew_disbanded=__1__ 在 __3__ 后解散 __2__ 。 + + +victory=胜利, 在 v__1__, __2__, 容量 __3__. 游戏时间: [font=default-large-semibold]__4__[/font] 从第一个岛开始。 船员: __5__. + +loss_cannon_destroyed=游戏结束 — 重炮被摧毁。 +loss_out_of_fuel=游戏结束 — 燃料耗尽 +loss_silo_destroyed=游戏结束 — 发射井被摧毁 +loss_silo_destroyed_before_necessary_launch=游戏结束 — 发射井在必要的发射前被摧毁。 +loss_rest_of_message_long=游戏时间: __1__ 自从第一个岛开始。船员: __2__ +loss_rest_of_message_short=游戏时间: __1__ 自从第一个岛开始。 + + + + + + + +highscore_heading_crew=团队 +highscore_heading_captain=船长 +highscore_heading_captain_tooltip=在 0 到 1000 里格(不包括)之间担任船长时间最长的玩家。 +highscore_heading_completion=完成 +highscore_heading_leagues=里格数 +highscore_heading_version=版本 +highscore_heading_difficulty=难度 +highscore_heading_peak_players=巅峰玩家 + + +proposal_displayform=__1__ — __2__ +run_displayform= __2__ +crewmember_displayform=[color=__2__,__3__,__4__]__5__[/color] [color=1,1,1]__6__[/color] +capacity_tooltip=容量。设置允许的最大乘员人数。 +difficulty_tooltip=难度。\n\n更高的难度有更高的污染和进化,更多的虫子,更少的金币战利品,但更高的宝箱战利品,并且对每个岛屿的时间、任务要求和发射井位置有些许影响。\n\n难度还决定了造船的材料。 +mode_tooltip=模式. + +auto_undock_tooltip=在这个位置停留的最长时间。\n\n一旦达到这个时间,船就会自动离岸。船长可以通过按此按钮选择提前离开。 +atsea_loading_tooltip=下一个目的地正在加载。 +leave_anytime_tooltip=船长选择何时启航。\n\n他们可以通过按此按钮离开船坞。 + +resources_needed_tooltip_0=在下一个目的地,需要这些资源才能出坞。 +resources_needed_tooltip_1=在下一个目的地,需要这些资源才能提前出坞。\n\n您停留的时间越长,所需的资源就越少,最终降至零。 +resources_needed_tooltip_2=船长可以通过单击此按钮提前撤离,但前提是船长舱内储存了足够的资源。\n\n到达成本: __1__\n现在离开将花费: __2__ +resources_needed_tooltip_3=船长可以通过单击此按钮来提前出坞,但前提是船长舱内储存了足够的资源。 + +resources_needed_tooltip_0_rocketvariant=下一个目的地,需要这些资源才能出坞。\n\n发射井代表火箭发射而不是资源。 +resources_needed_tooltip_1_rocketvariant=在下一个目的地,将需要这些资源以便提前撤离。\n\n您停留的时间越长,所需的资源就越少,最终降至零。\n\n发射井代表火箭发射而不是资源。 +resources_needed_tooltip_2_rocketvariant=船长可以通过单击此按钮提前撤离,但前提是船长舱内已储存了足够的资源。\n\n发射井代表火箭发射而不是资源。\n\nn到达成本: __1__\n现在离开将花费: __2__ +resources_needed_tooltip_3_rocketvariant=T船长可以通过单击此按钮提前撤离,但前提是船长舱内已储存了足够的资源。\n\n发射井代表火箭发射而不是资源。 +fuel_tooltip=储存的燃料: __1__.\n\n要储存更多,请将其送到船长舱。如果船用完燃料,团队就会失败。 gui_crew_window_buttons_quit_crew=退出团队 @@ -342,6 +433,7 @@ gui_progress_time_of_day=一天中的时间: __1__ gui_runs_play=开始游戏 gui_runs_ongoing_runs=正在进行的队伍 +gui_runs_ongoing_runs_helpful_tip=To join a run, first select it in the table below. gui_runs_ongoing_runs_spectate=观战 gui_runs_ongoing_runs_join_crew=加入团队 gui_runs_ongoing_runs_return_to_lobby=返回大厅 @@ -403,40 +495,4 @@ gui_questframe_nodamage=岛屿任务:无伤\n\n发射火箭,发射井不受 gui_crew_tooltip_1=你的船员\n\n执行船员操作,例如选择可用的职业。 gui_crew_tooltip_2=你的船员\n\n你是自由人,所以这里没什么可做的。 -gui_progress_tooltip=进度: __1__ 里格\n\n航行 __2__ 里格取得胜利 - - -location_displayname_first_1=羽翼未丰的山谷 -location_displayname_horseshoe_1=鲨鱼钥匙 -location_displayname_horseshoe_2=小钥匙 -location_displayname_horseshoe_3=小钥匙 -location_displayname_maze_1=迷惑迷宫 -location_displayname_radioactive_1=废弃实验室 -location_displayname_red_desert_1=沙虫火山口 -location_displayname_standard_1=埋藏宝藏岛 -location_displayname_standard_variant_1=僻静的戴尔 -location_displayname_swamp_1=毒沼泽 -location_displayname_walkways_1=冰冻水池 -location_displayname_sea_1= -location_displayname_dock_1=码头 -location_displayname_lobby_1=初始码头 - - -quest_structure_market_1=需要__1__x -quest_structure_market_2=(物品组件将是 -quest_structure_market_3=完成后退款) - -quest_structure_furnace_1=需要 -quest_structure_furnace_2=(熔炉可以将 -quest_structure_furnace_3=已交付物品 -quest_structure_furnace_4=拆分成组件) - - -highscore_heading_crew=团队 -highscore_heading_captain=船长 -highscore_heading_captain_tooltip=在 0 到 1000 里格(不包括)之间担任船长时间最长的玩家。 -highscore_heading_completion=完成 -highscore_heading_leagues=里格数 -highscore_heading_version=版本 -highscore_heading_difficulty=难度 -highscore_heading_peak_players=巅峰玩家 +gui_progress_tooltip=进度: __1__ 里格\n\n航行 __2__ 里格取得胜利 \ No newline at end of file From 8b02ea5b8fecd527c85007477fb31cee3cf8511d Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Tue, 31 May 2022 00:11:03 +0100 Subject: [PATCH 04/20] patch parrot silo warning --- control.lua | 2 +- maps/pirates/api_on_tick.lua | 2 +- maps/pirates/surfaces/cabin.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/control.lua b/control.lua index 14b826b9..df144849 100644 --- a/control.lua +++ b/control.lua @@ -112,7 +112,7 @@ require 'utils.freeplay' --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/maps/pirates/api_on_tick.lua b/maps/pirates/api_on_tick.lua index 02306570..a0bb9cfb 100644 --- a/maps/pirates/api_on_tick.lua +++ b/maps/pirates/api_on_tick.lua @@ -1024,7 +1024,7 @@ function Public.silo_update(tickinterval) if memory.overworldx >= 0 and dynamic_data.rocketsiloenergyconsumed >= 0.25 * dynamic_data.rocketsiloenergyneeded and (not dynamic_data.parrot_silo_warned) then dynamic_data.parrot_silo_warned = true - local spawnerscount = Common.spawner_count(surface) + local spawnerscount = Common.spawner_count(game.surfaces[destination.surface_name]) if spawnerscount > 0 then Common.parrot_speak(memory.force, {'pirates.parrot_silo_warning'}) end diff --git a/maps/pirates/surfaces/cabin.lua b/maps/pirates/surfaces/cabin.lua index 4c338e4e..09e04867 100644 --- a/maps/pirates/surfaces/cabin.lua +++ b/maps/pirates/surfaces/cabin.lua @@ -97,7 +97,7 @@ Public.Data.surfacename_rendering_pos = {x = -0.5, y = -15} Public.cabin_shop_data = { { - price = {{'coin', 400}, {'coal', 20}}, + price = {{'coin', 400}, {'coal', 20}, {'iron-plate', 10}},--should be inefficient on resources to merely buy arty to shoot nests offer = {type='give-item', item = 'artillery-shell', count = 5}, }, { From db6d13c6097eb5ceede898677889b946fc4544f6 Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Tue, 31 May 2022 00:11:17 +0100 Subject: [PATCH 05/20] unrequire pirates --- control.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/control.lua b/control.lua index df144849..14b826b9 100644 --- a/control.lua +++ b/control.lua @@ -112,7 +112,7 @@ require 'utils.freeplay' --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' From 90d7fe9aea7e478bc8cca9065d511dfeac1df233 Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Tue, 31 May 2022 00:33:31 +0100 Subject: [PATCH 06/20] patch number change --- maps/pirates/coredata.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maps/pirates/coredata.lua b/maps/pirates/coredata.lua index 75d79b80..f610884e 100644 --- a/maps/pirates/coredata.lua +++ b/maps/pirates/coredata.lua @@ -5,7 +5,7 @@ local _inspect = require 'utils.inspect'.inspect local Public = {} Public.scenario_id_name = 'pirates' -Public.version_string = '1.2.9' --major.minor.patch versioning, to match factorio mod portal +Public.version_string = '1.2.10' --major.minor.patch versioning, to match factorio mod portal Public.blueprint_library_allowed = true Public.blueprint_importing_allowed = true From 8f690263f9889ccbf9fedd0580f3b14d6312ae53 Mon Sep 17 00:00:00 2001 From: dwightkung <105593892+dwightkung@users.noreply.github.com> Date: Tue, 31 May 2022 10:44:40 +0800 Subject: [PATCH 07/20] Update pirates.cfg fix some inproper translation, add new lines. --- locale/zh-CN/pirates.cfg | 276 +++++++++++++++++++-------------------- 1 file changed, 138 insertions(+), 138 deletions(-) diff --git a/locale/zh-CN/pirates.cfg b/locale/zh-CN/pirates.cfg index cb715e40..e5e6afc1 100644 --- a/locale/zh-CN/pirates.cfg +++ b/locale/zh-CN/pirates.cfg @@ -1,28 +1,28 @@ [pirates] softmod_info_header_before_version_number==== 海盗船 v softmod_info_header_after_version_number= === -softmod_info_body_1=新闻和聊天: getcomfy.eu/discord +softmod_info_body_1=最新消息和聊天: getcomfy.eu/discord softmod_info_game_description_1=游戏介绍 -softmod_info_game_description_2=在这个多人游戏场景中启航。收集资源并为船添加燃料,以便尽可能航行更多的里格(距离单位,约为三海里)。 船使用代码魔法移动。每个团队都有一名船长,他执行诸如决定船何时离开等行动。达布隆(货币)可以在整个游戏中不同的市场上花费。\n\n团队越小,游戏进程越慢。\n\n[font=default-bold]获胜条件:[/font] 航行1000里格。\n[font=default-bold]失败条件:[/font] 船耗尽燃料或重炮被摧毁。 +softmod_info_game_description_2=在这个多人游戏场景中启航。收集资源并为船添加燃料,以便尽可能航行更多的里格(距离单位,约为三海里)。 船使用代码魔法移动。每个团队都有一名船长,他执行诸如决定船何时出坞等行动。达布隆(通用货币)可以在整个游戏中不同的市场上花费。\n\n团队人数越少,游戏进程越慢。\n\n[font=default-bold]获胜条件:[/font] 航行1000里格。\n[font=default-bold]失败条件:[/font] 船耗尽燃料或重炮被摧毁。 # softmod_info_bugs_1=已知问题 # softmod_info_bugs_2=• -softmod_info_new_players_1=对于新手 -softmod_info_new_players_2=开采煤炭和其他资源并将它们带到船上以继续进行,或者尝试向船长询问更具体的任务。 +softmod_info_new_players_1=对于新手的建议 +softmod_info_new_players_2=开采煤炭和其他资源并将它们带到船上以继续航行,或者尝试向船长询问更具体的任务。 -softmod_info_tips_1=这个游戏模式单人难以完成 -softmod_info_tips_2=• 船长可以通过在其中一个蓝色盒子中放置 100 个轨道信号来驾驶船离开乌鸦巢。\n• 授予船的资源会出现在船长的船舱中。\n• 为发射井充电会消耗所在电网中的所有电力。\n• 岛上可用的矿石数量与你打碎岩石的顺序无关。\n• 每个岛上的被动污染随着时间的推移而增加。\n• 攻击的强度与剩余虫巢数成正比。 (基于时间的进化速度也与虫巢成正比,但破坏虫巢会立即使进化值跳跃,比让虫巢活着“本应”产生的要多。)\n• 实验室生产力随着航行里格数增加而提高。\n• 离线的玩家可以将他们的物品随身携带一段时间——除了需要立即归还给团队的“重要”物品。\n• 当船移动时,甲板上的地面实体会被移至船舱,为了更好的性能表现。\n• 命令: /ccolor 选择你的个性化颜色。 /classinfo {classname} 给出了命名类的描述。想要管理你的类,使用 /take {classname} or /giveup. 船长还有以下命令:/tax(课税), /undock(启航), /officer(军官), /plank(跳甲板). +softmod_info_tips_1=这个模式单人难以完成 +softmod_info_tips_2=• 船长可以通过在瞭望台的其中一个蓝色箱子中放置 100 个轨道信号来驾驶船舶向左或向右。\n• 授予船的资源会出现在船长室中。\n• 为发射井充电会消耗所在电网中的所有电力。\n• 岛上可用的矿石数量与你打碎岩石的顺序无关。\n• 每个岛上的被动污染随着时间的推移而增加。\n• 攻击的强度与剩余虫巢数成正比。 (基于时间的进化速度也与虫巢成正比,但破坏虫巢会立即使进化值跳跃,比让虫巢活着“本应”产生的还要多。)\n• 实验室产能随着航行里格数增加而提高。\n• 离线的玩家可以将他们的物品随身携带一段时间——除了那些需要立即归还给团队的“重要”物品。\n• 当船移动时,甲板上的落地物品会被移至船舱,为了更好的性能表现。\n• 命令: /ccolor 随意一个有趣的颜色。 /classinfo {classname} 给出指定职业的描述(注意职业名称必须使用中文,例如/classinfo deckhand)。想要管理你的职业,请使用 /take {classname} 成为指定职业或 /giveup放弃当前职业。船长还有以下命令:/tax(向船员征收25%的税), /undock(启航,提前出坞), /officer(任命军官), /plank(让某人跳甲板,离开你的团队)。 softmod_info_updates_1=近期更新 -softmod_info_updates_2=v1.2.3\n• 重做岛屿上出现的“任务建筑”。\n• 修复了加载某些地图时出现的卡顿问题,例如沼泽。\n• 各种新的适合玩家的视觉渲染。\n• Mod准备翻译成其他语言。\n• 扩展了美食家的味觉。\n\nv1.2.2\n• 修复了 1.2.1 中引入的崩溃问题。\n• 增加了海妖击杀奖励。\n\nv1.2\n• 模组传送门发布。\n• 梦魇难度的一些重新平衡。 +softmod_info_updates_2=v1.2.3\n• 重做岛屿上出现的“任务建筑”。\n• 修复了加载某些地图时出现的卡顿问题,例如沼泽。\n• 各种新的适合玩家的视觉渲染。\n• 翻译成其他语言的Mod准备。\n• 扩展了美食家的味觉。\n\nv1.2.2\n• 修复了 1.2.1 中引入的崩溃问题。\n• 增加了海妖击杀奖励。\n\nv1.2\n• 模组传送门发布。\n• 噩梦难度的一些重新平衡。 softmod_info_credits_1=工作人员 -softmod_info_credits_2=海盗船由 thesixthroc 设计和编码。 Comfy 代码基础和帮助来自 Gerkiz, Hanakocz 和 Mew @ Comfy Industries (https://getcomfy.eu)。一些由 Mattisso 提供的岛屿结构蓝图。\n\nthesixthroc 正在寻找翻译和编码人员来帮助完成这个 mod。汉化:dwightkung 来和我们聊天: https://getcomfy.eu/discord\n\n"那些白手套。我永远不会忘记它们,直到我死去的那一天。" - Dr. John +softmod_info_credits_2=海盗船由 thesixthroc 设计和编码。 Comfy 代码基础和帮助来自 Gerkiz, Hanakocz 和 Mew @ Comfy Industries (https://getcomfy.eu)。一些由 Mattisso 提供的岛屿结构蓝图。\n\nthesixthroc 正在寻找翻译和编码人员来帮助完成这个 mod。汉化:dwightkung\n\n 欢迎来和我们聊天: https://getcomfy.eu/discord\n\n"那些白手套。我永远不会忘记它们,直到我死去的那一天。" - 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 -softmod_info_body_promote=by thesixthroc +softmod_info_body_promote=由 thesixthroc 制作 softmod_info_body_promote_old2=patreon.com/thesixthroc softmod_info_body_clicky=点击关闭。 @@ -46,8 +46,8 @@ location_displayname_maze_1=迷惑迷宫 location_displayname_radioactive_1=废弃实验室 location_displayname_red_desert_1=沙虫火山口 location_displayname_standard_1=埋藏宝藏岛 -location_displayname_standard_variant_1=僻静的戴尔 -location_displayname_swamp_1=毒沼泽 +location_displayname_standard_variant_1=僻静的山谷 +location_displayname_swamp_1=剧毒沼泽 location_displayname_walkways_1=冰冻水池 location_displayname_sea_1= location_displayname_dock_1=码头 @@ -58,40 +58,40 @@ location_displayname_lobby_1=初始码头 -parrot_hard_praise=钢铁玩家的钢铁箱子!嘎嘎! -parrot_normal_praise=铁玩家的铁箱子!嘎嘎! +parrot_hard_praise=钢铁的玩家才配得上钢箱子!嘎嘎! +parrot_normal_praise=铁打的玩家才配得上铁箱子!嘎嘎! parrot_fuel_warning=燃料不足! parrot_silo_warning=发射井正在吸引虫群... parrot_0=我们可以在这里待到天荒地老。 -parrot_night_warning=你知道虫子在晚上造成的伤害更大吗? -parrot_boats_warning=200 里格?我想我们正在被追赶... -parrot_kraken_warning=400 里格即将到来?那些粉红色的东西是什么我发现... +parrot_night_warning=你知道吗?虫子在晚上造成的伤害更大 +parrot_boats_warning=唔!200 里格?我想我们正在被虫群追赶... +parrot_kraken_warning=400 里格即将到来?那些粉红色的东西是什么,我发现... parrot_radioactive_tip_1=我们需要 铀-235 才能离开这个岛... parrot_radioactive_tip_2=虫子不在乎我们是否污染这里,但污染使它们进化得很快。 parrot_maze_tip_1=我们的小地图似乎有问题。 -parrot_captain_first_time_in_cabin_hint=船长可以在船舱内购买物品,例如用于驾驶船只的铁路信号灯。 +parrot_captain_first_time_in_cabin_hint=船长可以在船长舱内购买物品,例如用于驾驶船只的铁路信号灯。 -difficulty_easy=Easy -difficulty_normal=Normal -difficutly_hard=Hard -difficulty_nightmare=Nightmare +difficulty_easy=简单 +difficulty_normal=正常 +difficutly_hard=困难 +difficulty_nightmare=噩梦 -notify_difficulty_vote=__1__ 投了 [color=__2__,__3__,__4__]难度 __5__[/color] +notify_difficulty_vote=__1__ 投了 [color=__2__,__3__,__4__] __5__难度[/color] notify_difficulty_change=难度 [color=__1__,__2__,__3__]更改为 __4__[/color] -daynightcycle_static=Static -daynightcycle_slowcyclic=Slow Cyclic -daynightcycle_cyclic=Cyclic -daynightcycle_fastcyclic=Fast Cyclic -daynightcycle_rapidcyclic=Rapid Cyclic +daynightcycle_static=静态 +daynightcycle_slowcyclic=缓慢循环 +daynightcycle_cyclic=正常循环 +daynightcycle_fastcyclic=快速循环 +daynightcycle_rapidcyclic=极速循环 -ship_undocked_1=[font=heading-1]船舶出坞[/font] 由船长决定 +ship_undocked_1=英明的船长决定[font=heading-1]船舶提前出坞[/font] ship_undocked_2=[font=heading-1]船舶自动出坞[/font]。速回。 ship_undocked_3=[font=heading-1]船舶自动出坞[/font]。 @@ -100,21 +100,21 @@ plank_error_invalid_player=命令错误:玩家不是船员。 plank_error_self=命令错误:不能让自己跳甲板。 tax=征税 -tax_error_nothing=在队友的物品栏或光标堆栈中找不到硬币或游戏关键。 +tax_error_nothing=在队友的物品栏或光标堆栈中找不到硬币或游戏关键物品。 -respawn_speed_bonus_removed=重生速度加成结束。 +respawn_speed_bonus_removed=重生速度加成失效。 respawn_speed_bonus_applied=重生速度加成生效。 -find_map=__1__ 找到了一张地图。宝藏位置已揭晓。 -find_ghost=__1__ 发现了一个幽灵。 +find_map=__1__ 找到了一张地图。宝藏位置已揭晓! +find_ghost=__1__ 发现了一个幽灵! silo_destroyed=游戏结束 — 发射井被摧毁 research_notification=__1__ 研究完成。 -destroyed_all_nests=所有的虫巢被摧毁——逃生费用被移除。 +destroyed_all_nests=所有的虫巢被摧毁——逃生费用已移除。 -recover_offline_player_items=离线玩家的物品被回收到机舱。 +recover_offline_player_items=离线玩家的物品已被回收到船舱。 death_froze=__1__ 被冻死了。 death_pushed_into_water_by_cannon=__1__ 被重炮推入了水中。 @@ -127,7 +127,7 @@ approaching_destination=接近目的地 __1__, __2__. loading_destination=加载目的地 __1__, __2__. steer_left=左舷转向... -steer_right=转向右舷... +steer_right=右舷转向... @@ -135,23 +135,23 @@ steer_right=转向右舷... error_undock_too_early=出坞错误:前 10 秒内无法出坞。 error_undock_insufficient_resources=出坞错误: 船长舱没有足够的资源存储。 -error_cabin_full=很遗憾,机舱内没有空间来盛放您所有的奖励。 +error_cabin_full=很遗憾,船长舱内没有空间来盛放您所有的奖励。 -error_build_undergrounds_on_boat=建造错误:由于与船移动代码冲突,无法在船上建造地下。 -error_cant_carry_barrels=配方错误:桶太重,无法运回船上。尝试另一种方式。 -error_disembark=现在不是下船的时间。 +error_build_undergrounds_on_boat=建造错误:由于与船移动代码冲突,无法在船上建造地下建筑。 +error_cant_carry_barrels=配方错误:桶太重,无法运回船上。请尝试另一种方式。 +error_disembark=现在不是下船的时候。 quest_structure_market_1=需要__1__x -quest_structure_market_2=(物品组件将是 -quest_structure_market_3=完成后退款) +quest_structure_market_2=(物品将在 +quest_structure_market_3=完成后返还) quest_structure_furnace_1=需要 quest_structure_furnace_2=(熔炉可以将 -quest_structure_furnace_3=已交付物品 -quest_structure_furnace_4=拆分成组件) +quest_structure_furnace_3=已交付的物品 +quest_structure_furnace_4=拆分成原始材料) @@ -163,9 +163,9 @@ market_description_purchase_class=购买职业 __1__。 market_description_extra_time_at_sea=在海上多放松一分钟:将下一个目的地的加载时间增加 60 秒。 -market_event_sell=__1__ 以 __2__ 的价格售出 __3__. +market_event_sell=__1__ 以 __3__ 的价格售出 __2__. market_event_trade=__1__ 用 __2__ 换取 __3__. -market_event_buy=__1__ 以 __2__ 的价格购买 __3__. +market_event_buy=__1__ 以 __3__ 的价格购买 __2__. extra_time_at_sea=在海上多放松一分钟:将下一个目的地的加载时间增加 60 秒。 @@ -182,14 +182,14 @@ upgrade_rockets=在岛屿市场解锁火箭销售。 -hold_connections_label_inactive=inactive -hold_connections_label_to=to -__1__ -hold_connections_label_from=from -__1__ +hold_connections_label_inactive=未激活 +hold_connections_label_to=到 -__1__ +hold_connections_label_from=从 -__1__ -surface_label_cabin=Captain's Cabin -surface_label_crowsnest=Crow's Nest -surface_label_hold_nth=Ship's Hold: -__1__ -surface_label_hold=Ship's Hold +surface_label_cabin=船长舱 +surface_label_crowsnest=瞭望台 +surface_label_hold_nth=下层船舱: -__1__ +surface_label_hold=下层船舱 @@ -197,71 +197,71 @@ surface_label_hold=Ship's Hold role_officer=军官 role_officer_description=由船长任命,军官可以使用船长的商店并访问特权宝箱。 role_captain=船长 -role_captain_description=拥有驶出船坞、购买物品和其他各种特殊行动的执行权。游戏在指定队长时,会优先考虑那些作为非队长出场时间最长的人。 +role_captain_description=拥有提前驶出船坞、购买物品和其他各种特殊行动的执行权。游戏在指定队长时,会优先考虑那些作为非队长出场时间最长的人。 class_deckhand=水手 -class_deckhand_explanation=他们在甲板上的时候移动得更快并且为船舱生成矿石。 +class_deckhand_explanation=Deckhand,在甲板上的时候移动得较快并且为船舱生成矿石。 class_fisherman=渔夫 -class_fisherman_explanation=他们钓鱼的距离更远。 +class_fisherman_explanation=Fisherman,捕鱼的距离较远。 class_scout=侦察兵 -class_scout_explanation=它们速度更快,但脆弱且造成的伤害更小。 +class_scout_explanation=Scout,速度较快,但身体脆弱且伤害低。 class_samurai=武士 -class_samurai_explanation=他们很强壮,而且*没有装备武器*在近战中打得很好,但在其他方面表现不佳。 +class_samurai_explanation=Samurai,比较强壮,而且*没有装备武器*在近战中打得很好,但在其他方面表现不佳。 class_merchant=商人 -class_merchant_explanation=他们每个里格产生 50 达布隆。 +class_merchant_explanation=Merchant,每个里格产生 50 达布隆。 class_shoresman=海岸人 -class_shoresman_explanation=它们移动得稍微快一些,并且不在船时为船舱生成矿石。 +class_shoresman_explanation=Shoresman,移动得稍微快一些,并且不在船上时为船舱生成矿石。 class_boatswain=水手长 -class_boatswain_explanation=它们在甲板下时移动更快并为船舱生成矿石。 +class_boatswain_explanation=Boatswain,在甲板下面时移动较快并为船舱生成矿石。 class_prospector=勘探者 -class_prospector_explanation=他们在手工开采时会发现更多资源。 +class_prospector_explanation=Prospector,在手工开采时会发现较多资源。 class_lumberjack=伐木工人 -class_lumberjack_explanation=他们在砍树时会找到更多的资源。 +class_lumberjack_explanation=Lumberjack,在砍树时会找到较多的资源。 class_master_angler=钓鱼大师 -class_master_angler_explanation=他们钓鱼的距离更远,捕获的也更多。 +class_master_angler_explanation=Master Angler,钓鱼的距离非常远,捕获的量也非常多。 class_wood_lord=森林之王 -class_wood_lord_explanation=他们在砍树时会发现更多的资源。 -class_chief_excavator=首席挖掘机 -class_chief_excavator_explanation=他们在手工开采时发现了更多的资源。 -class_hatamoto=旗本 -class_hatamoto_explanation=他们非常强悍,而且*没有装备武器*近战打得很好,但其他方面就很差。 +class_wood_lord_explanation=Lord of the Woods,在砍树时会发现非常多的资源。 +class_chief_excavator=首席挖掘手 +class_chief_excavator_explanation=Chief Excavator,在手工开采时发现了非常多的资源。 +class_hatamoto=旗本武士 +class_hatamoto_explanation=Hatamoto,非常强悍,而且*没有装备武器*近战打得很好,但其他方面就很差。 class_iron_leg=铁腿 -class_iron_leg_explanation=它们在携带 3000 铁矿石时非常强韧。 +class_iron_leg_explanation=Iron Leg,在携带 3000 铁矿石时非常强韧。 class_quartermaster=军需官 -class_quartermaster_explanation=附近的船员获得+10%的物理攻击加成并为船舱生成矿石。 +class_quartermaster_explanation=Quartermaster,为附近的船员提供+10%的物理攻击加成并为船舱生成矿石。 class_dredger=挖泥手 -class_dredger_explanation=他们在钓鱼时会发现令人惊奇的物品。 -class_smoldering=闷烧 -class_smoldering_explanation=如果他们的煤炭少于 50,他们会定期将木材转化为煤炭。 +class_dredger_explanation=Dredger,在钓鱼时会发现令人惊奇的物品。 +class_smoldering=闷烧师 +class_smoldering_explanation=Smoldering,煤炭少于50时,会定期将木材转化为煤炭。 class_gourmet=美食家 -class_gourmet_explanation=他们通过在奇特的地方吃鱼来为小屋生成矿石。 +class_gourmet_explanation=Gourmet,通过在奇特的地方吃鱼来为小屋生成矿石。 class_explanation=__1__: __2__ -class_explanation_upgraded_class=__1__: 的升级 __2__. __3__ +class_explanation_upgraded_class=__1__: __2__的升级。 __3__ class_purchase=__1__ 购买了职业 __2__. ([font=scenario-message-dialog]__3__[/font]) class_upgrade=__1__ 将他们的职业从 __2__ 升级到了 __3__ ([font=scenario-message-dialog]__4__[/font]). -class_take_spare=__1__ 获得了空闲职业 __2__. ([font=scenario-message-dialog]__3__[/font]) -class_give_spare=一个空闲的 __1__ 职业授予 __2__。 ([font=scenario-message-dialog]__3__[/font]) +class_take_spare=__1__ 选择了空闲职业 __2__. ([font=scenario-message-dialog]__3__[/font]) +class_give_spare=一个空闲的 __1__ 职业被授予 __2__。 ([font=scenario-message-dialog]__3__[/font]) class_give_up=__1__ 放弃了 __2__。 class_becomes_spare=一个 __1__ 职业 现在空闲。 class_give_up_error_no_class=职业错误:你没有任何职业可以放弃。 -class_revoke=__1__ 撤销了 __2__ 从 __3__. +class_revoke=__1__ 从 __3__ 撤销了 __2__ 。 class_purchase_error_prerequisite_class=职业购买错误: 你需要成为 __1__ 才能购买。 -roles_confirm_captain=__1__ 接受了船长的职业。 -roles_confirm_captain_error_1=命令错误:您不是船长。 +roles_confirm_captain=__1__ 接受了船长的角色。 +roles_confirm_captain_error_1=命令错误:你不是船长。 roles_confirm_captain_error_2=命令错误:你不是临时的,所以你不需要接受。 -roles_renounce_captain=__1__ 放弃他们的船长头衔。 +roles_renounce_captain=__1__ 放弃了船长头衔。 roles_renounce_captain_error_1=命令错误:但你是唯一的船员...... -roles_pass_captainhood=__1__ 已将他们的船长头衔授予 __2__. -roles_lose_captainhood_by_afk=__1__ 由于挂机被取消了队长身份。 -roles_ask_player_about_captainhood_variant_1=__1__, 你想成为船长吗?如果接受就说/ok -roles_ask_player_about_captainhood_variant_2=__1__, 船长?如果是就说/ok -roles_ask_player_about_captainhood_variant_3=__1__,轮到你当队长了?如果接受就说/ok +roles_pass_captainhood=__1__ 已将船长头衔授予 __2__. +roles_lose_captainhood_by_afk=__1__ 由于挂机被取消了船长身份。 +roles_ask_player_about_captainhood_variant_1=__1__, 你想成为船长吗?如果接受请说/ok +roles_ask_player_about_captainhood_variant_2=__1__, 船长?船长便宜卖了 如果接受请说/ok +roles_ask_player_about_captainhood_variant_3=__1__,轮到你当船长了 如果接受请说/ok roles_make_officer=__1__ 任命 __2__ 为军官 roles_make_officer_error_1=命令错误:玩家无效。 @@ -270,13 +270,13 @@ roles_make_officer_error_3=命令错误:玩家不是船员。 roles_unmake_officer=__1__ 取消了 __2__ 的军官身份。 roles_unmake_officer_error_1=命令错误:玩家不是军官。 roles_unmake_officer_error_2=命令错误:玩家不是船员。 -roles_resign_officer=__1__ 辞去了军官。 -roles_notify_looking_for_captain=正在寻找合适的船长... +roles_resign_officer=__1__ 辞去了军官职务。 +roles_notify_looking_for_captain=正在物色合适的船长... -warn_nearly_afk_captain=注意:如果您作为船长闲置的时间过长,该职业会转移给其他船员。 +warn_nearly_afk_captain=注意:如果您作为船长闲置的时间过长,该职业会传递给其他船员。 error_class_assign_redundant=职业错误: 你已经是 __1__了。 -error_class_assign_unavailable_class=职业错误:没有空闲职位 +error_class_assign_unavailable_class=职业错误:没有空闲职业 @@ -294,23 +294,23 @@ randomize_chat_color=__1__的颜色随机成了 __2__ crew_to_spectator=__1__ 离开团队成为观众。 -lobby_to_spectator=__1__ 作为旁观者加入。 -lobby_to_spectator_2=__1__ 离开了大厅观看 __2__. -spectator_to_lobby=__1__ 停止观看并返回大厅。 +lobby_to_spectator=__1__ 作为观众加入。 +lobby_to_spectator_2=__1__ 离开了大厅去观战 __2__. +spectator_to_lobby=__1__ 停止观战并返回大厅。 lobby_to_crew=__1__ 加入团队 lobby_to_crew_2=__1__ 离开大厅加入 __2__. crew_leave=__1__离开了团队。 crew_launch=[__1__] 发射 crew_disband=[__1__] 在 __2__后解散。 -proposal_propose=__1__ 提议运行 __2__ [Capacity __3__]。 -proposal_retracted=提案 __1__ 撤回 -proposal_abandoned=提案 __1__ 废除 +proposal_propose=__1__ 提议建立 __2__ [Capacity __3__]。 +proposal_retracted=提案 __1__ 已撤回 +proposal_abandoned=提案 __1__ 已废除 loading_new_game=正在加载新游戏... -crew_summon=船员召唤。 -crew_continue_on_freeplay=现在继续在“Freeplay”上运行。 +crew_summon=召唤船员。 +crew_continue_on_freeplay=现在继续在“标准模式”上运行。 crew_disbanded=__1__ 在 __3__ 后解散 __2__ 。 @@ -343,71 +343,71 @@ proposal_displayform=__1__ — __2__ run_displayform= __2__ crewmember_displayform=[color=__2__,__3__,__4__]__5__[/color] [color=1,1,1]__6__[/color] capacity_tooltip=容量。设置允许的最大乘员人数。 -difficulty_tooltip=难度。\n\n更高的难度有更高的污染和进化,更多的虫子,更少的金币战利品,但更高的宝箱战利品,并且对每个岛屿的时间、任务要求和发射井位置有些许影响。\n\n难度还决定了造船的材料。 +difficulty_tooltip=难度。\n\n更高的难度有更高的污染和进化,更多的虫子,更少的金币战利品,但更高的宝箱战利品,并且对每个岛屿的时间、任务要求和发射井位置有些许影响。\n\n难度还决定了造船所用的材料。 mode_tooltip=模式. -auto_undock_tooltip=在这个位置停留的最长时间。\n\n一旦达到这个时间,船就会自动离岸。船长可以通过按此按钮选择提前离开。 +auto_undock_tooltip=在这个位置停留的最长时间。\n\n一旦达到这个时间,船就会自动离岸。船长也可以通过按此按钮选择提前出坞。 atsea_loading_tooltip=下一个目的地正在加载。 -leave_anytime_tooltip=船长选择何时启航。\n\n他们可以通过按此按钮离开船坞。 +leave_anytime_tooltip=船长选择何时启航。\n\n可以通过按此按钮离开船坞。 resources_needed_tooltip_0=在下一个目的地,需要这些资源才能出坞。 resources_needed_tooltip_1=在下一个目的地,需要这些资源才能提前出坞。\n\n您停留的时间越长,所需的资源就越少,最终降至零。 resources_needed_tooltip_2=船长可以通过单击此按钮提前撤离,但前提是船长舱内储存了足够的资源。\n\n到达成本: __1__\n现在离开将花费: __2__ -resources_needed_tooltip_3=船长可以通过单击此按钮来提前出坞,但前提是船长舱内储存了足够的资源。 +resources_needed_tooltip_3=船长可以通过单击此按钮来提前撤离,但前提是船长舱内储存了足够的资源。 resources_needed_tooltip_0_rocketvariant=下一个目的地,需要这些资源才能出坞。\n\n发射井代表火箭发射而不是资源。 -resources_needed_tooltip_1_rocketvariant=在下一个目的地,将需要这些资源以便提前撤离。\n\n您停留的时间越长,所需的资源就越少,最终降至零。\n\n发射井代表火箭发射而不是资源。 +resources_needed_tooltip_1_rocketvariant=在下一个目的地,将需要这些资源才能提前撤离。\n\n您停留的时间越长,所需的资源就越少,最终降至零。\n\n发射井代表火箭发射而不是资源。 resources_needed_tooltip_2_rocketvariant=船长可以通过单击此按钮提前撤离,但前提是船长舱内已储存了足够的资源。\n\n发射井代表火箭发射而不是资源。\n\nn到达成本: __1__\n现在离开将花费: __2__ resources_needed_tooltip_3_rocketvariant=T船长可以通过单击此按钮提前撤离,但前提是船长舱内已储存了足够的资源。\n\n发射井代表火箭发射而不是资源。 fuel_tooltip=储存的燃料: __1__.\n\n要储存更多,请将其送到船长舱。如果船用完燃料,团队就会失败。 gui_crew_window_buttons_quit_crew=退出团队 -gui_crew_window_buttons_quit_crew_tooltip=回到大厅 +gui_crew_window_buttons_quit_crew_tooltip=回到那个大厅 gui_crew_window_buttons_quit_spectators=回到大厅 gui_crew_window_buttons_join_crew=加入团队 gui_crew_window_buttons_join_spectators=观战 gui_crew_window_buttons_join_spectators_tooltip=您在执行此操作后的短时间内将无法重新加入船员。 -gui_crew_window_crewmembers=船员 +gui_crew_window_crewmembers=船员们 gui_crew_window_crewmembers_give_up_class=放弃职业 gui_crew_window_crewmembers_give_up_class_tooltip=放弃职业 gui_crew_window_crewmembers_resign_as_officer=辞去军官职务 -gui_crew_window_crewmembers_resign_as_officer_tooltip=放弃军官职位 +gui_crew_window_crewmembers_resign_as_officer_tooltip=放弃军官职务 gui_crew_window_spectators=观众 gui_crew_window_vote_for_difficulty=难度投票 gui_crew_window_spare_classes=空闲职业 gui_crew_window_assign_class_button=授予职业: __1__ -gui_crew_window_assign_class_button_tooltip=为 __1__.\n\n 职业描述: __2__ -gui_crew_window_selfassign_class_button=成为职业: __1__ -gui_crew_window_selfassign_class_button_tooltip=授予自己空闲职业 __1__.\n\n 职业描述: __2__ +gui_crew_window_assign_class_button_tooltip=任命此玩家为 __1__。\n\n 职业描述: __2__ +gui_crew_window_selfassign_class_button=选择职业: __1__ +gui_crew_window_selfassign_class_button_tooltip=授予自己空闲的职业 __1__.\n\n 职业描述: __2__ gui_crew_window_captains_actions=船长的行动 gui_crew_window_captains_actions_disband_crew=解散团队 gui_crew_window_captains_actions_disband_crew_tooltip=结束本次航行。点击后会再次提示。 gui_crew_window_captains_actions_disband_crew_check=你确定? gui_crew_window_captains_actions_disband_crew_check_tooltip=再次点击解散团队 -gui_crew_window_captains_actions_renounce_title=放弃船长身份 +gui_crew_window_captains_actions_renounce_title=放弃船长头衔 gui_crew_window_captains_actions_renounce_title_tooltip=你将不再是船长,这个角色将被传递,直到有船员接任。 gui_crew_window_captains_actions_pass_title=将船长传给 -gui_crew_window_captains_actions_pass_title_tooltip=让选中的船员成为船长。 +gui_crew_window_captains_actions_pass_title_tooltip=让此船员成为船长。 gui_crew_window_captains_actions_plank=跳甲板 (放逐为观众) -gui_crew_window_captains_actions_plank_tooltip=玩家将被送回大厅,暂时不能加入你的队伍。 (或使用 /plank {player}) +gui_crew_window_captains_actions_plank_tooltip=玩家将被送回大厅,暂时不能加入你的队伍。 (或使用 /plank {玩家的名字}) gui_crew_window_captains_actions_make_officer=任命军官 -gui_crew_window_captains_actions_make_officer_tooltip=任命此玩家为军官 (或使用/officer {player}) +gui_crew_window_captains_actions_make_officer_tooltip=任命此玩家为军官 (或使用/officer {玩家的名字}) gui_crew_window_captains_actions_unmake_officer=解除军官 -gui_crew_window_captains_actions_unmake_officer_tooltip=解除此玩家军官职务 或使用 /officer {player}) +gui_crew_window_captains_actions_unmake_officer_tooltip=解除此玩家军官职务 或使用 /officer {玩家的名字}) gui_crew_window_captains_actions_revoke_class=撤销职业 gui_crew_window_captains_actions_revoke_class_tooltip=将此玩家的职业放回备用池中。 gui_crew_window_captains_actions_summon_crew=召唤船员上船 -gui_crew_window_captains_actions_summon_crew_tooltip=召唤船员上船 +gui_crew_window_captains_actions_summon_crew_tooltip=将船员传送回船上 gui_crew_window_captains_actions_tax=征税 -gui_crew_window_captains_actions_tax_tooltip=对于您船员中的每个非军官,拿走四分之一的达布隆(和其他游戏关键物品)。 (或使用 /tax) -gui_crew_window_captains_actions_undock_tip=要提前出坞,请使用顶部工具栏。 +gui_crew_window_captains_actions_tax_tooltip=对于团队中的每个非军官,征收四分之一的达布隆(和其他游戏关键物品)。 (或使用 /tax) +gui_crew_window_captains_actions_undock_tip=想要提前出坞,请使用顶部工具栏。 -gui_crew_window_crew_age=寿命: __1__ +gui_crew_window_crew_age=时长: __1__ gui_crew_window_crew_capacity_and_difficulty=__1__, 容量 __2__. gui_crew_window_crew_count=船员 (__1__) -gui_evo_tooltip_1=本地进化值: __1__ +gui_evo_tooltip_1=本地虫族进化值: __1__ gui_evo_tooltip_2=里格数: __1__ gui_evo_tooltip_3=海妖: __1__ gui_evo_tooltip_4=时间: __1__ @@ -415,7 +415,7 @@ gui_evo_tooltip_5=发射井: __1__ gui_evo_tooltip_6=虫巢: __1__ gui_evo_tooltip_7=沙虫: __1__ -gui_info_info=信息 +gui_info_info=简介 gui_info_updates=更新 gui_info_tips=提示 gui_info_credits=工作人员 @@ -426,33 +426,33 @@ gui_minimap_switch_left=自动显示地图 — 开启 gui_minimap_switch_right=关闭 gui_progress=进度 -gui_progress_distance_travelled=航行里程: +gui_progress_distance_travelled=已航行里程: gui_progress_leagues=__1__ 里格 gui_progress_current_location=当前位置: __1__ -gui_progress_time_of_day=一天中的时间: __1__ +gui_progress_time_of_day=时刻: __1__ gui_runs_play=开始游戏 gui_runs_ongoing_runs=正在进行的队伍 -gui_runs_ongoing_runs_helpful_tip=To join a run, first select it in the table below. +gui_runs_ongoing_runs_helpful_tip=想要加入一个团队,首先在下表选择它 gui_runs_ongoing_runs_spectate=观战 gui_runs_ongoing_runs_join_crew=加入团队 gui_runs_ongoing_runs_return_to_lobby=返回大厅 gui_runs_ongoing_runs_hop_on_board=跳上船。 gui_runs_proposals=提案 gui_runs_proposals_endorse_proposal=批准提案 -gui_runs_proposals_retract_endorsement=撤回代言 +gui_runs_proposals_retract_endorsement=撤回支持 gui_runs_proposals_abandon_proposal=放弃提案 -gui_runs_proposal_maker_run_name=队伍名称 +gui_runs_proposal_maker_run_name=团队名称 gui_runs_proposal_maker_run_name_2=名称 gui_runs_proposal_maker_capacity=容量 gui_runs_proposal_maker_capacity_disabled=此容量设置目前不可用。 -gui_runs_proposal_maker_propose=提议 +gui_runs_proposal_maker_propose=提交 gui_runs_proposal_maker_no_limit=无限制 gui_runs_launch=启航 gui_runs_launch_error_1=聚集更多的海盗。 gui_runs_launch_error_2=服务器上的并发运行数已达到管理员设置的上限。 -gui_runs_launch_error_3=无法启动;至少一个队伍需要更高的容量。 +gui_runs_launch_error_3=无法启动;至少要有一个队伍需要高容量。 gui_runs_launch_error_4=没有可用的单桅帆船。改为加入现有的队伍。 gui_runs_wait_to_join=等待加入... __1__ @@ -460,7 +460,7 @@ gui_runs_wait_to_join=等待加入... __1__ gui_info_main_tooltip=关于海盗船的提示与更新 gui_crews=团队 -gui_crews_main_tooltip=查看正在进行的团队,或创建自己的队伍 +gui_crews_main_tooltip=查看正在进行的团队,或创建自己的团队 gui_minimap_main_tooltip=查看外部世界。 @@ -474,25 +474,25 @@ gui_etaframe_nest_escape_cost=下一个逃生成本: gui_etaframe_to_escape_store=想要逃跑,存储 gui_etaframe_or_store=或存储 gui_etaframe_rocket_requirement_tooltip=发射火箭 -gui_etaframe_undock_are_you_sure=出坞 — 你确定吗? +gui_etaframe_undock_are_you_sure=出坞—你确定吗? gui_etaframe_launched=发射: gui_etaframe_launched_tooltip=这个岛的火箭发射了,这里是奖励。 gui_etaframe_launching=火箭正在发射... gui_etaframe_charge=充电: -gui_etaframe_charge_tooltip=火箭发射井充电: __1__/__2__ GJ\n\n充满电以发射火箭,获得达布隆和燃料。 +gui_etaframe_charge_tooltip=火箭发射井充电: __1__/__2__ GJ\n\n充满电以发射火箭,同时获得达布隆和燃料。 gui_questframe=岛屿任务: gui_questframe_fail=失败 gui_questframe_ok=OK gui_questframe_complete_tooltip=这个岛的任务完成了,这里是奖励。 -gui_questframe_time=岛屿任务:时间\n\n在倒计时完成之前发射火箭以获得奖励。 -gui_questframe_worms=海岛任务:沙虫\n\n杀死足够多的蠕虫以获得奖励。 -gui_questframe_find=海岛任务:蠕虫\n\n杀死足够多的蠕虫以获得奖励。 -gui_questframe_resourceflow=海岛任务:资源流\n\n达到特定物品的生产率以获得奖励。 +gui_questframe_time=岛屿任务:限时\n\n在倒计时完成之前发射火箭以获得奖励。 +gui_questframe_worms=海岛任务:沙虫\n\n杀死足够多的沙虫以获得奖励。 +gui_questframe_find=海岛任务:幽灵\n\n找到幽灵以获得奖励。 +gui_questframe_resourceflow=海岛任务:资源滚滚\n\n达到特定物品的生产率以获得奖励。 gui_questframe_resourcecount=海岛任务:物品生产\n\n只需在地图上的任何地方完成这些物品的生产即可获得奖励。 -gui_questframe_nodamage=岛屿任务:无伤\n\n发射火箭,发射井不受到任何伤害。 +gui_questframe_nodamage=岛屿任务:无伤\n\n发射火箭,并且发射井不受到任何伤害。 -gui_crew_tooltip_1=你的船员\n\n执行船员操作,例如选择可用的职业。 -gui_crew_tooltip_2=你的船员\n\n你是自由人,所以这里没什么可做的。 +gui_crew_tooltip_1=你的团队\n\n执行船员操作,例如选择可用的职业。 +gui_crew_tooltip_2=你的团队\n\n你是自由人,所以什么也做不了。 -gui_progress_tooltip=进度: __1__ 里格\n\n航行 __2__ 里格取得胜利 \ No newline at end of file +gui_progress_tooltip=进度: __1__ 里格\n\n航行 __2__ 里格取得胜利 From 281d22bb94da91c1cce2aed6a17b9f9ff02f9c32 Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Wed, 1 Jun 2022 19:50:36 +0100 Subject: [PATCH 08/20] header on each file; clamp function; locale fixes --- control.lua | 4 ++-- locale/en/pirates.cfg | 13 +++++++++--- maps/pirates/ai.lua | 4 +++- maps/pirates/api_events.lua | 7 +++++-- maps/pirates/api_on_tick.lua | 2 ++ maps/pirates/balance.lua | 2 ++ maps/pirates/boat_upgrades.lua | 10 ++++++---- maps/pirates/commands.lua | 2 ++ maps/pirates/common.lua | 6 +++++- maps/pirates/coredata.lua | 16 ++++++++------- maps/pirates/crew.lua | 2 ++ maps/pirates/custom_events.lua | 2 ++ maps/pirates/effects.lua | 2 ++ maps/pirates/gui/color.lua | 2 ++ maps/pirates/gui/common.lua | 2 ++ maps/pirates/gui/crew.lua | 4 +++- maps/pirates/gui/evo.lua | 2 ++ maps/pirates/gui/fuel.lua | 2 ++ maps/pirates/gui/gui.lua | 5 +++-- maps/pirates/gui/info.lua | 2 ++ maps/pirates/gui/minimap.lua | 2 ++ maps/pirates/gui/progress.lua | 2 ++ maps/pirates/gui/runs.lua | 3 ++- maps/pirates/highscore.lua | 7 ++++--- .../tick_tack_trap.lua | 1 + maps/pirates/loot.lua | 20 ++++++++++--------- maps/pirates/main.lua | 1 + maps/pirates/math.lua | 15 ++++++++++---- maps/pirates/memory.lua | 2 ++ maps/pirates/ores.lua | 1 + maps/pirates/overworld.lua | 7 ++++--- maps/pirates/parrot.lua | 2 ++ maps/pirates/player_colors.lua | 2 ++ maps/pirates/progression.lua | 2 ++ maps/pirates/quest.lua | 1 + maps/pirates/raffle.lua | 2 ++ .../reference/default_map_settings.lua | 1 + maps/pirates/roles/classes.lua | 4 +++- maps/pirates/roles/roles.lua | 3 ++- maps/pirates/roles/tick_functions.lua | 2 ++ maps/pirates/shop/captains.lua | 2 ++ maps/pirates/shop/covered.lua | 2 ++ maps/pirates/shop/dock.lua | 2 ++ maps/pirates/shop/merchants.lua | 2 ++ maps/pirates/shop/shop.lua | 2 ++ maps/pirates/structures/boats/boats.lua | 2 ++ .../structures/boats/merchant_1/data.lua | 2 ++ .../boats/merchant_1/merchant_1.lua | 2 ++ maps/pirates/structures/boats/raft/data.lua | 2 ++ maps/pirates/structures/boats/raft/raft.lua | 2 ++ .../structures/boats/raft_large/data.lua | 2 ++ .../boats/raft_large/raft_large.lua | 2 ++ maps/pirates/structures/boats/sloop/data.lua | 2 ++ maps/pirates/structures/boats/sloop/sloop.lua | 2 ++ .../island_structures/island_structures.lua | 2 ++ .../island_structures/mattisso/data.lua | 2 ++ .../island_structures/mattisso/mattisso.lua | 2 ++ .../structures/island_structures/roc/data.lua | 2 ++ .../structures/island_structures/roc/roc.lua | 2 ++ .../quest_structures/furnace1/data.lua | 2 ++ .../quest_structures/furnace1/furnace1.lua | 4 +++- .../quest_structures/market1/data.lua | 2 ++ .../quest_structures/market1/market1.lua | 4 +++- .../structures/quest_structures/old_data.lua | 2 ++ .../quest_structures/quest_structures.lua | 2 ++ maps/pirates/structures/structures.lua | 2 ++ maps/pirates/surfaces/cabin.lua | 2 ++ maps/pirates/surfaces/channel/channel.lua | 2 ++ maps/pirates/surfaces/channel/data.lua | 2 ++ maps/pirates/surfaces/common.lua | 2 ++ maps/pirates/surfaces/crowsnest.lua | 2 ++ maps/pirates/surfaces/dock.lua | 2 ++ maps/pirates/surfaces/hold.lua | 4 +++- maps/pirates/surfaces/islands/common.lua | 2 ++ maps/pirates/surfaces/islands/first/data.lua | 2 ++ maps/pirates/surfaces/islands/first/first.lua | 2 ++ .../surfaces/islands/horseshoe/data.lua | 2 ++ .../surfaces/islands/horseshoe/horseshoe.lua | 2 ++ maps/pirates/surfaces/islands/hunt.lua | 2 ++ maps/pirates/surfaces/islands/islands.lua | 6 +++++- maps/pirates/surfaces/islands/maze/data.lua | 2 ++ maps/pirates/surfaces/islands/maze/maze.lua | 2 ++ .../surfaces/islands/radioactive/data.lua | 2 ++ .../islands/radioactive/radioactive.lua | 2 ++ .../surfaces/islands/red_desert/data.lua | 2 ++ .../islands/red_desert/red_desert.lua | 2 ++ .../surfaces/islands/standard/data.lua | 2 ++ .../surfaces/islands/standard/standard.lua | 2 ++ .../islands/standard_variant/data.lua | 2 ++ .../standard_variant/standard_variant.lua | 2 ++ maps/pirates/surfaces/islands/swamp/data.lua | 2 ++ maps/pirates/surfaces/islands/swamp/swamp.lua | 2 ++ .../surfaces/islands/walkways/data.lua | 2 ++ .../surfaces/islands/walkways/walkways.lua | 2 ++ maps/pirates/surfaces/lobby.lua | 2 ++ maps/pirates/surfaces/sea/kraken.lua | 2 ++ maps/pirates/surfaces/sea/sea.lua | 1 + maps/pirates/surfaces/surfaces.lua | 6 +++++- maps/pirates/utils_local.lua | 2 ++ 99 files changed, 252 insertions(+), 50 deletions(-) diff --git a/control.lua b/control.lua index 14b826b9..21182d2e 100644 --- a/control.lua +++ b/control.lua @@ -1,6 +1,6 @@ require 'utils.data_stages' _LIFECYCLE = _STAGE.control -- Control stage -_DEBUG = false +_DEBUG = true _DUMP_ENV = false require 'utils.server' @@ -112,7 +112,7 @@ require 'utils.freeplay' --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 302f12a6..2a0829e5 100644 --- a/locale/en/pirates.cfg +++ b/locale/en/pirates.cfg @@ -160,7 +160,7 @@ market_description_upgrade_hold=Purchase an extra hold. market_description_upgrade_merchants=Unlock merchant ships on future islands. market_description_upgrade_rockets=Unlock the sale of rockets at island markets. market_description_purchase_class=Purchase the class __1__. -market_description_extra_time_at_sea=Relax at sea for an extra minute: Increase the next destination's loading time by 60 seconds. +market_description_extra_time_at_sea=Relax at sea: Increase the next destination's loading time by 60 seconds. market_event_sell=__1__ sold __2__ for __3__. @@ -179,6 +179,10 @@ upgrade_power=[font=heading-1]__1__ upgraded the ship's power.[/font] upgrade_merchants=[font=heading-1]__1__ unlocked merchant ships at future islands.[/font] upgrade_rockets=[font=heading-1]__1__ unlocked the sale of rockets at future quest markets.[/font] +upgrade_hold_crowsnest_form=Extra Hold +upgrade_power_crowsnest_form=Power +upgrade_merchants_crowsnest_form=Unlock Merchants +upgrade_rockets_crowsnest_form=Unlock Rockets @@ -193,7 +197,6 @@ surface_label_hold=Ship's Hold - role_officer=Officer role_officer_description=Assigned by the captain, officers can use the Captain's shop and access privileged chests. role_captain=Captain @@ -307,6 +310,8 @@ proposal_propose=__1__ proposed the run __2__ [Capacity __3__]. proposal_retracted=Proposal __1__ retracted. proposal_abandoned=Proposal __1__ abandoned. +default_crew_name=NoName + loading_new_game=Loading new game... crew_summon=Crew summoned. @@ -400,7 +405,7 @@ gui_crew_window_captains_actions_revoke_class_tooltip=Put this player's class ba gui_crew_window_captains_actions_summon_crew=Summon Crew to Ship gui_crew_window_captains_actions_summon_crew_tooltip=Teleport crewmembers to the ship. gui_crew_window_captains_actions_tax=Tax Crew -gui_crew_window_captains_actions_tax_tooltip=For each non-officer in your crew, take a quarter of their doubloons (and other game-critical items). (or use /tax) +gui_crew_window_captains_actions_tax_tooltip=For each non-officer in your crew, take __1__% of their doubloons (and their other game-critical items). (or use /tax) gui_crew_window_captains_actions_undock_tip=To undock, use the top toolbar. gui_crew_window_crew_age=Age: __1__ @@ -420,6 +425,8 @@ gui_info_updates=Updates gui_info_tips=Tips gui_info_credits=Credits +gui_fuel_1=Fuel: + gui_minimap_tooltip=LMB: Zoom in.\nRMB: Zoom out.\nMMB: Scale window. gui_minimap_outside_view=Outside View gui_minimap_switch_left=Auto Show Map — On diff --git a/maps/pirates/ai.lua b/maps/pirates/ai.lua index 051233e3..a376f650 100644 --- a/maps/pirates/ai.lua +++ b/maps/pirates/ai.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Balance = require 'maps.pirates.balance' @@ -295,7 +297,7 @@ function Public.create_mail_delivery_biters() --these travel cross-map between b local spawners = surface.find_entities_filtered{name = 'biter-spawner', force = enemy_force_name} - local try_how_many_groups = Math.min(Math.max(0, (#spawners - 8) / 100), 4) + local try_how_many_groups = Math.clamp(0, 4, (#spawners - 8) / 100) for i = 1, try_how_many_groups do if Math.random(2) == 1 then diff --git a/maps/pirates/api_events.lua b/maps/pirates/api_events.lua index c1f91c46..b005b2cf 100644 --- a/maps/pirates/api_events.lua +++ b/maps/pirates/api_events.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Balance = require 'maps.pirates.balance' @@ -720,7 +722,8 @@ local function event_on_player_mined_entity(event) local baseamount = 4 --minimum 1 wood - local amount = Math.max(Math.ceil(Math.min(available, baseamount * available/starting)),1) + local amount = Math.clamp(1, Math.ceil(available), Math.ceil(baseamount * available/starting)) + destination.dynamic_data.wood_remaining = destination.dynamic_data.wood_remaining - amount if memory.classes_table and memory.classes_table[event.player_index] and memory.classes_table[event.player_index] == Classes.enum.LUMBERJACK then @@ -1184,7 +1187,7 @@ local function event_on_player_joined_game(event) end if _DEBUG then - game.print('Debug mode on. Use /go to get started') + game.print('Debug mode on. Use /go to get started, /1 /4 /32 etc to change game speed.') end local crew_to_put_back_in = nil diff --git a/maps/pirates/api_on_tick.lua b/maps/pirates/api_on_tick.lua index a0bb9cfb..fb188417 100644 --- a/maps/pirates/api_on_tick.lua +++ b/maps/pirates/api_on_tick.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + --luacheck: ignore --luacheck ignores because tickinterval arguments are a code templating choice... diff --git a/maps/pirates/balance.lua b/maps/pirates/balance.lua index 1fdb61f0..1526911e 100644 --- a/maps/pirates/balance.lua +++ b/maps/pirates/balance.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Public = {} local Math = require 'maps.pirates.math' diff --git a/maps/pirates/boat_upgrades.lua b/maps/pirates/boat_upgrades.lua index acf0025c..31b9f1c6 100644 --- a/maps/pirates/boat_upgrades.lua +++ b/maps/pirates/boat_upgrades.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' -- local Roles = require 'maps.pirates.roles.roles' @@ -38,10 +40,10 @@ Public.List = { } Public.crowsnest_display_form = { - [enum.EXTRA_HOLD] = 'Extra Hold', - [enum.MORE_POWER] = 'Power', - [enum.UNLOCK_MERCHANTS] = 'Unlock Merchants', - [enum.ROCKETS_FOR_SALE] = 'Unlock Rockets', + [enum.EXTRA_HOLD] = {'pirates.upgrade_hold_crowsnest_form'}, + [enum.MORE_POWER] = {'pirates.upgrade_power_crowsnest_form'}, + [enum.UNLOCK_MERCHANTS] = {'pirates.upgrade_merchants_crowsnest_form'}, + [enum.ROCKETS_FOR_SALE] = {'pirates.upgrade_rockets_crowsnest_form'}, } -- WARNING: The dock market pulls from these values, but the Crowsnest caption pulls data from main_shop_data_1. So don't change one without the other diff --git a/maps/pirates/commands.lua b/maps/pirates/commands.lua index 550ee587..1c7fa4b9 100644 --- a/maps/pirates/commands.lua +++ b/maps/pirates/commands.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + --luacheck: ignore --luacheck ignores because mass requires is a code templating choice... diff --git a/maps/pirates/common.lua b/maps/pirates/common.lua index 5fd5c34e..e9633fda 100644 --- a/maps/pirates/common.lua +++ b/maps/pirates/common.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Math = require 'maps.pirates.math' local Raffle = require 'maps.pirates.raffle' @@ -38,6 +40,8 @@ Public.structure_ensure_chunk_radius = 2 Public.quartermaster_range = 19 Public.allow_barreling_off_ship = true +Public.coin_tax_percentage = 10 + Public.fraction_of_map_loaded_at_sea = 1 Public.map_loading_ticks_atsea = 68 * 60 Public.map_loading_ticks_atsea_maze = 80 * 60 @@ -88,7 +92,7 @@ function Public.capacity() return Memory.get_crew_memory().capacity end -- function Public.mode() return Memory.get_crew_memory().mode end function Public.overworldx() return Memory.get_crew_memory().overworldx end function Public.game_completion_progress() return Public.overworldx()/CoreData.victory_x end -function Public.game_completion_progress_capped() return Math.min(Public.overworldx()/CoreData.victory_x, 1) end +function Public.game_completion_progress_capped() return Math.clamp(0, 1, Public.overworldx()/CoreData.victory_x) end function Public.capacity_scale() local capacity = Public.capacity() if not capacity then --e.g. for EE wattage on boats not owned by a crew diff --git a/maps/pirates/coredata.lua b/maps/pirates/coredata.lua index f610884e..0d0260ed 100644 --- a/maps/pirates/coredata.lua +++ b/maps/pirates/coredata.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Math = require 'maps.pirates.math' local _inspect = require 'utils.inspect'.inspect @@ -116,29 +118,29 @@ Public.difficulty_options = { {value = 1.0, icon = 'item/piercing-rounds-magazine', text = {'pirates.difficulty_normal'}, associated_color = {r = 255, g = 255, b = 50}}, - {value = 1.45, icon = 'item/uranium-rounds-magazine', text = {'pirates.difficutly_hard'}, associated_color = {r = 255, g = 50, b = 50}}, + {value = 1.4, icon = 'item/uranium-rounds-magazine', text = {'pirates.difficutly_hard'}, associated_color = {r = 255, g = 50, b = 50}}, {value = 2.1, icon = 'item/atomic-bomb', text = {'pirates.difficulty_nightmare'}, associated_color = {r = 170, g = 60, b = 60}}, } function Public.get_difficulty_option_from_value(difficulty_value) - -- given a difficulty value, key in to the closesy entry in the above table. (organising things this way allows us to make changes to the 'value' keys in the above table) - if difficulty_value <= 0.7 then + -- given a difficulty value, key in to the closesy entry in the above table. (organising things this way allows us to make changes to the 'value' keys in the above table without disrupting e.g. past highscores data) + if difficulty_value <= 0.8 then return 1 elseif difficulty_value < 1.2 then return 2 - elseif difficulty_value <= 2 then + elseif difficulty_value <= 1.75 then return 3 else return 4 end end function Public.get_difficulty_option_informal_name_from_value(difficulty_value) - -- given a difficulty value, provide a simple named description of the difficulty - if difficulty_value <= 0.7 then + -- given a difficulty value, provide a simple named description of the difficulty. for internal use + if difficulty_value <= 0.8 then return 'easy' elseif difficulty_value < 1.2 then return 'normal' - elseif difficulty_value <= 2 then + elseif difficulty_value <= 1.75 then return 'hard' else return 'nightmare' diff --git a/maps/pirates/crew.lua b/maps/pirates/crew.lua index c616278b..091a62cc 100644 --- a/maps/pirates/crew.lua +++ b/maps/pirates/crew.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Balance = require 'maps.pirates.balance' local _inspect = require 'utils.inspect'.inspect diff --git a/maps/pirates/custom_events.lua b/maps/pirates/custom_events.lua index fa8ec593..d59354c6 100644 --- a/maps/pirates/custom_events.lua +++ b/maps/pirates/custom_events.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Event = require 'utils.event' diff --git a/maps/pirates/effects.lua b/maps/pirates/effects.lua index 931ced69..682ec43f 100644 --- a/maps/pirates/effects.lua +++ b/maps/pirates/effects.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Math = require 'maps.pirates.math' -- local Memory = require 'maps.pirates.memory' diff --git a/maps/pirates/gui/color.lua b/maps/pirates/gui/color.lua index 0c547fc4..50ae3495 100644 --- a/maps/pirates/gui/color.lua +++ b/maps/pirates/gui/color.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Memory = require 'maps.pirates.memory' -- local Utils = require 'maps.pirates.utils_local' diff --git a/maps/pirates/gui/common.lua b/maps/pirates/gui/common.lua index 63428e00..fa74045d 100644 --- a/maps/pirates/gui/common.lua +++ b/maps/pirates/gui/common.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Common = require 'maps.pirates.common' diff --git a/maps/pirates/gui/crew.lua b/maps/pirates/gui/crew.lua index 8d374455..c9d30437 100644 --- a/maps/pirates/gui/crew.lua +++ b/maps/pirates/gui/crew.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Common = require 'maps.pirates.common' @@ -336,7 +338,7 @@ function Public.toggle_window(player) flow3.style.minimal_width = 95 flow3.style.font = 'default-bold' flow3.style.font_color = {r=0.10, g=0.10, b=0.10} - flow3.tooltip = {'pirates.gui_crew_window_captains_actions_tax_tooltip'} + flow3.tooltip = {'pirates.gui_crew_window_captains_actions_tax_tooltip', Common.coin_tax_percentage} flow2 = flow.add({ diff --git a/maps/pirates/gui/evo.lua b/maps/pirates/gui/evo.lua index de6ff747..921d8b44 100644 --- a/maps/pirates/gui/evo.lua +++ b/maps/pirates/gui/evo.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Common = require 'maps.pirates.common' local Balance = require 'maps.pirates.balance' diff --git a/maps/pirates/gui/fuel.lua b/maps/pirates/gui/fuel.lua index b4168ce0..51af525e 100644 --- a/maps/pirates/gui/fuel.lua +++ b/maps/pirates/gui/fuel.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' -- local Common = require 'maps.pirates.common' diff --git a/maps/pirates/gui/gui.lua b/maps/pirates/gui/gui.lua index b55ec4ff..d07339b1 100644 --- a/maps/pirates/gui/gui.lua +++ b/maps/pirates/gui/gui.lua @@ -1,3 +1,4 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' @@ -154,7 +155,7 @@ local function create_gui(player) }) flow3.style.font = 'default-large-semibold' flow3.style.font_color = GuiCommon.bold_font_color - flow3.caption = 'Fuel:' + flow3.caption = {'pirates.gui_fuel_1'} flow3 = flow2.add({ name = 'fuel_label_1', @@ -937,7 +938,7 @@ function Public.update_gui(player) flow2.fuel_label_1.caption = Utils.bignumber_abbrevform(memory.stored_fuel or 0) .. '[item=coal]' flow2.fuel_label_2.caption = Utils.negative_rate_abbrevform(memory.fuel_depletion_rate_memoized or 0) - local color_scale = Math.max(Math.min((- (memory.fuel_depletion_rate_memoized or 0))/30, 1),0) + local color_scale = Math.clamp(0, 1, (- (memory.fuel_depletion_rate_memoized or 0))/30) flow2.fuel_label_2.style.font_color = { r = GuiCommon.fuel_color_1.r * (1-color_scale) + GuiCommon.fuel_color_2.r * color_scale, g = GuiCommon.fuel_color_1.g * (1-color_scale) + GuiCommon.fuel_color_2.g * color_scale, diff --git a/maps/pirates/gui/info.lua b/maps/pirates/gui/info.lua index 1a17cebc..9424f994 100644 --- a/maps/pirates/gui/info.lua +++ b/maps/pirates/gui/info.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Memory = require 'maps.pirates.memory' -- local Common = require 'maps.pirates.common' diff --git a/maps/pirates/gui/minimap.lua b/maps/pirates/gui/minimap.lua index a8f5d99a..2304a25e 100644 --- a/maps/pirates/gui/minimap.lua +++ b/maps/pirates/gui/minimap.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Common = require 'maps.pirates.common' diff --git a/maps/pirates/gui/progress.lua b/maps/pirates/gui/progress.lua index 47c6c037..0eb10d76 100644 --- a/maps/pirates/gui/progress.lua +++ b/maps/pirates/gui/progress.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Common = require 'maps.pirates.common' diff --git a/maps/pirates/gui/runs.lua b/maps/pirates/gui/runs.lua index 2079e7f7..63f0e3f4 100644 --- a/maps/pirates/gui/runs.lua +++ b/maps/pirates/gui/runs.lua @@ -1,3 +1,4 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. local Memory = require 'maps.pirates.memory' local Common = require 'maps.pirates.common' @@ -586,7 +587,7 @@ function Public.click(event) -- local difficulty_option = flow.proposals.body.proposal_maker.body.options.difficulty.difficulty.slider.slider_value -- local mode_option = flow.proposals.body.proposal_maker.body.options.mode.mode.switch.switch_state - if (not proposal_name) or (proposal_name == '') then proposal_name = 'NoName' end + if (not proposal_name) or (proposal_name == '') then proposal_name = {'pirates.default_crew_name'} end -- make name unique -- local unique, changed = true, false diff --git a/maps/pirates/highscore.lua b/maps/pirates/highscore.lua index dcf0f968..a5c6aed1 100644 --- a/maps/pirates/highscore.lua +++ b/maps/pirates/highscore.lua @@ -1,4 +1,7 @@ --- Adapted from mountain_fortress_v3 highscores.lua +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + + +-- == This code is mostly a fork of the file from Mountain Fortress local Event = require 'utils.event' local Global = require 'utils.global' @@ -22,8 +25,6 @@ local score_key_debug = 'pirate_ship_scores_debug' local score_key_modded = 'pirate_ship_scores_modded' --- == This code is mostly a fork of the file from Mountain Fortress - local Public = {} local insert = table.insert diff --git a/maps/pirates/locally_maintained_comfy_forks/tick_tack_trap.lua b/maps/pirates/locally_maintained_comfy_forks/tick_tack_trap.lua index 8ba70741..d5a61655 100644 --- a/maps/pirates/locally_maintained_comfy_forks/tick_tack_trap.lua +++ b/maps/pirates/locally_maintained_comfy_forks/tick_tack_trap.lua @@ -1,3 +1,4 @@ + -- by mewmew -- modified by Gerkiz diff --git a/maps/pirates/loot.lua b/maps/pirates/loot.lua index 731d91d5..8f1da38a 100644 --- a/maps/pirates/loot.lua +++ b/maps/pirates/loot.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Math = require 'maps.pirates.math' -- local Memory = require 'maps.pirates.memory' @@ -212,7 +214,7 @@ function Public.wooden_chest_loot() local num = 1 return Public.chest_loot(num, - Math.max(0,Math.min(1, Math.sloped(Common.difficulty_scale(),1/2) * Common.game_completion_progress())) --enforce 0 to 1 + Math.clamp(0, 1, Math.sloped(Common.difficulty_scale(),1/2) * Common.game_completion_progress()) ) end @@ -220,7 +222,7 @@ function Public.iron_chest_loot() local num = 2 local loot = Public.chest_loot(num, - Math.max(0,Math.min(1, Math.sloped(Common.difficulty_scale(),1/2) * (5/100 + Common.game_completion_progress())) ) --enforce 0 to 1 + Math.clamp(0, 1, Math.sloped(Common.difficulty_scale(),1/2) * (5/100 + Common.game_completion_progress())) ) --reward higher difficulties with better loot loot[#loot + 1] = {name = 'coin', count = Math.random(500,1500)} @@ -231,7 +233,7 @@ function Public.covered_wooden_chest_loot() local num = 2 local loot = Public.chest_loot(num, - Math.max(0,Math.min(1, Math.sloped(Common.difficulty_scale(),1/2) * (18/100 + Common.game_completion_progress()) )) --enforce 0 to 1 + Math.clamp(0, 1, Math.sloped(Common.difficulty_scale(),1/2) * (18/100 + Common.game_completion_progress())) ) --reward higher difficulties with better loot return loot @@ -248,7 +250,7 @@ end function Public.covered_wooden_chest_loot_2() return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.chest_loot_data_raw), 2, - Math.max(0,Math.min(1, Math.sloped(Common.difficulty_scale(),1/2) * (10/100 + Common.game_completion_progress())))) + Math.clamp(0, 1, Math.sloped(Common.difficulty_scale(),1/2) * (10/100 + Common.game_completion_progress()))) end function Public.stone_furnace_loot() @@ -263,7 +265,7 @@ function Public.storage_tank_fluid_loot(force_type) ret = {name = 'crude-oil', amount = Math.random(3000, 12500)} elseif force_type == 'petroleum-gas' then ret = {name = 'petroleum-gas', amount = Math.random(1500, 7500)} - elseif rng < 6 then + elseif rng <= 6 then ret = {name = 'crude-oil', amount = Math.random(1500, 4500)} elseif rng == 7 then ret = {name = 'light-oil', amount = Math.random(1500, 3500)} @@ -321,7 +323,7 @@ function Public.maze_camp_loot() if Math.random(10) <= 7 then return {Public.random_plates()} else - return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.chest_loot_data_raw), 1, Math.max(0,Math.min(1, Math.sloped(Common.difficulty_scale(),1/2) * (15/100 + Common.game_completion_progress())))) + return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.chest_loot_data_raw), 1, Math.clamp(0, 1, Math.sloped(Common.difficulty_scale(),1/2) * (15/100 + Common.game_completion_progress()))) end end @@ -337,7 +339,7 @@ Public.maze_lab_loot_data_raw = { } function Public.maze_lab_loot() - return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.maze_lab_loot_data_raw), 1, Math.max(0,Math.min(1, Math.sloped(Common.difficulty_scale(),1/2) * (Common.game_completion_progress())))) + return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.maze_lab_loot_data_raw), 1, Math.clamp(0, 1, Math.sloped(Common.difficulty_scale(),1/2) * (Common.game_completion_progress()))) end Public.maze_treasure_data_raw = { @@ -407,7 +409,7 @@ function Public.maze_treasure_loot() if Math.random(5) == 1 then return {Public.random_plates(8)} else - return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.maze_treasure_data_raw), 1, Math.max(0,Math.min(1, Math.sloped(Common.difficulty_scale(),1/2) * (Common.game_completion_progress())))) + return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.maze_treasure_data_raw), 1, Math.clamp(0, 1, Math.sloped(Common.difficulty_scale(),1/2) * (Common.game_completion_progress()))) end end @@ -456,7 +458,7 @@ Public.dredger_loot_raw = { } function Public.dredger_loot() - return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.dredger_loot_raw), 1, Math.max(0,Math.min(1, Common.game_completion_progress()))) + return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.dredger_loot_raw), 1, Math.clamp(0, 1, Common.game_completion_progress())) end return Public \ No newline at end of file diff --git a/maps/pirates/main.lua b/maps/pirates/main.lua index 6f18df0b..c205d68a 100644 --- a/maps/pirates/main.lua +++ b/maps/pirates/main.lua @@ -1,3 +1,4 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. --[[ Pirate Ship is maintained by thesixthroc and hosted by Comfy. diff --git a/maps/pirates/math.lua b/maps/pirates/math.lua index af995ba6..c58823fa 100644 --- a/maps/pirates/math.lua +++ b/maps/pirates/math.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Public = {} @@ -20,7 +22,6 @@ Public.round = math.round - --- SCALING CURVES --- function Public.sloped(x, slope) @@ -39,6 +40,12 @@ end -- exponent -1.2 -> {5.28, 2.30, 1.41, 1.00, 0.61, 0.27, 0.14} + + +function Public.clamp(min, max, number) + return Public.min(max, Public.max(min, number)) +end + function Public.sgn(number) return number > 0 and 1 or (number == 0 and 0 or -1) end @@ -48,9 +55,9 @@ function Public.length(vec) end function Public.slopefromto(x, from, to) - return Public.max(0,Public.min(1, - (x - from) / (to - from) - )) + return Public.clamp(0, 1, + (x - from) / (to - from) + ) end function Public.distance(vec1, vec2) diff --git a/maps/pirates/memory.lua b/maps/pirates/memory.lua index 83f77d03..2f35a5e2 100644 --- a/maps/pirates/memory.lua +++ b/maps/pirates/memory.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Global = require 'utils.global' -- local CoreData = require 'maps.pirates.coredata' diff --git a/maps/pirates/ores.lua b/maps/pirates/ores.lua index dc238a51..cd535e7f 100644 --- a/maps/pirates/ores.lua +++ b/maps/pirates/ores.lua @@ -1,3 +1,4 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. -- local Balance = require 'maps.pirates.balance' -- local Memory = require 'maps.pirates.memory' diff --git a/maps/pirates/overworld.lua b/maps/pirates/overworld.lua index e7c55794..aa9798fc 100644 --- a/maps/pirates/overworld.lua +++ b/maps/pirates/overworld.lua @@ -1,3 +1,4 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. local Public = {} @@ -423,14 +424,14 @@ function Public.generate_overworld_destination(p) local x = Crowsnest.platformrightmostedge + dest.overworld_position.x local y = dest.overworld_position.y if dest.static_params.upgrade_for_sale then - local display_form = Upgrades.crowsnest_display_form[dest.static_params.upgrade_for_sale] + local display_form = {'', Upgrades.crowsnest_display_form[dest.static_params.upgrade_for_sale], ':'} if not dest.dynamic_data.crowsnest_renderings then dest.dynamic_data.crowsnest_renderings = {} end dest.dynamic_data.crowsnest_renderings.base_text_rendering = rendering.draw_text{ - text = display_form .. ':', + text = display_form, surface = surface, target = {x = x + 5.5, y = y + 2.5}, color = CoreData.colors.renderingtext_green, @@ -538,7 +539,7 @@ function Public.ensure_lane_generated_up_to(lane_yvalue, x) for _, dest in pairs(memory.destinations) do if dest.static_params.upgrade_for_sale and dest.dynamic_data.crowsnest_renderings then if rendering.is_valid(dest.dynamic_data.crowsnest_renderings.base_text_rendering) then - rendering.set_text(dest.dynamic_data.crowsnest_renderings.base_text_rendering, Upgrades.crowsnest_display_form[dest.static_params.upgrade_for_sale] .. ':') + rendering.set_text(dest.dynamic_data.crowsnest_renderings.base_text_rendering, {'', Upgrades.crowsnest_display_form[dest.static_params.upgrade_for_sale], ':'}) end for rendering_name, r in pairs(dest.dynamic_data.crowsnest_renderings) do if type(r) == 'table' and r.text_rendering and rendering.is_valid(r.text_rendering) then diff --git a/maps/pirates/parrot.lua b/maps/pirates/parrot.lua index 8ca2686f..90830b4b 100644 --- a/maps/pirates/parrot.lua +++ b/maps/pirates/parrot.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Math = require 'maps.pirates.math' -- local Memory = require 'maps.pirates.memory' diff --git a/maps/pirates/player_colors.lua b/maps/pirates/player_colors.lua index 8045818d..ab39bd34 100644 --- a/maps/pirates/player_colors.lua +++ b/maps/pirates/player_colors.lua @@ -1,3 +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 = {} diff --git a/maps/pirates/progression.lua b/maps/pirates/progression.lua index e15bb48a..e3d4348e 100644 --- a/maps/pirates/progression.lua +++ b/maps/pirates/progression.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Public = {} diff --git a/maps/pirates/quest.lua b/maps/pirates/quest.lua index 48fea5eb..aee0f7bd 100644 --- a/maps/pirates/quest.lua +++ b/maps/pirates/quest.lua @@ -1,3 +1,4 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. local Memory = require 'maps.pirates.memory' -- local Roles = require 'maps.pirates.roles.roles' diff --git a/maps/pirates/raffle.lua b/maps/pirates/raffle.lua index 69a3bfdb..64b52262 100644 --- a/maps/pirates/raffle.lua +++ b/maps/pirates/raffle.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Math = require 'maps.pirates.math' local Public = {} diff --git a/maps/pirates/reference/default_map_settings.lua b/maps/pirates/reference/default_map_settings.lua index 7ce74781..834340a3 100644 --- a/maps/pirates/reference/default_map_settings.lua +++ b/maps/pirates/reference/default_map_settings.lua @@ -1,3 +1,4 @@ + -- data:extend( -- { -- { diff --git a/maps/pirates/roles/classes.lua b/maps/pirates/roles/classes.lua index f159f86d..3c829dd5 100644 --- a/maps/pirates/roles/classes.lua +++ b/maps/pirates/roles/classes.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Balance = require 'maps.pirates.balance' local _inspect = require 'utils.inspect'.inspect @@ -255,7 +257,7 @@ local function class_on_player_used_capsule(event) if multiplier > 0 then local timescale = 60*30 * Math.max((Balance.game_slowness_scale())^(2/3),0.8) if memory.gourmet_recency_tick then - multiplier = multiplier * Math.max(0.2, Math.min(5, (1/5)^((memory.gourmet_recency_tick - game.tick)/(60*300)))) + multiplier = multiplier *Math.clamp(0.2, 5, (1/5)^((memory.gourmet_recency_tick - game.tick)/(60*300))) memory.gourmet_recency_tick = Math.max(memory.gourmet_recency_tick, game.tick - timescale*10) + timescale else multiplier = multiplier * 5 diff --git a/maps/pirates/roles/roles.lua b/maps/pirates/roles/roles.lua index dd96b85d..b28906a6 100644 --- a/maps/pirates/roles/roles.lua +++ b/maps/pirates/roles/roles.lua @@ -1,3 +1,4 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. local Session = require 'utils.datastore.session_data' local Antigrief = require 'utils.antigrief' @@ -414,7 +415,7 @@ function Public.captain_tax(captain_index) if inv and inv.valid then for _, i in pairs(items_to_req) do local amount = inv.get_item_count(i) - if i == 'coin' then amount = Math.floor(amount/10) end + if i == 'coin' then amount = Math.floor(amount/100*Common.coin_tax_percentage) end if amount and amount > 0 then inv.remove{name=i, count=amount} captain_inv.insert{name=i, count=amount} diff --git a/maps/pirates/roles/tick_functions.lua b/maps/pirates/roles/tick_functions.lua index 3b5c532d..7026d3fd 100644 --- a/maps/pirates/roles/tick_functions.lua +++ b/maps/pirates/roles/tick_functions.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + --luacheck: ignore --luacheck ignores because tickinterval arguments are a code templating choice... diff --git a/maps/pirates/shop/captains.lua b/maps/pirates/shop/captains.lua index b39ad5a0..5db6c547 100644 --- a/maps/pirates/shop/captains.lua +++ b/maps/pirates/shop/captains.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' -- local Roles = require 'maps.pirates.roles.roles' diff --git a/maps/pirates/shop/covered.lua b/maps/pirates/shop/covered.lua index e20bd6ed..69e8d73e 100644 --- a/maps/pirates/shop/covered.lua +++ b/maps/pirates/shop/covered.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' -- local Roles = require 'maps.pirates.roles.roles' diff --git a/maps/pirates/shop/dock.lua b/maps/pirates/shop/dock.lua index e92d14fc..1055a205 100644 --- a/maps/pirates/shop/dock.lua +++ b/maps/pirates/shop/dock.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' -- local Roles = require 'maps.pirates.roles.roles' diff --git a/maps/pirates/shop/merchants.lua b/maps/pirates/shop/merchants.lua index cd31a3f3..2f183e78 100644 --- a/maps/pirates/shop/merchants.lua +++ b/maps/pirates/shop/merchants.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Memory = require 'maps.pirates.memory' -- local Roles = require 'maps.pirates.roles.roles' diff --git a/maps/pirates/shop/shop.lua b/maps/pirates/shop/shop.lua index a380106c..cc309cc6 100644 --- a/maps/pirates/shop/shop.lua +++ b/maps/pirates/shop/shop.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' -- local Roles = require 'maps.pirates.roles.roles' diff --git a/maps/pirates/structures/boats/boats.lua b/maps/pirates/structures/boats/boats.lua index 2d2b56d0..bfb85d8a 100644 --- a/maps/pirates/structures/boats/boats.lua +++ b/maps/pirates/structures/boats/boats.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/structures/boats/merchant_1/data.lua b/maps/pirates/structures/boats/merchant_1/data.lua index 979cf22f..a01c5353 100644 --- a/maps/pirates/structures/boats/merchant_1/data.lua +++ b/maps/pirates/structures/boats/merchant_1/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Public = {} diff --git a/maps/pirates/structures/boats/merchant_1/merchant_1.lua b/maps/pirates/structures/boats/merchant_1/merchant_1.lua index ad34aba8..e29b70c6 100644 --- a/maps/pirates/structures/boats/merchant_1/merchant_1.lua +++ b/maps/pirates/structures/boats/merchant_1/merchant_1.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Data = require 'maps.pirates.structures.boats.merchant_1.data' diff --git a/maps/pirates/structures/boats/raft/data.lua b/maps/pirates/structures/boats/raft/data.lua index 055cac59..58107b3e 100644 --- a/maps/pirates/structures/boats/raft/data.lua +++ b/maps/pirates/structures/boats/raft/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Public = {} diff --git a/maps/pirates/structures/boats/raft/raft.lua b/maps/pirates/structures/boats/raft/raft.lua index 38d951ad..860e9625 100644 --- a/maps/pirates/structures/boats/raft/raft.lua +++ b/maps/pirates/structures/boats/raft/raft.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Data = require 'maps.pirates.structures.boats.raft.data' diff --git a/maps/pirates/structures/boats/raft_large/data.lua b/maps/pirates/structures/boats/raft_large/data.lua index 65d17bf1..87acff19 100644 --- a/maps/pirates/structures/boats/raft_large/data.lua +++ b/maps/pirates/structures/boats/raft_large/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Public = {} diff --git a/maps/pirates/structures/boats/raft_large/raft_large.lua b/maps/pirates/structures/boats/raft_large/raft_large.lua index 89fda127..2f227a45 100644 --- a/maps/pirates/structures/boats/raft_large/raft_large.lua +++ b/maps/pirates/structures/boats/raft_large/raft_large.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Data = require 'maps.pirates.structures.boats.raft_large.data' diff --git a/maps/pirates/structures/boats/sloop/data.lua b/maps/pirates/structures/boats/sloop/data.lua index 29ad5286..1ed3b5e6 100644 --- a/maps/pirates/structures/boats/sloop/data.lua +++ b/maps/pirates/structures/boats/sloop/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Public = {} diff --git a/maps/pirates/structures/boats/sloop/sloop.lua b/maps/pirates/structures/boats/sloop/sloop.lua index ca31189c..841aebb9 100644 --- a/maps/pirates/structures/boats/sloop/sloop.lua +++ b/maps/pirates/structures/boats/sloop/sloop.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Data = require 'maps.pirates.structures.boats.sloop.data' diff --git a/maps/pirates/structures/island_structures/island_structures.lua b/maps/pirates/structures/island_structures/island_structures.lua index 064fcf26..9bdae707 100644 --- a/maps/pirates/structures/island_structures/island_structures.lua +++ b/maps/pirates/structures/island_structures/island_structures.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Memory = require 'maps.pirates.memory' -- local Math = require 'maps.pirates.math' diff --git a/maps/pirates/structures/island_structures/mattisso/data.lua b/maps/pirates/structures/island_structures/mattisso/data.lua index 722c62d9..5ebe289d 100644 --- a/maps/pirates/structures/island_structures/mattisso/data.lua +++ b/maps/pirates/structures/island_structures/mattisso/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Public = {} diff --git a/maps/pirates/structures/island_structures/mattisso/mattisso.lua b/maps/pirates/structures/island_structures/mattisso/mattisso.lua index 95666c10..50e8979a 100644 --- a/maps/pirates/structures/island_structures/mattisso/mattisso.lua +++ b/maps/pirates/structures/island_structures/mattisso/mattisso.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Data = require 'maps.pirates.structures.island_structures.mattisso.data' diff --git a/maps/pirates/structures/island_structures/roc/data.lua b/maps/pirates/structures/island_structures/roc/data.lua index e708aec7..89d68ea7 100644 --- a/maps/pirates/structures/island_structures/roc/data.lua +++ b/maps/pirates/structures/island_structures/roc/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Public = {} local CoreData = require 'maps.pirates.coredata' diff --git a/maps/pirates/structures/island_structures/roc/roc.lua b/maps/pirates/structures/island_structures/roc/roc.lua index ca1439f8..37f368ed 100644 --- a/maps/pirates/structures/island_structures/roc/roc.lua +++ b/maps/pirates/structures/island_structures/roc/roc.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Data = require 'maps.pirates.structures.island_structures.roc.data' diff --git a/maps/pirates/structures/quest_structures/furnace1/data.lua b/maps/pirates/structures/quest_structures/furnace1/data.lua index 235b12f6..07b8f3a7 100644 --- a/maps/pirates/structures/quest_structures/furnace1/data.lua +++ b/maps/pirates/structures/quest_structures/furnace1/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Public = {} Public.step1 = { diff --git a/maps/pirates/structures/quest_structures/furnace1/furnace1.lua b/maps/pirates/structures/quest_structures/furnace1/furnace1.lua index 5d5c1d6f..2385b181 100644 --- a/maps/pirates/structures/quest_structures/furnace1/furnace1.lua +++ b/maps/pirates/structures/quest_structures/furnace1/furnace1.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' @@ -259,7 +261,7 @@ Public.entry_price_data_raw = {-- choose things which make interesting minifacto } function Public.entry_price() - local lambda = Math.max(Math.min(Math.sloped(Common.difficulty_scale(),1/2) * Common.game_completion_progress(), 1), 0) + local lambda = Math.clamp(0, 1, Math.sloped(Common.difficulty_scale(),1/2) * Common.game_completion_progress()) local item = Raffle.LambdaRaffle(Public.entry_price_data_raw, lambda) diff --git a/maps/pirates/structures/quest_structures/market1/data.lua b/maps/pirates/structures/quest_structures/market1/data.lua index 3f718308..08d5072f 100644 --- a/maps/pirates/structures/quest_structures/market1/data.lua +++ b/maps/pirates/structures/quest_structures/market1/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Public = {} Public.step1 = { diff --git a/maps/pirates/structures/quest_structures/market1/market1.lua b/maps/pirates/structures/quest_structures/market1/market1.lua index 90af6819..6af17909 100644 --- a/maps/pirates/structures/quest_structures/market1/market1.lua +++ b/maps/pirates/structures/quest_structures/market1/market1.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' @@ -258,7 +260,7 @@ Public.entry_price_data_raw = { } function Public.entry_price() - local lambda = Math.max(Math.min(Math.sloped(Common.difficulty_scale(),1/2) * Common.game_completion_progress(), 1), 0) + local lambda = Math.clamp(0, 1, Math.sloped(Common.difficulty_scale(),1/2) * Common.game_completion_progress()) local item = Raffle.LambdaRaffle(Public.entry_price_data_raw, lambda) diff --git a/maps/pirates/structures/quest_structures/old_data.lua b/maps/pirates/structures/quest_structures/old_data.lua index 76c92893..d93f6f4d 100644 --- a/maps/pirates/structures/quest_structures/old_data.lua +++ b/maps/pirates/structures/quest_structures/old_data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Public = {} Public.covered1 = { diff --git a/maps/pirates/structures/quest_structures/quest_structures.lua b/maps/pirates/structures/quest_structures/quest_structures.lua index d5bcb34c..ff1beb99 100644 --- a/maps/pirates/structures/quest_structures/quest_structures.lua +++ b/maps/pirates/structures/quest_structures/quest_structures.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/structures/structures.lua b/maps/pirates/structures/structures.lua index 20ed32ce..09cbbc28 100644 --- a/maps/pirates/structures/structures.lua +++ b/maps/pirates/structures/structures.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/cabin.lua b/maps/pirates/surfaces/cabin.lua index 09e04867..96e881b0 100644 --- a/maps/pirates/surfaces/cabin.lua +++ b/maps/pirates/surfaces/cabin.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' -- local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/channel/channel.lua b/maps/pirates/surfaces/channel/channel.lua index 37b3d09e..b96eed29 100644 --- a/maps/pirates/surfaces/channel/channel.lua +++ b/maps/pirates/surfaces/channel/channel.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Memory = require 'maps.pirates.memory' -- local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/channel/data.lua b/maps/pirates/surfaces/channel/data.lua index 45ee5937..c8f278df 100644 --- a/maps/pirates/surfaces/channel/data.lua +++ b/maps/pirates/surfaces/channel/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Common = require 'maps.pirates.common' -- local Utils = require 'maps.pirates.utils_local' diff --git a/maps/pirates/surfaces/common.lua b/maps/pirates/surfaces/common.lua index 3ce74aec..acab14fe 100644 --- a/maps/pirates/surfaces/common.lua +++ b/maps/pirates/surfaces/common.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Memory = require 'maps.pirates.memory' -- local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/crowsnest.lua b/maps/pirates/surfaces/crowsnest.lua index 5da33a9c..aa6f01ee 100644 --- a/maps/pirates/surfaces/crowsnest.lua +++ b/maps/pirates/surfaces/crowsnest.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' -- local Balance = require 'maps.pirates.balance' diff --git a/maps/pirates/surfaces/dock.lua b/maps/pirates/surfaces/dock.lua index a11adf5c..f45421a2 100644 --- a/maps/pirates/surfaces/dock.lua +++ b/maps/pirates/surfaces/dock.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/hold.lua b/maps/pirates/surfaces/hold.lua index 1b5343e2..aa13b4d9 100644 --- a/maps/pirates/surfaces/hold.lua +++ b/maps/pirates/surfaces/hold.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' -- local Math = require 'maps.pirates.math' @@ -232,7 +234,7 @@ function Public.create_hold_surface(nth) else if nth==2 then if memory.shiphold_rendering_1 then - rendering.set_text(memory.shiphold_rendering_1, 'Ship\'s Hold: -1') + rendering.set_text(memory.shiphold_rendering_1, {'pirates.surface_label_hold_nth', -1}) end end rendering.draw_text{ diff --git a/maps/pirates/surfaces/islands/common.lua b/maps/pirates/surfaces/islands/common.lua index 5fdfa376..ba13b083 100644 --- a/maps/pirates/surfaces/islands/common.lua +++ b/maps/pirates/surfaces/islands/common.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/islands/first/data.lua b/maps/pirates/surfaces/islands/first/data.lua index 51fd8603..df67db73 100644 --- a/maps/pirates/surfaces/islands/first/data.lua +++ b/maps/pirates/surfaces/islands/first/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Common = require 'maps.pirates.common' -- local Utils = require 'maps.pirates.utils_local' diff --git a/maps/pirates/surfaces/islands/first/first.lua b/maps/pirates/surfaces/islands/first/first.lua index 43c946c3..f9b0c12b 100644 --- a/maps/pirates/surfaces/islands/first/first.lua +++ b/maps/pirates/surfaces/islands/first/first.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/islands/horseshoe/data.lua b/maps/pirates/surfaces/islands/horseshoe/data.lua index 32533da7..43723a93 100644 --- a/maps/pirates/surfaces/islands/horseshoe/data.lua +++ b/maps/pirates/surfaces/islands/horseshoe/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Common = require 'maps.pirates.common' -- local Utils = require 'maps.pirates.utils_local' diff --git a/maps/pirates/surfaces/islands/horseshoe/horseshoe.lua b/maps/pirates/surfaces/islands/horseshoe/horseshoe.lua index b8dea526..867419ff 100644 --- a/maps/pirates/surfaces/islands/horseshoe/horseshoe.lua +++ b/maps/pirates/surfaces/islands/horseshoe/horseshoe.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/islands/hunt.lua b/maps/pirates/surfaces/islands/hunt.lua index 160a7570..784879c3 100644 --- a/maps/pirates/surfaces/islands/hunt.lua +++ b/maps/pirates/surfaces/islands/hunt.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/islands/islands.lua b/maps/pirates/surfaces/islands/islands.lua index 13471e9d..93f9e9a0 100644 --- a/maps/pirates/surfaces/islands/islands.lua +++ b/maps/pirates/surfaces/islands/islands.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' @@ -143,7 +145,9 @@ function Public.spawn_quest_structure(destination, points_to_avoid) for i = 1, 1 do p = Hunt.mid_farness_position_1(args, points_to_avoid) - QuestStructures.initialise_cached_quest_structure(p, QuestStructures.choose_quest_structure_type()) + if p then + QuestStructures.initialise_cached_quest_structure(p, QuestStructures.choose_quest_structure_type()) + end end return p diff --git a/maps/pirates/surfaces/islands/maze/data.lua b/maps/pirates/surfaces/islands/maze/data.lua index 0195519f..e5630a5c 100644 --- a/maps/pirates/surfaces/islands/maze/data.lua +++ b/maps/pirates/surfaces/islands/maze/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Common = require 'maps.pirates.common' -- local Utils = require 'maps.pirates.utils_local' diff --git a/maps/pirates/surfaces/islands/maze/maze.lua b/maps/pirates/surfaces/islands/maze/maze.lua index 3875f078..1f5e61a1 100644 --- a/maps/pirates/surfaces/islands/maze/maze.lua +++ b/maps/pirates/surfaces/islands/maze/maze.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/islands/radioactive/data.lua b/maps/pirates/surfaces/islands/radioactive/data.lua index 813b9047..8a070e26 100644 --- a/maps/pirates/surfaces/islands/radioactive/data.lua +++ b/maps/pirates/surfaces/islands/radioactive/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Common = require 'maps.pirates.common' -- local Utils = require 'maps.pirates.utils_local' diff --git a/maps/pirates/surfaces/islands/radioactive/radioactive.lua b/maps/pirates/surfaces/islands/radioactive/radioactive.lua index 541d892c..b11086f3 100644 --- a/maps/pirates/surfaces/islands/radioactive/radioactive.lua +++ b/maps/pirates/surfaces/islands/radioactive/radioactive.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/islands/red_desert/data.lua b/maps/pirates/surfaces/islands/red_desert/data.lua index d114ad0f..b7fb8f04 100644 --- a/maps/pirates/surfaces/islands/red_desert/data.lua +++ b/maps/pirates/surfaces/islands/red_desert/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Common = require 'maps.pirates.common' local CoreData = require 'maps.pirates.coredata' diff --git a/maps/pirates/surfaces/islands/red_desert/red_desert.lua b/maps/pirates/surfaces/islands/red_desert/red_desert.lua index 7f191b86..2a879c9b 100644 --- a/maps/pirates/surfaces/islands/red_desert/red_desert.lua +++ b/maps/pirates/surfaces/islands/red_desert/red_desert.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/islands/standard/data.lua b/maps/pirates/surfaces/islands/standard/data.lua index a6b6a290..b15c4f84 100644 --- a/maps/pirates/surfaces/islands/standard/data.lua +++ b/maps/pirates/surfaces/islands/standard/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Common = require 'maps.pirates.common' -- local Utils = require 'maps.pirates.utils_local' diff --git a/maps/pirates/surfaces/islands/standard/standard.lua b/maps/pirates/surfaces/islands/standard/standard.lua index 34b372b5..b9bf75d9 100644 --- a/maps/pirates/surfaces/islands/standard/standard.lua +++ b/maps/pirates/surfaces/islands/standard/standard.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/islands/standard_variant/data.lua b/maps/pirates/surfaces/islands/standard_variant/data.lua index fb8a2bbb..1655ff83 100644 --- a/maps/pirates/surfaces/islands/standard_variant/data.lua +++ b/maps/pirates/surfaces/islands/standard_variant/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Common = require 'maps.pirates.common' -- local Utils = require 'maps.pirates.utils_local' diff --git a/maps/pirates/surfaces/islands/standard_variant/standard_variant.lua b/maps/pirates/surfaces/islands/standard_variant/standard_variant.lua index 06d6d0de..160449ca 100644 --- a/maps/pirates/surfaces/islands/standard_variant/standard_variant.lua +++ b/maps/pirates/surfaces/islands/standard_variant/standard_variant.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/islands/swamp/data.lua b/maps/pirates/surfaces/islands/swamp/data.lua index c54879ea..76c57373 100644 --- a/maps/pirates/surfaces/islands/swamp/data.lua +++ b/maps/pirates/surfaces/islands/swamp/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Common = require 'maps.pirates.common' -- local Utils = require 'maps.pirates.utils_local' diff --git a/maps/pirates/surfaces/islands/swamp/swamp.lua b/maps/pirates/surfaces/islands/swamp/swamp.lua index 66267507..4f0f9db5 100644 --- a/maps/pirates/surfaces/islands/swamp/swamp.lua +++ b/maps/pirates/surfaces/islands/swamp/swamp.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/islands/walkways/data.lua b/maps/pirates/surfaces/islands/walkways/data.lua index b70b859d..9c67c774 100644 --- a/maps/pirates/surfaces/islands/walkways/data.lua +++ b/maps/pirates/surfaces/islands/walkways/data.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + -- local Common = require 'maps.pirates.common' -- local Utils = require 'maps.pirates.utils_local' diff --git a/maps/pirates/surfaces/islands/walkways/walkways.lua b/maps/pirates/surfaces/islands/walkways/walkways.lua index 64c342c0..60885723 100644 --- a/maps/pirates/surfaces/islands/walkways/walkways.lua +++ b/maps/pirates/surfaces/islands/walkways/walkways.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/lobby.lua b/maps/pirates/surfaces/lobby.lua index 35c8c58f..686e7435 100644 --- a/maps/pirates/surfaces/lobby.lua +++ b/maps/pirates/surfaces/lobby.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/sea/kraken.lua b/maps/pirates/surfaces/sea/kraken.lua index fffc6c21..6c360f05 100644 --- a/maps/pirates/surfaces/sea/kraken.lua +++ b/maps/pirates/surfaces/sea/kraken.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/sea/sea.lua b/maps/pirates/surfaces/sea/sea.lua index 73bbba3f..975a8a18 100644 --- a/maps/pirates/surfaces/sea/sea.lua +++ b/maps/pirates/surfaces/sea/sea.lua @@ -1,3 +1,4 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' diff --git a/maps/pirates/surfaces/surfaces.lua b/maps/pirates/surfaces/surfaces.lua index f993cf42..70a60b99 100644 --- a/maps/pirates/surfaces/surfaces.lua +++ b/maps/pirates/surfaces/surfaces.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Memory = require 'maps.pirates.memory' local Math = require 'maps.pirates.math' @@ -346,7 +348,9 @@ function Public.destination_on_arrival(destination) destination.static_params.class_for_sale = class_for_sale local covered = Islands.spawn_quest_structure(destination, points_to_avoid) - points_to_avoid[#points_to_avoid + 1] = {x = covered.x, y = covered.y, r = 25} + if covered then + points_to_avoid[#points_to_avoid + 1] = {x = covered.x, y = covered.y, r = 25} + end end Islands.spawn_treasure_maps(destination, points_to_avoid) diff --git a/maps/pirates/utils_local.lua b/maps/pirates/utils_local.lua index 4baf255e..1841c888 100644 --- a/maps/pirates/utils_local.lua +++ b/maps/pirates/utils_local.lua @@ -1,3 +1,5 @@ +-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/danielmartin0/ComfyFactorio-Pirates. + local Math = require 'maps.pirates.math' -- local _inspect = require 'utils.inspect'.inspect From 88d4da397e08502636a3fb8edf7c6795ebe0008b Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Wed, 1 Jun 2022 20:45:13 +0100 Subject: [PATCH 09/20] boat now pauses after each destination --- locale/en/pirates.cfg | 6 +++- maps/pirates/api_events.lua | 4 +-- maps/pirates/coredata.lua | 2 +- maps/pirates/gui/common.lua | 6 ++-- maps/pirates/gui/evo.lua | 2 +- maps/pirates/gui/gui.lua | 20 +++++++++++-- maps/pirates/progression.lua | 40 ++++++++++++++++++++++++- maps/pirates/structures/boats/boats.lua | 3 +- maps/pirates/surfaces/cabin.lua | 9 +++--- maps/pirates/surfaces/surfaces.lua | 6 ++-- 10 files changed, 79 insertions(+), 19 deletions(-) diff --git a/locale/en/pirates.cfg b/locale/en/pirates.cfg index 2a0829e5..e50d8f86 100644 --- a/locale/en/pirates.cfg +++ b/locale/en/pirates.cfg @@ -57,7 +57,7 @@ location_displayname_lobby_1=Starting Dock - +parrot_set_sail_advice=Ready to sail to the next island? Click up top! parrot_hard_praise=Steel chests for steel players! Squawk! parrot_normal_praise=Iron chests for iron players! Squawk! parrot_fuel_warning=Fuel is low! @@ -95,6 +95,8 @@ ship_undocked_1=[font=heading-1]Ship undocked[/font] by captain. ship_undocked_2=[font=heading-1]Ship auto-undocked[/font]. Return to ship. ship_undocked_3=[font=heading-1]Ship auto-undocked[/font]. +ship_set_off_to_next_island=[font=heading-1]Ship set sail[/font] for the next destination. + plank=__1__ planked __2__! plank_error_invalid_player=Command error: Player is not a crewmember. plank_error_self=Command error: Can't plank yourself. @@ -354,6 +356,7 @@ mode_tooltip=Mode. auto_undock_tooltip=The maximum time to stay at this location.\n\nOnce this time is reached, the boat undocks automatically. The captain can choose to leave earlier by pressing this button. atsea_loading_tooltip=The next destination is loading. leave_anytime_tooltip=The captain chooses when to undock the ship.\n\nThey can undock by pressing this button. +atsea_waiting_tooltip=The ship pauses after each destination. When the captain is ready, they can click this button to proceed. resources_needed_tooltip_0=At the next destination, these resources will be needed in order to undock. resources_needed_tooltip_1=At the next destination, these resources will be needed in order to undock early.\n\nFewer resources will be needed the longer you stay, eventually dropping to zero. @@ -475,6 +478,7 @@ gui_etaframe_board_warning=RETURN TO SHIP gui_etaframe_board_warning_tooltip=Probably time to board... gui_etaframe_autoundock=Auto-undock: gui_etaframe_arriving_in=Arriving in +gui_etaframe_atsea_waiting=Captain — Click here to Sail gui_etaframe_undock=Undock: gui_etaframe_anytime=Anytime gui_etaframe_nest_escape_cost=Next escape cost: diff --git a/maps/pirates/api_events.lua b/maps/pirates/api_events.lua index b005b2cf..d4981dad 100644 --- a/maps/pirates/api_events.lua +++ b/maps/pirates/api_events.lua @@ -723,7 +723,7 @@ local function event_on_player_mined_entity(event) local baseamount = 4 --minimum 1 wood local amount = Math.clamp(1, Math.ceil(available), Math.ceil(baseamount * available/starting)) - + destination.dynamic_data.wood_remaining = destination.dynamic_data.wood_remaining - amount if memory.classes_table and memory.classes_table[event.player_index] and memory.classes_table[event.player_index] == Classes.enum.LUMBERJACK then @@ -1773,7 +1773,7 @@ local function event_on_player_respawned(event) local boat = memory.boat if player.surface == game.surfaces[Common.current_destination().surface_name] then - if boat and boat.state == Boats.enum_state.ATSEA_SAILING then + if boat and boat.state == Boats.enum_state.ATSEA_SAILING or boat.state == Boats.enum_state.ATSEA_WAITING_TO_SAIL or boat.state == Boats.enum_state.ATSEA_LOADING_MAP then -- assuming sea is always default: local seasurface = game.surfaces[memory.sea_name] player.teleport(memory.spawnpoint, seasurface) diff --git a/maps/pirates/coredata.lua b/maps/pirates/coredata.lua index 0d0260ed..6695de79 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.2.10' --major.minor.patch versioning, to match factorio mod portal +Public.version_string = '1.2.11' --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/common.lua b/maps/pirates/gui/common.lua index fa74045d..cdbace5d 100644 --- a/maps/pirates/gui/common.lua +++ b/maps/pirates/gui/common.lua @@ -407,7 +407,7 @@ function Public.player_and_crew_state_bools(player) local destination = Common.current_destination() local dynamic_data = destination.dynamic_data --assumes this always exists - local in_crowsnest_bool, in_hold_bool, in_cabin_bool, onmap_bool, eta_bool, approaching_bool, retreating_bool, atsea_sailing_bool, landed_bool, quest_bool, silo_bool, charged_bool, launched_bool, captain_bool, atsea_loading_bool, character_on_deck_bool, on_deck_standing_near_loco_bool, on_deck_standing_near_cabin_bool, on_deck_standing_near_crowsnest_bool, cost_bool, cost_includes_rocket_launch_bool, approaching_dock_bool, leaving_dock_bool, leave_anytime_bool + local in_crowsnest_bool, in_hold_bool, in_cabin_bool, onmap_bool, eta_bool, approaching_bool, retreating_bool, atsea_sailing_bool, landed_bool, quest_bool, silo_bool, charged_bool, launched_bool, captain_bool, atsea_loading_bool, atsea_waiting_bool, character_on_deck_bool, on_deck_standing_near_loco_bool, on_deck_standing_near_cabin_bool, on_deck_standing_near_crowsnest_bool, cost_bool, cost_includes_rocket_launch_bool, approaching_dock_bool, leaving_dock_bool, leave_anytime_bool captain_bool = Common.is_captain(player) @@ -425,13 +425,14 @@ function Public.player_and_crew_state_bools(player) retreating_bool = memory.boat and memory.boat.state == Boats.enum_state.RETREATING and onmap_bool -- approaching_bool = memory.boat and memory.boat.state == Boats.enum_state.APPROACHING atsea_sailing_bool = memory.boat and memory.boat.state == Boats.enum_state.ATSEA_SAILING + atsea_waiting_bool = memory.boat and memory.boat.state == Boats.enum_state.ATSEA_WAITING_TO_SAIL landed_bool = memory.boat and memory.boat.state == Boats.enum_state.LANDED quest_bool = (dynamic_data.quest_type ~= nil) and onmap_bool charged_bool = dynamic_data.silocharged silo_bool = dynamic_data.rocketsilos and onmap_bool and ((dynamic_data.rocketsilos[1] and dynamic_data.rocketsilos[1].valid) or charged_bool) launched_bool = dynamic_data.rocketlaunched - cost_bool = destination.static_params.base_cost_to_undock and (not atsea_sailing_bool) and (not retreating_bool) + cost_bool = destination.static_params.base_cost_to_undock and (not atsea_sailing_bool) and (not atsea_waiting_bool) and (not retreating_bool) cost_includes_rocket_launch_bool = cost_bool and destination.static_params.base_cost_to_undock['launch_rocket'] leave_anytime_bool = (landed_bool and not (eta_bool or cost_bool)) @@ -465,6 +466,7 @@ function Public.player_and_crew_state_bools(player) approaching_bool = approaching_bool, retreating_bool = retreating_bool, atsea_sailing_bool = atsea_sailing_bool, + atsea_waiting_bool = atsea_waiting_bool, -- landed_bool = landed_bool, quest_bool = quest_bool, silo_bool = silo_bool, diff --git a/maps/pirates/gui/evo.lua b/maps/pirates/gui/evo.lua index 921d8b44..117639ec 100644 --- a/maps/pirates/gui/evo.lua +++ b/maps/pirates/gui/evo.lua @@ -81,7 +81,7 @@ function Public.full_update(player) local types = {'leagues', 'kraken', 'time', 'silo', 'nests', 'sandwurms'} - if memory.boat and memory.boat.state and (memory.boat.state == Boats.enum_state.ATSEA_SAILING or memory.boat.state == Boats.enum_state.ATSEA_LOADING_MAP) then + if memory.boat and memory.boat.state and (memory.boat.state == Boats.enum_state.ATSEA_SAILING or memory.boat.state == Boats.enum_state.ATSEA_WAITING_TO_SAIL or memory.boat.state == Boats.enum_state.ATSEA_LOADING_MAP) then evolution_leagues = evo - (memory.kraken_evo or 0) local krakens = false if memory.active_sea_enemies and memory.active_sea_enemies.krakens then diff --git a/maps/pirates/gui/gui.lua b/maps/pirates/gui/gui.lua index d07339b1..7f325908 100644 --- a/maps/pirates/gui/gui.lua +++ b/maps/pirates/gui/gui.lua @@ -517,7 +517,7 @@ function Public.process_etaframe_update(player, flow1, bools) local flow2 - if bools.cost_bool or bools.atsea_loading_bool or bools.eta_bool or bools.retreating_bool or bools.leave_anytime_bool then + if bools.cost_bool or bools.atsea_loading_bool or bools.atsea_waiting_bool or bools.eta_bool or bools.retreating_bool or bools.leave_anytime_bool then flow1.visible = true local tooltip = '' @@ -564,6 +564,15 @@ function Public.process_etaframe_update(player, flow1, bools) flow2.etaframe_label_1.caption = {'pirates.gui_etaframe_arriving_in'} flow2.etaframe_label_2.caption = Utils.standard_string_form_of_time_in_seconds(eta_ticks / 60) + + elseif bools.atsea_waiting_bool then + flow2.etaframe_label_1.visible = true + flow2.etaframe_label_2.visible = false + + tooltip = {'pirates.atsea_waiting_tooltip'} + + flow2.etaframe_label_1.caption = {'pirates.gui_etaframe_atsea_waiting'} + elseif bools.leave_anytime_bool then flow2.etaframe_label_1.visible = true flow2.etaframe_label_2.visible = true @@ -659,7 +668,7 @@ function Public.process_etaframe_update(player, flow1, bools) flow1.etaframe_piratebutton.tooltip = tooltip flow2.tooltip = tooltip - if bools.captain_bool and (not bools.retreating_bool) and (bools.leave_anytime_bool or bools.eta_bool or (bools.cost_bool and (not bools.atsea_loading_bool))) then + if bools.captain_bool and (not bools.retreating_bool) and (bools.leave_anytime_bool or bools.atsea_waiting_bool or bools.eta_bool or (bools.cost_bool and (not bools.atsea_loading_bool))) then flow1.etaframe_piratebutton.mouse_button_filter = {'left'} if memory.undock_shortcut_are_you_sure_data and memory.undock_shortcut_are_you_sure_data[player.index] and memory.undock_shortcut_are_you_sure_data[player.index] > game.tick - 60 * 4 then flow2.etaframe_label_1.visible = true @@ -1070,7 +1079,7 @@ function Public.update_gui(player) if flow1 then -- if not bools.eta_bool and not bools.retreating_bool and not bools.quest_bool and not bools.silo_bool and not bools.atsea_loading_bool and not bools.leave_anytime_bool and not bools.cost_bool and not bools.approaching_dock_bool and not bools.leaving_dock_bool then - if not bools.eta_bool and not bools.retreating_bool and not bools.quest_bool and not bools.silo_bool and not bools.atsea_loading_bool and not bools.leave_anytime_bool and not bools.cost_bool and not bools.approaching_dock_bool and not bools.leaving_dock_bool and not bools.atsea_sailing_bool then + if not (bools.eta_bool or bools.retreating_bool or bools.quest_bool or bools.silo_bool or bools.atsea_loading_bool or bools.leave_anytime_bool or bools.cost_bool or bools.approaching_dock_bool or bools.leaving_dock_bool or bools.atsea_sailing_bool or bools.atsea_waiting_bool) then flow1.visible = true else flow1.visible = false @@ -1172,6 +1181,11 @@ local function on_gui_click(event) memory.undock_shortcut_are_you_sure_data[player.index] = game.tick end end + elseif memory.boat.state == Boats.enum_state.ATSEA_WAITING_TO_SAIL then + if Roles.player_privilege_level(player) >= Roles.privilege_levels.CAPTAIN then + Progression.at_sea_begin_to_set_sail() + end + elseif string.sub(event.element.name, -13, -1) and string.sub(event.element.name, -13, -1) == '_piratebutton' then local name = string.sub(event.element.name, 1, -14) if Public[name] then diff --git a/maps/pirates/progression.lua b/maps/pirates/progression.lua index e3d4348e..2af4d64e 100644 --- a/maps/pirates/progression.lua +++ b/maps/pirates/progression.lua @@ -521,6 +521,42 @@ function Public.undock_from_dock(manual) end +function Public.at_sea_begin_to_set_sail() + local memory = Memory.get_crew_memory() + local boat = memory.boat + + boat.state = Boats.enum_state.ATSEA_SAILING + + script.raise_event(CustomEvents.enum['update_crew_fuel_gui'], {}) + + Crew.summon_crew() + + local force = memory.force + if not (force and force.valid) then return end + Common.notify_force(force, {'pirates.ship_set_off_to_next_island'}) +end + + + + +local parrot_set_sail_advice = + Token.register( + function(data) + local crew_id = data.crew_id + Memory.set_working_id(crew_id) + + local memory = Memory.get_crew_memory() + if not (memory.id and memory.id > 0) then return end --check if crew disbanded + + if memory.boat and memory.boat.state and memory.boat.state == Boats.enum_state.ATSEA_WAITING_TO_SAIL then + Common.parrot_speak(memory.force, {'pirates.parrot_set_sail_advice'}) + end + end +) + + + + function Public.go_from_currentdestination_to_sea() local memory = Memory.get_crew_memory() @@ -553,10 +589,12 @@ function Public.go_from_currentdestination_to_sea() Crowsnest.upgrade_chests('iron-chest') Common.parrot_speak(memory.force, {'pirates.parrot_normal_praise'}) + + Task.set_timeout_in_ticks(60 * 10, parrot_set_sail_advice, {crew_id = memory.id}) end end - memory.boat.state = Boats.enum_state.ATSEA_SAILING + memory.boat.state = Boats.enum_state.ATSEA_WAITING_TO_SAIL memory.boat.speed = 0 memory.boat.position = new_boatposition memory.boat.surface_name = seaname diff --git a/maps/pirates/structures/boats/boats.lua b/maps/pirates/structures/boats/boats.lua index bfb85d8a..b37fbc05 100644 --- a/maps/pirates/structures/boats/boats.lua +++ b/maps/pirates/structures/boats/boats.lua @@ -27,12 +27,13 @@ Public[enum.RAFTLARGE] = require 'maps.pirates.structures.boats.raft_large.raft_ Public[enum.MERCHANT] = require 'maps.pirates.structures.boats.merchant_1.merchant_1' Public.enum = enum local enum_state = { - ATSEA_SAILING = 'at_sea', APPROACHING = 'approaching', LANDED = 'landed', RETREATING = 'retreating', LEAVING_DOCK = 'leaving', + ATSEA_SAILING = 'at_sea', ATSEA_LOADING_MAP = 'waiting_for_load', + ATSEA_WAITING_TO_SAIL = 'waiting_for_sail', DOCKED = 'docked', } Public.enum_state = enum_state diff --git a/maps/pirates/surfaces/cabin.lua b/maps/pirates/surfaces/cabin.lua index 96e881b0..2829d6d9 100644 --- a/maps/pirates/surfaces/cabin.lua +++ b/maps/pirates/surfaces/cabin.lua @@ -110,10 +110,11 @@ Public.cabin_shop_data = { price = {{'coin', 2000}, {'stone-brick', 30}}, offer = {type='give-item', item = 'uranium-238', count = 10}, }, - { - price = {{'coin', 25}}, - offer = {type='nothing', effect_description={'pirates.market_description_extra_time_at_sea'}}, - }, + --disabled now that we can wait after any destination: + -- { + -- price = {{'coin', 25}}, + -- offer = {type='nothing', effect_description={'pirates.market_description_extra_time_at_sea'}}, + -- }, } function Public.get_cabin_surface_name() diff --git a/maps/pirates/surfaces/surfaces.lua b/maps/pirates/surfaces/surfaces.lua index 70a60b99..af9d8cd1 100644 --- a/maps/pirates/surfaces/surfaces.lua +++ b/maps/pirates/surfaces/surfaces.lua @@ -783,7 +783,7 @@ function Public.player_exit_crows_nest(player, player_relative_pos) local memory = Memory.get_crew_memory() local surface - if memory.boat and (memory.boat.state == Boats.enum_state.ATSEA_SAILING or memory.boat.state == Boats.enum_state.ATSEA_LOADING_MAP) then + if memory.boat and (memory.boat.state == Boats.enum_state.ATSEA_SAILING or memory.boat.state == Boats.enum_state.ATSEA_WAITING_TO_SAIL or memory.boat.state == Boats.enum_state.ATSEA_LOADING_MAP) then surface = game.surfaces[SurfacesCommon.encode_surface_name(memory.id, 0, Public.enum.SEA, Public.Sea.enum.DEFAULT)] else surface = game.surfaces[Common.current_destination().surface_name] @@ -822,7 +822,7 @@ function Public.player_exit_hold(player, relative_pos) local memory = Memory.get_crew_memory() local surface - if memory.boat and (memory.boat.state == Boats.enum_state.ATSEA_SAILING or memory.boat.state == Boats.enum_state.ATSEA_LOADING_MAP) then + if memory.boat and (memory.boat.state == Boats.enum_state.ATSEA_SAILING or memory.boat.state == Boats.enum_state.ATSEA_WAITING_TO_SAIL or memory.boat.state == Boats.enum_state.ATSEA_LOADING_MAP) then surface = game.surfaces[SurfacesCommon.encode_surface_name(memory.id, 0, Public.enum.SEA, Public.Sea.enum.DEFAULT)] else surface = game.surfaces[Common.current_destination().surface_name] @@ -860,7 +860,7 @@ function Public.player_exit_cabin(player, relative_pos) local memory = Memory.get_crew_memory() local surface - if memory.boat and (memory.boat.state == Boats.enum_state.ATSEA_SAILING or memory.boat.state == Boats.enum_state.ATSEA_LOADING_MAP) then + if memory.boat and (memory.boat.state == Boats.enum_state.ATSEA_SAILING or memory.boat.state == Boats.enum_state.ATSEA_WAITING_TO_SAIL or memory.boat.state == Boats.enum_state.ATSEA_LOADING_MAP) then surface = game.surfaces[SurfacesCommon.encode_surface_name(memory.id, 0, Public.enum.SEA, Public.Sea.enum.DEFAULT)] else surface = game.surfaces[Common.current_destination().surface_name] From de538a222162e9a424f39585b8fbe14b8f5acaef Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Wed, 1 Jun 2022 20:51:35 +0100 Subject: [PATCH 10/20] patch --- maps/pirates/gui/gui.lua | 31 +++++++++++++++++-------------- maps/pirates/progression.lua | 1 + 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/maps/pirates/gui/gui.lua b/maps/pirates/gui/gui.lua index 7f325908..d94f6c59 100644 --- a/maps/pirates/gui/gui.lua +++ b/maps/pirates/gui/gui.lua @@ -1168,22 +1168,25 @@ local function on_gui_click(event) Memory.set_working_id(crew_id) local memory = Memory.get_crew_memory() - if event.element.name and event.element.name == 'etaframe_piratebutton' and (memory.boat.state == Boats.enum_state.DOCKED or memory.boat.state == Boats.enum_state.LANDED) then - if Roles.player_privilege_level(player) >= Roles.privilege_levels.CAPTAIN then - if (not memory.undock_shortcut_are_you_sure_data) then memory.undock_shortcut_are_you_sure_data = {} end - if memory.undock_shortcut_are_you_sure_data[player.index] and memory.undock_shortcut_are_you_sure_data[player.index] > game.tick - 60 * 4 then - if memory.boat.state == Boats.enum_state.DOCKED then - Progression.undock_from_dock(true) - elseif memory.boat.state == Boats.enum_state.LANDED then - Progression.try_retreat_from_island(player, true) + if event.element.name and event.element.name == 'etaframe_piratebutton' then + if (memory.boat.state == Boats.enum_state.DOCKED or memory.boat.state == Boats.enum_state.LANDED) then + if Roles.player_privilege_level(player) >= Roles.privilege_levels.CAPTAIN then + if (not memory.undock_shortcut_are_you_sure_data) then memory.undock_shortcut_are_you_sure_data = {} end + if memory.undock_shortcut_are_you_sure_data[player.index] and memory.undock_shortcut_are_you_sure_data[player.index] > game.tick - 60 * 4 then + if memory.boat.state == Boats.enum_state.DOCKED then + Progression.undock_from_dock(true) + elseif memory.boat.state == Boats.enum_state.LANDED then + Progression.try_retreat_from_island(player, true) + end + else + memory.undock_shortcut_are_you_sure_data[player.index] = game.tick end - else - memory.undock_shortcut_are_you_sure_data[player.index] = game.tick end - end - elseif memory.boat.state == Boats.enum_state.ATSEA_WAITING_TO_SAIL then - if Roles.player_privilege_level(player) >= Roles.privilege_levels.CAPTAIN then - Progression.at_sea_begin_to_set_sail() + + elseif memory.boat.state == Boats.enum_state.ATSEA_WAITING_TO_SAIL then + if Roles.player_privilege_level(player) >= Roles.privilege_levels.CAPTAIN then + Progression.at_sea_begin_to_set_sail() + end end elseif string.sub(event.element.name, -13, -1) and string.sub(event.element.name, -13, -1) == '_piratebutton' then diff --git a/maps/pirates/progression.lua b/maps/pirates/progression.lua index 2af4d64e..b86364dc 100644 --- a/maps/pirates/progression.lua +++ b/maps/pirates/progression.lua @@ -547,6 +547,7 @@ local parrot_set_sail_advice = local memory = Memory.get_crew_memory() if not (memory.id and memory.id > 0) then return end --check if crew disbanded + if memory.game_lost then return end if memory.boat and memory.boat.state and memory.boat.state == Boats.enum_state.ATSEA_WAITING_TO_SAIL then Common.parrot_speak(memory.force, {'pirates.parrot_set_sail_advice'}) From 6b44d5a4fe9cad9c969fcf396467214a2ec61c7a Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Wed, 1 Jun 2022 21:01:00 +0100 Subject: [PATCH 11/20] patches --- locale/en/pirates.cfg | 6 +++--- maps/pirates/common.lua | 3 ++- maps/pirates/gui/info.lua | 2 +- maps/pirates/roles/tick_functions.lua | 17 +++-------------- 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/locale/en/pirates.cfg b/locale/en/pirates.cfg index e50d8f86..d66062cb 100644 --- a/locale/en/pirates.cfg +++ b/locale/en/pirates.cfg @@ -13,10 +13,10 @@ softmod_info_new_players_1=For New Players softmod_info_new_players_2=Mine coal and other resources and bring them to the ship to keep things going, or try asking the captain for more specific tasks. 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• Logged-out players keep their items with them for a while — except 'important' items that are returned to the crew immediately.\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. Captains also have /tax, /undock, /officer, /plank. +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=Recent changes -softmod_info_updates_2=v1.2.8\n• Poison damage against players buffed\n• Maze treasure buffed\n• Biter waves slightly more concentrated into groups\n\nv1.2.4-v1.2.7\n• String-related hotfixes.\n\nv1.2.3\n• Rework of 'quest buildings' that appear on islands.\n• Fixed stutter when loading certain maps, such as swamp.\n• Various new player-friendly visual renderings.\n• Mod prepared for translation into other languages.\n• Expanded Gourmet's sense of taste.\n\nv1.2\n• Mod portal release.\n• Some rebalancing of Nightmare difficulty. +softmod_info_updates_2=v1.2.11\n• Unlimited time can now be spent at sea between each destination.\n\nv1.2.8\n• Poison damage against players buffed\n• Maze treasure buffed\n• Biter waves slightly more concentrated into groups\n\nv1.2.3\n• Rework of 'quest buildings' that appear on islands.\n• Fixed stutter when loading certain maps, such as swamp.\n• Various new player-friendly visual renderings.\n• Mod prepared for translation into other languages.\n• Expanded Gourmet's sense of taste.\n\nv1.2\n• Mod portal release.\n• Some rebalancing of Nightmare difficulty. softmod_info_credits_1=Credits softmod_info_credits_2=Pirate Ship designed and coded by thesixthroc. Comfy codebase and help from Gerkiz, Hanakocz and Mew @ Comfy Industries (https://getcomfy.eu). Some island structure blueprints contributed by Mattisso.\n\nthesixthroc is looking for translators and coders to help with this mod. Come chat with us: https://getcomfy.eu/discord\n\n"Those white gloves. I'll never forget them 'till the day I die." - Dr. John @@ -353,7 +353,7 @@ capacity_tooltip=Capacity. Sets the maximum number of crewmembers allowed. difficulty_tooltip=Difficulty.\n\nHigher difficulties have higher pollution and evo, higher biter damage, lower gold loot, but higher chest loot, along with small effects on the time per island, quest requirements, and silo position.\n\nDifficulty also determines the material the ship is made out of. mode_tooltip=Mode. -auto_undock_tooltip=The maximum time to stay at this location.\n\nOnce this time is reached, the boat undocks automatically. The captain can choose to leave earlier by pressing this button. +auto_undock_tooltip=The maximum time to stay at this location.\n\nOnce this time is reached, the boat undocks automatically. The captain can choose to leave earlier by pressing this button (or typing /undock). atsea_loading_tooltip=The next destination is loading. leave_anytime_tooltip=The captain chooses when to undock the ship.\n\nThey can undock by pressing this button. atsea_waiting_tooltip=The ship pauses after each destination. When the captain is ready, they can click this button to proceed. diff --git a/maps/pirates/common.lua b/maps/pirates/common.lua index e9633fda..09bac3b4 100644 --- a/maps/pirates/common.lua +++ b/maps/pirates/common.lua @@ -172,7 +172,8 @@ end function Public.parrot_speak(force, message) force.print({"", {'pirates.notify_parrot'}, ' ', message}, CoreData.colors.parrot) - Server.to_discord_embed_raw({"", {'pirates.notify_parrot'}, ' ', message}, true) + local memory = Memory.get_crew_memory() + Server.to_discord_embed_raw({"", '[' .. memory.name .. ']', {'pirates.notify_parrot'}, ' ', message}, true) end diff --git a/maps/pirates/gui/info.lua b/maps/pirates/gui/info.lua index 9424f994..d441a6ce 100644 --- a/maps/pirates/gui/info.lua +++ b/maps/pirates/gui/info.lua @@ -228,7 +228,7 @@ function Public.full_update(player) elseif flow2.selected_tab_index == 2 then flow2.style.height = 520 elseif flow2.selected_tab_index == 3 then - flow2.style.height = 620 + flow2.style.height = 580 elseif flow2.selected_tab_index == 4 then flow2.style.height = 360 end diff --git a/maps/pirates/roles/tick_functions.lua b/maps/pirates/roles/tick_functions.lua index 7026d3fd..25a21e73 100644 --- a/maps/pirates/roles/tick_functions.lua +++ b/maps/pirates/roles/tick_functions.lua @@ -169,25 +169,14 @@ function Public.update_character_properties(tickinterval) local player_index = player.index local character = player.character if memory.classes_table and memory.classes_table[player_index] then - local max_reach_bonus = 0 - -- if memory.classes_table[player_index] == Classes.enum.DECKHAND then - -- max_reach_bonus = Math.max(max_reach_bonus, 6) - -- character.character_build_distance_bonus = 6 - -- else - -- character.character_build_distance_bonus = 0 - -- end if memory.classes_table[player_index] == Classes.enum.FISHERMAN then - max_reach_bonus = Math.max(max_reach_bonus, 10) - character.character_resource_reach_distance_bonus = 10 + character.character_reach_distance_bonus = 10 elseif memory.classes_table[player_index] == Classes.enum.MASTER_ANGLER or memory.classes_table[player_index] == Classes.enum.DREDGER then - max_reach_bonus = Math.max(max_reach_bonus, 16) - character.character_resource_reach_distance_bonus = 16 + character.character_reach_distance_bonus = 16 else - character.character_resource_reach_distance_bonus = 0 + character.character_reach_distance_bonus = 0 end - - character.character_reach_distance_bonus = max_reach_bonus end local health_boost = 0 -- base health is 250 From ab7fa21fea1d27df96ce240a4505a3e56db020c8 Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Wed, 1 Jun 2022 22:13:09 +0100 Subject: [PATCH 12/20] main tick reordering --- control.lua | 2 +- maps/pirates/main.lua | 250 +++++++++++++++++------------------------- 2 files changed, 99 insertions(+), 153 deletions(-) diff --git a/control.lua b/control.lua index 21182d2e..df144849 100644 --- a/control.lua +++ b/control.lua @@ -1,6 +1,6 @@ require 'utils.data_stages' _LIFECYCLE = _STAGE.control -- Control stage -_DEBUG = true +_DEBUG = false _DUMP_ENV = false require 'utils.server' diff --git a/maps/pirates/main.lua b/maps/pirates/main.lua index c205d68a..f6769f2d 100644 --- a/maps/pirates/main.lua +++ b/maps/pirates/main.lua @@ -144,55 +144,114 @@ local function crew_tick() local destination = Common.current_destination() local tick = game.tick - PiratesApiOnTick.boat_movement_tick(5) --arguments are tick intervals - -- PiratesApiOnTick.parrot_tick(5) - - if tick % 10 == 0 then - PiratesApiOnTick.prevent_disembark(10) - PiratesApiOnTick.prevent_unbarreling_off_ship(10) - end - if memory.age and memory.overworldx and memory.overworldx > 0 then memory.age = memory.age + 5 end if memory.real_age then memory.real_age = memory.real_age + 5 end - if tick % 60 == 0 then - PiratesApiOnTick.captain_warn_afk(60) - end - if tick % Common.loading_interval == 0 then - PiratesApiOnTick.loading_update(Common.loading_interval) - end - - if tick % 5 == 0 then - PiratesApiOnTick.quest_progress_tick(5) - end - - if tick % 5 == 0 then - PiratesApiOnTick.strobe_player_colors(5) - end + PiratesApiOnTick.boat_movement_tick(5) --arguments are tick intervals + -- PiratesApiOnTick.parrot_tick(5) + PiratesApiOnTick.quest_progress_tick(5) + PiratesApiOnTick.strobe_player_colors(5) + if tick % 10 == 0 then + PiratesApiOnTick.prevent_disembark(10) + PiratesApiOnTick.prevent_unbarreling_off_ship(10) PiratesApiOnTick.shop_ratelimit_tick(10) - end - - if tick % 30 == 0 then - PiratesApiOnTick.silo_update(30) - end - - if tick % 60 == 0 then - PiratesApiOnTick.ship_deplete_fuel(60) - end - - if tick % 10 == 0 then PiratesApiOnTick.pick_up_tick(10) - end + QuestStructures.tick_quest_structure_entry_price_check(10) + PiratesApiOnTick.update_boat_stored_resources(10) - if tick % 60 == 0 then - if memory.boat and memory.boat.state == Structures.Boats.enum_state.ATSEA_SAILING then - PiratesApiOnTick.crowsnest_natural_move(120) + if tick % 30 == 0 then + PiratesApiOnTick.silo_update(30) + PiratesApiOnTick.buried_treasure_check(30) + ClassPiratesApiOnTick.update_character_properties(30) + ClassPiratesApiOnTick.class_update_auxiliary_data(30) + ClassPiratesApiOnTick.class_renderings(30) + + if tick % 60 == 0 then + PiratesApiOnTick.captain_warn_afk(60) + PiratesApiOnTick.ship_deplete_fuel(60) + if memory.boat and memory.boat.state == Structures.Boats.enum_state.ATSEA_SAILING then + PiratesApiOnTick.crowsnest_natural_move(60) + end + PiratesApiOnTick.slower_boat_tick(60) + PiratesApiOnTick.raft_raids(60) + PiratesApiOnTick.place_cached_structures(60) + + + if destination.dynamic_data.timer then + destination.dynamic_data.timer = destination.dynamic_data.timer + 1 + end + + if memory.captain_acceptance_timer then + memory.captain_acceptance_timer = memory.captain_acceptance_timer - 1 + if memory.captain_acceptance_timer == 0 then + Roles.assign_captain_based_on_priorities() + end + end + + if memory.captain_accrued_time_data and memory.playerindex_captain and memory.overworldx and memory.overworldx > 0 and memory.overworldx < CoreData.victory_x then --only count time in the 'main game' + local player = game.players[memory.playerindex_captain] + if player and player.name then + if (not memory.captain_accrued_time_data[player.name]) then memory.captain_accrued_time_data[player.name] = 0 end + memory.captain_accrued_time_data[player.name] = memory.captain_accrued_time_data[player.name] + 1 + end + end + + if destination.dynamic_data.time_remaining and destination.dynamic_data.time_remaining > 0 then + destination.dynamic_data.time_remaining = destination.dynamic_data.time_remaining - 1 + + if destination.dynamic_data.time_remaining == 0 then + if memory.boat and memory.boat.surface_name then + local surface_name_decoded = Surfaces.SurfacesCommon.decode_surface_name(memory.boat.surface_name) + local type = surface_name_decoded.type + if type == Surfaces.enum.ISLAND then + Progression.retreat_from_island(false) + elseif type == Surfaces.enum.DOCK then + Progression.undock_from_dock(false) + end + end + end + end + + if tick % 120 == 0 then + Ai.Tick_actions(120) + + if tick % 240 == 0 then + PiratesApiOnTick.check_all_spawners_dead(240) + if memory.max_players_recorded then + local count_now = #Common.crew_get_crew_members() + if count_now and count_now > memory.max_players_recorded then + memory.max_players_recorded = count_now + end + end + PiratesApiOnTick.Kraken_Destroyed_Backup_check(240) + PiratesApiOnTick.LOS_tick(240) + end + end + + if tick % 300 == 0 then + PiratesApiOnTick.periodic_free_resources(300) + PiratesApiOnTick.update_recentcrewmember_list(300) + + if tick % 1800 == 0 then + PiratesApiOnTick.transfer_pollution(1800) + + if tick % 3600 == 0 then + PiratesApiOnTick.prune_offline_characters_list(3600) + end + end + end + + + if tick % 420 == 0 then + ClassPiratesApiOnTick.class_rewards_tick(420) + end + end end end @@ -208,123 +267,10 @@ local function crew_tick() end end - if tick % 60 == 0 then - PiratesApiOnTick.slower_boat_tick(60) + if tick % Common.loading_interval == 0 then + PiratesApiOnTick.loading_update(Common.loading_interval) end - if tick % 10 == 0 then - PiratesApiOnTick.update_boat_stored_resources(10) - end - - if tick % 10 == 0 then - QuestStructures.tick_quest_structure_entry_price_check(10) - end - - if tick % 30 == 0 then - PiratesApiOnTick.buried_treasure_check(30) - end - - if tick % 60 == 0 then - PiratesApiOnTick.raft_raids(60) - end - - if tick % 60 == 0 then - PiratesApiOnTick.place_cached_structures(60) - end - - if tick % 240 == 0 then - PiratesApiOnTick.check_all_spawners_dead(240) - end - - if tick % 60 == 0 then - - if destination.dynamic_data.timer then - destination.dynamic_data.timer = destination.dynamic_data.timer + 1 - end - - if memory.captain_acceptance_timer then - memory.captain_acceptance_timer = memory.captain_acceptance_timer - 1 - if memory.captain_acceptance_timer == 0 then - Roles.assign_captain_based_on_priorities() - end - end - - if memory.captain_accrued_time_data and memory.playerindex_captain and memory.overworldx and memory.overworldx > 0 and memory.overworldx < CoreData.victory_x then --only count time in the 'main game' - local player = game.players[memory.playerindex_captain] - if player and player.name then - if (not memory.captain_accrued_time_data[player.name]) then memory.captain_accrued_time_data[player.name] = 0 end - memory.captain_accrued_time_data[player.name] = memory.captain_accrued_time_data[player.name] + 1 - end - end - - if destination.dynamic_data.time_remaining and destination.dynamic_data.time_remaining > 0 then - destination.dynamic_data.time_remaining = destination.dynamic_data.time_remaining - 1 - - if destination.dynamic_data.time_remaining == 0 then - if memory.boat and memory.boat.surface_name then - local surface_name_decoded = Surfaces.SurfacesCommon.decode_surface_name(memory.boat.surface_name) - local type = surface_name_decoded.type - if type == Surfaces.enum.ISLAND then - Progression.retreat_from_island(false) - elseif type == Surfaces.enum.DOCK then - Progression.undock_from_dock(false) - end - end - end - end - end - - if tick % 240 == 0 then - if memory.max_players_recorded then - local count_now = #Common.crew_get_crew_members() - if count_now and count_now > memory.max_players_recorded then - memory.max_players_recorded = count_now - end - end - end - - if tick % 240 == 0 then - PiratesApiOnTick.Kraken_Destroyed_Backup_check(240) - end - - if tick % 300 == 0 then - PiratesApiOnTick.periodic_free_resources(300) - end - - if tick % 30 == 0 then - ClassPiratesApiOnTick.update_character_properties(30) - ClassPiratesApiOnTick.class_update_auxiliary_data(30) - ClassPiratesApiOnTick.class_renderings(30) - end - - if tick % 120 == 0 then - Ai.Tick_actions(120) - end - - if tick % 240 == 0 then - PiratesApiOnTick.LOS_tick(240) - end - - if tick % 420 == 0 then - ClassPiratesApiOnTick.class_rewards_tick(420) - end - - if tick % 300 == 0 then - PiratesApiOnTick.update_recentcrewmember_list(300) - end - - if tick % 1800 == 0 then - PiratesApiOnTick.transfer_pollution(1800) - end - - if tick % 3600 == 0 then - PiratesApiOnTick.prune_offline_characters_list(3600) - end - - -- if tick % (60*60*60) == 0 then - -- Parrot.parrot_say_tip() - -- end - if memory.crew_disband_tick then if memory.crew_disband_tick < tick then memory.crew_disband_tick = nil From d25759bda1cefc9b79957f17f8b3d4fcd57ed8ab Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Thu, 2 Jun 2022 12:38:51 +0100 Subject: [PATCH 13/20] market refunds stone furnaces --- locale/en/pirates.cfg | 2 +- maps/pirates/structures/quest_structures/market1/market1.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/en/pirates.cfg b/locale/en/pirates.cfg index d66062cb..1e5a1246 100644 --- a/locale/en/pirates.cfg +++ b/locale/en/pirates.cfg @@ -19,7 +19,7 @@ softmod_info_updates_1=Recent changes softmod_info_updates_2=v1.2.11\n• Unlimited time can now be spent at sea between each destination.\n\nv1.2.8\n• Poison damage against players buffed\n• Maze treasure buffed\n• Biter waves slightly more concentrated into groups\n\nv1.2.3\n• Rework of 'quest buildings' that appear on islands.\n• Fixed stutter when loading certain maps, such as swamp.\n• Various new player-friendly visual renderings.\n• Mod prepared for translation into other languages.\n• Expanded Gourmet's sense of taste.\n\nv1.2\n• Mod portal release.\n• Some rebalancing of Nightmare difficulty. softmod_info_credits_1=Credits -softmod_info_credits_2=Pirate Ship designed and coded by thesixthroc. Comfy codebase and help from Gerkiz, Hanakocz and Mew @ Comfy Industries (https://getcomfy.eu). Some island structure blueprints contributed by Mattisso.\n\nthesixthroc is looking for translators and coders to help with this mod. Come 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=Pirate Ship designed and coded by thesixthroc. 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_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 softmod_info_body_promote=by thesixthroc diff --git a/maps/pirates/structures/quest_structures/market1/market1.lua b/maps/pirates/structures/quest_structures/market1/market1.lua index 6af17909..ff51b8e4 100644 --- a/maps/pirates/structures/quest_structures/market1/market1.lua +++ b/maps/pirates/structures/quest_structures/market1/market1.lua @@ -223,7 +223,7 @@ Public.entry_price_data_raw = { maxLambda = 1, shape = false, base_amount = 250, - raw_materials = {} + raw_materials = {{name = 'stone', count = 1250}} }, ['advanced-circuit'] = { overallWeight = 1, From b5b4802c708de2926376b0ce743b196cefdad9ad Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Thu, 2 Jun 2022 12:40:32 +0100 Subject: [PATCH 14/20] luacheck --- maps/pirates/main.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maps/pirates/main.lua b/maps/pirates/main.lua index f6769f2d..54408be9 100644 --- a/maps/pirates/main.lua +++ b/maps/pirates/main.lua @@ -156,7 +156,7 @@ local function crew_tick() PiratesApiOnTick.quest_progress_tick(5) PiratesApiOnTick.strobe_player_colors(5) - + if tick % 10 == 0 then PiratesApiOnTick.prevent_disembark(10) PiratesApiOnTick.prevent_unbarreling_off_ship(10) @@ -181,7 +181,7 @@ local function crew_tick() PiratesApiOnTick.slower_boat_tick(60) PiratesApiOnTick.raft_raids(60) PiratesApiOnTick.place_cached_structures(60) - + if destination.dynamic_data.timer then destination.dynamic_data.timer = destination.dynamic_data.timer + 1 @@ -246,7 +246,7 @@ local function crew_tick() end end end - + if tick % 420 == 0 then ClassPiratesApiOnTick.class_rewards_tick(420) From dfd171e2968fc9c582b63ae39fac13634b1778d6 Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Thu, 2 Jun 2022 12:46:05 +0100 Subject: [PATCH 15/20] reduce class cost; bugfix ore generation --- maps/pirates/balance.lua | 8 ++++++-- maps/pirates/roles/tick_functions.lua | 2 +- maps/pirates/shop/dock.lua | 2 +- .../structures/quest_structures/furnace1/furnace1.lua | 2 +- .../structures/quest_structures/market1/market1.lua | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/maps/pirates/balance.lua b/maps/pirates/balance.lua index 1526911e..c39f4761 100644 --- a/maps/pirates/balance.lua +++ b/maps/pirates/balance.lua @@ -346,8 +346,12 @@ function Public.apply_crew_buffs_per_x(force) force.laboratory_productivity_bonus = Math.max(0, 7/100 * (Common.overworldx()/40) - (10*(Common.difficulty_scale()) - 5)) --difficulty causes lab productivity boosts to start later end -function Public.class_cost() - return 10000 +function Public.class_cost(at_dock) + if at_dock then + return 9000 + else + return 6000 + end -- return Math.ceil(10000 / (Public.crew_scale()*10/4)^(1/6)) end diff --git a/maps/pirates/roles/tick_functions.lua b/maps/pirates/roles/tick_functions.lua index 25a21e73..b3c4d9ed 100644 --- a/maps/pirates/roles/tick_functions.lua +++ b/maps/pirates/roles/tick_functions.lua @@ -262,7 +262,7 @@ function Public.class_rewards_tick(tickinterval) end - if game.tick % tickinterval == 0 and (not (memory.boat and memory.boat.state and memory.boat.state == Structures.Boats.enum_state.ATSEA_LOADING_MAP)) then --it is possible to spend extra time here, so don't give out freebies + if game.tick % tickinterval == 0 and (not (memory.boat and memory.boat.state and (memory.boat.state == Structures.Boats.enum_state.ATSEA_LOADING_MAP or memory.boat.state == Structures.Boats.enum_state.ATSEA_WAITING_TO_SAIL))) then --it is possible to spend extra time here, so don't give out freebies if memory.classes_table and memory.classes_table[player_index] then local class = memory.classes_table[player_index] diff --git a/maps/pirates/shop/dock.lua b/maps/pirates/shop/dock.lua index 1055a205..454d90fc 100644 --- a/maps/pirates/shop/dock.lua +++ b/maps/pirates/shop/dock.lua @@ -185,7 +185,7 @@ function Public.create_dock_markets(surface, p) -- new class offerings: if destination.static_params.class_for_sale then - e.add_market_item{price={{'coin', Balance.class_cost()}}, offer={type="nothing", effect_description = {'pirates.market_description_purchase_class', Classes.display_form(destination.static_params.class_for_sale)}}} + e.add_market_item{price={{'coin', Balance.class_cost(true)}}, offer={type="nothing", effect_description = {'pirates.market_description_purchase_class', Classes.display_form(destination.static_params.class_for_sale)}}} -- destination.dynamic_data.market_class_offer_rendering = rendering.draw_text{ -- text = 'Class available: ' .. Classes.display_form(destination.static_params.class_for_sale), diff --git a/maps/pirates/structures/quest_structures/furnace1/furnace1.lua b/maps/pirates/structures/quest_structures/furnace1/furnace1.lua index 2385b181..97f9c260 100644 --- a/maps/pirates/structures/quest_structures/furnace1/furnace1.lua +++ b/maps/pirates/structures/quest_structures/furnace1/furnace1.lua @@ -95,7 +95,7 @@ function Public.create_step2_entities() end if destination.static_params.class_for_sale then - quest_structure_data.market.add_market_item{price={{'coin', Balance.class_cost()}}, offer={type="nothing", effect_description = {'pirates.market_description_purchase_class', Classes.display_form(destination.static_params.class_for_sale)}}} + quest_structure_data.market.add_market_item{price={{'coin', Balance.class_cost(false)}}, offer={type="nothing", effect_description = {'pirates.market_description_purchase_class', Classes.display_form(destination.static_params.class_for_sale)}}} -- destination.dynamic_data.market_class_offer_rendering = rendering.draw_text{ -- text = 'Class available: ' .. Classes.display_form(destination.static_params.class_for_sale), diff --git a/maps/pirates/structures/quest_structures/market1/market1.lua b/maps/pirates/structures/quest_structures/market1/market1.lua index ff51b8e4..49a59d1c 100644 --- a/maps/pirates/structures/quest_structures/market1/market1.lua +++ b/maps/pirates/structures/quest_structures/market1/market1.lua @@ -85,7 +85,7 @@ function Public.create_step2_entities() end if destination.static_params.class_for_sale then - quest_structure_data.market.add_market_item{price={{'coin', Balance.class_cost()}}, offer={type="nothing", effect_description = {'pirates.market_description_purchase_class', Classes.display_form(destination.static_params.class_for_sale)}}} + quest_structure_data.market.add_market_item{price={{'coin', Balance.class_cost(false)}}, offer={type="nothing", effect_description = {'pirates.market_description_purchase_class', Classes.display_form(destination.static_params.class_for_sale)}}} -- destination.dynamic_data.market_class_offer_rendering = rendering.draw_text{ -- text = 'Class available: ' .. Classes.display_form(destination.static_params.class_for_sale), From 612ab5b6d8821e035f3ce0174c7b53bdc2df4b0d Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Thu, 2 Jun 2022 12:47:59 +0100 Subject: [PATCH 16/20] 9000->10000 at dock --- maps/pirates/balance.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maps/pirates/balance.lua b/maps/pirates/balance.lua index c39f4761..86bacb8c 100644 --- a/maps/pirates/balance.lua +++ b/maps/pirates/balance.lua @@ -348,7 +348,7 @@ end function Public.class_cost(at_dock) if at_dock then - return 9000 + return 10000 else return 6000 end From 2ffbcb2038a60f50064c88ad408228564fece73f Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Thu, 2 Jun 2022 12:57:15 +0100 Subject: [PATCH 17/20] coin economy rescale --- maps/pirates/api_events.lua | 8 ++++---- maps/pirates/balance.lua | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/maps/pirates/api_events.lua b/maps/pirates/api_events.lua index d4981dad..1e1dae85 100644 --- a/maps/pirates/api_events.lua +++ b/maps/pirates/api_events.lua @@ -896,11 +896,11 @@ local function base_kill_rewards(event) if entity_name == 'small-worm-turret' then iron_amount = 5 - coin_amount = 60 + coin_amount = 50 memory.playtesting_stats.coins_gained_by_nests_and_worms = memory.playtesting_stats.coins_gained_by_nests_and_worms + coin_amount elseif entity_name == 'medium-worm-turret' then iron_amount = 20 - coin_amount = 100 + coin_amount = 90 memory.playtesting_stats.coins_gained_by_nests_and_worms = memory.playtesting_stats.coins_gained_by_nests_and_worms + coin_amount elseif entity_name == 'biter-spawner' or entity_name == 'spitter-spawner' then iron_amount = 30 @@ -908,11 +908,11 @@ local function base_kill_rewards(event) memory.playtesting_stats.coins_gained_by_nests_and_worms = memory.playtesting_stats.coins_gained_by_nests_and_worms + coin_amount elseif entity_name == 'big-worm-turret' then iron_amount = 30 - coin_amount = 160 + coin_amount = 140 memory.playtesting_stats.coins_gained_by_nests_and_worms = memory.playtesting_stats.coins_gained_by_nests_and_worms + coin_amount elseif entity_name == 'behemoth-worm-turret' then iron_amount = 50 - coin_amount = 280 + coin_amount = 260 memory.playtesting_stats.coins_gained_by_nests_and_worms = memory.playtesting_stats.coins_gained_by_nests_and_worms + coin_amount elseif memory.overworldx > 0 then --avoid coin farming on first island if entity_name == 'small-biter' then diff --git a/maps/pirates/balance.lua b/maps/pirates/balance.lua index 86bacb8c..4ba351ac 100644 --- a/maps/pirates/balance.lua +++ b/maps/pirates/balance.lua @@ -43,7 +43,7 @@ function Public.cost_to_leave_multiplier() return Math.sloped(Common.difficulty_scale(), 8/10) end -Public.rocket_launch_coin_reward = 6000 +Public.rocket_launch_coin_reward = 5000 function Public.crew_scale() local ret = Common.activecrewcount()/10 @@ -382,7 +382,7 @@ function Public.sandworm_evo_increase_per_spawn() end function Public.kraken_kill_reward_items() - return {{name = 'sulfuric-acid-barrel', count = 5}, {name = 'coin', count = 1000}} + return {{name = 'sulfuric-acid-barrel', count = 5}, {name = 'coin', count = 800}} end function Public.kraken_kill_reward_fuel() return 200 @@ -520,7 +520,7 @@ function Public.starting_items_crew_upstairs() {['grenade'] = 3}, {['shotgun'] = 2, ['shotgun-shell'] = 36}, -- {['raw-fish'] = 5}, - {['coin'] = 2000}, + {['coin'] = 1000}, } end @@ -532,7 +532,7 @@ function Public.starting_items_crew_downstairs() {['inserter'] = Math.random(120,140)}, {['storage-tank'] = 2}, {['medium-electric-pole'] = Math.random(15,21)}, - {['coin'] = 2000}, + {['coin'] = 1000}, {['solar-panel'] = 3}, } end From 3a51bb85cd26894c90e095284545b72105e4fdfc Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Thu, 2 Jun 2022 13:19:55 +0100 Subject: [PATCH 18/20] disable prospector, rework lumberjack --- maps/pirates/api_events.lua | 70 ++++++++++++++++------------------ maps/pirates/roles/classes.lua | 24 ++++++++++-- maps/pirates/shop/covered.lua | 6 ++- 3 files changed, 57 insertions(+), 43 deletions(-) diff --git a/maps/pirates/api_events.lua b/maps/pirates/api_events.lua index 1e1dae85..e9e7ca24 100644 --- a/maps/pirates/api_events.lua +++ b/maps/pirates/api_events.lua @@ -646,9 +646,9 @@ end local function event_pre_player_mined_item(event) -- figure out which crew this is about: - local crew_id = nil - if event.player_index and game.players[event.player_index].valid then crew_id = tonumber(string.sub(game.players[event.player_index].force.name, -3, -1)) or nil end - Memory.set_working_id(crew_id) + -- local crew_id = nil + -- if event.player_index and game.players[event.player_index].valid then crew_id = tonumber(string.sub(game.players[event.player_index].force.name, -3, -1)) or nil end + -- Memory.set_working_id(crew_id) -- local memory = Memory.get_crew_memory() -- if memory.planet[1].type.id == 11 then --rocky planet @@ -660,6 +660,10 @@ local function event_pre_player_mined_item(event) -- end end + +Public.every_nth_tree_gives_coins = 6 + + local function event_on_player_mined_entity(event) if not event.player_index then return end local player = game.players[event.player_index] @@ -677,8 +681,6 @@ local function event_on_player_mined_entity(event) return end - local every_nth_tree_gives_coins = 6 - if entity.type == 'tree' then if not event.buffer then return end local available = destination.dynamic_data.wood_remaining @@ -695,22 +697,18 @@ local function event_on_player_mined_entity(event) local give = {} if memory.classes_table and memory.classes_table[event.player_index] then if memory.classes_table[event.player_index] == Classes.enum.LUMBERJACK then - give[#give + 1] = {name = 'wood', count = 4} - if Math.random(every_nth_tree_gives_coins) == 1 then - local a = 20 - give[#give + 1] = {name = 'coin', count = a} - memory.playtesting_stats.coins_gained_by_trees_and_rocks = memory.playtesting_stats.coins_gained_by_trees_and_rocks + a - end - elseif memory.classes_table[event.player_index] == Classes.enum.WOOD_LORD then give[#give + 1] = {name = 'wood', count = 1} - give[#give + 1] = {name = 'iron-ore', count = 1} - give[#give + 1] = {name = 'copper-ore', count = 1} - give[#give + 1] = {name = 'coal', count = 1} - if Math.random(every_nth_tree_gives_coins) == 1 then - local a = 12 - give[#give + 1] = {name = 'coin', count = a} - memory.playtesting_stats.coins_gained_by_trees_and_rocks = memory.playtesting_stats.coins_gained_by_trees_and_rocks + a - end + Classes.lumberjack_bonus_items(give) + -- elseif memory.classes_table[event.player_index] == Classes.enum.WOOD_LORD then + -- give[#give + 1] = {name = 'wood', count = 1} + -- give[#give + 1] = {name = 'iron-ore', count = 1} + -- give[#give + 1] = {name = 'copper-ore', count = 1} + -- give[#give + 1] = {name = 'coal', count = 1} + -- if Math.random(every_nth_tree_gives_coins) == 1 then + -- local a = 12 + -- give[#give + 1] = {name = 'coin', count = a} + -- memory.playtesting_stats.coins_gained_by_trees_and_rocks = memory.playtesting_stats.coins_gained_by_trees_and_rocks + a + -- end end end @@ -727,25 +725,21 @@ local function event_on_player_mined_entity(event) destination.dynamic_data.wood_remaining = destination.dynamic_data.wood_remaining - amount if memory.classes_table and memory.classes_table[event.player_index] and memory.classes_table[event.player_index] == Classes.enum.LUMBERJACK then - give[#give + 1] = {name = 'wood', count = amount + 3} - if Math.random(every_nth_tree_gives_coins) == 1 then - local a = 12 - give[#give + 1] = {name = 'coin', count = a} - memory.playtesting_stats.coins_gained_by_trees_and_rocks = memory.playtesting_stats.coins_gained_by_trees_and_rocks + a - end - elseif memory.classes_table and memory.classes_table[event.player_index] and memory.classes_table[event.player_index] == Classes.enum.WOOD_LORD then - give[#give + 1] = {name = 'wood', count = amount + 3} - give[#give + 1] = {name = 'iron-ore', count = 1} - give[#give + 1] = {name = 'copper-ore', count = 1} - give[#give + 1] = {name = 'coal', count = 1} - if Math.random(every_nth_tree_gives_coins) == 1 then - local a = 12 - give[#give + 1] = {name = 'coin', count = a} - memory.playtesting_stats.coins_gained_by_trees_and_rocks = memory.playtesting_stats.coins_gained_by_trees_and_rocks + a - end + give[#give + 1] = {name = 'wood', count = amount} + Classes.lumberjack_bonus_items(give) + -- elseif memory.classes_table and memory.classes_table[event.player_index] and memory.classes_table[event.player_index] == Classes.enum.WOOD_LORD then + -- give[#give + 1] = {name = 'wood', count = amount + 3} + -- give[#give + 1] = {name = 'iron-ore', count = 1} + -- give[#give + 1] = {name = 'copper-ore', count = 1} + -- give[#give + 1] = {name = 'coal', count = 1} + -- if Math.random(every_nth_tree_gives_coins) == 1 then + -- local a = 12 + -- give[#give + 1] = {name = 'coin', count = a} + -- memory.playtesting_stats.coins_gained_by_trees_and_rocks = memory.playtesting_stats.coins_gained_by_trees_and_rocks + a + -- end else give[#give + 1] = {name = 'wood', count = amount} - if Math.random(every_nth_tree_gives_coins) == 1 then --tuned + if Math.random(Public.every_nth_tree_gives_coins) == 1 then --tuned local a = 5 give[#give + 1] = {name = 'coin', count = a} memory.playtesting_stats.coins_gained_by_trees_and_rocks = memory.playtesting_stats.coins_gained_by_trees_and_rocks + a @@ -778,7 +772,7 @@ local function event_on_player_mined_entity(event) local give = {} - if memory.overworldx > 0 then + if memory.overworldx > 0 then --no coins on first map, else the optimal strategy is to handmine everything there if memory.classes_table and memory.classes_table[event.player_index] and memory.classes_table[event.player_index] == Classes.enum.PROSPECTOR then local a = 3 give[#give + 1] = {name = 'coin', count = a} diff --git a/maps/pirates/roles/classes.lua b/maps/pirates/roles/classes.lua index 3c829dd5..fbf2c546 100644 --- a/maps/pirates/roles/classes.lua +++ b/maps/pirates/roles/classes.lua @@ -91,7 +91,7 @@ Public.class_unlocks = { Public.class_purchase_requirement = { [enum.MASTER_ANGLER] = enum.FISHERMAN, [enum.WOOD_LORD] = enum.LUMBERJACK, - -- [enum.CHIEF_EXCAVATOR] = enum.PROSPECTOR, + [enum.CHIEF_EXCAVATOR] = enum.PROSPECTOR, [enum.HATAMOTO] = enum.SAMURAI, [enum.DREDGER] = enum.MASTER_ANGLER, } @@ -108,10 +108,10 @@ function Public.initial_class_pool() enum.SAMURAI, -- enum.MERCHANT, --not interesting, breaks coin economy enum.BOATSWAIN, - enum.PROSPECTOR, + -- enum.PROSPECTOR, --lumberjack is just more fun enum.LUMBERJACK, enum.IRON_LEG, - -- enum.SMOLDERING, + -- enum.SMOLDERING, --tedious enum.GOURMET, } end @@ -269,6 +269,24 @@ local function class_on_player_used_capsule(event) end end + +function Public.lumberjack_bonus_items(give_table) + local memory = Memory.get_crew_memory() + + if Math.random(Public.every_nth_tree_gives_coins) == 1 then + local a = 12 + give_table[#give_table + 1] = {name = 'coin', count = a} + memory.playtesting_stats.coins_gained_by_trees_and_rocks = memory.playtesting_stats.coins_gained_by_trees_and_rocks + a + elseif Math.random(2) == 1 then + if Math.random(5) == 1 then + give_table[#give_table + 1] = {name = 'copper-ore', count = 1} + else + give_table[#give_table + 1] = {name = 'iron-ore', count = 1} + end + end +end + + local event = require 'utils.event' event.add(defines.events.on_player_used_capsule, class_on_player_used_capsule) diff --git a/maps/pirates/shop/covered.lua b/maps/pirates/shop/covered.lua index 69e8d73e..d7e5e496 100644 --- a/maps/pirates/shop/covered.lua +++ b/maps/pirates/shop/covered.lua @@ -48,11 +48,13 @@ Public.offers_default = { {price = {{'coin', 720}}, offer = {type = 'give-item', item = 'gate', count = 10}}, {price = {{'coin', 120}}, offer = {type = 'give-item', item = 'storage-tank', count = 4}}, {price = {{'coin', 240}}, offer = {type = 'give-item', item = 'big-electric-pole', count = 8}}, - {price = {{'coin', 240}}, offer = {type = 'give-item', item = 'steel-furnace', count = 4}}, {price = {{'coin', 360}}, offer = {type = 'give-item', item = 'stack-inserter', count = 3}}, {price = {{'coin', 900}}, offer = {type = 'give-item', item = 'piercing-shotgun-shell', count = 9}}, {price = {{'coin', 960}}, offer = {type = 'give-item', item = 'flamethrower', count = 1}}, - {price = {{'coin', 1800}}, offer = {type = 'give-item', item = 'flamethrower-ammo', count = 5}}, + {price = {{'coin', 960}}, offer = {type = 'give-item', item = 'flamethrower', count = 1}}, + {price = {{'coin', 1800}}, offer = {type = 'give-item', item = 'flamethrower-ammo', count = 6}}, + {price = {{'coin', 1800}}, offer = {type = 'give-item', item = 'flamethrower-ammo', count = 6}}, + {price = {{'coin', 1800}}, offer = {type = 'give-item', item = 'flamethrower-ammo', count = 6}}, {price = {{'coin', 1800}}, offer = {type = 'give-item', item = 'flying-robot-frame', count = 1}}, } From dd4f5491a18b3a1aec0387e4be405481adb5bce8 Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Thu, 2 Jun 2022 13:34:22 +0100 Subject: [PATCH 19/20] wave _frequency_ now depends on pollution --- maps/pirates/ai.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maps/pirates/ai.lua b/maps/pirates/ai.lua index a376f650..865c9603 100644 --- a/maps/pirates/ai.lua +++ b/maps/pirates/ai.lua @@ -127,10 +127,14 @@ function Public.eat_up_fraction_of_all_pollution(surface, fraction_of_global_pol end function Public.wave_size_rng() -- random variance in attack sizes + local memory = Memory.get_crew_memory() + + local wave_percentage_chance = Math.clamp(0, 70, 20 + 10 * memory.floating_pollution/1400) --trying this out + local wave_size_multiplier = 1 local memory = Memory.get_crew_memory() local rng1 = Math.random(100) - if rng1 <= 68 then + if rng1 > wave_percentage_chance then wave_size_multiplier = 0 elseif memory.overworldx > 0 then local rng2 = Math.random(1000) From b7c0c6697adfe75b329642d7462901ebe10422fe Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Thu, 2 Jun 2022 13:36:44 +0100 Subject: [PATCH 20/20] rocket now blows up after you launch it --- maps/pirates/api_events.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maps/pirates/api_events.lua b/maps/pirates/api_events.lua index e9e7ca24..4e6d1e49 100644 --- a/maps/pirates/api_events.lua +++ b/maps/pirates/api_events.lua @@ -1610,7 +1610,6 @@ local function event_on_rocket_launched(event) local a = Balance.rocket_launch_coin_reward Common.give_items_to_crew({{name = 'coin', count = a}}) memory.playtesting_stats.coins_gained_by_rocket_launches = memory.playtesting_stats.coins_gained_by_rocket_launches + a - end local force = memory.force @@ -1626,6 +1625,11 @@ local function event_on_rocket_launched(event) destination.dynamic_data.quest_progress = destination.dynamic_data.rocketsilohp Quest.try_resolve_quest() end + + if destination.dynamic_data.rocketsilos and destination.dynamic_data.rocketsilos[1] and destination.dynamic_data.rocketsilos[1].valid then + destination.dynamic_data.rocketsilos[1].die() + destination.dynamic_data.rocketsilos = nil + end end