Help, unable to add upgrade plan

Place to post guides, observations, things related to modding that are not mods themselves.
sdgmlj
Fast Inserter
Fast Inserter
Posts: 174
Joined: Sun Jul 04, 2021 11:12 pm
Contact:

Help, unable to add upgrade plan

Post by sdgmlj »

I made a loader 1x1 and it works fine, but it cannot be used to upgrade the planner (green image)
May I ask where I should change?

Code: Select all

local entity = table.deepcopy(data.raw["loader-1x1"]["loader-1x1"])
	entity.name = loader.name
	entity.icons = loader_icons(loader)
	entity.flags = {"placeable-neutral", "player-creation"}
	entity.max_health = 220
	entity.next_upgrade = loader.next_upgrade
	entity.fast_replaceable_group = "loader"
	entity.speed = function_loader_speed(loader.speed,loader.name) * 0.03125
	entity.minable = {mining_time = 0.25, result = loader.name}
	entity.structure_render_layer = "object"
	entity.container_distance = 0.75
	entity.integration_patch_render_layer = "decals"
	entity.belt_animation_set = data.raw["transport-belt"][loader.belt].belt_animation_set
	entity.collision_box = { {-0.4, -0.45} , {0.4, 0.45} }
    entity.selection_box = { {-0.5, -0.5} , {0.5, 0.5} }
    entity.drawing_box = { {-0.4, -0.4}	, {0.4, 0.4} }
	entity.structure = 	picyures(loader)
	data:extend {item,recipe,entity}
Post Reply

Return to “Modding discussion”