when dose repair_result in repair-tool active?

Place to get help with not working mods / modding interface.
meifray
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat May 29, 2021 6:12 pm
Contact:

when dose repair_result in repair-tool active?

Post by meifray »

so I just write these code:

Code: Select all

local sounds=require("__base__/prototypes/entity/sounds");
data.raw["repair-tool"]["repair-pack"].repair_result=
{
	type = "direct",
	action_delivery =
	{
		type = "instant",
		source_effects =
		{
			{
				type = "damage",
				damage = {type = "physical", amount = -5000}
			},
			{
				type = "play-sound",
				sound = sounds.eat_fish
			}
		},
		target_effects =
		{
			{
				type = "damage",
				damage = {type = "physical", amount = -5000}
			},
			{
				type = "play-sound",
				sound = sounds.eat_fish
			}
		}
	}
};

and trying fixing a building while I am damaged(whcih mean I can be heal),but it seems not being active at all,and I checked https://lua-api.factorio.com/latest/Lua ... air_result ,
it dont`t really tell when does it active.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3322
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: when dose repair_result in repair-tool active?

Post by boskid »

Hm.. looking into the code i see there is exactly 1 place where it is used, but it is not interesting at all: its the LuaItemPrototype::repair_result read. Even at the commit where this property was introduced (back in 2013) it was not used.

So here is the answer: it is not used. I am going to leave it in 1.1.x but i will remove it for the expansion.
meifray
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat May 29, 2021 6:12 pm
Contact:

Re: when dose repair_result in repair-tool active?

Post by meifray »

ok,then I will update the wiki with this info

nvm,its updated.
Post Reply

Return to “Modding help”