mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2024-12-30 23:17:53 +02:00
Mtn v3 - fix extra wagons not spawning
This commit is contained in:
parent
84882e4a3f
commit
65befc1574
@ -226,13 +226,14 @@ function Public.locomotive_spawn(surface, position, reversed)
|
||||
local extra_wagons = Public.stateful.get_stateful('extra_wagons')
|
||||
|
||||
if extra_wagons and extra_wagons > 0 then
|
||||
local pos = this.locomotive_cargo.position
|
||||
local pos = this.locomotive.position
|
||||
local inc = 7
|
||||
|
||||
if reversed then
|
||||
local new_position = {x = pos.x, y = pos.y - inc}
|
||||
|
||||
for y = pos.y, new_position.y - (6 * extra_wagons), -2 do
|
||||
surface.create_entity({name = 'straight-rail', position = {new_position.x, y}, force = 'player', direction = 0})
|
||||
surface.create_entity({name = 'straight-rail', position = {pos.x, y}, force = 'player', direction = 0})
|
||||
end
|
||||
|
||||
for _ = 1, extra_wagons do
|
||||
|
@ -1628,86 +1628,23 @@ if _DEBUG then
|
||||
function()
|
||||
local cbl = Task.get(apply_settings_dev_token)
|
||||
local data = {
|
||||
rounds_survived = 58,
|
||||
season = 3,
|
||||
rounds_survived = 11,
|
||||
season = 4,
|
||||
test_mode = false,
|
||||
buffs = {
|
||||
{name = 'defense', discord = 'Defense starting supplies', modifier = 'starting_items', items = {{name = 'gun-turret', count = 2}, {name = 'firearm-magazine', count = 25}}, add_per_buff = 1, limit = 10},
|
||||
{name = 'fast_startup_2', discord = 'Assemling starting supplies', modifier = 'starting_items', items = {{name = 'assembling-machine-3', count = 2}}, add_per_buff = 2, limit = 25},
|
||||
{name = 'character_health_bonus', discord = 'Character health bonus', modifier = 'force', state = 250},
|
||||
{name = 'fast_startup_2', discord = 'Assemling starting supplies', modifier = 'starting_items', items = 0, add_per_buff = 2, limit = 25},
|
||||
{name = 'supplies_2', discord = 'Starting items supplies', modifier = 'starting_items', items = {{name = 'iron-plate', count = 400}, {name = 'copper-plate', count = 400}}, add_per_buff = 400, limit = 1000},
|
||||
{name = 'character_health_bonus', discord = 'Character health bonus', modifier = 'force', state = 250},
|
||||
{name = 'defense_3', discord = 'Defense starting supplies', modifier = 'starting_items', items = {{name = 'rocket-launcher', count = 1}, {name = 'rocket', count = 100}}, add_per_buff = 1, limit = 1},
|
||||
{name = 'supplies_1', discord = 'Starting items supplies', modifier = 'starting_items', items = {{name = 'iron-plate', count = 200}, {name = 'copper-plate', count = 200}}, add_per_buff = 200, limit = 1000},
|
||||
{name = 'character_health_bonus', discord = 'Character health bonus', modifier = 'force', state = 250},
|
||||
{name = 'worker_robots_storage_bonus', discord = 'Robot storage bonus', modifier = 'force', state = 1},
|
||||
{name = 'supplies', discord = 'Starting items supplies', modifier = 'starting_items', items = {{name = 'iron-plate', count = 100}, {name = 'copper-plate', count = 100}}, add_per_buff = 100, limit = 1000},
|
||||
{name = 'xp_bonus', discord = 'RPG XP point bonus', modifier = 'rpg', state = 0.12},
|
||||
{name = 'manual_mining_speed_modifier', discord = 'Mining speed modifier', modifier = 'force', state = 0.15},
|
||||
{name = 'fast_startup_2', discord = 'Assemling starting supplies', modifier = 'starting_items', items = 0, add_per_buff = 2, limit = 25},
|
||||
{name = 'armor', discord = 'Armor starting supplies', modifier = 'starting_items', limit = 1, items = {{name = 'modular-armor', count = 1}, {name = 'solar-panel-equipment', count = 2}}, add_per_buff = 1},
|
||||
{name = 'laboratory_productivity_bonus', discord = 'Productivity bonus', modifier = 'force', state = 0.15},
|
||||
{name = 'laboratory_speed_modifier', discord = 'Laboratory speed modifier', modifier = 'force', state = 0.15},
|
||||
{name = 'laboratory_productivity_bonus', discord = 'Productivity bonus', modifier = 'force', state = 0.15},
|
||||
{name = 'supplies_1', discord = 'Starting items supplies', modifier = 'starting_items', items = 0, add_per_buff = 200, limit = 1000},
|
||||
{name = 'worker_robots_storage_bonus', discord = 'Robot storage bonus', modifier = 'force', state = 1},
|
||||
{name = 'fast_startup_1', discord = 'Assemling starting supplies', modifier = 'starting_items', items = {{name = 'assembling-machine-2', count = 2}}, add_per_buff = 2, limit = 25},
|
||||
{name = 'character_running_speed_modifier', discord = 'Running speed modifier', modifier = 'force', state = 0.05},
|
||||
{name = 'manual_mining_speed_modifier', discord = 'Mining speed modifier', modifier = 'force', state = 0.15},
|
||||
{name = 'character_running_speed_modifier', discord = 'Running speed modifier', modifier = 'force', state = 0.05},
|
||||
{name = 'manual_crafting_speed_modifier', discord = 'Crafting speed modifier', modifier = 'force', state = 0.12},
|
||||
{name = 'defense_2', discord = 'Defense starting supplies', modifier = 'starting_items', items = {{name = 'grenade', count = 25}, {name = 'poison-capsule', count = 15}}, add_per_buff = 1, limit = 10},
|
||||
{name = 'heal-thy-buildings', discord = 'Repair starting supplies', modifier = 'starting_items', items = {{name = 'repair-pack', count = 5}}, add_per_buff = 2, limit = 20},
|
||||
{name = 'defense', discord = 'Defense starting supplies', modifier = 'starting_items', items = 0, add_per_buff = 1, limit = 10},
|
||||
{name = 'worker_robots_storage_bonus', discord = 'Robot storage bonus', modifier = 'force', state = 1},
|
||||
{name = 'worker_robots_storage_bonus', discord = 'Robot storage bonus', modifier = 'force', state = 1},
|
||||
{name = 'supplies_2', discord = 'Starting items supplies', modifier = 'starting_items', limit = 1000, add_per_buff = 400, items = 0},
|
||||
{name = 'worker_robots_speed_modifier', discord = 'Robot speed modifier', modifier = 'force', state = 0.5},
|
||||
{name = 'extra_wagons', discord = 'Extra wagon at start', modifier = 'locomotive', state = 1},
|
||||
{name = 'fast_startup_2', discord = 'Assembling starting supplies', modifier = 'starting_items', limit = 25, add_per_buff = 2, items = 0},
|
||||
{name = 'worker_robots_storage_bonus', discord = 'Robot storage bonus', modifier = 'force', state = 1},
|
||||
{name = 'xp_bonus', discord = 'RPG XP point bonus', modifier = 'rpg', state = 0.12},
|
||||
{name = 'xp_bonus', discord = 'RPG XP point bonus', modifier = 'rpg', state = 0.12},
|
||||
{name = 'manual_crafting_speed_modifier', discord = 'Crafting speed modifier', modifier = 'force', state = 0.12},
|
||||
{name = 'defense', discord = 'Defense starting supplies', modifier = 'starting_items', limit = 10, add_per_buff = 1, items = 0},
|
||||
{name = 'supplies_1', discord = 'Starting items supplies', modifier = 'starting_items', limit = 1000, add_per_buff = 200, items = 0},
|
||||
{name = 'defense_2', discord = 'Defense starting supplies', modifier = 'starting_items', limit = 10, add_per_buff = 1, items = 0},
|
||||
{name = 'defense', discord = 'Defense starting supplies', modifier = 'starting_items', limit = 10, add_per_buff = 1, items = 0},
|
||||
{name = 'fast_startup_2', discord = 'Assembling starting supplies', modifier = 'starting_items', limit = 25, add_per_buff = 2, items = 0},
|
||||
{name = 'laboratory_productivity_bonus', discord = 'Productivity bonus', modifier = 'force', state = 0.15},
|
||||
{name = 'manual_mining_speed_modifier', discord = 'Mining speed modifier', modifier = 'force', state = 0.15},
|
||||
{
|
||||
name = 'distance',
|
||||
discord = 'RPG reach distance bonus',
|
||||
modifier = 'rpg_distance',
|
||||
modifiers = {'character_resource_reach_distance_bonus', 'character_item_pickup_distance_bonus', 'character_loot_pickup_distance_bonus', 'character_reach_distance_bonus'},
|
||||
state = 1
|
||||
},
|
||||
{name = 'character_running_speed_modifier', discord = 'Running speed modifier', modifier = 'force', state = 0.05},
|
||||
{name = 'fast_startup_1', discord = 'Assembling starting supplies', modifier = 'starting_items', limit = 25, add_per_buff = 2, items = 0},
|
||||
{name = 'fast_startup_1', discord = 'Assembling starting supplies', modifier = 'starting_items', limit = 25, add_per_buff = 2, items = 0},
|
||||
{name = 'worker_robots_battery_modifier', discord = 'Robot battery bonus', modifier = 'force', state = 1},
|
||||
{name = 'character_running_speed_modifier', discord = 'Running speed modifier', modifier = 'force', state = 0.05},
|
||||
{name = 'production_1', discord = 'Production starting supplies', modifier = 'starting_items', limit = 2, add_per_buff = 1, items = {{name = 'steel-furnace', count = 4}, {name = 'solid-fuel', count = 100}}},
|
||||
{name = 'manual_crafting_speed_modifier', discord = 'Crafting speed modifier', modifier = 'force', state = 0.12},
|
||||
{name = 'manual_mining_speed_modifier', discord = 'Mining speed modifier', modifier = 'force', state = 0.15},
|
||||
{name = 'armor', discord = 'Armor starting supplies', modifier = 'starting_items', limit = 1, add_per_buff = 1, items = {{name = 'modular-armor', count = 1}, {name = 'solar-panel-equipment', count = 2}}},
|
||||
{name = 'heal-thy-buildings', discord = 'Repair starting supplies', modifier = 'starting_items', limit = 20, add_per_buff = 2, items = {{name = 'repair-pack', count = 5}}},
|
||||
{name = 'character_running_speed_modifier', discord = 'Running speed modifier', modifier = 'force', state = 0.05},
|
||||
{name = 'extra_wagons', discord = 'Extra wagon at start', modifier = 'locomotive', state = 1},
|
||||
{name = 'fast_startup', discord = 'Assembling starting supplies', modifier = 'starting_items', limit = 25, add_per_buff = 2, items = {{name = 'assembling-machine-1', count = 2}}},
|
||||
{
|
||||
name = 'distance',
|
||||
discord = 'RPG reach distance bonus',
|
||||
modifier = 'rpg_distance',
|
||||
modifiers = {'character_resource_reach_distance_bonus', 'character_item_pickup_distance_bonus', 'character_loot_pickup_distance_bonus', 'character_reach_distance_bonus'},
|
||||
state = 1
|
||||
},
|
||||
{name = 'defense', discord = 'Defense starting supplies', modifier = 'starting_items', limit = 10, add_per_buff = 1, items = {{name = 'gun-turret', count = 2}, {name = 'firearm-magazine', count = 25}}},
|
||||
{name = 'worker_robots_speed_modifier', discord = 'Robot speed modifier', modifier = 'force', state = 0.5},
|
||||
{name = 'worker_robots_storage_bonus', discord = 'Robot storage bonus', modifier = 'force', state = 1},
|
||||
{name = 'worker_robots_speed_modifier', discord = 'Robot speed modifier', modifier = 'force', state = 0.5},
|
||||
{name = 'mining_drill_productivity_bonus', discord = 'Drill productivity bonus', modifier = 'force', state = 0.5},
|
||||
{name = 'worker_robots_battery_modifier', discord = 'Robot battery bonus', modifier = 'force', state = 1},
|
||||
{name = 'supplies', discord = 'Starting items supplies', modifier = 'starting_items', limit = 1000, add_per_buff = 100, items = {{name = 'iron-plate', count = 100}, {name = 'copper-plate', count = 100}}}
|
||||
{name = 'extra_wagons', discord = 'Extra wagon at start', modifier = 'locomotive', state = 1}
|
||||
},
|
||||
current_date = 1705915448
|
||||
current_date = 1711187954
|
||||
}
|
||||
local settings = {
|
||||
value = data
|
||||
|
Loading…
Reference in New Issue
Block a user