mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-30 06:43:45 +01:00
Double save anvil-given name
parent
a7190a3693
commit
87ef954409
@ -41,7 +41,10 @@ local function update_anvil_slots(meta)
|
|||||||
local meta = name_item:get_meta()
|
local meta = name_item:get_meta()
|
||||||
-- Limit name length
|
-- Limit name length
|
||||||
new_name = string.sub(new_name, 1, 30)
|
new_name = string.sub(new_name, 1, 30)
|
||||||
|
-- Rename item
|
||||||
meta:set_string("description", new_name)
|
meta:set_string("description", new_name)
|
||||||
|
-- Double-save the name internally, too
|
||||||
|
meta:set_string("name", new_name)
|
||||||
new_output = name_item
|
new_output = name_item
|
||||||
else
|
else
|
||||||
new_output = ""
|
new_output = ""
|
||||||
|
Loading…
Reference in New Issue
Block a user