- Have at least two rocket silo prototypes in the same fast replace group (see code below).
- Place one of them, set it to auto-launch with cargo.
- Fast replace it with another one.
- See the checkbox unset and silo not launching once rocket has cargo.
Note: it also dumps all contents on fast replace regardless if silos have the exact same recipe going etc. But IDK what causes it, so I didn't report it. Tell me if you want me make a bug report for this as well.
Code used for adding more silos:
Code: Select all
local template = {
door_opening_speed = 1,
light_blinking_speed = 1,
rocket_parts_required = 19,
rocket_rising_delay = 1,
launch_wait_time = 1,
arm_01_back_animation = {
animation_speed = 32,
hr_version = {animation_speed = 32},
},
arm_02_right_animation = {
animation_speed = 32,
hr_version = {animation_speed = 32},
},
arm_03_front_animation = {
animation_speed = 32,
hr_version = {animation_speed = 32},
},
engine_starting_speed = 1,
flying_acceleration = 0,
flying_speed = 1/4,
rising_speed = 1,
fast_replaceable_group = 'fp-testing-silo',
}
local function make_rocket_silo(properties)
local silo = util.merge{data.raw['rocket-silo']['rocket-silo'], template, properties}
properties.name = properties.name .. '-rocket'
silo.rocket_entity = properties.name
local rocket = util.merge{data.raw['rocket-silo-rocket']['rocket-silo-rocket'], template, properties}
data:extend{silo, rocket}
end
-- silo props
make_rocket_silo{
name = '1rpm-door-opening-silo',
door_opening_speed = 2/154,
rocket_rising_delay = 2,
}
make_rocket_silo{
name = '1rpm-light-blinking-silo',
light_blinking_speed = 2/154,
rocket_rising_delay = 2,
}
make_rocket_silo{
name = '1rpm-rising-delay-silo',
rocket_rising_delay = 154,
}
make_rocket_silo{
name = '1rpm-launch-wait-silo',
launch_wait_time = 154,
}
-- rocket props
make_rocket_silo{
name = '1rpm-engine-starting-silo',
engine_starting_speed = 1/153, -- sum of 1/N precision error
}
make_rocket_silo{
name = '1rpm-flying-speed-silo',
flying_speed = 0.5/154, -- sum of 1/N precision error, total distance = 0.5
}
make_rocket_silo{
name = '1rpm-flying-acceleration-silo',
flying_acceleration = 1/162,
--[[
function time_in_flight(v, a)
local s, c = 0, 0
while s < 0.5 do
s = s + v
v = v + v * a -- may be v * (1 + a), which is different
c = c + 1
end
return c
end
]]
flying_speed = 1/512,
}
make_rocket_silo{
name = '1rpm-rising-speed-silo',
rising_speed = 1/154,
}
local base_silo = data.raw['rocket-silo']['rocket-silo']
base_silo.active_energy_usage = '80kW'
base_silo.energy_usage = '40kW'
base_silo.idle_enegy_usage = '20kW'
base_silo.energy_source.drain = '10kW'
base_silo.rocket_parts_required = 10
base_silo.fast_replaceable_group = 'fp-testing-silo'