mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-12-24 01:30:22 +01:00
show current texture for mob reset stick
This commit is contained in:
parent
350fc3647c
commit
f58841ab3e
10
crafts.lua
10
crafts.lua
@ -299,12 +299,18 @@ minetest.register_tool(":mobs:mob_reset_stick", {
|
|||||||
|
|
||||||
tex_obj = obj
|
tex_obj = obj
|
||||||
|
|
||||||
|
-- get base texture
|
||||||
|
local bt = tex_obj:get_luaentity().base_texture[1]
|
||||||
|
|
||||||
|
if type(bt) ~= "string" then
|
||||||
|
bt = ""
|
||||||
|
end
|
||||||
|
|
||||||
local name = user:get_player_name()
|
local name = user:get_player_name()
|
||||||
local tex = ""
|
|
||||||
|
|
||||||
minetest.show_formspec(name, "mobs_texture", "size[8,4]"
|
minetest.show_formspec(name, "mobs_texture", "size[8,4]"
|
||||||
.. "field[0.5,1;7.5,0;name;"
|
.. "field[0.5,1;7.5,0;name;"
|
||||||
.. minetest.formspec_escape(S("Enter texture:")) .. ";" .. tex .. "]"
|
.. minetest.formspec_escape(S("Enter texture:")) .. ";" .. bt .. "]"
|
||||||
.. "button_exit[2.5,3.5;3,1;mob_texture_change;"
|
.. "button_exit[2.5,3.5;3,1;mob_texture_change;"
|
||||||
.. minetest.formspec_escape(S("Change")) .. "]")
|
.. minetest.formspec_escape(S("Change")) .. "]")
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user