Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pirate Ship update for Vanilla 2.0 #481

Merged
merged 31 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
30bb935
locale fixes
danielmartin0 Oct 15, 2024
a58e031
decoratives
danielmartin0 Oct 15, 2024
9a4cd10
port target_offset
danielmartin0 Oct 15, 2024
01f1448
Update crew.lua
danielmartin0 Oct 15, 2024
bf9cb53
flag -> skull
danielmartin0 Oct 15, 2024
6fa9cce
gui updates
danielmartin0 Oct 15, 2024
98746e9
9 ships
danielmartin0 Oct 15, 2024
0814cf7
notice given to samurai/hatamoto
danielmartin0 Oct 15, 2024
157725a
Revert "flag -> skull"
danielmartin0 Oct 15, 2024
3b54e2c
fix info
danielmartin0 Oct 15, 2024
c2c411a
fix render layers
danielmartin0 Oct 15, 2024
56dbf76
rework treasure maps
danielmartin0 Oct 15, 2024
0b75a8c
less decorative spam in memory
danielmartin0 Oct 15, 2024
7232f90
fix map_being_loaded_destination_index
danielmartin0 Oct 16, 2024
4abebfb
fix using space age deco
danielmartin0 Oct 16, 2024
548e74b
bugfixes
danielmartin0 Oct 16, 2024
4ded924
Update coredata.lua
danielmartin0 Oct 16, 2024
d5c40d6
shaman fix
danielmartin0 Oct 17, 2024
3375790
Re-open GUI of teleported items when the boat moves
danielmartin0 Oct 17, 2024
dabeee0
Update pirates.cfg
danielmartin0 Oct 17, 2024
aa3a900
bump version
danielmartin0 Oct 17, 2024
e1cf855
Fix turret nerfs
danielmartin0 Oct 17, 2024
34238df
update ammo categories
danielmartin0 Oct 17, 2024
77d5b2e
rebalance shotguns due to base game changes
danielmartin0 Oct 17, 2024
d078e3d
Update coredata.lua
danielmartin0 Oct 28, 2024
84bcafa
fix repeatedly calling init
danielmartin0 Oct 29, 2024
71aa65c
luacheck
danielmartin0 Oct 29, 2024
1594f0a
luacheck
danielmartin0 Oct 29, 2024
a98c504
reinstate discarded line
danielmartin0 Oct 29, 2024
767ff99
bump version
danielmartin0 Oct 29, 2024
bb9a056
Merge branch 'develop' into pirates
Gerkiz Oct 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 24 additions & 19 deletions locale/en/pirates.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ softmod_info_new_players_2=Mine coal and other resources and bring them to the s
softmod_info_tips_1=Features of the game that are hard to work out alone
softmod_info_tips_2=• The captain (or officers) can steer the boat from the crow's nest by placing 50 rail signals in one of the blue boxes.\n• The quantity on an island is independent of the order in which you break rocks.\n• Passive pollution ramps up over time on each island.\n• Items dropped on the deck are transferred to the cabin when the boat moves for performance reasons.\n• Mining productivity increases naturally with leagues traveled.\nOn multiplayer, crews that are inactive for 96 hours are auto-disbanded.\n• Useful commands: /classinfo {classname} command, /plank {player}, /officer {player}, /undock, /ccolor, /clear_north_tanks, /clear_south_tanks, /tax, /reset_password

softmod_info_1_1=v1.6.7
softmod_info_1_2=• Corner cases of offline inventory storage fixed for players handcrafting or wearing power armor.\n• Market weapon upgrades no longer affect weapon shooting speed.\n• Fixed revenge biters not spawning for ship slots 4–7.\n• Shotguns are now buffed as intended.\n• Land mine technology disabled.
softmod_info_1_1=v1.7 highlights
softmod_info_1_2=• Support for Factorio 2.0.\n• With the introduction of remote view, spectator mode has been retired.\n• 9 simultaneous crews are now supported.\n• The treasure map mechanic has been reworked to use cameras.\n• Ship movement no longer causes players to exit the GUI of entities on the ship.\n• Performance improvements.

softmod_info_2_1=v1.6.1–1.6.6 highlights
softmod_info_2_2=• Optional setting for new crews to disable blueprints.\n• Each island now has a grace period of 2 minutes before attacks.\n• Machines now deactivate after several minutes spent waiting at sea.\n• Private crews and captain-protected crews no longer revert to public crews when inactive. Runs now autodisband after 96 hours of inactivity.\n• Further slowing of gameplay for small crews.

