From 36ce85d5b9117d12fd6b46c131b10b62b7ce789e Mon Sep 17 00:00:00 2001 From: Kiri Date: Wed, 22 Mar 2023 23:10:37 -0700 Subject: [PATCH] More TODOs done. --- TODO.md | 10 ++++++---- zscript.zs | 22 +++++++++++++++++++++- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/TODO.md b/TODO.md index 3dea199..df6a32e 100644 --- a/TODO.md +++ b/TODO.md @@ -6,6 +6,10 @@ n Deployed sprites for every angle (ceiling) n - Showing charge level x flat sprite? Advantages: One direction, can probably be used on ceiling and wall. x - Showing charge level +x Sparks +x Debris when destroyed +x Show remaining batteries as ammo +x Switching to mag manager goes to batteries screen - Pickup sprites for every angle - Spool of wire, a tool, and some electical tape @@ -13,9 +17,7 @@ x - Showing charge level - 1st-person sprites - Wire cutters and electrical tape -x Sparks -x Debris when destroyed +- Help screen -- Switching to mag manager goes to batteries screen +- Add (or make sure) loadout code in loadout editor -- Show remaining batteries as ammo diff --git a/zscript.zs b/zscript.zs index 8bbf52d..d5973aa 100644 --- a/zscript.zs +++ b/zscript.zs @@ -263,7 +263,7 @@ class JumperCablesUsable : HDWeapon if(PressingFire()) { SetWeaponState("deploy"); } - A_WeaponReady(WRF_NOFIRE | WRF_ALLOWRELOAD | WRF_ALLOWUSER4); + A_WeaponReady(WRF_NOFIRE | WRF_ALLOWUSER3); // USER3 = MagManager. FLineTraceData linetraceData; DoLineTrace(HDPlayerPawn(invoker.owner), linetraceData); @@ -293,6 +293,10 @@ class JumperCablesUsable : HDWeapon } goto ready; + user3: + #### A 0 A_MagManager("HDBattery"); + goto ready; + } action void SpawnParticleForLineTrace(HDPlayerPawn pawn, FLineTraceData linetraceData) @@ -501,5 +505,21 @@ class JumperCablesUsable : HDWeapon } } } + + override void DrawHUDStuff(HDStatusBar statusBar, HDWeapon weapon, HDPlayerPawn pawn) + { + // Copied and modified from ThunderBuster display. + if(statusBar.hudlevel == 1) { + statusBar.DrawBattery( + -54, -4, + statusBar.DI_SCREEN_CENTER_BOTTOM, + reloadorder : true); + statusBar.DrawNum( + pawn.CountInv("HDBattery"), + -46, -8, + statusBar.DI_SCREEN_CENTER_BOTTOM); + } + } + }