]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Migrate random shuttle events to load dynamically (#40326)
authorHannah Giovanna Dawson <karakkaraz@gmail.com>
Sat, 1 Nov 2025 00:36:44 +0000 (00:36 +0000)
committerGitHub <noreply@github.com>
Sat, 1 Nov 2025 00:36:44 +0000 (00:36 +0000)
Content.Server/GameTicking/Rules/Components/LoadMapRuleComponent.cs
Resources/Prototypes/GameRules/unknown_shuttles.yml
Resources/Prototypes/Shuttles/shuttle_incoming_event.yml [deleted file]

index f09fff5eafaad9f7ddd01ddcf599d96540b2a2e8..f1bd1e5eef48f54fdea04a709a4b7f2f16362bda 100644 (file)
@@ -34,7 +34,11 @@ public sealed partial class LoadMapRuleComponent : Component
     /// <summary>
     /// A <see cref="PreloadedGridPrototype"/> to move to a new map.
     /// If there are no instances left nothing is done.
+    /// <para>
+    /// This is deprecated. Do not create new content that uses this field,
+    /// and migrate existing content to be loaded dynamically during the round.
+    /// </para>
     /// </summary>
-    [DataField]
+    [DataField, Obsolete("Do not pre-load grids. This causes the server to have to keep that grid loaded in memory during the entire round, even if that grid is never summoned to the playspace.")]
     public ProtoId<PreloadedGridPrototype>? PreloadedGrid;
 }
index 6b5cdc7998747b5bd8bff203c37ad110da8ae6a9..ae57cab0b6b1cc25de828615eb33ba336e09b8a5 100644 (file)
@@ -49,7 +49,7 @@
     weight: 10 # 10 default
     reoccurrenceDelay: 30
     duration: 1
-    maxOccurrences: 1 # should be the same as [copies] in shuttle_incoming_event.yml
+    maxOccurrences: 1
   - type: RuleGrids
   - type: LoadMapRule
 
@@ -58,9 +58,9 @@
   id: UnknownShuttleCargoLost
   components:
   - type: StationEvent
-    maxOccurrences: 2 # should be the same as [copies] in shuttle_incoming_event.yml
+    maxOccurrences: 2
   - type: LoadMapRule
-    preloadedGrid: ShuttleCargoLost
+    gridPath: /Maps/Shuttles/ShuttleEvent/lost_cargo.yml
 
 - type: entity
   parent: BaseUnknownShuttleRule
@@ -68,9 +68,9 @@
   components:
   - type: StationEvent
     startAnnouncement: station-event-unknown-shuttle-incoming
-    maxOccurrences: 2 # should be the same as [copies] in shuttle_incoming_event.yml
+    maxOccurrences: 2
   - type: LoadMapRule
-    preloadedGrid: TravelingCuisine
+    gridPath: /Maps/Shuttles/ShuttleEvent/traveling_china_cuisine.yml
 
 - type: entity
   parent: BaseUnknownShuttleRule
@@ -78,9 +78,9 @@
   components:
   - type: StationEvent
     startAnnouncement: station-event-unknown-shuttle-incoming
-    maxOccurrences: 3 # should be the same as [copies] in shuttle_incoming_event.yml
+    maxOccurrences: 3
   - type: LoadMapRule
-    preloadedGrid: DisasterEvacPod
+    gridPath: /Maps/Shuttles/ShuttleEvent/disaster_evacpod.yml
 
 # The power of 3 clowns proved too strong for the players and may need to be 1984'ed. Replace this with a more engaging clown shuttle.
 - type: entity
@@ -91,7 +91,7 @@
     startAnnouncement: station-event-unknown-shuttle-incoming #!!
     weight: 2
   - type: LoadMapRule
-    preloadedGrid: Honki
+    gridPath: /Maps/Shuttles/ShuttleEvent/honki.yml
 
 - type: entity
   parent: BaseUnknownShuttleRule
   - type: StationEvent
     startAnnouncement: null # It should be silent.
     weight: 5 # lower because weird freelance roles
-    maxOccurrences: 2 # should be the same as [copies] in shuttle_incoming_event.yml
+    maxOccurrences: 2
   - type: LoadMapRule
