@@ -88,31 +88,31 @@ function bodyparts_that_can_wear(unit, item)
88
88
if item ._type == df .item_helmst then
89
89
for index , part in pairs (unitparts ) do
90
90
if part .flags .HEAD then
91
- bodyparts [ # bodyparts + 1 ] = index
91
+ table.insert ( bodyparts , index )
92
92
end
93
93
end
94
94
elseif item ._type == df .item_armorst then
95
95
for index , part in pairs (unitparts ) do
96
96
if part .flags .UPPERBODY then
97
- bodyparts [ # bodyparts + 1 ] = index
97
+ table.insert ( bodyparts , index )
98
98
end
99
99
end
100
100
elseif item ._type == df .item_glovesst then
101
101
for index , part in pairs (unitparts ) do
102
102
if part .flags .GRASP then
103
- bodyparts [ # bodyparts + 1 ] = index
103
+ table.insert ( bodyparts , index )
104
104
end
105
105
end
106
106
elseif item ._type == df .item_pantsst then
107
107
for index , part in pairs (unitparts ) do
108
108
if part .flags .LOWERBODY then
109
- bodyparts [ # bodyparts + 1 ] = index
109
+ table.insert ( bodyparts , index )
110
110
end
111
111
end
112
112
elseif item ._type == df .item_shoesst then
113
113
for index , part in pairs (unitparts ) do
114
114
if part .flags .STANCE then
115
- bodyparts [ # bodyparts + 1 ] = index
115
+ table.insert ( bodyparts , index )
116
116
end
117
117
end
118
118
else
0 commit comments