Add chests, the beginnings of a machines API, and other things
This commit is contained in:
parent
3720070a28
commit
4d8312b79d
22 changed files with 557 additions and 16 deletions
|
|
@ -72,6 +72,9 @@ function ns.apply_wearable(m, wearable)
|
|||
item[i] = ns.apply_wearable_part(m, x, i)
|
||||
end
|
||||
m.wearing[w.name] = item
|
||||
if w.logical_height_offset then
|
||||
m:set_logical_height_offset(m.logical_height_offset +w.logical_height_offset)
|
||||
end
|
||||
end
|
||||
|
||||
function ns.remove_wearable(m, wearable)
|
||||
|
|
@ -82,6 +85,9 @@ function ns.remove_wearable(m, wearable)
|
|||
x:remove()
|
||||
end
|
||||
m.wearing[wearable] = nil
|
||||
if ns.wearables[wearable].logical_height_offset then
|
||||
m:set_logical_height_offset(m.logical_height_offset -ns.wearables[wearable].logical_height_offset)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -94,6 +100,7 @@ end)
|
|||
|
||||
ns.register_wearable {
|
||||
name = "top_hat",
|
||||
logical_height_offset = 4.5,
|
||||
attachments = {
|
||||
{
|
||||
mesh = "rgt_top_hat.gltf",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue