mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-09 10:08:15 -06:00
added bugfix to train blacklisting
This commit is contained in:
1
TODO
1
TODO
@@ -5,3 +5,4 @@ do hardcore testing
|
||||
models & art
|
||||
space elevator compat
|
||||
railloader compat
|
||||
major bug with copy-paste when the operation is changed by blueprint but it gets copied to the old settings before it's checked for update
|
||||
|
||||
@@ -20,8 +20,13 @@ Date: 2022-11-13
|
||||
Features:
|
||||
- Added warmup period on just built stations
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.3.0
|
||||
Version: 0.4.0
|
||||
Date: 2022-11-15
|
||||
Features:
|
||||
- Fixed copy-paste
|
||||
- Added alert sounds
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.4.1
|
||||
Date: 2022-11-20
|
||||
Features:
|
||||
- Bugfix with train blacklisting
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cybersyn",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"title": "Project Cybersyn",
|
||||
"author": "Mami",
|
||||
"factorio_version": "1.1",
|
||||
|
||||
@@ -12,7 +12,7 @@ combinator_entity.radius_visualisation_specification = {
|
||||
distance = 1.5,
|
||||
}
|
||||
combinator_entity.active_energy_usage = "10KW"
|
||||
combinator_entity.allow_copy_paste = true
|
||||
combinator_entity.allow_copy_paste = false
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -419,9 +419,9 @@ function on_combinator_updated(map_data, comb, new_params)
|
||||
local is_pr_state = floor(bits/2)%3
|
||||
station.is_p = is_pr_state == 0 or is_pr_state == 1
|
||||
station.is_r = is_pr_state == 0 or is_pr_state == 2
|
||||
local allow_all_trains = bits%2 == 1
|
||||
if station.allow_all_trains ~= allow_all_trains then
|
||||
station.allow_all_trains = allow_all_trains
|
||||
local allows_all_trains = bits%2 == 1
|
||||
if station.allows_all_trains ~= allows_all_trains then
|
||||
station.allows_all_trains = allows_all_trains
|
||||
update_station_if_auto(map_data, station)
|
||||
end
|
||||
end
|
||||
@@ -862,8 +862,8 @@ local function main()
|
||||
|
||||
flib_event.register({defines.events.on_pre_surface_deleted, defines.events.on_pre_surface_cleared}, on_surface_removed)
|
||||
|
||||
flib_event.register(defines.events.on_entity_settings_pasted, on_paste)
|
||||
flib_event.register(defines.events.on_player_cursor_stack_changed, on_cursor_stack_changed)
|
||||
--flib_event.register(defines.events.on_entity_settings_pasted, on_paste)
|
||||
--flib_event.register(defines.events.on_player_cursor_stack_changed, on_cursor_stack_changed)
|
||||
|
||||
local nth_tick = math.ceil(60/mod_settings.tps);
|
||||
flib_event.on_nth_tick(nth_tick, function()
|
||||
|
||||
@@ -40,6 +40,15 @@ local migrations_table = {
|
||||
map_data.to_comb_params[id] = get_comb_params(comb)
|
||||
end
|
||||
end,
|
||||
["0.4.1"] = function()
|
||||
---@type MapData
|
||||
local map_data = global
|
||||
map_data.tick_state = STATE_INIT
|
||||
for id, station in pairs(map_data.stations) do
|
||||
station.allows_all_trains = station.allow_all_trains or station.allows_all_trains
|
||||
station.allow_all_trains = nil
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
---@param data ConfigurationChangedData
|
||||
|
||||
Reference in New Issue
Block a user