From 7e348e3383a4a784743be7c387e3bab510a05bc2 Mon Sep 17 00:00:00 2001 From: octacian Date: Thu, 28 Jul 2016 22:11:16 -0700 Subject: [PATCH] use formspec instead of formspec_normal --- api.lua | 4 ++-- init.lua | 2 +- os.lua | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api.lua b/api.lua index 3022c8e..88432e0 100644 --- a/api.lua +++ b/api.lua @@ -9,7 +9,7 @@ function digicompute.on(pos, node) minetest.swap_node({x = pos_.x, y = pos_.y, z = pos_.z}, {name = "digicompute:"..node.."_on", param2 = temp.param2}) -- set node to on after 5 seconds end, vector.new(pos)) local meta = minetest.get_meta(pos) -- get meta - meta:set_string("formspec", digicompute.formspec_normal("", "")) + meta:set_string("formspec", digicompute.formspec("", "")) end -- turn off function digicompute.off(pos, node) @@ -120,7 +120,7 @@ function digicompute.register_terminal(termstring, desc) -- if name received, set if fields.name then meta:set_string("name", fields.name) -- set name - meta:set_string("formspec", digicompute.formspec_normal(meta:get_string("input"), meta:get_string("output"))) -- refresh formspec + meta:set_string("formspec", digicompute.formspec(meta:get_string("input"), meta:get_string("output"))) -- update formspec return end -- if submit, check for keywords and process according to os diff --git a/init.lua b/init.lua index 1ebe709..0f44776 100755 --- a/init.lua +++ b/init.lua @@ -12,7 +12,7 @@ end -- FORMSPECS -- normal -function digicompute.formspec_normal(input, output) +function digicompute.formspec(input, output) if not output then local output = "" end if not input then local input = "" end -- formspec diff --git a/os.lua b/os.lua index 187629c..93c4707 100644 --- a/os.lua +++ b/os.lua @@ -30,5 +30,5 @@ end -- [function] refresh formspec function digicompute.os.refresh(pos) local meta = minetest.get_meta(pos) -- get meta - meta:set_string("formspec", digicompute.formspec_normal(meta:get_string("input"), meta:get_string("output"))) + meta:set_string("formspec", digicompute.formspec(meta:get_string("input"), meta:get_string("output"))) end