mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-08 10:08:08 -06:00
better localization
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
close gui when the combinator is destroyed
|
close gui when the combinator is destroyed
|
||||||
do not play close sound when a different gui is opened
|
do not play close sound when a different gui is opened
|
||||||
improve localization
|
|
||||||
support space elevator
|
support space elevator
|
||||||
do hardcore testing
|
do hardcore testing
|
||||||
optimizations?
|
optimizations?
|
||||||
|
|||||||
@@ -14,21 +14,21 @@ cybersyn-network-flag=The default set of networks a station will service when no
|
|||||||
cybersyn-combinator=Cybernetic combinator
|
cybersyn-combinator=Cybernetic combinator
|
||||||
|
|
||||||
[item-description]
|
[item-description]
|
||||||
cybersyn-combinator=Place next to a train stop to add it to the cybersyn network. Adjacent stations can now request or provide items or fluids by train. Has 4 different operation modes.
|
cybersyn-combinator=Place next to a train stop to add it to the cybersyn train network. This stop can now request or provide items using the circuit network. Be sure to set a threshold signal.
|
||||||
|
|
||||||
[entity-name]
|
[entity-name]
|
||||||
cybersyn-combinator=Cybernetic combinator
|
cybersyn-combinator=Cybernetic combinator
|
||||||
cybersyn-combinator-output=NA
|
cybersyn-combinator-output=Cybernetic combinator output
|
||||||
|
|
||||||
[entity-description]
|
[entity-description]
|
||||||
cybersyn-combinator=Place next to a train stop to add it to the cybersyn network. Has 4 different operation modes.
|
cybersyn-combinator=Has 4 different operation modes. Primary control allows providing and requesting. Optional Control allows setting thresholds per-item and reading all in progress deliveries. Depot control allows parked trains to be added to the network. Wagon control allows for reading the desired contents of the adjacent wagon.
|
||||||
cybersyn-combinator-output=NA
|
cybersyn-combinator-output=¡Viva la Revolución!
|
||||||
|
|
||||||
[technology-name]
|
[technology-name]
|
||||||
cybersyn-train-network=Cybernetic train network
|
cybersyn-train-network=Cybernetic train network
|
||||||
|
|
||||||
[technology-description]
|
[technology-description]
|
||||||
cybersyn-train-network=Train station controllers capable of coordinating the inputs and outputs of an entire economy.
|
cybersyn-train-network=Train stop controllers capable of coordinating the inputs and outputs of an entire economy.
|
||||||
|
|
||||||
[virtual-signal-name]
|
[virtual-signal-name]
|
||||||
cybersyn-priority=Station priority
|
cybersyn-priority=Station priority
|
||||||
|
|||||||
@@ -450,6 +450,27 @@ function update_station_if_auto(map_data, station, forbidden_entity)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@param map_data MapData
|
||||||
|
---@param rail LuaEntity
|
||||||
|
---@param forbidden_entity LuaEntity?
|
||||||
|
function force_update_station_from_rail(map_data, rail, forbidden_entity)
|
||||||
|
--NOTE: should we search further or better? it would be more expensive
|
||||||
|
local entity = rail.get_rail_segment_entity(defines.rail_direction.back, false)
|
||||||
|
if entity and entity.valid and entity.name == "train-stop" then
|
||||||
|
local station = map_data.stations[entity.unit_number]
|
||||||
|
if station then
|
||||||
|
reset_station_layout(map_data, station, forbidden_entity)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
entity = rail.get_rail_segment_entity(defines.rail_direction.front, false)
|
||||||
|
if entity and entity.valid and entity.name == "train-stop" then
|
||||||
|
local station = map_data.stations[entity.unit_number]
|
||||||
|
if station then
|
||||||
|
reset_station_layout(map_data, station, forbidden_entity)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
---@param map_data MapData
|
---@param map_data MapData
|
||||||
---@param rail LuaEntity
|
---@param rail LuaEntity
|
||||||
---@param forbidden_entity LuaEntity?
|
---@param forbidden_entity LuaEntity?
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ local function on_combinator_built(map_data, comb)
|
|||||||
end
|
end
|
||||||
if control.operation == OPERATION_WAGON_MANIFEST then
|
if control.operation == OPERATION_WAGON_MANIFEST then
|
||||||
if rail then
|
if rail then
|
||||||
update_station_from_rail(map_data, rail, nil)
|
force_update_station_from_rail(map_data, rail, nil)
|
||||||
end
|
end
|
||||||
elseif control.operation == OPERATION_DEPOT then
|
elseif control.operation == OPERATION_DEPOT then
|
||||||
if stop then
|
if stop then
|
||||||
@@ -287,11 +287,14 @@ function on_combinator_network_updated(map_data, comb, network_name)
|
|||||||
local depot = map_data.depots[stop.unit_number]
|
local depot = map_data.depots[stop.unit_number]
|
||||||
if depot.entity_comb == comb then
|
if depot.entity_comb == comb then
|
||||||
if depot.available_train then
|
if depot.available_train then
|
||||||
|
---@type uint
|
||||||
|
local train_id = depot.available_train
|
||||||
remove_available_train(map_data, depot)
|
remove_available_train(map_data, depot)
|
||||||
add_available_train(map_data, depot, depot.available_train)
|
depot.network_name = network_name
|
||||||
|
add_available_train(map_data, depot, train_id)
|
||||||
|
else
|
||||||
|
depot.network_name = network_name
|
||||||
end
|
end
|
||||||
depot.network_name = network_name
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user