Code: Select all
Entity is not arithmetic-combinator or decider-combinator or constant-combinator.
Is there some bug with the field? Or how is the base game able to set the description but mods get an error?
If it's not a bug, this is a request to be able to use the description property while the entity is a ghost, just like the base game can.
Edit: For anyone needing a workaround in the meanwhile, this is what I did:
When accessing description, use custom helper functions that check if the entity is a ghost:
Code: Select all
function set_description(entity, description)
if entity.name == "entity-ghost" then
if entity.tags then
local tags = entity.tags
tags.description = description
entity.tags = tags
else
entity.tags = { description = description }
end
else
entity.combinator_description = description
end
end
function get_description(entity)
if entity.name == "entity-ghost" then
return entity.tags and entity.tags.description or ""
end
return entity.combinator_description
end