https://lua-api.factorio.com/latest/eve ... or_upgrade uses the terminology 'target' , so I think it would be nice to have the ability to say something along the lines of
luaEntity.get_upgrade_target --> luaPrototype
luaEntity.upgrade() similar to .revive() which leverages multiple return values.
Additional API calls related to entity upgrades
Re: Additional API calls related to entity upgrades
These were added as LuaEntity::get_upgrade_target() and LuaEntity::apply_upgrade().
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.