[0.16.7] inner_name not found

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Cooldude2606
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Sat Sep 16, 2017 9:04 pm
Contact:

[0.16.7] inner_name not found

Post by Cooldude2606 »

From the 0.15 to 0.16 update I went through my softmod to make it work in 0.16, many of the things changed I fixed but we are getting this error:
Key "inner_name" not found in property tree at ROOT
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.

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
Please ask if more context is required.
--- Developer for Explosive Gaming and Clusterio. Please contact me via our Discord. ---

Rseding91
Factorio Staff
Factorio Staff
Posts: 13250
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.7] inner_name not found

Post by Rseding91 »

LuaEntity::ghost_name is the name of the ghost entity (otherwise it just reports entity-ghost). inner_name has always been the property you have to define when using create_entity to create an entity-ghost.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Cooldude2606
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Sat Sep 16, 2017 9:04 pm
Contact:

Re: [0.16.7] inner_name not found

Post by Cooldude2606 »

Rseding91 wrote:LuaEntity::ghost_name is the name of the ghost entity (otherwise it just reports entity-ghost). inner_name has always been the property you have to define when using create_entity to create an entity-ghost.
In this case why is it not the same in both places. Should it not be ghost_name in both places or inner_name in both places so that it is consistent, this would make sence as i asumed that you removed inner_name and replaced it with ghost_name as they are used to describe the same property of an entity. So is it not an inconsistency that it has two names (in diffrent contexts) to describe the entity prototype inside the ghost?
--- Developer for Explosive Gaming and Clusterio. Please contact me via our Discord. ---

Post Reply

Return to “Modding help”