Fix crash with wearables

This commit is contained in:
Signal 2025-10-11 00:03:51 -04:00
parent 5e4d2924e4
commit 9a76d59086

View file

@ -63,9 +63,9 @@ function ns.apply_wearable_part(m, w, i)
end
function ns.apply_wearable(m, wearable)
local w = type(wearable) == "string" and ns.wearables[wearable] or wearable
local w = ns.wearables[wearable]
-- Do nothing if we're already wearing this.
if m.wearing[w.name] then return end
if not w or m.wearing[w.name] then return end
local item = {}
for i, x in ipairs(w.attachments) do
x.name = w.name