Migrate random shuttle events to load dynamically (#40326)

This commit is contained in:
Hannah Giovanna Dawson
2025-11-01 00:36:44 +00:00
committed by GitHub
parent 1f38a34217
commit 696debc606
3 changed files with 29 additions and 125 deletions

View File

@@ -34,7 +34,11 @@ public sealed partial class LoadMapRuleComponent : Component
/// <summary> /// <summary>
/// A <see cref="PreloadedGridPrototype"/> to move to a new map. /// A <see cref="PreloadedGridPrototype"/> to move to a new map.
/// If there are no instances left nothing is done. /// 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> /// </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; public ProtoId<PreloadedGridPrototype>? PreloadedGrid;
} }

View File

@@ -49,7 +49,7 @@
weight: 10 # 10 default weight: 10 # 10 default
reoccurrenceDelay: 30 reoccurrenceDelay: 30
duration: 1 duration: 1
maxOccurrences: 1 # should be the same as [copies] in shuttle_incoming_event.yml maxOccurrences: 1
- type: RuleGrids - type: RuleGrids
- type: LoadMapRule - type: LoadMapRule
@@ -58,9 +58,9 @@
id: UnknownShuttleCargoLost id: UnknownShuttleCargoLost
components: components:
- type: StationEvent - type: StationEvent
maxOccurrences: 2 # should be the same as [copies] in shuttle_incoming_event.yml maxOccurrences: 2
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: ShuttleCargoLost gridPath: /Maps/Shuttles/ShuttleEvent/lost_cargo.yml
- type: entity - type: entity
parent: BaseUnknownShuttleRule parent: BaseUnknownShuttleRule
@@ -68,9 +68,9 @@
components: components:
- type: StationEvent - type: StationEvent
startAnnouncement: station-event-unknown-shuttle-incoming startAnnouncement: station-event-unknown-shuttle-incoming
maxOccurrences: 2 # should be the same as [copies] in shuttle_incoming_event.yml maxOccurrences: 2
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: TravelingCuisine gridPath: /Maps/Shuttles/ShuttleEvent/traveling_china_cuisine.yml
- type: entity - type: entity
parent: BaseUnknownShuttleRule parent: BaseUnknownShuttleRule
@@ -78,9 +78,9 @@
components: components:
- type: StationEvent - type: StationEvent
startAnnouncement: station-event-unknown-shuttle-incoming startAnnouncement: station-event-unknown-shuttle-incoming
maxOccurrences: 3 # should be the same as [copies] in shuttle_incoming_event.yml maxOccurrences: 3
- type: LoadMapRule - 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. # 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 - type: entity
@@ -91,7 +91,7 @@
startAnnouncement: station-event-unknown-shuttle-incoming #!! startAnnouncement: station-event-unknown-shuttle-incoming #!!
weight: 2 weight: 2
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: Honki gridPath: /Maps/Shuttles/ShuttleEvent/honki.yml
- type: entity - type: entity
parent: BaseUnknownShuttleRule parent: BaseUnknownShuttleRule
@@ -100,9 +100,9 @@
- type: StationEvent - type: StationEvent
startAnnouncement: null # It should be silent. startAnnouncement: null # It should be silent.
weight: 5 # lower because weird freelance roles weight: 5 # lower because weird freelance roles
maxOccurrences: 2 # should be the same as [copies] in shuttle_incoming_event.yml maxOccurrences: 2
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: SyndieEvacPod gridPath: /Maps/Shuttles/ShuttleEvent/syndie_evacpod.yml
- type: entity - type: entity
id: UnknownShuttleNTQuark id: UnknownShuttleNTQuark
@@ -114,7 +114,7 @@
earliestStart: 45 # late to hopefully have enough ghosts to fill all roles quickly. earliestStart: 45 # late to hopefully have enough ghosts to fill all roles quickly.
minimumPlayers: 25 minimumPlayers: 25
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: NTQuark gridPath: /Maps/Shuttles/ShuttleEvent/quark.yml
- type: entity - type: entity
id: UnknownShuttleCruiser id: UnknownShuttleCruiser
@@ -124,7 +124,7 @@
startAnnouncement: station-event-unknown-shuttle-incoming #!! startAnnouncement: station-event-unknown-shuttle-incoming #!!
weight: 2 # Its just a big ship, so it needs to be rarer to be interesting. weight: 2 # Its just a big ship, so it needs to be rarer to be interesting.
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: Cruiser gridPath: /Maps/Shuttles/ShuttleEvent/cruiser.yml
- type: entity - type: entity
id: UnknownShuttleCryptid id: UnknownShuttleCryptid
@@ -133,7 +133,7 @@
- type: StationEvent - type: StationEvent
startAnnouncement: station-event-unknown-shuttle-incoming #!! startAnnouncement: station-event-unknown-shuttle-incoming #!!
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: Cryptid gridPath: /Maps/Shuttles/ShuttleEvent/cryptid.yml
- type: entity - type: entity
id: UnknownShuttleEternal id: UnknownShuttleEternal
@@ -142,7 +142,7 @@
- type: StationEvent - type: StationEvent
startAnnouncement: station-event-unknown-shuttle-incoming #!! startAnnouncement: station-event-unknown-shuttle-incoming #!!
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: Eternal gridPath: /Maps/Shuttles/ShuttleEvent/eternal.yml
- type: entity - type: entity
id: UnknownShuttleFlatline id: UnknownShuttleFlatline
@@ -151,7 +151,7 @@
- type: StationEvent - type: StationEvent
startAnnouncement: station-event-unknown-shuttle-incoming #!! startAnnouncement: station-event-unknown-shuttle-incoming #!!
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: Flatline gridPath: /Maps/Shuttles/ShuttleEvent/flatline.yml
- type: entity - type: entity
id: UnknownShuttleGym id: UnknownShuttleGym
@@ -161,7 +161,7 @@
startAnnouncement: station-event-unknown-shuttle-incoming #!! startAnnouncement: station-event-unknown-shuttle-incoming #!!
weight: 5 # Its just a big ship, so it needs to be rarer to be interesting. weight: 5 # Its just a big ship, so it needs to be rarer to be interesting.
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: Gym gridPath: /Maps/Shuttles/ShuttleEvent/gym.yml
- type: entity - type: entity
id: UnknownShuttleNTIncorporation id: UnknownShuttleNTIncorporation
@@ -172,7 +172,7 @@
weight: 2 # Its just a big ship, so it needs to be rarer to be interesting. 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) earliestStart: 45 # late to hopefully have enough ghosts to fill all roles quickly. (5-6)
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: NTIncorporation gridPath: /Maps/Shuttles/ShuttleEvent/incorporation.yml
- type: entity - type: entity
id: UnknownShuttleInstigator id: UnknownShuttleInstigator
@@ -183,7 +183,7 @@
weight: 1 # lower because antags. weight: 1 # lower because antags.
earliestStart: 50 # late to hopefully have enough ghosts to fill all roles quickly (3) and because antags earliestStart: 50 # late to hopefully have enough ghosts to fill all roles quickly (3) and because antags
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: Instigator gridPath: /Maps/Shuttles/ShuttleEvent/instigator.yml
- type: entity - type: entity
id: UnknownShuttleJoe id: UnknownShuttleJoe
@@ -192,7 +192,7 @@
- type: StationEvent - type: StationEvent
startAnnouncement: station-event-unknown-shuttle-incoming #!! startAnnouncement: station-event-unknown-shuttle-incoming #!!
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: Joe gridPath: /Maps/Shuttles/ShuttleEvent/joe.yml
- type: entity - type: entity
id: UnknownShuttleLambordeere id: UnknownShuttleLambordeere
@@ -201,7 +201,7 @@
- type: StationEvent - type: StationEvent
startAnnouncement: station-event-unknown-shuttle-incoming #!! startAnnouncement: station-event-unknown-shuttle-incoming #!!
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: Lambordeere gridPath: /Maps/Shuttles/ShuttleEvent/lambordeere.yml
- type: entity - type: entity
id: UnknownShuttleManOWar id: UnknownShuttleManOWar
@@ -212,7 +212,7 @@
weight: 1 # lower because antags weight: 1 # lower because antags
earliestStart: 50 # late to hopefully have enough ghosts to fill all roles quickly. (4) & antags earliestStart: 50 # late to hopefully have enough ghosts to fill all roles quickly. (4) & antags
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: ManOWar gridPath: /Maps/Shuttles/ShuttleEvent/manowar.yml
- type: entity - type: entity
id: UnknownShuttleMeatZone id: UnknownShuttleMeatZone
@@ -221,7 +221,7 @@
- type: StationEvent - type: StationEvent
startAnnouncement: station-event-unknown-shuttle-incoming #!! startAnnouncement: station-event-unknown-shuttle-incoming #!!
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: Meatzone gridPath: /Maps/Shuttles/ShuttleEvent/meatzone.yml
- type: entity - type: entity
id: UnknownShuttleMicroshuttle id: UnknownShuttleMicroshuttle
@@ -232,7 +232,7 @@
weight: 11 # this is higher because its just a little generic personal shuttle weight: 11 # this is higher because its just a little generic personal shuttle
maxOccurrences: 4 maxOccurrences: 4
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: Microshuttle gridPath: /Maps/Shuttles/ShuttleEvent/microshuttle.yml
- type: entity - type: entity
id: UnknownShuttleSpacebus id: UnknownShuttleSpacebus
@@ -241,5 +241,5 @@
- type: StationEvent - type: StationEvent
startAnnouncement: station-event-unknown-shuttle-incoming #!! startAnnouncement: station-event-unknown-shuttle-incoming #!!
- type: LoadMapRule - type: LoadMapRule
preloadedGrid: Spacebus gridPath: /Maps/Shuttles/ShuttleEvent/spacebus.yml

View File

@@ -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