softmod_info_3_1=v1.6.0 highlights
softmod_info_3_2=• 7 simultaneous crews supported. Surface loading is paused if other crews are engaged in a fight at sea, or are loading themselves.\n• New runs begin on the top lane so that beginners are more likely to encounter docks.\n• Disconnecting players once again have their items temporarily saved. Items are returned to the crew if players don't reconnect quickly.\n• Players now die rather than being temporarily marooned if they miss the boat.\n• Melee classes can no longer hold weapons. New class added.\n• The pause at sea now occurs after the loading time for the next destination.
softmod_info_2_1=v1.6 highlights
softmod_info_2_2=• New runs begin on the top lane so that beginners are more likely to encounter docks.\n• Players now die rather than being temporarily marooned if they miss the boat.\n• The pause at sea now occurs after the loading time for the next destination.\n• Optional setting for new crews to disable blueprints.\n• Machines now deactivate after several minutes spent waiting at sea.\n• Private crews and captain-protected crews no longer revert to public crews when inactive. Runs now autodisband after 96 hours of inactivity.\n• Shotguns are now buffed as intended.

softmod_info_credits_1=Credits
softmod_info_credits_2=Designed/developed by thesixthroc. Updates from Piratux. Comfy codebase and help from Gerkiz, Hanakocz and Mew @ Comfy Industries (https://getcomfy.eu). Island structure blueprints contributed by Mattisso.\n\nCome chat with us: https://getcomfy.eu/discord\n\n"Those white gloves. I'll never forget them 'till the day I die." - Dr. John
Expand Down Expand Up @@ -67,14 +64,14 @@ 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! Quick, throw some coal to captain's cabin!
parrot_silo_warning=The silo is attracting biters...
parrot_silo_warning=The silo is attracting enemies...
parrot_0=We can wait here for as long as we like.
parrot_night_warning=Did you know biters deal more damage at night?
parrot_night_warning=Did you know enemies deal more damage at night?
parrot_boats_warning=200 leagues? I think we're being chased...
parrot_kraken_warning=400 leagues coming up? What are those pink things I spy...
parrot_need_resources_to_undock_warning=Oh no! From now on, if we won't collect resources in time, we will lose!
parrot_radioactive_tip_1=We'll need uranium-235 to push away from this island...
parrot_radioactive_tip_2=The biters don't care if we pollute here, but they evolve fast.
parrot_radioactive_tip_2=The enemies don't care if we pollute here, but they evolve fast.
parrot_maze_tip_1=Something seems wrong with our minimap.
parrot_cave_tip_1=That island looks suspiciously dark... I'm scared! Squawk!
parrot_captain_first_time_in_cabin_hint=Squawk! Captains and officers can buy rail signals to steer the ship!
Expand Down Expand Up @@ -131,7 +128,7 @@ silo_destroyed=The silo was destroyed.

research_notification=__1__ researched.

destroyed_all_nests=All biter bases destroyed — escape cost removed.
destroyed_all_nests=All enemy bases destroyed — escape cost removed.

recover_offline_player_items=Offline player's items recovered to cabin.

Expand Down Expand Up @@ -249,6 +246,8 @@ class_scout=Scout
class_scout_explanation_advanced=They move __1__% times faster, but receive __2__% more damage and deal __3__% less damage.
class_samurai=Samurai
class_samurai_explanation_advanced=They receive __1__% less damage, and with no weapon equipped do extra __2__ damage in melee (scales with 'physical projectile damage' research bonuses), but deal __3__% less damage otherwise.\nIf the damage dealt in melee is an overkill, the remaining damage splashes onto nearby enemies.
discard_weapon_to_inventory=As a __1__, your weapon has been placed back in your inventory.
discard_weapon_to_ground=As a __1__, your weapon has been removed. Since your inventory was full, it has been placed on the ground.
class_merchant=Merchant
class_merchant_explanation_advanced=They generate 50 doubloons per league.
class_shoresman=Shoresman
Expand Down Expand Up @@ -401,12 +400,13 @@ highscore_heading_difficulty=Difficulty
highscore_heading_peak_players=PeakPlayers

second_element=__2__
run_condition_private=, private
run_condition_captain_protected=, cap'n-protected
run_condition_blueprints_disabled=, BPs disabled
player_count_description=__plural_for_parameter__1__{1=__1__ player|rest=__1__ players}__
run_condition_private_2=private
run_condition_captain_protected_2=cap'n-protected
run_condition_blueprints_disabled_2=BPs disabled
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.
difficulty_tooltip=Difficulty.\n\nHigher difficulties have higher pollution and evo, higher enemy 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 (or typing /undock).
Expand Down Expand Up @@ -486,9 +486,9 @@ gui_classes_take_enabled_tooltip=Equip the class to receive bonuses!
gui_classes_take_disabled_tooltip=This class is currently in use by someone
gui_classes_drop_tooltip=Unequip the class to allow someone else to take it

gui_evo_tooltip_1=Local Biter Evolution: __1__
gui_evo_tooltip_1=Local Evolution: __1__
gui_evo_tooltip_2=Leagues: __1__
gui_evo_tooltip_3=Kraken: __1__
gui_evo_tooltip_3=Sea Enemies: __1__
gui_evo_tooltip_4=Time: __1__
gui_evo_tooltip_5=Silo: __1__
gui_evo_tooltip_6=Nests: __1__
Expand All @@ -508,10 +508,15 @@ gui_minimap_switch_right=Off

gui_progress=Progress
gui_progress_distance_travelled=Distance travelled:
gui_progress_leagues_hint=Travel 1000 leagues for victory!
gui_progress_leagues=__1__ leagues
gui_progress_current_location=Current location: __1__
gui_progress_time_of_day=Time of day: __1__

gui_treasure=Treasure
gui_treasure_discovered_maps=Discovered Maps
gui_treasure_tooltip=The treasure maps the crew has currently found. Dig at the right location to find treasure.

gui_runs_play=Crews
gui_runs_ongoing_runs=Ongoing Crews
gui_runs_ongoing_runs_helpful_tip=To join a crew, first select it in the table below.
Expand Down Expand Up @@ -566,9 +571,9 @@ gui_etaframe_board_warning_tooltip=Probably time to board...
gui_etaframe_autoundock=Auto-undock:
gui_etaframe_loading=Loading
gui_etaframe_defeat_krakens=Defeat the krakens!
gui_etaframe_atsea_waiting=Captain — Click here to
gui_etaframe_atsea_waiting=Captain — Click here to proceed
gui_etaframe_atsea_waiting_are_you_sure=Proceed — Are you sure?
gui_etaframe_atsea_victorious=Captain — Click here to Proceed
gui_etaframe_atsea_victorious=Captain — Click here to proceed
gui_etaframe_undock=Undock:
gui_etaframe_anytime=Anytime
gui_etaframe_next_escape_cost=Next escape cost:
Expand Down
8 changes: 7 additions & 1 deletion maps/pirates/ai.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ function Public.Tick_actions(tick_interval)
if destination.type ~= Surfaces.enum.ISLAND then
return
end

if destination.subtype and destination.subtype == IslandEnum.enum.FIRST then
return
end

if memory.boat.state ~= Boats.enum_state.LANDED and memory.boat.state ~= Boats.enum_state.RETREATING then
return
end
Expand All @@ -74,7 +79,8 @@ function Public.Tick_actions(tick_interval)
if game.tick % (tick_interval * 2) == 0 and memory.boat.state == Boats.enum_state.LANDED then
local extra_evo = 2 * tick_interval / 60 * Balance.evolution_per_second()
Common.increment_evo(extra_evo)
destination.dynamic_data.evolution_accrued_time = destination.dynamic_data.evolution_accrued_time + extra_evo
destination.dynamic_data.evolution_accrued_time = (destination.dynamic_data.evolution_accrued_time or 0)
+ extra_evo
end

-- if destination.subtype == IslandEnum.enum.RED_DESERT then return end -- This was a hack to stop biter boats causing attacks, but, it has the even worse effect of stopping all floating_pollution gathering.
Expand Down
32 changes: 16 additions & 16 deletions maps/pirates/api_events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -582,14 +582,14 @@ local function handle_damage_dealt_by_players(event)
end
end

if class and class == Classes.enum.SCOUT then
if event.entity.valid and class and class == Classes.enum.SCOUT then
-- event.entity.health = event.entity.health + (1 - Balance.scout_damage_dealt_multiplier) * event.final_damage_amount
Common.damage_hostile_entity(
event.entity,
-(1 - Balance.scout_damage_dealt_multiplier) * event.final_damage_amount
)
event.final_damage_amount = event.final_damage_amount * Balance.scout_damage_dealt_multiplier
elseif class and (class == Classes.enum.SAMURAI or class == Classes.enum.HATAMOTO) then
elseif event.entity.valid and class and (class == Classes.enum.SAMURAI or class == Classes.enum.HATAMOTO) then
local samurai = class == Classes.enum.SAMURAI
local hatamoto = class == Classes.enum.HATAMOTO

Expand Down Expand Up @@ -731,13 +731,13 @@ local function handle_maze_walls_damage_resistance(event)
elseif event.damage_type.name and event.damage_type.name == 'fire' then
-- put out forest fires:
for _, e2 in
pairs(entity.surface.find_entities_filtered({
area = {
{ entity.position.x - 4, entity.position.y - 4 },
{ entity.position.x + 4, entity.position.y + 4 },
},
name = 'fire-flame-on-tree',
}))
pairs(entity.surface.find_entities_filtered({
area = {
{ entity.position.x - 4, entity.position.y - 4 },
{ entity.position.x + 4, entity.position.y + 4 },
},
name = 'fire-flame-on-tree',
}))
do
if e2.valid then
e2.destroy()
Expand Down Expand Up @@ -1696,7 +1696,7 @@ local function event_on_research_finished(event)
force.set_gun_speed_modifier(category, current_m + factor * m)
end
elseif t == 'turret-attack' then
local category = e.ammo_category
local category = e.turret_id
local factor = Balance.player_turret_attack_modifiers()[category]

if factor then
Expand Down Expand Up @@ -1946,7 +1946,7 @@ function Public.player_entered_vehicle(player, vehicle)
-- if not vehicle.valid then log('vehicle invalid') return end

local player_relative_pos =
{ x = player.character.position.x - vehicle.position.x, y = player.character.position.y - vehicle.position.y }
{ x = player.character.position.x - vehicle.position.x, y = player.character.position.y - vehicle.position.y }

local memory = Memory.get_crew_memory()

Expand Down Expand Up @@ -2131,7 +2131,7 @@ function Public.event_on_chunk_generated(event)
})
else
tiles[#tiles + 1] =
{ name = 'out-of-map', position = Utils.psum({ p, { 1, terraingen_coordinates_offset } }) }
{ name = 'out-of-map', position = Utils.psum({ p, { 1, terraingen_coordinates_offset } }) }
end
end
end
Expand Down Expand Up @@ -2179,7 +2179,7 @@ function Public.event_on_chunk_generated(event)
if special.name == 'buried-treasure' then
if destination.dynamic_data.buried_treasure and crewid ~= 0 then
destination.dynamic_data.buried_treasure[#destination.dynamic_data.buried_treasure + 1] =
{ treasure = Loot.buried_treasure_loot(), position = special.position }
{ treasure = Loot.buried_treasure_loot(), position = special.position }
end
elseif special.name == 'chest' then
local e = surface.create_entity({
Expand Down Expand Up @@ -2253,7 +2253,7 @@ function Public.event_on_chunk_generated(event)

if special.components then
destination.dynamic_data.structures_waiting_to_be_placed[#destination.dynamic_data.structures_waiting_to_be_placed + 1] =
{ data = special, tick = game.tick }
{ data = special, tick = game.tick }
end
end

Expand Down Expand Up @@ -2463,7 +2463,7 @@ local function event_on_market_item_purchased(event)
Shop.event_on_market_item_purchased(event)
end

local remove_boost_movement_speed_on_respawn = Token.register(function (data)
local remove_boost_movement_speed_on_respawn = Token.register(function(data)
local player = data.player
local crew_id = data.crew_id
if not (player and player.valid) then
Expand All @@ -2486,7 +2486,7 @@ local remove_boost_movement_speed_on_respawn = Token.register(function (data)
Common.notify_player_expected(player, { 'pirates.respawn_speed_bonus_removed' })
end)

local boost_movement_speed_on_respawn = Token.register(function (data)
local boost_movement_speed_on_respawn = Token.register(function(data)
local player = data.player
local crew_id = data.crew_id
if not player or not player.valid then
Expand Down
Loading
Loading