From a897b9582288c5f3c1d22957f46ea8cb5bf96489 Mon Sep 17 00:00:00 2001 From: Barichello Date: Sun, 16 Jan 2022 15:27:24 -0300 Subject: Add DEV functions to amped hardpoint --- .../scripts/vscripts/gamemodes/_gamemode_cp.nut | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'Northstar.CustomServers') 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 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") + ) + } +} -- cgit v1.2.3