mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2024-11-14 14:40:29 +01:00
fix bones formspec
This commit is contained in:
parent
ad319c50a3
commit
6deb010475
|
@ -106,6 +106,17 @@ bones_loot.get_loot = function(pos, loot_type, max_stacks, exclusive_loot_type)
|
|||
return items
|
||||
end
|
||||
|
||||
local bones_formspec =
|
||||
"size[8,9]" ..
|
||||
"list[current_name;main;0,0.3;8,4;]" ..
|
||||
"list[current_player;main;0,4.85;8,1;]" ..
|
||||
"list[current_player;main;0,6.08;8,3;8]" ..
|
||||
"listring[current_name;main]" ..
|
||||
"listring[current_player;main]"
|
||||
if minetest.get_modpath("default") then
|
||||
bones_formspec = bones_formspec .. default.get_hotbar_bg(0,4.85)
|
||||
end
|
||||
|
||||
bones_loot.place_bones = function(pos, loot_type, max_stacks, infotext, exclusive_loot_type)
|
||||
minetest.set_node(pos, {name="bones:bones", param2 = math.random(1,4)-1})
|
||||
local meta = minetest.get_meta(pos)
|
||||
|
@ -113,6 +124,7 @@ bones_loot.place_bones = function(pos, loot_type, max_stacks, infotext, exclusiv
|
|||
infotext = S("Someone's old bones")
|
||||
end
|
||||
meta:set_string("infotext", infotext)
|
||||
meta:set_string("formspec", bones_formspec)
|
||||
|
||||
if max_stacks and max_stacks > 0 then
|
||||
local loot = bones_loot.get_loot(pos, loot_type, max_stacks, exclusive_loot_type)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
name = bones_loot
|
||||
description = An API that allows bones to be placed procedurally with randomly generated loot
|
||||
depends = bones
|
||||
optional_depends = dungeon_loot, intllib
|
||||
optional_depends = dungeon_loot, intllib, default
|
Loading…
Reference in New Issue
Block a user