Added License
This commit is contained in:
parent
0b60a421da
commit
8408271659
@ -1,2 +1,3 @@
|
||||
default
|
||||
central_message
|
||||
story
|
||||
|
@ -1,2 +1,3 @@
|
||||
default
|
||||
central_message
|
||||
story
|
||||
|
@ -2,5 +2,13 @@ story.talk_form = "size[8,7.5;]"
|
||||
story.talk_form = story.talk_form..default.gui_colors
|
||||
story.talk_form = story.talk_form..default.gui_bg
|
||||
story.talk_form = story.talk_form.."image[0,0.0;3,8;story_player.png]"
|
||||
story.talk_form = story.talk_form.."label[2.5,0;You : Hi\nCate : Hi, I have an quest for you!]"
|
||||
story.talk_form = story.talk_form.."label[2.5,0;%s]"
|
||||
story.talk_form = story.talk_form.."image[6,0.0;3,8;story_character_1.png]"
|
||||
|
||||
story.set_talk_form = function(pos, name, text)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", string.format(story.talk_form, text))
|
||||
meta:set_string("infotext", name)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8*4)
|
||||
end
|
||||
|
@ -2,5 +2,13 @@ story.talk_form = "size[8,7.5;]"
|
||||
story.talk_form = story.talk_form..default.gui_colors
|
||||
story.talk_form = story.talk_form..default.gui_bg
|
||||
story.talk_form = story.talk_form.."image[0,0.0;3,8;story_player.png]"
|
||||
story.talk_form = story.talk_form.."label[2.5,0;You : Hi\nCate : Hi, I have an quest for you!]"
|
||||
story.talk_form = story.talk_form.."label[2.5,0;%s]"
|
||||
story.talk_form = story.talk_form.."image[6,0.0;3,8;story_character_1.png]"
|
||||
|
||||
story.set_talk_form = function(pos, name, text)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", string.format(story.talk_form, text))
|
||||
meta:set_string("infotext", name)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8*4)
|
||||
end
|
||||
|
@ -8,15 +8,28 @@ minetest.register_node("story:character_static", {
|
||||
tiles = {"character.png"},
|
||||
drawtype = "mesh",
|
||||
mesh = "character_static.obj",
|
||||
groups = {crumbly = 3},
|
||||
groups = {story = 1, quests =1},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", story.talk_form)
|
||||
meta:set_string("infotext", "Character")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8*4)
|
||||
story.set_talk_form(pos, "Character", "")
|
||||
end,
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craftitem("story:conversation", {
|
||||
description = "Set Conversation",
|
||||
inventory_image = "story_set_conversation.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if not placer or not placer:is_player() then
|
||||
return
|
||||
end
|
||||
if not pointed_thing or not pointed_thing.under then
|
||||
return
|
||||
end
|
||||
story.set_talk_form(pointed_thing.under)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
@ -8,15 +8,28 @@ minetest.register_node("story:character_static", {
|
||||
tiles = {"character.png"},
|
||||
drawtype = "mesh",
|
||||
mesh = "character_static.obj",
|
||||
groups = {crumbly = 3},
|
||||
groups = {story = 1, quests =1},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", story.talk_form)
|
||||
meta:set_string("infotext", "Character")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8*4)
|
||||
story.set_talk_form(pos, "Character", "")
|
||||
end,
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craftitem("story:conversation", {
|
||||
description = "Set Conversation",
|
||||
inventory_image = "story_set_conversation.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if not placer or not placer:is_player() then
|
||||
return
|
||||
end
|
||||
if not pointed_thing or not pointed_thing.under then
|
||||
return
|
||||
end
|
||||
story.set_talk_form(pointed_thing.under)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
BIN
mods/story/textures/story_set_conversation.png
Normal file
BIN
mods/story/textures/story_set_conversation.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 249 B |
Loading…
x
Reference in New Issue
Block a user