1
1
use flecs_ecs:: core:: { World , WorldGet } ;
2
2
use hyperion_inventory:: PlayerInventory ;
3
- use hyperion_item:: builder:: { AttackDamage , Color , ItemBuilder } ;
3
+ use hyperion_item:: builder:: { AttackDamage , BookBuilder , Color , ItemBuilder } ;
4
4
use valence_protocol:: ItemKind ;
5
5
6
6
use crate :: { Handles , Rank , Team } ;
@@ -22,7 +22,8 @@ pub const MAIN_SLOT: u16 = 0;
22
22
pub const PICKAXE_SLOT : u16 = 1 ;
23
23
pub const BLOCK_SLOT : u16 = 2 ;
24
24
pub const UPGRADE_START_SLOT : u16 = 3 ;
25
- pub const GUI_SLOT : u16 = 8 ;
25
+ pub const GUI_SLOT : u16 = 7 ;
26
+ pub const HELP_SLOT : u16 = 8 ;
26
27
27
28
impl Rank {
28
29
pub fn apply_inventory (
@@ -32,9 +33,34 @@ impl Rank {
32
33
world : & World ,
33
34
build_count : i8 ,
34
35
) {
36
+ inventory. clear ( ) ;
35
37
let upgrade_not_available = ItemBuilder :: new ( ItemKind :: GrayDye ) ;
36
38
37
- inventory. clear ( ) ;
39
+ let book = BookBuilder :: new ( "§b@andrewgazelka" , "§6§l10k Guide" )
40
+ . add_page (
41
+ "§6Welcome to Hyperion!\n \n §7This is a §c10,000§7 player PvP battle to break the \
42
+ Guinness World Record!\n \n §7Current record: §b8,825 players",
43
+ )
44
+ . add_page (
45
+ "§6§lTeams\n \n §cRed Team\n §9Blue Team\n §aGreen Team\n §6Yellow Team\n \n §7Teams are \
46
+ identified by boot color!",
47
+ )
48
+ . add_page (
49
+ "§6§lProgression\n \n §7Gain XP by:\n §7- Mining ores\n §7- Killing players\n \n §7When \
50
+ killed:\n §7- Keep §61/3§7 of XP\n §7- Killer gets §61/2§7 of your XP",
51
+ )
52
+ . add_page (
53
+ "§6§lClasses\n \n §7Everyone starts with the §dStick§7 class\n \n §7Unlock new \
54
+ classes by gaining XP and defeating players!\n \n §7Upgrade your gear to become \
55
+ stronger!",
56
+ )
57
+ . add_page (
58
+ "§6§lControls\n \n §7[1-4] §7Combat Items\n §7[5-6] §7Building Blocks\n §7[7] \
59
+ §7Upgrades Menu\n §7[8] §7Help Book\n \n §6Good luck!",
60
+ )
61
+ . build ( ) ;
62
+
63
+ inventory. set_hotbar ( HELP_SLOT , book) ;
38
64
39
65
let color = match team {
40
66
Team :: Red => Color ( 255 , 0 , 0 ) ,
@@ -49,7 +75,7 @@ impl Rank {
49
75
50
76
inventory. set_boots ( boots) ;
51
77
52
- let upgrades = [ "Speed" , "Vision" , " Health", "Armor" , "Damage" ] ;
78
+ let upgrades = [ "Speed" , "Health" , "Armor" , "Damage" ] ;
53
79
54
80
world. get :: < & Handles > ( |handles| {
55
81
for ( i, upgrade) in upgrades. into_iter ( ) . enumerate ( ) {
0 commit comments