May I ask how to modify the drawing order of physical images
May I ask how to modify the drawing order of physical images
I made a solid using a prototype of a heat pipe, but it is always obscured by the entity behind it. How can I modify it? thank you
- Attachments
-
- 屏幕截图 2024-12-26 130049.jpg (14.33 KiB) Viewed 268 times
-
- 屏幕截图 2024-12-26 130030.jpg (24.03 KiB) Viewed 268 times
Re: May I ask how to modify the drawing order of physical images
{
filename = path.."heating-tower.png",
priority = "high",
width = 320,
height = 320,
shift = {0.03, -1.45},
scale = 0.5,
},
Re: May I ask how to modify the drawing order of physical images
Code: Select all
local entity = util.table.deepcopy(data.raw["heat-pipe"]["heat-pipe"])
entity.name = name
entity.icon = path.."icon.png"
entity.flags = {"placeable-neutral", "placeable-player", "player-creation"}
entity.icon_size = 64
entity.minable = {mining_time = 1, result = name}
entity.max_health = 600
entity.corpse = "small-remnants"
entity.collision_mask = {layers={item=true, object=true, player=true, water_tile=true, elevated_rail=true, is_object=true, is_lower_object=true}}
entity.collision_box = {{-1.4, -1.4}, {1.4, 1.4}}
entity.selection_box = {{-1.5, -1.5}, {1.5, 1.5}}
entity.drawing_box_vertical_extension = 2.5
entity.heat_buffer =
{
max_temperature = 500,
specific_heat = "100MJ",
max_transfer = "100MW",
minimum_glow_temperature = 200,
connections =
{
{position = {1, 0}, direction = defines.direction.east},
{position = {-1, 0}, direction = defines.direction.west},
},
}
entity.connection_sprites = set_connection_sprites(false)
entity.heat_glow_sprites = set_connection_sprites(true)
entity.fast_replaceable_group = nil
entity.heating_radius = 16
data:extend({item,recipe,entity})
Re: May I ask how to modify the drawing order of physical images
Some entities allow the use of picture sets that include draw layer specifications. It seems that heat pipes do not, since they use ConnectableEntityGraphics which only allows flat sprites that automatically get drawn at ground level. You'll need to use a different entity type to make the graphics you want.
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Re: May I ask how to modify the drawing order of physical images
Thank you, I want to make a heating tower because only the heat pipes and reactor support "heating_radius". It's not easy to change the prototype of the reactor because some inputs and outputs cannot be turned off. Can I only use a shorter material as this method?robot256 wrote: Thu Dec 26, 2024 6:03 am Some entities allow the use of picture sets that include draw layer specifications. It seems that heat pipes do not, since they use ConnectableEntityGraphics which only allows flat sprites that automatically get drawn at ground level. You'll need to use a different entity type to make the graphics you want.
Re: May I ask how to modify the drawing order of physical images
I'm not sure what the best solution for you is. You might need to make a composite entity, where the base is a heat pipe and the graphics are added/removed by scripts when the base is built/destroyed. There are other threads about how to do that.
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Re: May I ask how to modify the drawing order of physical images
Thank you, I followed your instructions and added a 'lamp', which is now functioning properlyrobot256 wrote: Thu Dec 26, 2024 1:11 pm I'm not sure what the best solution for you is. You might need to make a composite entity, where the base is a heat pipe and the graphics are added/removed by scripts when the base is built/destroyed. There are other threads about how to do that.