From 5efea863be7fb419e4d2178d5a4dc6845b5763b0 Mon Sep 17 00:00:00 2001
From: Aristeas <94058548+ari-steas@users.noreply.github.com>
Date: Tue, 1 Apr 2025 20:14:56 -0500
Subject: [PATCH] Add RocketCore Gamemode
---
.../Data/Prefabs/RocketBall.sbc | 2345 +++++++++++++++++
.../Data/Prefabs/RocketBall.sbcB5 | Bin 0 -> 23619 bytes
.../RocketCore/RocketCoreGamemode.cs | 305 +++
.../GameModes/RocketCore/RocketCoreHud.cs | 172 ++
.../TeamDeathMatch/TeamDeathmatchGamemode.cs | 2 +-
.../Scripts/SUGMA/GameState/PointTracker.cs | 17 +-
.../HeartNetworking/Custom/PointsPacket.cs | 6 +-
.../Scripts/SUGMA/SUGMA_SessionComponent.cs | 6 +-
.../Data/Scripts/SUGMA/Utilities/SUtils.cs | 3 +
...tarCore SUGMA Gamemodes.csproj.DotSettings | 2 +-
10 files changed, 2843 insertions(+), 15 deletions(-)
create mode 100644 Gamemode Mods/StarCore SUGMA Gamemodes/Data/Prefabs/RocketBall.sbc
create mode 100644 Gamemode Mods/StarCore SUGMA Gamemodes/Data/Prefabs/RocketBall.sbcB5
create mode 100644 Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameModes/RocketCore/RocketCoreGamemode.cs
create mode 100644 Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameModes/RocketCore/RocketCoreHud.cs
diff --git a/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Prefabs/RocketBall.sbc b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Prefabs/RocketBall.sbc
new file mode 100644
index 000000000..88a166f42
--- /dev/null
+++ b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Prefabs/RocketBall.sbc
@@ -0,0 +1,2345 @@
+
+
+
+
+
+ Aristeas
+
+
+
+ 108055600967661582
+ CastShadows InScene
+ 108055600967661582
+
+
+
+
+
+ 0.01681527
+ -0.689737439
+ 0.0471778736
+ 0.722325265
+
+
+
+
+
+
+ MyModStorageComponent
+
+
+
+ -
+ ba5bfb16-27fe-4f83-8e1b-9fe04ed919d8
+
+
+
+
+
+
+
+
+ Large
+
+
+ LargeBlockSmallGenerator
+ 127494882478367085
+
+ Weldless
+ 144115188075855874
+
+
+
+ MyInventoryBase
+
+ true
+
+ 0
+ 1
+ 9223372036854.775807
+ 2147483647
+
+ CanReceive
+ false
+
+
+
+ MyTimerComponent
+
+ true
+ 0
+ 0
+ false
+ false
+ Frame100
+ 0
+ 900
+ false
+
+
+
+
+ false
+ true
+ true
+ true
+ 1
+ true
+ 1
+
+
+ LargeBlockBeacon
+ 117397356654221988
+
+
+
+ Weldless
+ 144115188075855874
+ false
+ true
+ true
+ true
+ 1
+ true
+ 200000
+ THE BALL
+
+
+ LargeBlockCockpitSeat
+ 117809699502817722
+
+
+
+ 144115188075855874
+
+
+
+ MyInventoryBase
+
+ true
+
+ 0
+ 1
+ 9223372036854.775807
+ 2147483647
+
+ CanReceive CanSend
+ false
+
+
+
+ MyMultiTextPanelComponent
+
+
+
+ 0
+
+ 1
+ NONE
+
+ 4294967295
+ 255
+ 255
+ 255
+ 255
+ 255
+ 255
+ 255
+
+
+ 4278190080
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 255
+
+ 0
+ SCRIPT
+ TSS_ArtificialHorizon
+ 2
+ true
+
+ 4288108544
+ 0
+ 88
+ 151
+ 0
+ 88
+ 151
+ 255
+
+
+ 4294962611
+ 179
+ 237
+ 255
+ 179
+ 237
+ 255
+ 255
+
+
+ 0
+
+
+
+ 0
+
+ 1
+ NONE
+
+ 4294967295
+ 255
+ 255
+ 255
+ 255
+ 255
+ 255
+ 255
+
+
+ 4278190080
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 255
+
+ 0
+ SCRIPT
+ TSS_EnergyHydrogen
+ 2
+ true
+
+ 4288108544
+ 0
+ 88
+ 151
+ 0
+ 88
+ 151
+ 255
+
+
+ 4294962611
+ 179
+ 237
+ 255
+ 179
+ 237
+ 255
+ 255
+
+
+ 0
+
+
+
+ 0
+
+ 1
+ NONE
+
+ 4294967295
+ 255
+ 255
+ 255
+ 255
+ 255
+ 255
+ 255
+
+
+ 4278190080
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 255
+
+ 0
+ SCRIPT
+ TSS_Gravity
+ 2
+ true
+
+ 4288108544
+ 0
+ 88
+ 151
+ 0
+ 88
+ 151
+ 255
+
+
+ 4294962611
+ 179
+ 237
+ 255
+ 179
+ 237
+ 255
+ 255
+
+
+ 0
+
+
+
+ 0
+
+ 1
+ NONE
+
+ 4294967295
+ 255
+ 255
+ 255
+ 255
+ 255
+ 255
+ 255
+
+
+ 4278190080
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 255
+
+ 0
+
+ 2
+
+ 4288108544
+ 0
+ 88
+ 151
+ 0
+ 88
+ 151
+ 255
+
+
+ 4294962611
+ 179
+ 237
+ 255
+ 179
+ 237
+ 255
+ 255
+
+
+ 0
+
+
+
+ 0
+
+ 1
+ NONE
+
+ 4294967295
+ 255
+ 255
+ 255
+ 255
+ 255
+ 255
+ 255
+
+
+ 4278190080
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 255
+
+ 0
+ SCRIPT
+ TSS_ClockAnalog
+ 2
+ true
+
+ 4288108544
+ 0
+ 88
+ 151
+ 0
+ 88
+ 151
+ 255
+
+
+ 4294962611
+ 179
+ 237
+ 255
+ 179
+ 237
+ 255
+ 255
+
+
+ 0
+
+
+
+ 0
+
+ 1
+ NONE
+
+ 4294967295
+ 255
+ 255
+ 255
+ 255
+ 255
+ 255
+ 255
+
+
+ 4278190080
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 255
+
+ 0
+
+ 2
+
+ 4288108544
+ 0
+ 88
+ 151
+ 0
+ 88
+ 151
+ 255
+
+
+ 4294962611
+ 179
+ 237
+ 255
+ 179
+ 237
+ 255
+ 255
+
+
+ 0
+
+
+
+
+
+
+
+ false
+ true
+ true
+ true
+ 1
+ false
+
+ Character
+
+
+
+
+
+
+ Character
+
+
+
+
+
+ Character
+
+
+
+
+
+
+
+
+
+ 0.322268754
+ 0.740566134
+ 0.339292675
+ -0.4822708
+
+
+
+ false
+ 0
+
+
+ 0
+ false
+ 0
+
+ 954916
+
+
+ LargeBlockGyro
+ 91430459503144092
+
+
+
+ 144115188075855874
+ false
+ true
+ true
+ true
+ 1
+ true
+ 0.01
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ AQD_LG_IonThrusterS_Armored
+ 91904584980615575
+
+
+
+ Weldless
+
+
+
+ MyTimerComponent
+
+ true
+ 0
+ 0
+ true
+ false
+ Frame100
+ 0
+ 100
+ false
+
+
+
+ MyModStorageComponent
+
+
+
+ -
+ 74de02b3-27f9-4960-b1c4-27351f2b06d1
+ [FlameColors]
+0.27/0.41/0.65/0.75
+0.27/0.41/0.65/0.75
+False
+Linked
+True
+
+
+
+
+
+
+
+
+ false
+ true
+ true
+ true
+ 14
+ true
+
+
+ AQD_LG_IonThrusterS_Armored
+ 131191130628960182
+
+
+
+ Weldless
+
+
+
+ MyTimerComponent
+
+ true
+ 0
+ 0
+ true
+ false
+ Frame100
+ 0
+ 100
+ false
+
+
+
+ MyModStorageComponent
+
+
+
+ -
+ 74de02b3-27f9-4960-b1c4-27351f2b06d1
+ [FlameColors]
+0.27/0.41/0.65/0.75
+0.27/0.41/0.65/0.75
+False
+Linked
+True
+
+
+
+
+
+
+
+
+ false
+ true
+ true
+ true
+ 13
+ true
+
+
+ AQD_LG_IonThrusterS_Armored
+ 120284295702293143
+
+
+
+ Weldless
+
+
+
+ MyTimerComponent
+
+ true
+ 0
+ 0
+ true
+ false
+ Frame100
+ 0
+ 100
+ false
+
+
+
+ MyModStorageComponent
+
+
+
+ -
+ 74de02b3-27f9-4960-b1c4-27351f2b06d1
+ [FlameColors]
+0.27/0.41/0.65/0.75
+0.27/0.41/0.65/0.75
+False
+Linked
+True
+
+
+
+
+
+
+
+
+ false
+ true
+ true
+ true
+ 10
+ true
+
+
+ AQD_LG_IonThrusterS_Armored
+ 97962770887056127
+
+
+
+ Weldless
+
+
+
+ MyTimerComponent
+
+ true
+ 0
+ 0
+ true
+ false
+ Frame100
+ 0
+ 100
+ false
+
+
+
+ MyModStorageComponent
+
+
+
+ -
+ 74de02b3-27f9-4960-b1c4-27351f2b06d1
+ [FlameColors]
+0.27/0.41/0.65/0.75
+0.27/0.41/0.65/0.75
+False
+Linked
+True
+
+
+
+
+
+
+
+
+ false
+ true
+ true
+ true
+ 9
+ true
+
+
+ AQD_LG_IonThrusterS_Armored
+ 91747736122410389
+
+
+
+ Weldless
+
+
+
+ MyTimerComponent
+
+ true
+ 0
+ 0
+ true
+ false
+ Frame100
+ 0
+ 100
+ false
+
+
+
+ MyModStorageComponent
+
+
+
+ -
+ 74de02b3-27f9-4960-b1c4-27351f2b06d1
+ [FlameColors]
+0.27/0.41/0.65/0.75
+0.27/0.41/0.65/0.75
+False
+Linked
+True
+
+
+
+
+
+
+
+
+ false
+ true
+ true
+ true
+ 12
+ true
+
+
+ AQD_LG_IonThrusterS_Armored
+ 112660050684883642
+
+
+
+ Weldless
+
+
+
+ MyTimerComponent
+
+ true
+ 0
+ 0
+ true
+ false
+ Frame100
+ 0
+ 100
+ false
+
+
+
+ MyModStorageComponent
+
+
+
+ -
+ 74de02b3-27f9-4960-b1c4-27351f2b06d1
+ [FlameColors]
+0.27/0.41/0.65/0.75
+0.27/0.41/0.65/0.75
+False
+Linked
+True
+
+
+
+
+
+
+
+
+ false
+ true
+ true
+ true
+ 11
+ true
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Base
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlopedCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorInvCorner2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorCorner
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorCorner2Tip
+
+
+
+ Neon_Colorable_Lights
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorBlock
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ LargeBlockArmorSlope2Tip
+
+
+
+ Weldless
+
+
+ THE BALL
+ false
+ false
+ false
+ false
+ 0
+
+
+
+
+ None
+ 0
+ 76561198274566684
+ 0
+
+
+
\ No newline at end of file
diff --git a/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Prefabs/RocketB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Q
zr)Fke(9qn_*tn>nVez7-MT;(IY+iV+{Ss#^%(c1Zcld@caW=o;CC(>2dP{5F+-bX8
zT6S$*u@7G2{NQQ7*jLxM`%dQb#iacp#dir07cea)D
K@D{`D!2bZMN5n(`
literal 0
HcmV?d00001
diff --git a/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameModes/RocketCore/RocketCoreGamemode.cs b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameModes/RocketCore/RocketCoreGamemode.cs
new file mode 100644
index 000000000..9b32138bf
--- /dev/null
+++ b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameModes/RocketCore/RocketCoreGamemode.cs
@@ -0,0 +1,305 @@
+using SC.SUGMA.API;
+using SC.SUGMA.GameState;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using RichHudFramework;
+using VRage.Game.ModAPI;
+using SC.SUGMA.Utilities;
+using Sandbox.ModAPI;
+using Sandbox.Game.Entities;
+using Sandbox.Game;
+using VRageMath;
+using VRage.ModAPI;
+
+namespace SC.SUGMA.GameModes.RocketCore
+{
+ internal class RocketCoreGamemode : GamemodeBase
+ {
+ public static double MatchDuration = 20;
+
+ ///
+ /// Lists currently tracked factions.
+ ///
+ public readonly List TrackedFactions = new List();
+ public List InFactions { get; private set; } = new List();
+ protected IMyFaction _winningFaction;
+
+ public PointTracker PointTracker;
+
+ protected ShareTrackApi ShareTrackApi => SUGMA_SessionComponent.I.ShareTrackApi;
+ public MatchTimer MatchTimer => SUGMA_SessionComponent.I.GetComponent("MatchTimer");
+ public Dictionary FactionGoals = new Dictionary();
+ private bool _waitingForBallSpawn = false;
+ public override string ReadableName { get; internal set; } = "RocketCore";
+
+ public IMyCubeGrid BallEntity = null;
+
+ public override string Description { get; internal set; } =
+ "Score by pushing the ball into the enemy team's goal! Grids are made invincible.";
+
+ public RocketCoreGamemode()
+ {
+ ArgumentParser += new ArgumentParser(
+ new ArgumentParser.ArgumentDefinition(
+ time => double.TryParse(time, out MatchDuration),
+ "t",
+ "match-time",
+ "Match time, in minutes.")
+ );
+ }
+
+ public override void Close()
+ {
+ StopRound();
+ }
+
+ public override void UpdateActive()
+ {
+ if (PointTracker == null || MatchTimer == null ||
+ TrackedFactions == null) // ten billion nullchecks of aristeas
+ return;
+
+ if (MatchTimer.IsMatchEnded && MyAPIGateway.Session.IsServer)
+ StopRound();
+
+ if (_waitingForBallSpawn)
+ return;
+
+ foreach (var zoneSet in FactionGoals)
+ {
+ if (zoneSet.Value.ContainedGrids.Count <= 0)
+ continue;
+ // Goal was made
+ PointTracker.AddFactionPoints(zoneSet.Key, -1);
+ SUGMA_SessionComponent.I.GetComponent("rocHud")?.GoalScored(zoneSet.Key);
+
+ if (_winningFaction != null)
+ break;
+
+ SpawnBall();
+ Log.Info($"Goal was scored against {zoneSet.Key.Name}! New points: {PointTracker.GetFactionPoints(zoneSet.Key)}");
+
+ _waitingForBallSpawn = true;
+ }
+ }
+
+ public override void StartRound(string[] arguments = null)
+ {
+ _waitingForBallSpawn = false;
+ _winningFaction = null;
+ PointTracker = new PointTracker(3, 0);
+ PointTracker.OnFactionWin += OnFactionLose;
+
+ SUGMA_SessionComponent.I.UnregisterComponent("ROCPointTracker");
+ if (!MyAPIGateway.Utilities.IsDedicated)
+ SUGMA_SessionComponent.I.UnregisterComponent("rocHud");
+
+ foreach (var grid in ShareTrackApi.GetTrackedGrids())
+ {
+ var faction = PlayerTracker.I.GetGridFaction(grid);
+ if (faction == null || !ShareTrackApi.IsGridAlive(grid))
+ continue;
+
+ if (!TrackedFactions.Contains(faction))
+ TrackedFactions.Add(faction);
+
+ List subGrids = new List();
+ grid.GetGridGroup(GridLinkTypeEnum.Physical).GetGrids(subGrids);
+ foreach (var subGrid in subGrids)
+ {
+ ((MyCubeGrid)subGrid).Immune = true;
+ ((MyCubeGrid)subGrid).DestructibleBlocks = false;
+ }
+ }
+
+ if (TrackedFactions.Count <= 1)
+ {
+ MyAPIGateway.Utilities.ShowNotification("There aren't any combatants, idiot!", 10000, "Red");
+ StopRound();
+ return;
+ }
+
+ SUGMA_SessionComponent.I.RegisterComponent("ROCPointTracker", PointTracker);
+
+ var factionNames = new List();
+ var factionSpawns = SUtils.GetFactionSpawns();
+ foreach (var faction in TrackedFactions)
+ {
+ factionNames.Add($"|{faction.Tag}|");
+ foreach (var compareFaction in TrackedFactions)
+ {
+ if (faction == compareFaction)
+ continue;
+
+ MyAPIGateway.Session.Factions.DeclareWar(faction.FactionId, compareFaction.FactionId);
+ //MyAPIGateway.Utilities.ShowMessage("ROC", $"Declared war between {factionKvp.Key.Name} and {faction.Name}");
+ }
+
+ if (factionSpawns.ContainsKey(faction))
+ {
+ var zone = new SphereZone(
+ factionSpawns[faction].GetPosition() - factionSpawns[faction].GetPosition().Normalized() * 2500,
+ 750)
+ {
+ SphereDrawColor = faction.CustomColor.ColorMaskToRgb().SetAlphaPct(0.25f),
+ GridFilter = Array.Empty()
+ };
+ FactionGoals[faction] = zone;
+ SUGMA_SessionComponent.I.RegisterComponent($"RocZone{faction.FactionId}", zone);
+ }
+ }
+
+ InFactions = new List(TrackedFactions);
+
+ base.StartRound(arguments);
+ MyAPIGateway.Utilities.ShowNotification("Combatants: " + string.Join(" vs ", factionNames), 10000, "Red");
+ MatchTimer.Start(MatchDuration);
+
+ if (!MyAPIGateway.Utilities.IsDedicated)
+ SUGMA_SessionComponent.I.RegisterComponent("rocHud", new RocketCoreHud(this));
+
+ SpawnBall();
+
+ Log.Info("Started a ROC match." +
+ $"\n- Combatants: {string.Join(" vs ", factionNames)}");
+ }
+
+ private void OnFactionLose(IMyFaction loser)
+ {
+ foreach (var grid in ShareTrackApi.GetTrackedGrids())
+ {
+ var faction = PlayerTracker.I.GetGridFaction(grid);
+ if (faction == null || !ShareTrackApi.IsGridAlive(grid) || faction != loser) continue;
+
+ List subGrids = new List();
+ grid.GetGridGroup(GridLinkTypeEnum.Physical).GetGrids(subGrids);
+ foreach (var subGrid in subGrids)
+ {
+ ((MyCubeGrid)subGrid).Immune = false;
+ ((MyCubeGrid)subGrid).DestructibleBlocks = true;
+ }
+
+ FactionGoals[loser].IsVisible = false;
+ InFactions.Remove(loser);
+ }
+
+ if (InFactions.Count > 1) return;
+
+ _winningFaction = InFactions[0];
+ StopRound();
+ }
+
+ public override void StopRound()
+ {
+ BallEntity?.Close();
+ bool setWinnerFromArgs = false;
+ foreach (var arg in Arguments)
+ {
+ if (arg.StartsWith("win"))
+ {
+ long factionId;
+ long.TryParse(arg.Remove(0, 3), out factionId);
+
+ _winningFaction = MyAPIGateway.Session.Factions.TryGetFactionById(factionId);
+ setWinnerFromArgs = true;
+ Log.Info($"Winner in arguments found: {factionId} ({_winningFaction?.Name})");
+ break;
+ }
+ }
+
+ if (!setWinnerFromArgs && MyAPIGateway.Session.IsServer)
+ {
+ Arguments = Arguments.Concat(new[] { $"win{_winningFaction?.FactionId ?? -1}" }).ToArray();
+ }
+
+ SUGMA_SessionComponent.I.GetComponent("rocHud")?.MatchEnded(_winningFaction);
+
+ foreach (var factionKvp in TrackedFactions)
+ {
+ foreach (var faction in TrackedFactions)
+ {
+ if (faction == factionKvp)
+ continue;
+
+ MyAPIGateway.Session.Factions.SendPeaceRequest(factionKvp.FactionId, faction.FactionId);
+ MyAPIGateway.Session.Factions.AcceptPeace(faction.FactionId, factionKvp.FactionId);
+ }
+ }
+
+ // Reset destructibility
+ foreach (var grid in ShareTrackApi.GetTrackedGrids())
+ {
+ List subGrids = new List();
+ grid.GetGridGroup(GridLinkTypeEnum.Physical).GetGrids(subGrids);
+ foreach (var subGrid in subGrids)
+ {
+ ((MyCubeGrid)subGrid).Immune = false;
+ ((MyCubeGrid)subGrid).DestructibleBlocks = true;
+ }
+ }
+
+ foreach (var zone in FactionGoals)
+ SUGMA_SessionComponent.I.UnregisterComponent(zone.Value.ComponentId);
+
+ MatchTimer?.Stop();
+ SUGMA_SessionComponent.I.UnregisterComponent("PointTracker");
+
+ base.StopRound();
+ InFactions.Clear();
+ TrackedFactions.Clear();
+ FactionGoals.Clear();
+ PointTracker = null;
+ }
+
+ protected void SpawnBall()
+ {
+ if (!MyAPIGateway.Session.IsServer)
+ return;
+
+ BallEntity?.Close();
+ MyVisualScriptLogicProvider.PrefabSpawned += PrefabSpawned;
+ MyVisualScriptLogicProvider.SpawnPrefab("THE BALL", SUtils.RandVector().Normalized() * 250, Vector3D.Forward, Vector3D.Up, entityName: "SugmaTheBall");
+ }
+
+ private void PrefabSpawned(string entityName)
+ {
+ try
+ {
+ IMyEntity ballEnt;
+ if (!MyAPIGateway.Entities.TryGetEntityByName(entityName, out ballEnt))
+ throw new Exception("Could not find ball entity!");
+
+ BallEntity = (IMyCubeGrid) ballEnt;
+ SUGMA_SessionComponent.I.ShareTrackApi.TrackGrid(BallEntity);
+
+ MyVisualScriptLogicProvider.PrefabSpawned -= PrefabSpawned;
+ Log.Info("RocketCoreGamemode spawned ball entity " + entityName + " at " + BallEntity.GetPosition());
+
+ var array = new[]
+ {
+ BallEntity
+ };
+
+ foreach (var zone in FactionGoals)
+ zone.Value.GridFilter = array;
+ _waitingForBallSpawn = false;
+ }
+ catch (Exception ex)
+ {
+ Log.Exception(ex, typeof(RocketCoreGamemode));
+ }
+ }
+
+ internal override void DisplayWinMessage()
+ {
+ if (_winningFaction == null)
+ {
+ MyAPIGateway.Utilities.ShowNotification("YOU ARE ALL LOSERS.", 10000, "Red");
+ return;
+ }
+
+ MyAPIGateway.Utilities.ShowNotification($"A WINNER IS [{_winningFaction?.Name}]!", 10000);
+ }
+ }
+}
diff --git a/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameModes/RocketCore/RocketCoreHud.cs b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameModes/RocketCore/RocketCoreHud.cs
new file mode 100644
index 000000000..3b4270e2d
--- /dev/null
+++ b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameModes/RocketCore/RocketCoreHud.cs
@@ -0,0 +1,172 @@
+using RichHudFramework.Client;
+using RichHudFramework.UI;
+using RichHudFramework.UI.Client;
+using Sandbox.Game.Entities;
+using SC.SUGMA.GameModes.Elimination;
+using SC.SUGMA.GameState;
+using SC.SUGMA.Utilities;
+using System;
+using System.Collections.Generic;
+using Sandbox.ModAPI;
+using VRage.Game.ModAPI;
+using VRageMath;
+
+namespace SC.SUGMA.GameModes.RocketCore
+{
+ internal class RocketCoreHud : ComponentBase
+ {
+ private int _closeTime = -1;
+ private readonly RocketCoreGamemode _gamemode;
+ public RocHud_Window Window;
+
+ public MySoundPair CaptureSound = new MySoundPair("SUGMA_CaptureSound_TF2");
+ private List _zoneGpses = new List();
+
+ public RocketCoreHud(RocketCoreGamemode gamemode)
+ {
+ _gamemode = gamemode;
+ }
+
+ public override void Init(string id)
+ {
+ base.Init(id);
+
+ if (!RichHudClient.Registered)
+ throw new Exception("RichHudAPI was not initialized in time!");
+
+ Window = new RocHud_Window(HudMain.HighDpiRoot, _gamemode);
+ foreach (var zone in _gamemode.FactionGoals)
+ {
+ var gps = MyAPIGateway.Session.GPS.Create($"{zone.Key.Name} Goal", "", zone.Value.Sphere.Center, true,
+ false);
+ MyAPIGateway.Session.GPS.AddLocalGps(gps);
+ _zoneGpses.Add(gps);
+ }
+ }
+
+ public override void Close()
+ {
+ HudMain.HighDpiRoot.RemoveChild(Window);
+ foreach (var gps in _zoneGpses)
+ MyAPIGateway.Session.GPS.RemoveLocalGps(gps);
+ }
+
+ public override void UpdateTick()
+ {
+ Window.Update();
+ if (_closeTime > 0)
+ _closeTime--;
+
+ if (_closeTime == 0) SUGMA_SessionComponent.I.UnregisterComponent(ComponentId);
+ }
+
+ public void MatchEnded(IMyFaction winner)
+ {
+ Window.MatchEnded(winner);
+ _closeTime = HudConstants.MatchResultsVisibleTicks;
+ }
+
+ public void GoalScored(IMyFaction faction)
+ {
+ MyAPIGateway.Utilities.ShowNotification($"Goal was scored against {faction.Name}!", 10000);
+ SUtils.PlaySound(CaptureSound);
+ }
+ }
+
+ internal class RocHud_Window : HudElementBase
+ {
+ private readonly RocketCoreGamemode _gamemode;
+
+ private bool _matchEnded;
+ private readonly MatchTimer _timer;
+ private readonly LabelBox _timerLabel;
+
+ private readonly Dictionary _factionLabels = new Dictionary();
+
+ public RocHud_Window(HudParentBase parent, RocketCoreGamemode gamemode) : base(parent)
+ {
+ _gamemode = gamemode;
+ _timer = gamemode.MatchTimer;
+
+ if (_gamemode == null)
+ throw new Exception("Null gamemode!");
+ if (_timer == null)
+ throw new Exception("Null match timer!");
+
+ Size = new Vector2(100, 24);
+
+ Offset = new Vector2(0, 515); // Regardless of screen size, this is out of 1920x1080
+
+ _timerLabel = new LabelBox(this)
+ {
+ ParentAlignment = ParentAlignments.Inner | ParentAlignments.Top,
+ Height = 24,
+ DimAlignment = DimAlignments.Height,
+ Text = "20:00",
+ TextPadding = new Vector2(2.5f, 0),
+ FitToTextElement = false,
+ Color = HudConstants.HudBackgroundColor
+ };
+
+ var idx = 0;
+ foreach (var faction in _gamemode.TrackedFactions)
+ {
+ _factionLabels[faction] = new LabelBox(this)
+ {
+ Format = GlyphFormat.White.WithColor(faction.CustomColor.ColorMaskToRgb()).WithSize(2)
+ .WithAlignment(TextAlignment.Center),
+ ParentAlignment =
+ ParentAlignments.InnerV |
+ (idx % 2 == 0 ? ParentAlignments.Right : ParentAlignments.Left) |
+ ParentAlignments.Top,
+ Color = HudConstants.HudBackgroundColor,
+ Offset = new Vector2(0, (int)-Math.Floor(idx / 2f) * (24 + 5)),
+ Text = $"{_gamemode.PointTracker.StartingPoints} GOALS LEFT"
+ };
+ idx++;
+ }
+
+ _gamemode.PointTracker.OnPointsUpdated += OnPointsUpdated;
+ }
+
+ private void OnPointsUpdated(IMyFaction faction, int points)
+ {
+ if (!_factionLabels.ContainsKey(faction))
+ return;
+
+ _factionLabels[faction].Text = $"{points} GOAL{(points == 1 ? "" : "S")} LEFT";
+ }
+
+ public void Update()
+ {
+ if (_matchEnded)
+ return;
+
+ _timerLabel.Text = _timer.RemainingTimeString();
+ }
+
+ public void MatchEnded(IMyFaction winner)
+ {
+ _matchEnded = true;
+ var winnerPoints = 0;
+
+ _timerLabel?.Unregister();
+ foreach (var label in _factionLabels)
+ label.Value.Unregister();
+
+ var winnerLabel = new LabelBox(_timerLabel)
+ {
+ Text = winner != null
+ ? $"A WINNER IS {winner.Name}."
+ : "YOU ARE ALL LOSERS",
+ ParentAlignment = ParentAlignments.Bottom,
+ Height = EliminationHud_TeamBanner.BaseHeight,
+ TextPadding = new Vector2(2.5f, 0),
+ Color = HudConstants.HudBackgroundColor
+ };
+
+ winnerLabel.TextBoard.SetFormatting(GlyphFormat.White.WithColor(Color.Red).WithSize(3)
+ .WithAlignment(TextAlignment.Center));
+ }
+ }
+}
diff --git a/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameModes/TeamDeathMatch/TeamDeathmatchGamemode.cs b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameModes/TeamDeathMatch/TeamDeathmatchGamemode.cs
index 1c006051f..8ab8ffdbc 100644
--- a/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameModes/TeamDeathMatch/TeamDeathmatchGamemode.cs
+++ b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameModes/TeamDeathMatch/TeamDeathmatchGamemode.cs
@@ -139,7 +139,7 @@ public override void StopRound()
if (!setWinnerFromArgs && MyAPIGateway.Session.IsServer)
{
if (WinningFaction == null)
- WinningFaction = PointTracker.FactionPoints.MaxBy(f => f.Value).Key;
+ WinningFaction = PointTracker.GetHighestPoints();
Arguments = Arguments.Concat(new[] { $"win{WinningFaction?.FactionId ?? -1}" }).ToArray();
}
diff --git a/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameState/PointTracker.cs b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameState/PointTracker.cs
index d20ed34a5..f984cf3bb 100644
--- a/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameState/PointTracker.cs
+++ b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/GameState/PointTracker.cs
@@ -2,11 +2,9 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
-using Sandbox.Game.Multiplayer;
using Sandbox.ModAPI;
using SC.SUGMA.HeartNetworking;
using SC.SUGMA.HeartNetworking.Custom;
-using SC.SUGMA.Utilities;
using VRage.Game.ModAPI;
namespace SC.SUGMA.GameState
@@ -14,10 +12,10 @@ namespace SC.SUGMA.GameState
internal class PointTracker : ComponentBase
{
private bool _pointsUpdated;
- public int StartingPoints;
- public int VictoryPoints = 3;
+ public readonly int StartingPoints;
+ public readonly int VictoryPoints;
- public Dictionary FactionPoints { get; internal set; } = new Dictionary();
+ protected Dictionary FactionPoints = new Dictionary();
public Action OnPointsUpdated = null;
private void OnFactionCreated(long factionId)
@@ -49,7 +47,7 @@ public override void UpdateTick()
{
if (_pointsUpdated && MyAPIGateway.Session.IsServer)
{
- HeartNetwork.I.SendToEveryone(new PointsPacket(this));
+ HeartNetwork.I.SendToEveryone((PointsPacket) this);
_pointsUpdated = false;
}
}
@@ -70,6 +68,11 @@ public int GetFactionPoints(long factionId)
return GetFactionPoints(MyAPIGateway.Session.Factions.TryGetFactionById(factionId));
}
+ public IMyFaction GetHighestPoints()
+ {
+ return FactionPoints.MaxBy(f => f.Value).Key;
+ }
+
public void SetFactionPoints(IMyFaction faction, int value)
{
if (!MyAPIGateway.Session.IsServer || !FactionPoints.ContainsKey(faction))
@@ -137,5 +140,7 @@ public override string ToString()
sb.Append($"{faction.Key.Name}: {faction.Value}pts\n");
return sb.ToString();
}
+
+ public static explicit operator PointsPacket(PointTracker tracker) => new PointsPacket(tracker.ComponentId, tracker.FactionPoints);
}
}
\ No newline at end of file
diff --git a/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/HeartNetworking/Custom/PointsPacket.cs b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/HeartNetworking/Custom/PointsPacket.cs
index 7e6c18d1d..d798e645d 100644
--- a/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/HeartNetworking/Custom/PointsPacket.cs
+++ b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/HeartNetworking/Custom/PointsPacket.cs
@@ -17,11 +17,11 @@ private PointsPacket()
{
}
- public PointsPacket(PointTracker pointTracker)
+ public PointsPacket(string componentId, Dictionary points)
{
- _senderObjectId = pointTracker.ComponentId;
+ _senderObjectId = componentId;
_points = new Dictionary();
- foreach (var factionKvp in pointTracker.FactionPoints)
+ foreach (var factionKvp in points)
_points.Add(factionKvp.Key.FactionId, factionKvp.Value);
//string data = "";
diff --git a/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/SUGMA_SessionComponent.cs b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/SUGMA_SessionComponent.cs
index e863fb505..24e477159 100644
--- a/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/SUGMA_SessionComponent.cs
+++ b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/SUGMA_SessionComponent.cs
@@ -11,14 +11,11 @@
using SC.SUGMA.GameModes.Elimination;
using SC.SUGMA.GameModes.TeamDeathmatch;
using SC.SUGMA.GameModes.KOTH;
+using SC.SUGMA.GameModes.RocketCore;
using SC.SUGMA.GameState;
using SC.SUGMA.HeartNetworking;
using SC.SUGMA.HeartNetworking.Custom;
-using SC.SUGMA.Utilities;
using VRage.Game.Components;
-using VRage.Scripting;
-using Sandbox.Game;
-using VRageMath;
namespace SC.SUGMA
{
@@ -38,6 +35,7 @@ internal class SUGMA_SessionComponent : MySessionComponentBase
["dom"] = new DominationGamemode(),
["tdm"] = new TeamDeathmatchGamemode(),
["koth"] = new KOTHGamemode(),
+ ["roc"] = new RocketCoreGamemode(),
};
///
diff --git a/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/Utilities/SUtils.cs b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/Utilities/SUtils.cs
index aec9bd4a1..b19f1603b 100644
--- a/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/Utilities/SUtils.cs
+++ b/Gamemode Mods/StarCore SUGMA Gamemodes/Data/Scripts/SUGMA/Utilities/SUtils.cs
@@ -43,6 +43,9 @@ public static void SetDamageEnabled(bool value)
public static void SetWorldPermissionsForMatch(bool matchActive)
{
+ if (MyAPIGateway.Session == null)
+ return;
+
MyAPIGateway.Utilities.ShowMessage("SUGMA",
$"Match global permissions {(matchActive ? "enabled" : "disabled")}.");
diff --git a/Gamemode Mods/StarCore SUGMA Gamemodes/StarCore SUGMA Gamemodes.csproj.DotSettings b/Gamemode Mods/StarCore SUGMA Gamemodes/StarCore SUGMA Gamemodes.csproj.DotSettings
index 07eaf28c4..53b65eeda 100644
--- a/Gamemode Mods/StarCore SUGMA Gamemodes/StarCore SUGMA Gamemodes.csproj.DotSettings
+++ b/Gamemode Mods/StarCore SUGMA Gamemodes/StarCore SUGMA Gamemodes.csproj.DotSettings
@@ -2,4 +2,4 @@
True
True
True
- True
\ No newline at end of file
+ False
\ No newline at end of file