Removed SmartFS as not supporting the wanted features
This commit is contained in:
parent
47847d2951
commit
f89dfe780e
17
chat.lua
17
chat.lua
@ -31,21 +31,6 @@ npc.dialogue = {}
|
||||
npc.dialogue.YES_GIFT_ANSWER_LABEL = "Yes, give wielded item"
|
||||
npc.dialogue.NO_GIFT_ANSWER_LAEBL = "Nevermind"
|
||||
|
||||
-- Yes/No dialogue declaration
|
||||
npc.dialogue.gift_dialogue = smartfs.create("advanced_npc:gift_dialogue", function(state)
|
||||
state:size(7, 2.4)
|
||||
state:button(0.5, 0.7, 6, 0.5, "yes_option", npc.dialogue.YES_GIFT_ANSWER_LABEL)
|
||||
state:button(0.5, 1.4, 6, 0.5, "no_option", npc.dialogue.NO_GIFT_ANSWER_LAEBL, true)
|
||||
|
||||
local dialogue_result
|
||||
state:get("yes_option"):click(function(self, state)
|
||||
dialogue_result = true
|
||||
end)
|
||||
state:get("no_option"):click(function(self, state)
|
||||
dialogue_result = false
|
||||
end)
|
||||
end)
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Creates a formspec for dialog
|
||||
--------------------------------------------------------------------
|
||||
@ -66,7 +51,7 @@ end
|
||||
|
||||
-- New function for getting dialogue formspec
|
||||
function npc.dialogue.show_yes_no_dialogue(prompt, player_name)
|
||||
local dialogue_form = npc.dialogue.gift_dialogue
|
||||
|
||||
|
||||
-- Send prompt message to player
|
||||
minetest.chat_send_player(player_name, prompt)
|
||||
|
3
init.lua
3
init.lua
@ -1,9 +1,6 @@
|
||||
|
||||
local path = minetest.get_modpath("advanced_npc")
|
||||
|
||||
-- Load SmartFS library by rubenwardy
|
||||
dofile(path .. "/lib/smartfs.lua")
|
||||
|
||||
-- Intllib
|
||||
local S
|
||||
if minetest.get_modpath("intllib") then
|
||||
|
1005
lib/smartfs.lua
1005
lib/smartfs.lua
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user