Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FAK Upgrades for the BPX Sight System #40

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions zscript/accensus/items/FAK Upgrades/FAK Peppergrinder.zs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@ class FAK_Oddball_Pump : FAK_Upgrade
override int HasUpgrade(HDWeapon wpn, HDPickup pkp) { return wpn.WeaponStatus[0] & 8 > 0; }
}

class FAK_BPX_ReflexSight : FAK_Upgrade
{
override string GetItem() { return "HDBPX"; }
override string GetDisplayName() { return "Reflex Sight"; }
override int GetCost() { return 0; }
override void DoUpgrade(HDWeapon wpn, HDPickup pkp) { wpn.WeaponStatus[6] = 1; }
override int HasUpgrade(HDWeapon wpn, HDPickup pkp) { return wpn.WeaponStatus[6] == 1 ? HUResult_Installed : HUResult_Unique; }
override void DoDowngrade(HDWeapon wpn, HDPickup pkp) { wpn.WeaponStatus[6] = 0; }
}

class FAK_BPX_Scope : FAK_Upgrade
{
override string GetItem() { return "HDBPX"; }
override string GetDisplayName() { return "Scope"; }
override void DoUpgrade(HDWeapon wpn, HDPickup pkp) { wpn.WeaponStatus[6] = 2; }
override int HasUpgrade(HDWeapon wpn, HDPickup pkp) { return wpn.WeaponStatus[6] == 2 ? HUResult_Installed : HUResult_Unique; }
override void DoDowngrade(HDWeapon wpn, HDPickup pkp) { wpn.WeaponStatus[6] = 0; GiveCore(wpn.owner, 0.25); }
}

class FAK_HLAR_SelectFire : FAK_Upgrade
{
override string GetItem() { return "HDHLAR"; }
Expand Down