Code: Select all
fluid_box =
{
base_area = 150,
pipe_covers = pipecoverspictures(),
filter = "water",
pipe_connections =
{
{ position = {0.64, -0.12} },
},
hide_connection_info = true,
},
Code: Select all
fluid_box =
{
base_area = 150,
pipe_covers = pipecoverspictures(),
filter = "water",
pipe_connections =
{
{ position = {0.64, -0.12} },
},
hide_connection_info = true,
},
when you say entity center, would be in collision box the entity center or the sprite width x heightrobot256 wrote: ↑Sun Oct 30, 2022 3:16 pm The pipe connection offset is the X and Y distance from the *center of the entity* to the center of *the tile where a pipe can be placed to connect to it*. So if you have a 2x2 entity, a valid connection offset would be {1.5, 0.5}, placing the pipe on one half of the right side.
Code: Select all
{
type = "storage-tank",
name = "fish-tank-pump",
icon = "__update-fish__/graphics/icons/fish-farm-icon.png",
icon_size = 32,
flags = {},--{"placeable-player", "player-creation"},
minable = {mining_time = 0.5, result = "fish-tank-pump"},
max_health = 500,
corpse = "fish-tank-remnants",
dying_explosion = "storage-tank-explosion",
collision_box = {{-0.4, -0.6}, {0.4, 1.1}},
selection_box = {{-0.5, -1.2}, {0.5, 1.2}},
damaged_trigger_effect = hit_effects.entity(),
fluid_box =
{
base_area = 250,
pipe_covers = pipecoverspictures(),
filter = "water",
pipe_connections = {{ type = "input", position = {6.5, 2.5} }},
hide_connection_info = true,
},
--two_direction_only = true,
window_bounding_box = {{-0.125, 0.6875}, {0.1875, 1.1875}},--{{-0.1, -0.1}, {0.1, 0.1}},--{{-2.8, -3.3}, {2.1, 0.3}},
pictures =
{
picture =
{
sheets =
{
{
filename = "__update-fish__/graphics/entity/pump.png",
frames = 1,
width = 104,
height = 227,
shift = util.by_pixel(-7.1, -9.9),
scale = 0.5
},
{
filename = "__update-fish__/graphics/entity/pump-shadow.png",
--priority = "extra-high",
frames = 1,
width = 150,
height = 122,
shift = util.by_pixel(26.2, 10.8),
scale = 0.5,
draw_as_shadow = true
}
}
},
fluid_background = blank,
window_background = blank,
flow_sprite = blank,
gas_flow = blank
},
--flow_length_in_ticks = 360,
vehicle_impact_sound = sounds.generic_impact,
open_sound = sounds.machine_open,
close_sound = sounds.machine_close,
working_sound =
{
sound =
{
filename = "__base__/sound/storage-tank.ogg",
volume = 0.6
},
match_volume_to_activity = true,
audible_distance_modifier = 0.5,
max_sounds_per_type = 3
},
}