Called when an entity is marked for upgrade with the upgrade planner or via script.
player_index?: uint32entity: LuaEntitytarget: LuaEntityPrototypequality: LuaQualityPrototype — The target quality.previous_target?: LuaEntityPrototype — Previous upgrade target of the entity, if entity was already marked for upgrade.previous_quality?: LuaQualityPrototype — Previous upgrade target quality, if entity was already marked for upgrade.name: defines.events — Identifier of the eventtick: uint32 — Tick the event was generated.