Display node name when targeted

master
Jordan Irwin 2021-04-24 23:46:43 -07:00
parent 7f395fd23a
commit 098030d354
2 changed files with 5 additions and 3 deletions

View File

@ -1,3 +1,2 @@
- place item back in inventory when formspec is closed
- display text when targeting node

View File

@ -2,9 +2,11 @@
local S = core.get_translator(equip_exam.name)
local common_name = S("Equipment Examiner")
local node_def = {
description = S("Equipment Examiner"),
short_description = S("Equipment Examiner"),
description = common_name,
short_description = common_name,
drawtype = "normal",
tiles = {
"equip_exam_examiner.png",
@ -17,6 +19,7 @@ local node_def = {
stack_max = 1,
on_construct = function(pos)
local meta = core.get_meta(pos)
meta:set_string("infotext", common_name)
meta:set_string("formspec", equip_exam:get_formspec())
local inv = meta:get_inventory()
inv:set_size("input", 1)