-    preloadedGrid: SyndieEvacPod
+    gridPath: /Maps/Shuttles/ShuttleEvent/syndie_evacpod.yml
 
 - type: entity
   id: UnknownShuttleNTQuark
     earliestStart: 45 # late to hopefully have enough ghosts to fill all roles quickly.
     minimumPlayers: 25
   - type: LoadMapRule
-    preloadedGrid: NTQuark
+    gridPath: /Maps/Shuttles/ShuttleEvent/quark.yml
 
 - type: entity
   id: UnknownShuttleCruiser
     startAnnouncement: station-event-unknown-shuttle-incoming #!!
     weight: 2 # Its just a big ship, so it needs to be rarer to be interesting.
   - type: LoadMapRule
-    preloadedGrid: Cruiser
+    gridPath: /Maps/Shuttles/ShuttleEvent/cruiser.yml
 
 - type: entity
   id: UnknownShuttleCryptid
   - type: StationEvent
     startAnnouncement: station-event-unknown-shuttle-incoming #!!
   - type: LoadMapRule
-    preloadedGrid: Cryptid
+    gridPath: /Maps/Shuttles/ShuttleEvent/cryptid.yml
 
 - type: entity
   id: UnknownShuttleEternal
   - type: StationEvent
     startAnnouncement: station-event-unknown-shuttle-incoming #!!
   - type: LoadMapRule
-    preloadedGrid: Eternal
+    gridPath: /Maps/Shuttles/ShuttleEvent/eternal.yml
 
 - type: entity
   id: UnknownShuttleFlatline
   - type: StationEvent
     startAnnouncement: station-event-unknown-shuttle-incoming #!!
   - type: LoadMapRule
-    preloadedGrid: Flatline
+    gridPath: /Maps/Shuttles/ShuttleEvent/flatline.yml
 
 - type: entity
   id: UnknownShuttleGym
     startAnnouncement: station-event-unknown-shuttle-incoming #!!
     weight: 5 # Its just a big ship, so it needs to be rarer to be interesting.
   - type: LoadMapRule
-    preloadedGrid: Gym
+    gridPath: /Maps/Shuttles/ShuttleEvent/gym.yml
 
 - type: entity
   id: UnknownShuttleNTIncorporation
     weight: 2 # Its just a big ship, so it needs to be rarer to be interesting.
     earliestStart: 45 # late to hopefully have enough ghosts to fill all roles quickly. (5-6)
   - type: LoadMapRule
-    preloadedGrid: NTIncorporation
+    gridPath: /Maps/Shuttles/ShuttleEvent/incorporation.yml
 
 - type: entity
   id: UnknownShuttleInstigator
     weight: 1 #  lower because antags.
     earliestStart: 50 # late to hopefully have enough ghosts to fill all roles quickly (3) and because antags
   - type: LoadMapRule
-    preloadedGrid: Instigator
+    gridPath: /Maps/Shuttles/ShuttleEvent/instigator.yml
 
 - type: entity
   id: UnknownShuttleJoe
   - type: StationEvent
     startAnnouncement: station-event-unknown-shuttle-incoming #!!
   - type: LoadMapRule
-    preloadedGrid: Joe
+    gridPath: /Maps/Shuttles/ShuttleEvent/joe.yml
 
 - type: entity
   id: UnknownShuttleLambordeere
   - type: StationEvent
     startAnnouncement: station-event-unknown-shuttle-incoming #!!
   - type: LoadMapRule
-    preloadedGrid: Lambordeere
+    gridPath: /Maps/Shuttles/ShuttleEvent/lambordeere.yml
 
 - type: entity
   id: UnknownShuttleManOWar
     weight: 1 # lower because antags
     earliestStart: 50 # late to hopefully have enough ghosts to fill all roles quickly. (4) & antags
   - type: LoadMapRule
-    preloadedGrid: ManOWar
+    gridPath: /Maps/Shuttles/ShuttleEvent/manowar.yml
 
 - type: entity
   id: UnknownShuttleMeatZone
   - type: StationEvent
     startAnnouncement: station-event-unknown-shuttle-incoming #!!
   - type: LoadMapRule
-    preloadedGrid: Meatzone
+    gridPath: /Maps/Shuttles/ShuttleEvent/meatzone.yml
 
 - type: entity
   id: UnknownShuttleMicroshuttle
     weight: 11 # this is higher because its just a little generic personal shuttle
     maxOccurrences: 4
   - type: LoadMapRule
-    preloadedGrid: Microshuttle
+    gridPath: /Maps/Shuttles/ShuttleEvent/microshuttle.yml
 
 - type: entity
   id: UnknownShuttleSpacebus
   - type: StationEvent
     startAnnouncement: station-event-unknown-shuttle-incoming #!!
   - type: LoadMapRule
-    preloadedGrid: Spacebus
+    gridPath: /Maps/Shuttles/ShuttleEvent/spacebus.yml
 
diff --git a/Resources/Prototypes/Shuttles/shuttle_incoming_event.yml b/Resources/Prototypes/Shuttles/shuttle_incoming_event.yml
deleted file mode 100644 (file)
index 8bcfb32..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-- type: preloadedGrid
-  id: ShuttleCargoLost
-  path: /Maps/Shuttles/ShuttleEvent/lost_cargo.yml
-  copies: 2
-
-- type: preloadedGrid
-  id: TravelingCuisine
-  path: /Maps/Shuttles/ShuttleEvent/traveling_china_cuisine.yml
-  copies: 2
-
-- type: preloadedGrid
-  id: DisasterEvacPod
-  path: /Maps/Shuttles/ShuttleEvent/disaster_evacpod.yml
-  copies: 3
-
-# The power of 3 clowns has proved too strong for the players and may need to be 1984ed.
-- type: preloadedGrid
-  id: Honki
-  path: /Maps/Shuttles/ShuttleEvent/honki.yml
-  copies: 1
-
-- type: preloadedGrid
-  id: SyndieEvacPod
-  path: /Maps/Shuttles/ShuttleEvent/syndie_evacpod.yml
-  copies: 2
-
-- type: preloadedGrid
-  id: NTQuark
-  path: /Maps/Shuttles/ShuttleEvent/quark.yml
-  copies: 1
-
-- type: preloadedGrid
-  id: MeatZone
-  path: /Maps/Shuttles/ShuttleEvent/meatzone.yml
-  copies: 1
-
-- type: preloadedGrid
-  id: Cruiser
-  path: /Maps/Shuttles/ShuttleEvent/cruiser.yml
-  copies: 1
-
-- type: preloadedGrid
-  id: Cryptid
-  path: /Maps/Shuttles/ShuttleEvent/cryptid.yml
-  copies: 1
-
-- type: preloadedGrid
-  id: Eternal
-  path: /Maps/Shuttles/ShuttleEvent/eternal.yml
-  copies: 1
-
-- type: preloadedGrid
-  id: Flatline
-  path: /Maps/Shuttles/ShuttleEvent/flatline.yml
-  copies: 1
-
-- type: preloadedGrid
-  id: Gym
-  path: /Maps/Shuttles/ShuttleEvent/gym.yml
-  copies: 1
-
-- type: preloadedGrid
-  id: NTIncorporation
-  path: /Maps/Shuttles/ShuttleEvent/incorporation.yml
-  copies: 1
-
-- type: preloadedGrid
-  id: Instigator
-  path: /Maps/Shuttles/ShuttleEvent/instigator.yml
-  copies: 1
-
-- type: preloadedGrid
-  id: Joe
-  path: /Maps/Shuttles/ShuttleEvent/joe.yml
-  copies: 1
-
-- type: preloadedGrid
-  id: Lambordeere
-  path: /Maps/Shuttles/ShuttleEvent/lambordeere.yml
-  copies: 1
-
-- type: preloadedGrid
-  id: ManOWar
-  path: /Maps/Shuttles/ShuttleEvent/manowar.yml
-  copies: 1
-
-- type: preloadedGrid
-  id: Meatzone
-  path: /Maps/Shuttles/ShuttleEvent/meatzone.yml
-  copies: 1
-
-- type: preloadedGrid
-  id: Microshuttle
-  path: /Maps/Shuttles/ShuttleEvent/microshuttle.yml
-  copies: 4
-
-- type: preloadedGrid
-  id: Spacebus
-  path: /Maps/Shuttles/ShuttleEvent/spacebus.yml
-  copies: 1