Skip to content

Commit fed4c9b

Browse files
committed
Use table.insert()
1 parent c124013 commit fed4c9b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

uniform-unstick.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,31 +88,31 @@ function bodyparts_that_can_wear(unit, item)
8888
if item._type == df.item_helmst then
8989
for index, part in pairs(unitparts) do
9090
if part.flags.HEAD then
91-
bodyparts[#bodyparts+1] = index
91+
table.insert(bodyparts, index)
9292
end
9393
end
9494
elseif item._type == df.item_armorst then
9595
for index, part in pairs(unitparts) do
9696
if part.flags.UPPERBODY then
97-
bodyparts[#bodyparts+1] = index
97+
table.insert(bodyparts, index)
9898
end
9999
end
100100
elseif item._type == df.item_glovesst then
101101
for index, part in pairs(unitparts) do
102102
if part.flags.GRASP then
103-
bodyparts[#bodyparts+1] = index
103+
table.insert(bodyparts, index)
104104
end
105105
end
106106
elseif item._type == df.item_pantsst then
107107
for index, part in pairs(unitparts) do
108108
if part.flags.LOWERBODY then
109-
bodyparts[#bodyparts+1] = index
109+
table.insert(bodyparts, index)
110110
end
111111
end
112112
elseif item._type == df.item_shoesst then
113113
for index, part in pairs(unitparts) do
114114
if part.flags.STANCE then
115-
bodyparts[#bodyparts+1] = index
115+
table.insert(bodyparts, index)
116116
end
117117
end
118118
else

0 commit comments

Comments
 (0)