1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-11 13:39:14 +02:00
This commit is contained in:
danielmartin0 2022-03-13 02:09:21 +00:00
parent d2ecd38764
commit 9125ab5351
3 changed files with 17 additions and 15 deletions

View File

@ -5,8 +5,8 @@ local inspect = require 'utils.inspect'.inspect
local Public = {} local Public = {}
Public.scenario_id_name = 'pirates' Public.scenario_id_name = 'pirates'
Public.version_string = '1.1.0.2' Public.version_string = '1.1.0.3'
Public.version_float = 1.102 Public.version_float = 1.103
Public.blueprint_library_allowed = true Public.blueprint_library_allowed = true
Public.blueprint_importing_allowed = true Public.blueprint_importing_allowed = true

View File

@ -506,13 +506,13 @@ function Public.update_gui(player)
end end
end end
GuiEvo.regular_update(player) GuiEvo.full_update(player)
GuiProgress.regular_update(player) --moved to event GuiProgress.regular_update(player) --moved to event
GuiRuns.regular_update(player) GuiRuns.full_update(player)
GuiCrew.regular_update(player) GuiCrew.full_update(player)
GuiFuel.regular_update(player) GuiFuel.regular_update(player)
GuiMinimap.regular_update(player) GuiMinimap.full_update(player)
GuiInfo.regular_update(player) GuiInfo.full_update(player)
-- local lives = memory.lives or 1 -- local lives = memory.lives or 1
-- local button = pirates_flow.lives_piratebutton_frame.lives_piratebutton -- local button = pirates_flow.lives_piratebutton_frame.lives_piratebutton

View File

@ -38,7 +38,7 @@ function Public.strobe_player_colors(tickinterval)
local strobing_players = memory.speed_boost_characters local strobing_players = memory.speed_boost_characters
if #strobing_players > 0 then if strobing_players and #strobing_players > 0 then
local col = Utils.rgb_from_hsv((game.tick*6) % 360, 0.7, 0.9) local col = Utils.rgb_from_hsv((game.tick*6) % 360, 0.7, 0.9)
for index, val in pairs(strobing_players) do for index, val in pairs(strobing_players) do
if val then if val then
@ -947,9 +947,10 @@ end
function Public.loading_update(tickinterval) function Public.loading_update(tickinterval)
local memory = Memory.get_crew_memory() local memory = Memory.get_crew_memory()
if memory.game_lost then return end if memory.game_lost then return end
if not memory.loadingticks then return end if not memory.loadingticks then return end
local destination = Common.current_destination() local currentdestination = Common.current_destination()
local destination_index = memory.mapbeingloadeddestination_index local destination_index = memory.mapbeingloadeddestination_index
if not destination_index then memory.loadingticks = nil return end if not destination_index then memory.loadingticks = nil return end
@ -960,8 +961,9 @@ function Public.loading_update(tickinterval)
-- if memory.loadingticks % 100 == 0 then game.print(memory.loadingticks) end -- if memory.loadingticks % 100 == 0 then game.print(memory.loadingticks) end
if (not destination) then local destination_data = memory.destinations[destination_index]
if memory.boat and destination.type == Surfaces.enum.LOBBY then if (not destination_data) then
if memory.boat and currentdestination.type == Surfaces.enum.LOBBY then
if memory.loadingticks >= 350 - Common.loading_interval then if memory.loadingticks >= 350 - Common.loading_interval then
if Boats.players_on_boat_count(memory.boat) > 0 then if Boats.players_on_boat_count(memory.boat) > 0 then
if memory.loadingticks < 350 then if memory.loadingticks < 350 then
@ -987,13 +989,13 @@ function Public.loading_update(tickinterval)
end end
return return
else else
local surface_name = destination.surface_name local surface_name = destination_data.surface_name
if not surface_name then return end if not surface_name then return end
local surface = game.surfaces[surface_name] local surface = game.surfaces[surface_name]
if not surface then return end if not surface then return end
if destination.type == Surfaces.enum.LOBBY then if currentdestination.type == Surfaces.enum.LOBBY then
if memory.loadingticks >= 1260 then if memory.loadingticks >= 1260 then
@ -1038,9 +1040,9 @@ function Public.loading_update(tickinterval)
elseif memory.boat.state == Boats.enum_state.ATSEA_LOADING_MAP then elseif memory.boat.state == Boats.enum_state.ATSEA_LOADING_MAP then
local total = Common.map_loading_ticks_atsea local total = Common.map_loading_ticks_atsea
if destination.type == Surfaces.enum.DOCK then if currentdestination.type == Surfaces.enum.DOCK then
total = Common.map_loading_ticks_atsea_dock total = Common.map_loading_ticks_atsea_dock
elseif destination.type == Surfaces.enum.ISLAND and destination.subtype == Surfaces.Island.enum.MAZE then elseif currentdestination.type == Surfaces.enum.ISLAND and currentdestination.subtype == Surfaces.Island.enum.MAZE then
total = Common.map_loading_ticks_atsea_maze total = Common.map_loading_ticks_atsea_maze
end end