|
86 | 86 |
|
87 | 87 | -- slot reordering to make sure the first rows of the bone are always populated |
88 | 88 | local function bones_inv_reorder(meta) |
89 | | - local next_empty=1 -- there are no empty slots inside the bones before this |
| 89 | + local next_empty = 1 -- there are no empty slots inside the bones before this |
90 | 90 | local next_populated -- there are no populated slots preceded by unpopulated slots before this |
91 | | - local inv=meta:get_inventory() |
92 | | - next_empty=find_next_empty(inv,"main",next_empty) |
| 91 | + local inv = meta:get_inventory() |
| 92 | + next_empty = find_next_empty(inv, "main", next_empty) |
93 | 93 | if next_empty < 0 then |
94 | 94 | return |
95 | 95 | end |
96 | | - next_populated=find_next_populated(inv,"main",next_empty+1) |
| 96 | + next_populated = find_next_populated(inv, "main", next_empty + 1) |
97 | 97 | while next_populated > 0 do |
98 | 98 | local stack = inv:get_stack("main", next_populated) |
99 | 99 | inv:set_stack("main", next_populated, ItemStack()) |
100 | 100 | inv:set_stack("main", next_empty, stack) |
101 | | - next_empty=find_next_empty(inv,"main",next_empty+1) |
102 | | - next_populated=find_next_populated(inv,"main",next_populated+1) |
| 101 | + next_empty = find_next_empty(inv, "main", next_empty + 1) |
| 102 | + next_populated = find_next_populated(inv, "main", next_populated + 1) |
103 | 103 | end |
104 | 104 | end |
105 | 105 |
|
|
0 commit comments