Explorar o código

force presets, loadout fix

Taislin hai 6 meses
pai
achega
9c62d6abd4

+ 18 - 5
Content.Server/GameTicking/GameTicker.GameRule.cs

@@ -315,13 +315,26 @@ public IEnumerable<EntityPrototype> GetAllGameRulePrototypes()
 
     private void UpdateGameRules()
     {
-        var query = EntityQueryEnumerator<DelayedStartRuleComponent, GameRuleComponent>();
-        while (query.MoveNext(out var uid, out var delay, out var rule))
+
+        if (_gameMapManager.GetSelectedMap() is { } mapPrototype)
         {
-            if (_gameTiming.CurTime < delay.RuleStartTime)
-                continue;
+            var map = mapPrototype;
+            if (map.FixedPreset != "")
+            {
+                SetGamePreset(map.FixedPreset);
+            }
+        }
+        else
+        {
+            var query = EntityQueryEnumerator<DelayedStartRuleComponent, GameRuleComponent>();
+            while (query.MoveNext(out var uid, out var delay, out var rule))
+            {
+                if (_gameTiming.CurTime < delay.RuleStartTime)
+                    continue;
 
-            StartGameRule(uid, rule);
+
+                StartGameRule(uid, rule);
+            }
         }
     }
 

+ 1 - 1
Content.Server/GameTicking/Rules/CaptureAreaSystem.cs

@@ -215,7 +215,7 @@ private void ProcessArea(EntityUid uid, CaptureAreaComponent area, float frameTi
 
             //announce when theres 2 and 1 minutes left.
             var timeleft = area.CaptureDuration - area.CaptureTimer;
-            if (currentController != ruleComp.DefenderFactionName)
+            if (currentController != Faction2String(ruleComp.DefenderFactionName))
             {
                 if (timeleft <= 120 && area.CaptureTimerAnnouncement2 == false)
                 {

+ 1 - 1
Content.Server/Maps/GameMapPrototype.cs

@@ -48,7 +48,7 @@ public sealed partial class GameMapPrototype : IPrototype
     /// If this map requires a specific preset
     /// </summary>
     [DataField("fixedPreset")]
-    public string FixedPreset { get; private set; } = "Nomads";
+    public string FixedPreset { get; private set; } = "";
 
     [DataField("stations", required: true)]
     private Dictionary<string, StationConfig> _stations = new();

+ 1 - 1
Resources/Prototypes/Roles/Jobs/Civ14/TDM/sovietCW.yml

@@ -176,7 +176,7 @@
     shoes: civ13_shoes_Soviet_sapogi_boots
     jumpsuit: civ13_uniform_Soviet_amoeba_outfit
     gloves: ClothingHandsGlovesFingerless
-    belt: ClothingWebbingSovietCWRifleman
+    belt: ClothingWebbingSovietCWMG
     neck: civ13_accessory_6B2_body_armor
     head: civ13_head_soviet_ushanka_1
     pocket1: CombatKnife