Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
f7cd4b9
Update modinfo_stable.sbmi
ari-steas Jan 31, 2025
836b050
Update CommandHandler.cs
ari-steas Jan 31, 2025
1135d43
Update modinfo_stable.sbmi
ari-steas Jan 31, 2025
b60fc0a
Unnerf Fusion Radiators (#1874)
ari-steas Jan 31, 2025
b837902
Remove unnecessary textures (#1875)
ari-steas Jan 31, 2025
90dff8f
S5 Dev Push
FP-Anomaly Feb 1, 2025
dbd41be
SOL S5 Dev Push
FP-Anomaly Feb 1, 2025
c4d8bca
Merge branch 'main' of https://github.com/FP-Anomaly/SCModRepository
FP-Anomaly Feb 1, 2025
86c8754
Update Aristeas NewUniversalUpload.yml
ari-steas Feb 1, 2025
7a03998
Merge branch 'stable' into main
ari-steas Feb 1, 2025
780f4ce
Create Push n Pull Test.txt
FP-Anomaly Feb 2, 2025
e60d29a
Merge branch 'main' of https://github.com/FP-Anomaly/SCModRepository
FP-Anomaly Feb 2, 2025
140da29
Create Tester2.txt
FP-Anomaly Feb 2, 2025
3e78f1e
More testing
FP-Anomaly Feb 3, 2025
3a9c213
Test
FP-Anomaly Feb 3, 2025
946e66d
Create Testy.txt
FP-Anomaly Feb 3, 2025
991b89d
S5 Dev Push for realz
FP-Anomaly Feb 3, 2025
00bc63a
SOL SEASON 5 UPDATE (#1877)
FP-Anomaly Feb 3, 2025
f385788
Point Additions and Final Tweaks
FP-Anomaly Feb 3, 2025
8b4c1d8
Merge branch 'main' into main
FP-Anomaly Feb 3, 2025
2ff7ab1
Point Additions and Final Tweaks (#1878)
FP-Anomaly Feb 3, 2025
ada32af
Update SUGMA Clearboard (#1879)
ari-steas Feb 4, 2025
0ec1912
Update PointAdditions.cs
FP-Anomaly Feb 4, 2025
5d14c1c
Merge branch 'main' into main
FP-Anomaly Feb 4, 2025
e21290d
Update PointAdditions.cs (#1880)
FP-Anomaly Feb 4, 2025
37abfbe
Revert mistaken fusion heat edits (#1882)
ari-steas Feb 6, 2025
b0ed423
KOTH go Brrrr
CommodoreChet Feb 7, 2025
71e2d36
KOTH go Brrrr (#1884)
CommodoreChet Feb 7, 2025
73490cd
Hard-sync winning KOTH faction (#1885)
ari-steas Feb 7, 2025
d17a510
Dev (#1886)
ari-steas Feb 7, 2025
19789d2
shrink Indicator
CommodoreChet Feb 7, 2025
09ea747
shrink Indicator (#1887)
CommodoreChet Feb 7, 2025
41dc439
Fix KOTH win condition display (#1888)
ari-steas Feb 7, 2025
a7588b8
fix merge failure (#1890)
ari-steas Feb 7, 2025
17708eb
Misc. SUGMA changes (#1891)
ari-steas Feb 7, 2025
66ddf72
Tune up new fusion radiators (#1892)
ari-steas Feb 9, 2025
15b0be1
OS1 Tweaks
FP-Anomaly Feb 9, 2025
1115f64
Merge branch 'main' into main
FP-Anomaly Feb 9, 2025
ed414cf
OS1 Tweaks (#1893)
FP-Anomaly Feb 9, 2025
e911c3f
Mostly functional upgraded fusion hud (#1894)
ari-steas Feb 24, 2025
ecc7703
modify fusion hud (#1895)
ari-steas Feb 27, 2025
54902fa
Update FusionWindow.cs
ari-steas Feb 28, 2025
ec9199d
Re-exclude SRBs from grid integrity calcs (#1898)
ari-steas Mar 1, 2025
2bd69c1
Emergency bounce zone fix (#1899)
ari-steas Mar 1, 2025
8a74364
Create AiRange_EntityComponents.sbc
ari-steas Mar 2, 2025
269e352
Disable monowhip animation (#1896)
ari-steas Mar 2, 2025
d747c21
Merge branch 'stable' into main
ari-steas Mar 2, 2025
aa66b6a
Configurable Minimum Siege Time
CommodoreChet Mar 2, 2025
91d9cb1
Configurable Minimum Siege Time (#1902)
CommodoreChet Mar 2, 2025
9fb9dce
Delete Weapon Mods/Stable/Anomaly_Solaris_Hypernautics directory
ari-steas Mar 2, 2025
f5a185b
Tweaks and Shotgun Reworks
FP-Anomaly Mar 2, 2025
4dbcebd
Merge branch 'main' into main
FP-Anomaly Mar 2, 2025
ef95e57
Tweaks and Shotgun Reworks (#1903)
FP-Anomaly Mar 2, 2025
035bc39
Adding Stealth Drive
FP-Anomaly Mar 2, 2025
998d04d
Merge remote-tracking branch 'upstream/main'
FP-Anomaly Mar 2, 2025
5b7acc2
Stealth Drive (#1905)
FP-Anomaly Mar 2, 2025
006b589
Update and rename modinfo.sbmi to modinfo_main.sbmi
ari-steas Mar 2, 2025
9816c8d
the cast spectator smoothening (#1906)
InvalidArgument3 Mar 2, 2025
a3c0011
Update SOL_CubeBlocks.sbc
FP-Anomaly Mar 5, 2025
20a0759
Merge pull request #2 from StarCoreSE/main
FP-Anomaly Mar 5, 2025
7219d54
Update SOL_CubeBlocks.sbc (#1907)
FP-Anomaly Mar 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ public override void StopRound()
{
if (arg.StartsWith("win"))
{
Log.Info("Winner in arguments found: " + arg);
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;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ internal class elmHud_Window : HudElementBase
private bool _matchEnded;
private readonly MatchTimer _timer;

private readonly LabelBox _timerLabel;
internal readonly LabelBox _timerLabel;
internal LabelBox _winnerLabel;
public EliminationHud_TeamBanner[] Banners;

public elmHud_Window(HudParentBase parent, EliminationGamemode gamemode) : base(parent)
Expand Down Expand Up @@ -121,6 +122,7 @@ public void Update()

public void MatchEnded(IMyFaction winner)
{
Log.Info("EliminationHud.cs:125 MatchEnded (" + winner?.Name + ")");
_matchEnded = true;
var winnerPoints = 0;
foreach (var banner in Banners)
Expand All @@ -136,7 +138,7 @@ public void MatchEnded(IMyFaction winner)
if (_timerLabel == null)
return;

var winnerLabel = new LabelBox(_timerLabel)
_winnerLabel = new LabelBox(_timerLabel)
{
Text = winner != null
? $"A WINNER IS {winner.Name}. {winnerPoints} tickets remaining."
Expand All @@ -147,7 +149,7 @@ public void MatchEnded(IMyFaction winner)
Color = HudConstants.HudBackgroundColor
};

winnerLabel.TextBoard.SetFormatting(GlyphFormat.White.WithColor(Color.Red).WithSize(3)
_winnerLabel.TextBoard.SetFormatting(GlyphFormat.White.WithColor(Color.Red).WithSize(3)
.WithAlignment(TextAlignment.Center));
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
using System;
using System.Collections.Generic;
using Sandbox.ModAPI;
using SC.SUGMA.GameModes.Elimination;
using SC.SUGMA.GameState;
using SC.SUGMA.Utilities;
using VRage.Game.ModAPI;
using VRageMath;

namespace SC.SUGMA.GameModes.KOTH
{
internal partial class KOTHGamemode : EliminationGamemode
{
public KOTHSphereZone ControlPoint;

private Vector3D _controlPointPosition = new Vector3D(0, 0, 0);
private float _controlPointRadius = 2500f;

private int ActivationTime = 300;
public int ActivationTimeCounter = 0;

private int WinTime = 120;

public override string ReadableName { get; internal set; } = "King Of The Hill";

public override string Description { get; internal set; } =
"Fight to Control the Capture Point. Either hold it uncontested, or eliminate the enemy team to win.";

public KOTHGamemode()
{
ArgumentParser += new ArgumentParser(
new ArgumentParser.ArgumentDefinition(
text => ActivationTime = int.Parse(text),
"at", "activation-time",
$"Delay before Center Zone is Capturable, in Seconds"
),
new ArgumentParser.ArgumentDefinition(
text => WinTime = int.Parse(text),
"wt", "win-time",
"How long a team has to hold the zone uncontested to win, in Seconds"
)
);
}

public override void StartRound(string[] arguments = null)
{
base.StartRound(arguments);

if (TrackedFactions.Count <= 1)
return;

ActivationTimeCounter = ActivationTime;
ControlPoint = null;

if (!MyAPIGateway.Utilities.IsDedicated)
SUGMA_SessionComponent.I.RegisterComponent("KOTHHud", new KOTHHud(this));
}

public override void StopRound()
{
_winningFaction = ControlPoint?._zoneOwner;
base.StopRound();

SUGMA_SessionComponent.I.GetComponent<KOTHHud>("KOTHHud")?.MatchEnded(_winningFaction);
SUGMA_SessionComponent.I.UnregisterComponent("KOTHHud");

ControlPoint = null;
SUGMA_SessionComponent.I.UnregisterComponent("KOTHZone");
}

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);
}

public override void UpdateActive()
{
if (ActivationTimeCounter > 0)
{
if (_matchTimer.Ticks % 60 == 0)
{
ActivationTimeCounter--;

if (ActivationTimeCounter <= 0)
{
ControlPoint = new KOTHSphereZone(_controlPointPosition, _controlPointRadius, WinTime);
SUGMA_SessionComponent.I.RegisterComponent("KOTHZone", ControlPoint);
}
}
}

if (ControlPoint == null)
return;

if (ControlPoint.IsCaptured)
{
StopRound();
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
using System;
using System.Collections.Generic;
using RichHudFramework;
using RichHudFramework.Client;
using RichHudFramework.UI;
using RichHudFramework.UI.Client;
using RichHudFramework.UI.Rendering;
using SC.SUGMA.GameModes.Elimination;
using SC.SUGMA.GameState;
using SC.SUGMA.Utilities;
using VRage.Game.ModAPI;
using VRage.Utils;
using VRageMath;

namespace SC.SUGMA.GameModes.KOTH
{
internal class KOTHHud : ComponentBase
{
private readonly KOTHGamemode _gamemode;
private KOTHHud_Window _window;

public KOTHHud(KOTHGamemode 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 KOTHHud_Window(HudMain.HighDpiRoot, _gamemode);
}

public override void Close()
{
HudMain.HighDpiRoot.RemoveChild(_window);
}

public override void UpdateTick()
{
if (SUGMA_SessionComponent.I.CurrentGamemode != null)
_window.Update();
}

public void MatchEnded(IMyFaction winner)
{
_window.MatchEnded(winner);
}
}

internal class KOTHHud_Window : WindowBase
{
private static readonly Material _circleMaterial =
new Material(MyStringId.GetOrCompute("SugmaCircle"), new Vector2(32, 32));

private readonly KOTHGamemode _gamemode;
private readonly elmHud_Window _windowBase;

private TexturedBox _captureIndicator;

private Label _captureLabel;

public KOTHHud_Window(HudParentBase parent, KOTHGamemode gamemode) : base(parent)
{
_gamemode = gamemode;
_windowBase = SUGMA_SessionComponent.I.GetComponent<EliminationHud>("elmHud").Window;

_captureIndicator = new TexturedBox(_windowBase)
{
Material = _circleMaterial,
ParentAlignment = ParentAlignments.Bottom | ParentAlignments.Center,
Size = Vector2.One * 32,
Offset = new Vector2(0, -10),
ZOffset = sbyte.MaxValue
};

_captureLabel = new Label(_captureIndicator)
{
ParentAlignment = ParentAlignments.Center,
Offset = new Vector2(0, -35),
Text = "Initializing KOTH..."
};

foreach (var banner in _windowBase.Banners)
{
banner.Visible = false;
}
}

public void Update()
{
if (_gamemode.ControlPoint == null)
{
int timeLeft = Math.Max(0, _gamemode.ActivationTimeCounter);
if (timeLeft > 0)
{
_captureIndicator.Color = Color.White;
_captureLabel.Text = $"Zone Locked: {timeLeft}s";
}
else
{
_captureIndicator.Color = Color.White;
_captureLabel.Text = "Waiting for zone creation...";
}
return;
}

var zone = _gamemode.ControlPoint;

bool isActivelyCapturing = zone.ActiveCapturingFaction != null && zone.CaptureTimeCurrent > 0f;
Color capturingColor = isActivelyCapturing
? zone.ActiveCapturingFaction.CustomColor.ColorMaskToRgb()
: Color.White;

_captureIndicator.Color = capturingColor.SetAlphaPct(0.5f);

float current = zone.CaptureTimeCurrent;
float total = zone.CaptureTime;

if (!isActivelyCapturing && current > 0f)
{
_captureIndicator.Color = Color.White.SetAlphaPct(0.5f);
}

_captureLabel.Text = $"Capturing: {current:0.0}s / {total:0.0}s";
}

public void MatchEnded(IMyFaction winner)
{
Log.Info("KOTHHud.cs:133 MatchEnded (" + winner?.Name + ")");
_captureIndicator.Visible = false;
_captureLabel.Visible = false;

_windowBase._winnerLabel.Visible = false;
_windowBase._winnerLabel = new LabelBox(_windowBase._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
};
_windowBase._winnerLabel.Visible = true;

_windowBase._winnerLabel.TextBoard.SetFormatting(GlyphFormat.White.WithColor(Color.Red).WithSize(3)
.WithAlignment(TextAlignment.Center));
}
}
}
Loading
Loading