diff options
author | Barichello <artur@barichello.me> | 2022-01-16 15:27:24 -0300 |
---|---|---|
committer | Barichello <artur@barichello.me> | 2022-01-16 16:00:13 -0300 |
commit | a897b9582288c5f3c1d22957f46ea8cb5bf96489 (patch) | |
tree | 13646a1a45b1398c52794c93e449cc5fc299dac1 /Northstar.CustomServers | |
parent | 70cba8a0cecc28d10a052144e3f2516c2f0f0d21 (diff) | |
download | NorthstarMods-a897b9582288c5f3c1d22957f46ea8cb5bf96489.tar.gz NorthstarMods-a897b9582288c5f3c1d22957f46ea8cb5bf96489.zip |
Add DEV functions to amped hardpoint
Diffstat (limited to 'Northstar.CustomServers')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut index 9b243927..64fd79b4 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut @@ -2,6 +2,7 @@ untyped global function GamemodeCP_Init global function RateSpawnpoints_CP +global function DEV_PrintHardpointsInfo // needed for sh_gamemode_cp_dialogue global array<entity> HARDPOINTS @@ -453,3 +454,34 @@ void function OnHardpointLeft( entity trigger, entity player ) else hardpoint.militiaCappers.remove( hardpoint.militiaCappers.find( player ) ) } + +string function CaptureStateToString( int state ) +{ + switch ( state ) + { + case CAPTURE_POINT_STATE_UNASSIGNED: + return "UNASSIGNED" + case CAPTURE_POINT_STATE_HALTED: + return "HALTED" + case CAPTURE_POINT_STATE_CAPTURED: + return "CAPTURED" + case CAPTURE_POINT_STATE_AMPING: + return "AMPING" + case CAPTURE_POINT_STATE_AMPED: + return "AMPED" + } + return "UNKNOWN" +} + +void function DEV_PrintHardpointsInfo() +{ + foreach (entity hardpoint in HARDPOINTS) + { + printt( + "Hardpoint:", hardpoint.kv.hardpointGroup, + "|Team:", Dev_TeamIDToString(hardpoint.GetTeam()), + "|State:", CaptureStateToString(hardpoint.GetHardpointState()), + "|Progress:", GetGlobalNetFloat("objective" + hardpoint.kv.hardpointGroup + "Progress") + ) + } +} |