Was working on my mod. Tried making my own entity.
Code: Select all
data:extend({
{
type = "assembling-machine",
name = "helium-condenser",
icon = "__loopx__/graphics/icons/items/lx-superconductor.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "lx-superconductor"},
max_health = 100,
corpse = "small-remnants",
collision_box = {{-1.4, -1.4}, {1.4, 1.4}},
selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
vehicle_impact_sound = { filename = "__base__/sound/car-wood-impact.ogg", volume = 1.0 },
layers =
{
filename = "__loopx__/graphics/entity/helium-condenser/helium-condenser.png",
width = 127,
height = 127,
shift = {0.84, -0.09},
},
crafting_categories = {"crafting"},
crafting_speed = 2.1,
energy_source =
{
type = "electric",
usage_priority = "secondary-input",
emissions = 0.03 / 3.5
},
energy_usage = "200kW",
ingredient_count = 4,
module_specification =
{
module_slots = 5,
module_info_icon_shift = {0, 0.5},
module_info_multi_row_initial_height_modifier = -0.3
},
allowed_effects = {"consumption", "speed", "productivity", "pollution"}
}
})
The game returned me an invisible entity graphic. Without giving me an error that it won't load the graphic. Or that I used the wrong syntax or type/instead of "layers" that I should use "animation".
What did you expect to happen instead?
Expected the entity to show the graphics (Looked at some internal entities within demo-entities.lua) and worked my way from there. As layers was used by other mods aswell as in the base game. Expected to get an error of some sort if I did it wrongly which I didn't get.
Write down the steps to reproduce the bug if you know them.
1. Make a mod and the necessities. (I can provide my mod in it's current stage if necessary for testing, Sidenote -> Has a lot of dependencies on other mods)
2. Make an entity with the code above with proper pictures and proper sizes (etc.)
3. The game won't load the graphic and return an invisible entity. And will not return an error.
Does it happen always, once, or sometimes?
Always.