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.