ingame manual added
This commit is contained in:
parent
08d748d358
commit
4f14601ad5
@ -32,6 +32,7 @@ function steampunk_blimp.pilot_formspec(name)
|
||||
|
||||
basic_form = basic_form.."button[1,1.0;4,1;turn_on;Start/Stop the fire]"
|
||||
basic_form = basic_form.."button[1,2.0;4,1;water;Load water from bellow]"
|
||||
basic_form = basic_form.."button[1,3.0;4,1;manual;Show Manual Menu]"
|
||||
|
||||
basic_form = basic_form.."checkbox[1,4.6;take_control;Take the Control;"..take_control.."]"
|
||||
basic_form = basic_form.."checkbox[1,5.2;anchor;Anchor away;"..anchor.."]"
|
||||
@ -186,6 +187,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
else
|
||||
minetest.chat_send_player(name,core.colorize('#ff0000', " >>> Impossible. The ship needs to be in the water."))
|
||||
end
|
||||
end
|
||||
if fields.manual then
|
||||
steampunk_blimp.manual_formspec(name)
|
||||
end
|
||||
if fields.take_control then
|
||||
if fields.take_control == "true" then
|
||||
|
1
init.lua
1
init.lua
@ -80,6 +80,7 @@ dofile(minetest.get_modpath("steampunk_blimp") .. DIR_DELIM .. "custom_physics.l
|
||||
dofile(minetest.get_modpath("steampunk_blimp") .. DIR_DELIM .. "hud.lua")
|
||||
dofile(minetest.get_modpath("steampunk_blimp") .. DIR_DELIM .. "entities.lua")
|
||||
dofile(minetest.get_modpath("steampunk_blimp") .. DIR_DELIM .. "forms.lua")
|
||||
dofile(minetest.get_modpath("steampunk_blimp") .. DIR_DELIM .. "manual.lua")
|
||||
|
||||
--
|
||||
-- helpers and co.
|
||||
|
84
manual.lua
Executable file
84
manual.lua
Executable file
@ -0,0 +1,84 @@
|
||||
--------------
|
||||
-- Manual --
|
||||
--------------
|
||||
|
||||
function steampunk_blimp.manual_formspec(name)
|
||||
local basic_form = table.concat({
|
||||
"formspec_version[3]",
|
||||
"size[6,6]"
|
||||
}, "")
|
||||
|
||||
basic_form = basic_form.."button[1,1.0;4,1;short;Shortcuts]"
|
||||
basic_form = basic_form.."button[1,2.5;4,1;fuel;Refueling]"
|
||||
basic_form = basic_form.."button[1,4.0;4,1;share;Sharing]"
|
||||
|
||||
minetest.show_formspec(name, "steampunk_blimp:manual_main", basic_form)
|
||||
end
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if formname == "steampunk_blimp:manual_main" then
|
||||
if fields.short then
|
||||
local text = {
|
||||
"Shortcuts \n\n",
|
||||
"* Right click: enter in / acess the internal menu \n",
|
||||
"* Punch with dye to paint the primary color\n",
|
||||
"* Punch a dye, but holding Aux (E) key to change the secondary color.\n",
|
||||
"* To change the blimp logo, call the command \"/blimp_logo\".\n",
|
||||
"* Forward or backward while in drive position: controls the power lever \n",
|
||||
"* Left or right while in drive position: controls the direction \n",
|
||||
"* Jump and sneak: controls the up and down movement \n",
|
||||
"* Aux (E) + right click while inside: acess inventory \n",
|
||||
"* Aux (E) + backward while in drive position: the machine does backward \n",
|
||||
"* Aux (E) + foward while in drive position: extra power \n"
|
||||
}
|
||||
local shortcut_form = table.concat({
|
||||
"formspec_version[3]",
|
||||
"size[16,10]",
|
||||
"label[1.0,2.0;", table.concat(text, ""), "]",
|
||||
}, "")
|
||||
minetest.show_formspec(player:get_player_name(), "steampunk_blimp:manual_shortcut", shortcut_form)
|
||||
end
|
||||
if fields.fuel then
|
||||
local text = {
|
||||
"Fuel \n\n",
|
||||
"To fly it, it is necessary to provide some items, such as fuel to be burned and \n",
|
||||
"water for the boiler. The fuel can be coal, coal block or wood. To supply it, \n",
|
||||
"be on board and punch the necessary items on the airship.\n",
|
||||
"There is another way to load water to the boiler: if it is landed on water, it can load \n",
|
||||
"it through the menu. But the current pressure will be lost. \n"
|
||||
}
|
||||
local fuel_form = table.concat({
|
||||
"formspec_version[3]",
|
||||
"size[16,10]",
|
||||
"label[1.0,2.0;", table.concat(text, ""), "]",
|
||||
}, "")
|
||||
minetest.show_formspec(player:get_player_name(), "steampunk_blimp:fuel", fuel_form)
|
||||
end
|
||||
if fields.share then
|
||||
local text = {
|
||||
"Sharing \n\n",
|
||||
"This vehicle was made to be shared with a team. So the owner can set more users to \n",
|
||||
"operate it. Inside the blimp, just use the command \"/blimp_share <name>\" \n",
|
||||
"To remove someone from the sharing, \"/blimp_remove <name>\" \n",
|
||||
"To list the owners, \"/blimp_list\" \n",
|
||||
"Is possible to lock the blimp access, so only the owners can enter: \"/blimp_lock true\" \n",
|
||||
"To let anyone enter, \"/blimp_lock false\" \n",
|
||||
"All shared owners can access the blimp inventory"
|
||||
}
|
||||
local tips_form = table.concat({
|
||||
"formspec_version[3]",
|
||||
"size[16,10]",
|
||||
"label[1,2;", table.concat(text, ""), "]",
|
||||
}, "")
|
||||
minetest.show_formspec(player:get_player_name(), "steampunk_blimp:share", tips_form)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_chatcommand("blimp_manual", {
|
||||
params = "",
|
||||
description = "Blimp manual",
|
||||
func = function(name, param)
|
||||
steampunk_blimp.manual_formspec(name)
|
||||
end
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user