Skip to content

Commit

Permalink
Rewrote all code related to LuaEntity.circuit_wire_connection_points
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Nov 10, 2024
1 parent 01b7c99 commit db142b0
Show file tree
Hide file tree
Showing 11 changed files with 402 additions and 444 deletions.
22 changes: 2 additions & 20 deletions prototypes/biofluid/provider-tank.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,25 +92,7 @@ ENTITY {
energy_source = {type = "void"},
energy_usage = "1W",
show_recipe_icon_on_map = false,
circuit_wire_connection_points = {
{
shadow = {red = {0.171875, 0.140625}, green = {0.171875, 0.265625}},
wire = {red = {-0.53125, -0.15625}, green = {-0.53125, 0}}
},
{
shadow = {red = {0.890625, 0.703125}, green = {0.75, 0.75}},
wire = {red = {0.34375, 0.28125}, green = {0.34375, 0.4375}}
},
{
shadow = {red = {0.15625, 0.0625}, green = {0.09375, 0.125}},
wire = {red = {-0.53125, -0.09375}, green = {-0.53125, 0.03125}}
},
{
shadow = {red = {0.796875, 0.703125}, green = {0.625, 0.75}},
wire = {red = {0.40625, 0.28125}, green = {0.40625, 0.4375}}
}
},
circuit_connector_sprites = _G.circuit_connector_definitions["inserter"].sprites,
circuit_wire_max_distance = data.raw["storage-tank"]["storage-tank"].circuit_wire_max_distance,
circuit_connector = circuit_connector_definitions["py-valves"],
circuit_wire_max_distance = _G.default_circuit_wire_max_distance,
collision_mask = collision_mask_util.get_default_mask("furnace")
}
20 changes: 1 addition & 19 deletions prototypes/biofluid/requester-tank.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,25 +93,7 @@ ENTITY {
energy_source = {type = "void"},
energy_usage = "1W",
show_recipe_icon_on_map = false,
circuit_wire_connection_points = {
{
shadow = {red = {0.171875, 0.140625}, green = {0.171875, 0.265625}},
wire = {red = {-0.53125, -0.15625}, green = {-0.53125, 0}}
},
{
shadow = {red = {0.890625, 0.703125}, green = {0.75, 0.75}},
wire = {red = {0.34375, 0.28125}, green = {0.34375, 0.4375}}
},
{
shadow = {red = {0.15625, 0.0625}, green = {0.09375, 0.125}},
wire = {red = {-0.53125, -0.09375}, green = {-0.53125, 0.03125}}
},
{
shadow = {red = {0.796875, 0.703125}, green = {0.625, 0.75}},
wire = {red = {0.40625, 0.28125}, green = {0.40625, 0.4375}}
}
},
circuit_connector_sprites = _G.circuit_connector_definitions["inserter"].sprites,
circuit_connector = circuit_connector_definitions["py-valves"],
circuit_wire_max_distance = data.raw["storage-tank"]["storage-tank"].circuit_wire_max_distance,
collision_mask = collision_mask_util.get_default_mask("furnace")
}
5 changes: 2 additions & 3 deletions prototypes/buildings/flora-collector.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ for i = 1, 4 do
height = 4
},
collision_mask = {layers = {item = true, object = true, water_tile = true}},
circuit_wire_connection_points = circuit_connector_definitions["flora-collector-mkxx"].points,
circuit_connector_sprites = circuit_connector_definitions["flora-collector-mkxx"].sprites,
circuit_wire_max_distance = default_circuit_wire_max_distance,
circuit_connector = circuit_connector_definitions["flora-collector-mkxx"],
circuit_wire_max_distance = _G.default_circuit_wire_max_distance,
graphics_set = {
animation = {
layers = {
Expand Down
5 changes: 2 additions & 3 deletions prototypes/buildings/fluid-drill-mk01.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ ENTITY {
width = 12,
height = 12
},
circuit_wire_connection_points = circuit_connector_definitions["fluid-drill-mkxx"].points,
circuit_connector_sprites = circuit_connector_definitions["fluid-drill-mkxx"].sprites,
circuit_wire_max_distance = default_circuit_wire_max_distance,
circuit_connector = circuit_connector_definitions["fluid-drill-mkxx"],
circuit_wire_max_distance = _G.default_circuit_wire_max_distance,
graphics_set = {
animation = {
layers = {
Expand Down
5 changes: 2 additions & 3 deletions prototypes/buildings/fluid-drill-mk02.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ ENTITY {
width = 12,
height = 12
},
circuit_wire_connection_points = circuit_connector_definitions["fluid-drill-mkxx"].points,
circuit_connector_sprites = circuit_connector_definitions["fluid-drill-mkxx"].sprites,
circuit_wire_max_distance = default_circuit_wire_max_distance,
circuit_connector = circuit_connector_definitions["fluid-drill-mkxx"],
circuit_wire_max_distance = _G.default_circuit_wire_max_distance,
graphics_set = {
animation = {
layers = {
Expand Down
5 changes: 2 additions & 3 deletions prototypes/buildings/fluid-drill-mk03.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,8 @@ ENTITY {
width = 12,
height = 12
},
circuit_wire_connection_points = circuit_connector_definitions["fluid-drill-mkxx"].points,
circuit_connector_sprites = circuit_connector_definitions["fluid-drill-mkxx"].sprites,
circuit_wire_max_distance = default_circuit_wire_max_distance,
circuit_connector = circuit_connector_definitions["fluid-drill-mkxx"],
circuit_wire_max_distance = _G.default_circuit_wire_max_distance,
graphics_set = {
animation = {
layers = {
Expand Down
5 changes: 2 additions & 3 deletions prototypes/buildings/fluid-drill-mk04.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ ENTITY {
width = 12,
height = 12
},
circuit_wire_connection_points = circuit_connector_definitions["fluid-drill-mkxx"].points,
circuit_connector_sprites = circuit_connector_definitions["fluid-drill-mkxx"].sprites,
circuit_wire_max_distance = default_circuit_wire_max_distance,
circuit_connector = circuit_connector_definitions["fluid-drill-mkxx"],
circuit_wire_max_distance = _G.default_circuit_wire_max_distance,
graphics_set = {
animation = {
layers = {
Expand Down
5 changes: 2 additions & 3 deletions prototypes/buildings/harvester.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ ENTITY {
width = 4,
height = 4
},
circuit_wire_connection_points = circuit_connector_definitions["harvester"].points,
circuit_connector_sprites = circuit_connector_definitions["harvester"].sprites,
circuit_wire_max_distance = default_circuit_wire_max_distance,
circuit_connector = circuit_connector_definitions["harvester"],
circuit_wire_max_distance = _G.default_circuit_wire_max_distance,
graphics_set = {
animation = {
layers = {
Expand Down
3 changes: 1 addition & 2 deletions prototypes/buildings/outpost-aerial.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ data:extend {{
scale_info_icons = true,
name = "outpost-aerial",
type = "container",
circuit_connector_sprites = table.deepcopy(data.raw.container["steel-chest"].circuit_connector_sprites),
circuit_wire_connection_point = table.deepcopy(data.raw.container["steel-chest"].circuit_wire_connection_point),
circuit_connector = table.deepcopy(data.raw.container["steel-chest"].circuit_connector), -- todo
circuit_wire_max_distance = 9,
close_sound = {
filename = "__base__/sound/metallic-chest-close.ogg",
Expand Down
3 changes: 1 addition & 2 deletions prototypes/buildings/outpost.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ data:extend {{
scale_info_icons = true,
name = "outpost",
type = "container",
circuit_connector_sprites = table.deepcopy(data.raw.container["steel-chest"].circuit_connector_sprites),
circuit_wire_connection_point = table.deepcopy(data.raw.container["steel-chest"].circuit_wire_connection_point),
circuit_connector = table.deepcopy(data.raw.container["steel-chest"].circuit_connector), -- todo
circuit_wire_max_distance = 9,
close_sound = {
filename = "__base__/sound/metallic-chest-close.ogg",
Expand Down
Loading

0 comments on commit db142b0

Please sign in to comment.