Part Item
Each part is defined as an entry in your parts table with configurable fields for how it behaves during installation, usage, and interaction with vehicles.
Last updated
Each part is defined as an entry in your parts table with configurable fields for how it behaves during installation, usage, and interaction with vehicles.
Last updated
luaCopyEditparts = {
oil_filter = {
label = "Oil Filter",
searchChance = 15,
weight = 250,
tools = { wrench = 1 },
consumables = { oil = 1 },
anim = {
dict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@",
clip = "machinic_loop_mechandplayer",
flag = 16,
time = 5
},
reqParts = { "engine_cover" },
model = "prop_oilcan_01a",
applyRange = 2.0,
applyAtBone = "engine",
canStart = function(installed, part)
return installed, installed and "" or "Engine won't start without oil filter."
end,
removePart = function(self, entity, part)
-- custom logic to clean up or detach
end,
addPart = function(self, entity, part)
-- apply tuning or set vars
end
}
}