1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-07 13:31:40 +02:00

remove needs_more_capacity

This commit is contained in:
danielmartin0 2024-09-10 16:27:47 +01:00
parent 955884c1c3
commit 4d2c87f28f
7 changed files with 12 additions and 25 deletions

View File

@ -75,10 +75,10 @@ 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!
parrot_cliff_explosive_tip=Cliff explosives? These look so powerful, they could blow away those annoying chests in the hold. Squawk!
parrot_buried_treasure_tip=Squawk! If X marks the spot - use an item to dig with!
parrot_captain_left_protected_run=Uh oh, looks like the captain left. Since this is protected crew, the captain role will not be redistributed.
parrot_player_joins_protected_run_with_no_captain=This crew has captain protection turned on, so you will have to wait for captain to come back to control the ship.
parrot_create_new_crew_tip=You can always join/create another crew from the lobby by exiting current crew by clicking red flag on top then clicking Quit Crew.
parrot_buried_treasure_tip=Squawk! If X marks the spot - use an item to dig!
parrot_captain_left_protected_run=The captain has disconnected. Since this crew is captain-protected, the captain role will not be redistributed for __1__ hours. Squawk!
parrot_player_joins_protected_run_with_no_captain=Hello there! Since this crew is captain-protected, you will have to wait for captain to return in order to control the ship.
parrot_create_new_crew_tip=You can always create or join another crew. To do this, press the red flag on top, click 'Quit Crew', then press 'Crews'.
difficulty_easy=Easy
difficulty_normal=Normal
@ -546,7 +546,6 @@ gui_join_private_run_error_wrong_password=The password you've entered is incorre
gui_runs_launch=Launch crew
gui_runs_launch_error_2=The number of concurrent crews on the server has reached the cap set by the admins.
gui_runs_launch_error_3=Can't launch; at least one crew needs high player capacity.
gui_runs_launch_error_4=No sloops available. Join an existing crew instead.
gui_runs_launch_error_5=Can't create the proposal, because there are too many crews. Join some existing crew crew instead.

View File

@ -142,7 +142,7 @@ function(cmd)
local global_memory = Memory.get_global_memory()
if tonumber(param) then
global_memory.active_crews_cap_memory = tonumber(param)
global_memory.active_crews_cap_in_memory = tonumber(param)
Common.notify_player_expected(player, {'pirates.cmd_notify_set_max_crews', param})
end
end

View File

@ -346,7 +346,6 @@ function Public.crew_overall_state_bools(player_index)
created_crew = false,
proposing = false,
sloops_full = false,
needs_more_capacity = false,
crew_count_capped = false,
leaving = false,
proposal_can_launch = false,
@ -370,12 +369,10 @@ function Public.crew_overall_state_bools(player_index)
ret.proposing = true
if #global_memory.crew_active_ids >= Common.starting_ships_count then
ret.sloops_full = true
elseif #global_memory.crew_active_ids >= global_memory.active_crews_cap_memory then
elseif #global_memory.crew_active_ids >= global_memory.active_crews_cap_in_memory then
ret.crew_count_capped = true
elseif global_memory.active_crews_cap_memory > 1 and #global_memory.crew_active_ids == (global_memory.active_crews_cap_memory - 1) and not ((global_memory.crew_memories[1] and global_memory.crew_memories[1].capacity >= Common.minimum_run_capacity_to_enforce_space_for) or (global_memory.crew_memories[2] and global_memory.crew_memories[2].capacity >= Common.minimum_run_capacity_to_enforce_space_for) or (global_memory.crew_memories[3] and global_memory.crew_memories[3].capacity >= Common.minimum_run_capacity_to_enforce_space_for)) and not (CoreData.capacity_options[proposal.capacity_option].value >= Common.minimum_run_capacity_to_enforce_space_for) then
ret.needs_more_capacity = true
end
if not (ret.sloops_full or ret.needs_more_capacity or ret.crew_count_capped) then
if not (ret.sloops_full or ret.crew_count_capped) then
ret.proposal_can_launch = true
end
end

View File

@ -444,13 +444,6 @@ function Public.toggle_window(player)
})
flow4.style.single_line = false
flow4 = flow3.add({
name = 'proposal_insufficient_player_capacity',
type = 'label',
caption = {'pirates.gui_runs_launch_error_3'},
})
flow4.style.single_line = false
flow4 = flow3.add({
name = 'proposal_insufficient_sloops',
type = 'label',
@ -542,8 +535,6 @@ function Public.full_update(player)
flow.proposals.body.flow_proposal_launch.proposal_insufficient_sloops.visible = playercrew_status.sloops_full
flow.proposals.body.flow_proposal_launch.proposal_insufficient_player_capacity.visible = playercrew_status.needs_more_capacity
flow.proposals.body.flow_proposal_launch.proposal_crew_count_capped.visible = playercrew_status.crew_count_capped
-- flow.proposals.body.proposal_maker.body.proposal_cant_do_infinity_mode.visible = (flow.proposals.body.proposal_maker.body.options.mode.mode.switch.switch_state == 'right')
@ -576,7 +567,7 @@ function Public.full_update(player)
elseif mem.crewplayerindices then
count = #mem.crewplayerindices
end
local extraCrewText = ''
if mem.run_is_protected and mem.run_is_private then
extraCrewText = ' (private, protected)'
@ -724,7 +715,7 @@ function Public.click(event)
end
if eventname == 'propose_crew' then
if #global_memory.crew_active_ids >= global_memory.active_crews_cap_memory then
if #global_memory.crew_active_ids >= global_memory.active_crews_cap_in_memory then
Common.notify_player_error(player, {'pirates.gui_runs_launch_error_5'})
return
end

View File

@ -108,7 +108,7 @@ local function on_init()
Common.init_game_settings(Balance.technology_price_multiplier)
global_memory.active_crews_cap_memory = Common.active_crews_cap
global_memory.active_crews_cap_in_memory = Common.active_crews_cap
global_memory.protected_but_not_private_run_cap = Common.protected_but_not_private_run_cap
global_memory.private_run_cap = Common.private_run_cap

View File

@ -30,7 +30,7 @@ function Public.global_reset_memory()
pirates_global_memory.lobby_boats = {}
pirates_global_memory.active_crews_cap_memory = nil
pirates_global_memory.active_crews_cap_in_memory = nil
pirates_global_memory.crew_capacity_min = nil
pirates_global_memory.crewproposals = {}

View File

@ -239,7 +239,7 @@ function Public.player_left_so_redestribute_roles(player)
local officers = Common.crew_get_non_afk_officers()
if memory.run_is_protected and #officers == 0 then
if memory.crewplayerindices and #memory.crewplayerindices > 0 then
Common.parrot_speak(memory.force, {'pirates.parrot_captain_left_protected_run'})
Common.parrot_speak(memory.force, {'pirates.parrot_captain_left_protected_run', Common.protected_run_lock_amount_hr})
Common.parrot_speak(memory.force, {'pirates.parrot_create_new_crew_tip'})
end
elseif memory.run_is_protected then