|
7 | 7 | local S = minetest.get_translator("bones") |
8 | 8 |
|
9 | 9 | local bones_max_slots = tonumber(minetest.settings:get("bones_max_slots")) or 15 * 10 |
10 | | -local min_inv_size = 4 * 8 -- display and provide at least this many slots |
| 10 | +local min_inv_size = 4 * 8 -- display and provide at least this many slots |
11 | 11 |
|
12 | 12 | bones = {} |
13 | 13 |
|
@@ -79,14 +79,13 @@ local function get_bones_formspec_for_size(numitems) |
79 | 79 | end |
80 | 80 | local output={} |
81 | 81 | appendmulti(output, "size[", 8.5, ",", 9, "]") |
82 | | - if scroll then |
83 | | - -- ok so I don't want to figure out the constants for (rows-delta)*multiplier so I'll let this code do it for me |
| 82 | + if scroll then |
84 | 83 | local row_05=13.2 |
85 | 84 | local row_15=128 |
86 | 85 | local multiplier=(row_15-row_05)/10 |
87 | 86 | appendmulti(output, "scrollbaroptions[max=",(rows-5)*multiplier+row_05,"]") |
88 | | - appendmulti(output, "scrollbar[8,0;0.3,4.5;vertical;bones_scroll;0]") |
89 | | - appendmulti(output, "scroll_container[0,0.3;10.3,4.95;bones_scroll;vertical;0.1]") |
| 87 | + appendmulti(output, "scrollbar[8,0;0.3,4.5;vertical;bones_scroll;0]", |
| 88 | + "scroll_container[0,0.3;10.3,4.95;bones_scroll;vertical;0.1]") |
90 | 89 | end |
91 | 90 | appendmulti(output, "list[current_name;main;0,0;", cols, ",", rows, ";]") |
92 | 91 | if scroll then |
@@ -392,7 +391,8 @@ local function place_bones(player, bones_pos, items) |
392 | 391 | bones_meta:set_string("owner", player_name) |
393 | 392 | if share_bones_time ~= 0 then |
394 | 393 | bones_meta:set_string("infotext", S("@1's fresh bones", player_name)) |
395 | | - if share_bones_time_early == 0 or not minetest.is_protected(bones_pos, player_name) then |
| 394 | + if share_bones_time_early == 0 or |
| 395 | + not minetest.is_protected(bones_pos, player_name) then |
396 | 396 | bones_meta:set_int("time", 0) |
397 | 397 | else |
398 | 398 | bones_meta:set_int("time", share_bones_time - share_bones_time_early) |
|
0 commit comments