mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-02-03 13:12:11 +02:00
Mtn: fix fluidboxes
This commit is contained in:
parent
fb6ab4366f
commit
42b9762812
@ -184,7 +184,7 @@ local function do_refill_turrets()
|
||||
|
||||
local data = turret_data.data
|
||||
if data.liquid then
|
||||
turret.fluidbox[1] = data
|
||||
turret.set_fluid(1, data)
|
||||
elseif data then
|
||||
turret.insert(data)
|
||||
end
|
||||
@ -278,11 +278,10 @@ local function do_magic_fluid_crafters()
|
||||
|
||||
if fcount > 0 then
|
||||
local fluidbox_index = data.fluidbox_index
|
||||
local fb = entity.fluidbox
|
||||
|
||||
local fb_data = fb[fluidbox_index] or { name = data.item, amount = 0 }
|
||||
local fb_data = entity.get_fluid(fluidbox_index) or { name = data.item, amount = 0 }
|
||||
fb_data.amount = fb_data.amount + fcount
|
||||
fb[fluidbox_index] = fb_data
|
||||
entity.set_fluid(fluidbox_index, fb_data)
|
||||
|
||||
entity.products_finished = entity.products_finished + fcount
|
||||
|
||||
|
@ -244,20 +244,12 @@ local function equal_fluid(source_tank, target_tank)
|
||||
return
|
||||
end
|
||||
|
||||
if #source_tank.fluidbox < 1 then
|
||||
return
|
||||
end
|
||||
|
||||
if #target_tank.fluidbox < 1 then
|
||||
return
|
||||
end
|
||||
|
||||
local source_fluid = source_tank.fluidbox[1] ~= nil and source_tank.fluidbox[1]
|
||||
local source_fluid = source_tank.get_fluid(1) ~= nil and source_tank.get_fluid(1)
|
||||
if not source_fluid then
|
||||
return
|
||||
end
|
||||
|
||||
local target_fluid = target_tank.fluidbox[1]
|
||||
local target_fluid = target_tank.get_fluid(1)
|
||||
local source_fluid_amount = source_fluid.amount
|
||||
|
||||
local amount
|
||||
|
@ -565,6 +565,10 @@ local collapse_after_wave_200 = function ()
|
||||
return
|
||||
end
|
||||
|
||||
if WD.get('paused') then
|
||||
return
|
||||
end
|
||||
|
||||
local wave_number = WD.get_wave()
|
||||
|
||||
if wave_number >= 200 and not Collapse.has_collapse_started() then
|
||||
|
@ -967,7 +967,7 @@ local function setup_enemy_force()
|
||||
if not surface or not surface.valid then
|
||||
return
|
||||
end
|
||||
e_force.set_evolution_factor(1, surface) -- this should never change since we are changing biter types on spawn
|
||||
e_force.set_evolution_factor(1, surface.name) -- this should never change since we are changing biter types on spawn
|
||||
e_force.set_friend(game.forces.player, true) -- outlander force (player) should not be attacked by turrets
|
||||
e_force.set_cease_fire(game.forces.player, true) -- outlander force (player) should not be attacked by units
|
||||
if (this.testing_mode == true) then
|
||||
|
@ -754,7 +754,7 @@ local function build_config_gui(data)
|
||||
if Module.collapse_grace then
|
||||
switch_state = 'left'
|
||||
end
|
||||
add_switch(scroll_pane, switch_state, 'collapse_grace', 'Collapse', 'On = Enables collapse after wave 100.\nOff = Disables collapse - you must breach the first zone for collapse to occur.')
|
||||
add_switch(scroll_pane, switch_state, 'collapse_grace', 'Collapse', 'On = Enables collapse after wave 200.\nOff = Disables collapse - you must breach the first zone for collapse to occur.')
|
||||
|
||||
scroll_pane.add({ type = 'line' })
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user