updated README.md + added new way to display dialogs
This commit is contained in:
parent
90e77b8f39
commit
e95248af72
@ -26,3 +26,4 @@ Minetest : http://www.minetest.net/
|
|||||||
* srifqi (Indonesian translation)
|
* srifqi (Indonesian translation)
|
||||||
* Wuzzy (@Wuzzy2 - central_message mod)
|
* Wuzzy (@Wuzzy2 - central_message mod)
|
||||||
* celeron55 + minetest community (creative mod)
|
* celeron55 + minetest community (creative mod)
|
||||||
|
* rubenwardy (fix mobs crash on no XP found + cleanups of classes and story)
|
||||||
|
@ -29,6 +29,15 @@ story.get_talk_form = function(text)
|
|||||||
return string.format(story.talk_form, text)
|
return string.format(story.talk_form, text)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function story.show_dialog(player, text)
|
||||||
|
local lines = text:split("\n")
|
||||||
|
for i,t in ipairs(lines) do
|
||||||
|
minetest.after((i-1)*2.3, function(player, t)
|
||||||
|
cmsg.push_message_player(player, t)
|
||||||
|
end, player,t)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- hud
|
-- hud
|
||||||
|
|
||||||
story.hud = {}
|
story.hud = {}
|
||||||
@ -392,7 +401,8 @@ minetest.register_entity("story:human", {
|
|||||||
print("[story] not near story position")
|
print("[story] not near story position")
|
||||||
if (story.generator.players_stories[clicker:get_player_name()].wait_for and story.generator.players_stories[clicker:get_player_name()].wait_for == "talk") or not(story.generator.players_stories[clicker:get_player_name()].wait_for) then
|
if (story.generator.players_stories[clicker:get_player_name()].wait_for and story.generator.players_stories[clicker:get_player_name()].wait_for == "talk") or not(story.generator.players_stories[clicker:get_player_name()].wait_for) then
|
||||||
story.generator.players_stories[clicker:get_player_name()].wait_for = nil
|
story.generator.players_stories[clicker:get_player_name()].wait_for = nil
|
||||||
minetest.show_formspec(clicker:get_player_name(), "story:story", story.get_talk_form(story.generator.players_stories[clicker:get_player_name()].text))
|
--minetest.show_formspec(clicker:get_player_name(), "story:story", story.get_talk_form(story.generator.players_stories[clicker:get_player_name()].text))
|
||||||
|
story.show_dialog(clicker, story.generator.players_stories[clicker:get_player_name()].text)
|
||||||
story.generator.gen_next_step(clicker)
|
story.generator.gen_next_step(clicker)
|
||||||
else
|
else
|
||||||
print("[story] waiting for something else")
|
print("[story] waiting for something else")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user