From what i say in the api LuaEntity.inner_name was replaced by LuaEntity.ghost_name so why is LuaSurface.can_place_entity creating problems.Key "inner_name" not found in property tree at ROOT
My Code:
Code: Select all
if entity.name ~= 'player' then
local entity_name = entity.name == 'entity-ghost' and entity.ghost_name or entity.name
local ghost = {name='entity-ghost',position=entity.position,ghost_name=entity_name,direction=entity.direction,force=player.force}
if surface.can_place_entity(ghost) then
surface.create_entity(ghost).time_to_live = 59
end
end