1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-28 08:00:14 -05:00

Staffs: picking up staff at Crazy Place while holding staff places other staff at Crazy Place

This commit is contained in:
Jbleezy
2023-03-30 17:11:31 -07:00
parent 0ef0577fea
commit 726e916709
2 changed files with 33 additions and 1 deletions

View File

@ -230,6 +230,7 @@
* Upgrade only requires collecting souls in The Crazy Place
* Can no longer collect souls in The Crazy Place from staff kills
* Can collect souls in The Crazy Place after upgrading to fill 5% of max ammo per soul
* Picking up a staff at The Crazy Place while holding a staff places the other staff at The Crazy Place
* Fixed triggers for inserting and picking up staffs in The Crazy Place
* Fixed being able to carry multiple staffs by picking up a staff with staff revive weapon out
* Get full ammo when initially picked up after upgrading (normally missing one clip)

View File

@ -295,8 +295,17 @@ watch_for_player_pickup_staff()
a_weapons = player getweaponslistprimaries();
n_max_other_weapons = get_player_weapon_limit( player ) - 1;
if ( a_weapons.size > n_max_other_weapons || issubstr( weapon_drop, "staff" ) )
if ( issubstr( weapon_drop, "staff" ) )
{
n_index = get_staff_enum_from_element_weapon( weapon_drop );
e_staff_standard = get_staff_info_from_element_index( n_index );
e_staff_standard_upgraded = e_staff_standard.upgrade;
e_staff_standard_upgraded.charge_trigger notify( "trigger", player );
}
else if ( a_weapons.size > n_max_other_weapons )
{
player takeweapon( weapon_drop );
}
player thread watch_staff_ammo_reload();
self ghost();
@ -322,6 +331,28 @@ watch_for_player_pickup_staff()
}
}
get_staff_enum_from_element_weapon(weapon_drop)
{
if (isSubStr(weapon_drop, "fire"))
{
return 1;
}
else if (isSubStr(weapon_drop, "air"))
{
return 2;
}
else if (isSubStr(weapon_drop, "lightning"))
{
return 3;
}
else if (isSubStr(weapon_drop, "water"))
{
return 4;
}
return 1;
}
can_pickup_staff()
{
b_has_staff = self player_has_staff();