Forráskód Böngészése

Fixes for Valley

Civvies dont steal stuff anymore.

Added a gracewall around the blugoslavia spawn.

Added an exit from the Insurgent base so you don't need to use the tunnels.

Supply crates now give points.

Lower points per kill for insurgents to 20.

Stasis bed in UN hospital is now powered.

UN hospital and Blugoslavian Base both have defibrilators now.
Taislin 6 hónapja
szülő
commit
4e77e242b8

+ 1 - 1
Content.Server/GameTicking/Rules/Components/ValleyPointsComponent.cs

@@ -36,7 +36,7 @@ public sealed partial class ValleyPointsComponent : Component
     /// Points awarded for killing a Blugoslavian soldier.
     /// </summary>
     [DataField]
-    public int KillPoints = 30;
+    public int KillPoints = 20;
 
     /// <summary>
     /// Points awarded for delivering a supply box.

+ 8 - 30
Content.Server/GameTicking/Rules/ValleyPointsSystem.cs

@@ -11,6 +11,7 @@
 using Robust.Shared.Timing;
 using Content.Server.KillTracking;
 using Content.Shared.NPC.Systems;
+using Content.Server.RoundEnd;
 
 
 namespace Content.Server.GameTicking.Rules;
@@ -27,7 +28,7 @@ public sealed class ValleyPointsRuleSystem : GameRuleSystem<ValleyPointsComponen
     [Dependency] private readonly EntityLookupSystem _lookup = default!;
     [Dependency] private readonly SharedTransformSystem _transform = default!;
     [Dependency] private readonly SharedHandsSystem _hands = default!;
-
+    [Dependency] private readonly RoundEndSystem _roundEndSystem = default!;
     [Dependency] private readonly NpcFactionSystem _factionSystem = default!; // Added dependency
     private ISawmill _sawmill = default!;
     private TimeSpan _lastSupplyBoxCheck = TimeSpan.Zero;
@@ -191,9 +192,13 @@ private void ProcessBlugoslavianSupplyDelivery(ValleyPointsComponent valley, Ent
 
         // Start securing timer
         valley.SecuringSupplyBoxes[supplyBox] = _timing.CurTime;
+        if (TryComp<ValleyCheckpointComponent>(checkpoint, out var checkpointComp))
+        {
+            checkpointComp.SecuringBoxes.Add(supplyBox);
+        }
 
         _sawmill.Info($"Supply box delivery started at {area.Name}, securing for {valley.SupplyBoxSecureTime} seconds");
-        AnnounceToAll($"Blugoslavia supply box delivery started at {area.Name}!");
+
     }
 
     private void ProcessInsurgentSupplyTheft(ValleyPointsComponent valley, EntityUid supplyBox, EntityUid baseArea, CaptureAreaComponent area)
@@ -348,19 +353,6 @@ private void UpdateSupplyBoxSecuring(ValleyPointsComponent valley)
         }
     }
 
-    /// <summary>
-    /// Award points to Blugoslavia for delivering a supply box to a checkpoint.
-    /// </summary>
-    public void AwardSupplyBoxDelivery(EntityUid ruleEntity, EntityUid checkpoint, EntityUid supplyBox)
-    {
-        if (!TryComp<ValleyPointsComponent>(ruleEntity, out var valley))
-            return;
-
-        // Start securing timer
-        valley.SecuringSupplyBoxes[supplyBox] = _timing.CurTime;
-        _sawmill.Info($"Supply box delivery started at checkpoint, securing for {valley.SupplyBoxSecureTime} seconds");
-    }
-
     /// <summary>
     /// Award points to insurgents for killing a Blugoslavian soldier.
     /// </summary>
@@ -374,19 +366,6 @@ public void AwardInsurgentKill(EntityUid ruleEntity)
         AnnounceToAll($"Insurgents: +{valley.KillPoints} points (Kill) - Total: {valley.InsurgentPoints}");
     }
 
-    /// <summary>
-    /// Award points to insurgents for stealing and delivering a supply box.
-    /// </summary>
-    public void AwardStolenSupplyBox(EntityUid ruleEntity)
-    {
-        if (!TryComp<ValleyPointsComponent>(ruleEntity, out var valley))
-            return;
-
-        valley.InsurgentPoints += valley.StolenSupplyBoxPoints;
-        _sawmill.Info($"Insurgents awarded {valley.StolenSupplyBoxPoints} points for stolen supply box. Total: {valley.InsurgentPoints}");
-        AnnounceToAll($"Insurgents: +{valley.StolenSupplyBoxPoints} points (Supply Theft) - Total: {valley.InsurgentPoints}");
-    }
-
     /// <summary>
     /// Award points to Blugoslavia for successfully escorting a convoy.
     /// </summary>
@@ -448,8 +427,7 @@ private void EndGame(EntityUid uid, ValleyPointsComponent valley, string winner)
         _sawmill.Info($"Valley gamemode ended: {finalMessage}");
         AnnounceToAll(finalMessage);
 
-        // Check UN objectives
-        AnnounceToAll(CheckUNObjectives(valley));
+        _roundEndSystem.EndRound();
     }
     private string CheckUNObjectives(ValleyPointsComponent valley)
     {

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 2 - 2
Resources/Maps/civ/tdm/valley.yml


+ 46 - 0
Resources/Prototypes/Civ14/Entities/Markers/grace_wall.yml

@@ -116,6 +116,29 @@
       blockingFactions: [Insurgents]
       permanent: true
 
+- type: entity
+  name: grace wall insurgents
+  id: MarkerGracewallInsurgentsHorizontal
+  parent: MarkerGracewallInsurgents
+  suffix: horizontal
+  components:
+    - type: Fixtures
+      fixtures:
+        gracewall: # Define a fixture for the area
+          shape: !type:PhysShapeAabb
+            bounds: "-1.5, -0.2, 1.5, 0.2"
+          # Collision layer/mask will be managed by the GracewallRuleSystem
+          density: 100
+          hard: true
+          mask:
+            - LowImpassable
+            - MidImpassable
+            - HighImpassable
+          layer:
+            - LowImpassable
+            - MidImpassable
+            - HighImpassable
+
 - type: entity
   name: grace wall blugoslavia
   id: MarkerGracewallBlugoslavia
@@ -126,3 +149,26 @@
       gracewallRadius: 1.5
       blockingFactions: [Blugoslavia]
       permanent: true
+
+- type: entity
+  name: grace wall blugoslavia
+  id: MarkerGracewallBlugoslaviaHorizontal
+  parent: MarkerGracewallBlugoslavia
+  suffix: horizontal
+  components:
+    - type: Fixtures
+      fixtures:
+        gracewall: # Define a fixture for the area
+          shape: !type:PhysShapeAabb
+            bounds: "-1.5, -0.2, 1.5, 0.2"
+          # Collision layer/mask will be managed by the GracewallRuleSystem
+          density: 100
+          hard: true
+          mask:
+            - LowImpassable
+            - MidImpassable
+            - HighImpassable
+          layer:
+            - LowImpassable
+            - MidImpassable
+            - HighImpassable

+ 1 - 1
Resources/Prototypes/Civ14/Entities/Mobs/NPC/civilians.yml

@@ -21,7 +21,7 @@
     - type: MobMover
     - type: HTN
       rootTask:
-        task: SimpleHumanoidHostileCompound
+        task: IdleCompound
 
 - type: startingGear
   id: Civilian1

+ 1 - 0
Resources/Prototypes/Maps/Pools/default.yml

@@ -6,3 +6,4 @@
     - Nomads
     - Opushka
     - Hotel
+    - Valley

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott