mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-28 02:30:27 +01:00
[mff_pclasses & pclasses] Enhance showcasing menus
- Remove the labels introduced last time and use the old line-wrapping textareas - Add showcase screenshots for the four classes presented - Add a little map of the spawn and both available class buildings - For #473
This commit is contained in:
parent
99655796ff
commit
59c4c8e919
@ -28,19 +28,19 @@ pclasses.api.register_class("hunter", {
|
|||||||
tile = "default_wood.png",
|
tile = "default_wood.png",
|
||||||
holo_item = "throwing:bow_minotaur_horn_improved"
|
holo_item = "throwing:bow_minotaur_horn_improved"
|
||||||
},
|
},
|
||||||
informations = pclasses.api.textify("Being a hunter is mostly being tactical, or just kicking in and firing arrows like madness.\n" ..
|
informations = pclasses.api.textify("Being a hunter is mostly being tactical, or just kicking in and firing arrows like madness." ..
|
||||||
"Being a hunter, you're in the only class which member can use new and exclusive\n" ..
|
"Being a hunter, you're in the only class which member can use new and exclusive" ..
|
||||||
"ranged weapons, like spears, arbalests and bows. Your stamina is increased to\n" ..
|
"ranged weapons, like spears, arbalests and bows. Your stamina is increased to" ..
|
||||||
"40, you're a sport person, able to sprint for a long time, which is found to be\n" ..
|
"40, you're a sport person, able to sprint for a long time, which is found to be" ..
|
||||||
"useful when you hunt down animals and mobs who can't run faster than you walk..\n" ..
|
"useful when you hunt down animals and mobs who can't run faster than you walk.." ..
|
||||||
"and even more when you need to cowardly run away... anyway. The point is, being\n" ..
|
"and even more when you need to cowardly run away... anyway. The point is, being" ..
|
||||||
"a hunter is great, since you can access new and exclusive weapons, and leather\n" ..
|
"a hunter is great, since you can access new and exclusive weapons, and leather" ..
|
||||||
"armors, crafted from leather. Obviously.. Those clothes are pretty strong, and\n" ..
|
"armors, crafted from leather. Obviously.. Those clothes are pretty strong, and" ..
|
||||||
"will protect you more than wooden pieces (at least the reinforced one), with the\n" ..
|
"will protect you more than wooden pieces (at least the reinforced one), with the" ..
|
||||||
"satation consumption of wearing nothing. If you want to risk it and become a\n" ..
|
"satation consumption of wearing nothing. If you want to risk it and become a" ..
|
||||||
"hunter, you should look for a green pedestal with a bow so fancy over it that you\n" ..
|
"hunter, you should look for a green pedestal with a bow so fancy over it that you" ..
|
||||||
"can already tell that we're gonna make you use loads of ores for it. (actually\n" ..
|
"can already tell that we're gonna make you use loads of ores for it. (actually" ..
|
||||||
"you need to fight a super strong mob, but it's just details...)")
|
"you need to fight a super strong mob, but it's just details...)") .. "image[2.4,5.6;6,4;pclasses_showcase_hunter.png]"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
BIN
mods/mff/mff_pclasses/textures/pclasses_showcase_hunter.png
Normal file
BIN
mods/mff/mff_pclasses/textures/pclasses_showcase_hunter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
BIN
mods/mff/mff_pclasses/textures/pclasses_showcase_warrior.png
Normal file
BIN
mods/mff/mff_pclasses/textures/pclasses_showcase_warrior.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
BIN
mods/mff/mff_pclasses/textures/pclasses_showcase_wizard.png
Normal file
BIN
mods/mff/mff_pclasses/textures/pclasses_showcase_wizard.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@ -23,17 +23,17 @@ pclasses.api.register_class("warrior", {
|
|||||||
tile = "default_steel_block.png",
|
tile = "default_steel_block.png",
|
||||||
holo_item = "default:dungeon_master_s_blood_sword"
|
holo_item = "default:dungeon_master_s_blood_sword"
|
||||||
},
|
},
|
||||||
informations = pclasses.api.textify("'Warriors' is a class of players designed to improve fighting parameters of players who\n" ..
|
informations = pclasses.api.textify("'Warriors' is a class of players designed to improve fighting parameters of players who" ..
|
||||||
"chose to belong to it. You become a big tank, of human shape. Not only can you wear\n" ..
|
"chose to belong to it. You become a big tank, of human shape. Not only can you wear" ..
|
||||||
"stronger protections (like the Black Mithril armor's pieces, because Black Mithril is a thing\n" ..
|
"stronger protections (like the Black Mithril armor's pieces, because Black Mithril is a thing" ..
|
||||||
"here), and use more powerful hand-to-hand weapons (such as the Dungeon Master's\n" ..
|
"here), and use more powerful hand-to-hand weapons (such as the Dungeon Master's" ..
|
||||||
"blood sword, because yes, you are going to fight Dungeon Masters and drain their blood),\n" ..
|
"blood sword, because yes, you are going to fight Dungeon Masters and drain their blood)," ..
|
||||||
"but your stamina bar is boosted up to 20! Trust us, running away is an important part\n" ..
|
"but your stamina bar is boosted up to 20! Trust us, running away is an important part" ..
|
||||||
"of fighting a Dungeon Master. Being a warrior, you regenerate health faster, which is,\n" ..
|
"of fighting a Dungeon Master. Being a warrior, you regenerate health faster, which is," ..
|
||||||
"again, quite handy, at the cost of needing to eat more frequently (less handy). The\n" ..
|
"again, quite handy, at the cost of needing to eat more frequently (less handy). The" ..
|
||||||
"pedestal tied to the Warriors' includes the strongest sword, available only to Warriors :\n" ..
|
"pedestal tied to the Warriors' includes the strongest sword, available only to Warriors :" ..
|
||||||
"the Dungeon Master's Blood Sword. It just looks like what you imagine, just\n" ..
|
"the Dungeon Master's Blood Sword. It just looks like what you imagine, just" ..
|
||||||
"more pixel-ish.")
|
"more pixel-ish.") .. "image[2.4,5.6;6,4;pclasses_showcase_warrior.png]"
|
||||||
})
|
})
|
||||||
|
|
||||||
pclasses.api.reserve_item("warrior", "default:sword_mithril")
|
pclasses.api.reserve_item("warrior", "default:sword_mithril")
|
||||||
|
@ -23,24 +23,24 @@ pclasses.api.register_class("wizard", {
|
|||||||
color = {r = 230, g = 230, b = 0},
|
color = {r = 230, g = 230, b = 0},
|
||||||
holo_item = "default:book"
|
holo_item = "default:book"
|
||||||
},
|
},
|
||||||
informations = pclasses.api.textify("'Wizards' is a class of players aimed at enhancing magic abilities. Basically, you\n" ..
|
informations = pclasses.api.textify("'Wizards' is a class of players aimed at enhancing magic abilities. Basically, you " ..
|
||||||
"become a wizard. Or a witch. Whichever one you prefer. You can then use magic, which\n" ..
|
"become a wizard. Or a witch. Whichever one you prefer. You can then use magic, which " ..
|
||||||
"is nice. But since this magic was implemented by the people coding for this server\n" ..
|
"is nice. But since this magic was implemented by the people coding for this server " ..
|
||||||
"(well, one of them, mostly), you should expect a few things to not.. work.. If you have\n" ..
|
"(well, one of them, mostly), you should expect a few things to not.. work.. If you have " ..
|
||||||
"comments, complaints and threats, contact us, well, me.. Being a wizard means you will\n" ..
|
"comments, complaints and threats, contact us, well, me.. Being a wizard means you will " ..
|
||||||
"need energy, or 'mana', to cast spells, or rather, to use our ugly wands. This energy is\n" ..
|
"need energy, or 'mana', to cast spells, or rather, to use our ugly wands. This energy is " ..
|
||||||
"recharged by.. waiting. You use it every time you cast a spell or engrave a rune with a\n" ..
|
"recharged by.. waiting. You use it every time you cast a spell or engrave a rune with a " ..
|
||||||
"wand, to charge it, and not have you throw zillions of spell in a minute. Once your\n" ..
|
"wand, to charge it, and not have you throw zillions of spell in a minute. Once your " ..
|
||||||
"your mana charger has dropped down to 0, or too low for that cool shape shift spell\n" ..
|
"your mana charger has dropped down to 0, or too low for that cool shape shift spell " ..
|
||||||
"(not implemented (yet?)), just wait a bit and it will come back on its own. At least it\n" ..
|
"(not implemented (yet?)), just wait a bit and it will come back on its own. At least it " ..
|
||||||
"should. The maximum mana capacity is significantly higher in Wizards (and Witches) than\n" ..
|
"should. The maximum mana capacity is significantly higher in Wizards (and Witches) than " ..
|
||||||
"in any other class. Since this class is still a work in progress, the following things are\n" ..
|
"in any other class. Since this class is still a work in progress, the following things are " ..
|
||||||
"not implemented yet. Note : poking at the developers could help us bring you the\n" ..
|
"not implemented yet. Note : poking at the developers could help us bring you the " ..
|
||||||
"content, it's motivating! Wizards can wear silk robes (not there yet) to add in maximum\n" ..
|
"content, it's motivating! Wizards can wear silk robes (not there yet) to add in maximum " ..
|
||||||
"mana levels and mana regeneration if worn entirely. It is interesting to note that those\n" ..
|
"mana levels and mana regeneration if worn entirely. It is interesting to note that those " ..
|
||||||
"robes do not make you hungry faster, contrary to most armors. Finally, the pedestal to\n" ..
|
"robes do not make you hungry faster, contrary to most armors. Finally, the pedestal to " ..
|
||||||
"use in order to become a member of this class has a book floating over it, to symbolize\n" ..
|
"use in order to become a member of this class has a book floating over it, to symbolize " ..
|
||||||
"wisdom.")
|
"wisdom.") .. "image[2.4,5.6;6,4;pclasses_showcase_wizard.png]"
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Reserved items here
|
-- Reserved items here
|
||||||
|
@ -21,6 +21,6 @@ pclasses.api.register_class("adventurer", {
|
|||||||
"read what's in it. You'll still be able to come back to this boilerplate class whenever you\n" ..
|
"read what's in it. You'll still be able to come back to this boilerplate class whenever you\n" ..
|
||||||
"want to (minus actual cooldown regulation of.. an hour between two changes) if you like\n" ..
|
"want to (minus actual cooldown regulation of.. an hour between two changes) if you like\n" ..
|
||||||
"being hurt, or hardcore gaming, which, from afar, look alike.... The pedestal has a backpack\n" ..
|
"being hurt, or hardcore gaming, which, from afar, look alike.... The pedestal has a backpack\n" ..
|
||||||
"over it, because, yay adventures!")
|
"over it, because, yay adventures!") .. "image[2.4,5.6;6,4;pclasses_showcase_adventurer.png]"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -92,27 +92,24 @@ local pbutton_form = "size[10,10]" ..
|
|||||||
"tabheader[0,0;pmenu_header;infos"
|
"tabheader[0,0;pmenu_header;infos"
|
||||||
|
|
||||||
function pclasses.api.textify(text)
|
function pclasses.api.textify(text)
|
||||||
--return "textarea[0.5,0.2;9.6,10;pmenu_data;;" .. text .. "]"
|
return ("textarea[0.5,0.2;9.6,5.8;pmenu_data;;%s]"):format(text)
|
||||||
local returned = ""
|
|
||||||
for i, line in pairs(text:split('\n')) do
|
|
||||||
returned = ("%slabel[0.2,%f;%s]"):format(returned, 0.2 + (i-1)*0.5, line)
|
|
||||||
end
|
|
||||||
return returned
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local pbuttons = {}
|
local pbuttons = {}
|
||||||
local pforms = {}
|
local pforms = {}
|
||||||
local pinfo = pclasses.api.textify(
|
local pinfo = pclasses.api.textify(
|
||||||
"PClasses (Player Classes) allows you to become a member of specific classes implemented\n" ..
|
"PClasses (Player Classes) allows you to become a member of specific classes implemented " ..
|
||||||
"with abilities, advantages, and reserved items. Each one of the classes defined grants\n" ..
|
"with abilities, advantages, and reserved items. Each one of the classes defined grants " ..
|
||||||
"the right to carry items, called reserved items, tied to the abilities of a class. A \n" ..
|
"the right to carry items, called reserved items, tied to the abilities of a class. A " ..
|
||||||
"hunter will be able to use arrows, whereas a warrior can own powerful weapons. Each time\n" ..
|
"hunter will be able to use arrows, whereas a warrior can own powerful weapons. Each time " ..
|
||||||
"you switch classes, you will lose your stats and items, the latter being transfered into\n" ..
|
"you switch classes, you will lose your stats and items, the latter being transfered into " ..
|
||||||
"a special part of your inventory, the graveyard. Once you return to a class that allows\n" ..
|
"a special part of your inventory, the graveyard. Once you return to a class that allows " ..
|
||||||
"you to use those items, they will return in your main inventory.\n" ..
|
"you to use those items, they will return in your main inventory.\n" ..
|
||||||
"You can use this menu to navigate between classes and read informations about what\n" ..
|
"You can use this menu to navigate between classes and read informations about what " ..
|
||||||
"abilities come with specific classes."
|
"abilities come with specific classes.\n" ..
|
||||||
)
|
"You can see on this man the location of all class buildings available, containing their " ..
|
||||||
|
"respective class pedestals."
|
||||||
|
) .. "image[2.4,5.6;6,4;pclasses_buildings.png]"
|
||||||
|
|
||||||
|
|
||||||
minetest.after(0, function()
|
minetest.after(0, function()
|
||||||
@ -123,14 +120,12 @@ minetest.after(0, function()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
pbutton_form = pbutton_form .. ";1]"
|
pbutton_form = pbutton_form .. ";1]"
|
||||||
minetest.log("action", pbutton_form)
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
if formname ~= "" then return end
|
if formname ~= "" then return end
|
||||||
|
|
||||||
if fields.pmenu_header then
|
if fields.pmenu_header then
|
||||||
minetest.log(fields.pmenu_header)
|
|
||||||
if fields.pmenu_header + 0 == 1 then
|
if fields.pmenu_header + 0 == 1 then
|
||||||
player:set_inventory_formspec(pbutton_form .. pinfo)
|
player:set_inventory_formspec(pbutton_form .. pinfo)
|
||||||
else
|
else
|
||||||
|
BIN
mods/pclasses/textures/pclasses_buildings.png
Normal file
BIN
mods/pclasses/textures/pclasses_buildings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 133 KiB |
BIN
mods/pclasses/textures/pclasses_showcase_adventurer.png
Normal file
BIN
mods/pclasses/textures/pclasses_showcase_adventurer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Loading…
Reference in New Issue
Block a user