Merge branch 'aperx' into main

This commit is contained in:
2025-12-17 01:27:33 +09:00
committed by GitHub
45 changed files with 426 additions and 1969 deletions

View File

@@ -341,9 +341,9 @@ function vlayer.create_input_interface(surface, position, circuit, last_user)
end
if circuit then
for k, _ in pairs(circuit) do
for _, v in pairs(circuit[k]) do
interface.connect_neighbour{ wire = defines.wire_type[k], target_entity = v }
for k, _ in pairs({ defines.wire_connector_id.circuit_red, defines.wire_connector_id.circuit_green }) do
for _, v in pairs(circuit.get_wire_connector{ wire_connector_id = k, or_create = false }.real_connections) do
interface.connect_to{ target = v.target }
end
end
end
@@ -419,9 +419,9 @@ function vlayer.create_output_interface(surface, position, circuit, last_user)
end
if circuit then
for k, _ in pairs(circuit) do
for _, v in pairs(circuit[k]) do
interface.connect_neighbour{ wire = defines.wire_type[k], target_entity = v }
for k, _ in pairs({ defines.wire_connector_id.circuit_red, defines.wire_connector_id.circuit_green }) do
for _, v in pairs(circuit.get_wire_connector{ wire_connector_id = k, or_create = false }.real_connections) do
interface.connect_to{ target = v.target }
end
end
end
@@ -566,9 +566,9 @@ function vlayer.create_circuit_interface(surface, position, circuit, last_user)
end
if circuit then
for k, _ in pairs(circuit) do
for _, v in pairs(circuit[k]) do
interface.connect_neighbour{ wire = defines.wire_type[k], target_entity = v }
for k, _ in pairs({ defines.wire_connector_id.circuit_red, defines.wire_connector_id.circuit_green }) do
for _, v in pairs(circuit.get_wire_connector{ wire_connector_id = k, or_create = false }.real_connections) do
interface.connect_to{ target = v.target }
end
end
end
@@ -629,7 +629,7 @@ local function handle_circuit_interfaces()
circuit_oc.clear_slot(clear_index)
end
interface.combinator_description = vlayer_circuits_string
end
end

View File

@@ -189,6 +189,10 @@ function Warps.make_warp_area(warp_id)
if entity.type == "electric-pole" then
warp.electric_pole = entity
end
if entity.name == "small-lamp" then
entity.always_on = true
end
end
end