11use flecs_ecs:: core:: { World , WorldGet } ;
22use hyperion_inventory:: PlayerInventory ;
3- use hyperion_item:: builder:: { AttackDamage , Color , ItemBuilder } ;
3+ use hyperion_item:: builder:: { AttackDamage , BookBuilder , Color , ItemBuilder } ;
44use valence_protocol:: ItemKind ;
55
66use crate :: { Handles , Rank , Team } ;
@@ -22,7 +22,8 @@ pub const MAIN_SLOT: u16 = 0;
2222pub const PICKAXE_SLOT : u16 = 1 ;
2323pub const BLOCK_SLOT : u16 = 2 ;
2424pub 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 ;
2627
2728impl Rank {
2829 pub fn apply_inventory (
@@ -32,9 +33,34 @@ impl Rank {
3233 world : & World ,
3334 build_count : i8 ,
3435 ) {
36+ inventory. clear ( ) ;
3537 let upgrade_not_available = ItemBuilder :: new ( ItemKind :: GrayDye ) ;
3638
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) ;
3864
3965 let color = match team {
4066 Team :: Red => Color ( 255 , 0 , 0 ) ,
@@ -49,7 +75,7 @@ impl Rank {
4975
5076 inventory. set_boots ( boots) ;
5177
52- let upgrades = [ "Speed" , "Vision" , " Health", "Armor" , "Damage" ] ;
78+ let upgrades = [ "Speed" , "Health" , "Armor" , "Damage" ] ;
5379
5480 world. get :: < & Handles > ( |handles| {
5581 for ( i, upgrade) in upgrades. into_iter ( ) . enumerate ( ) {
0 commit comments