From e2b7907e7913f3ea2a76de6935dcb550a1421669 Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Thu, 2 Jan 2025 22:18:09 +0000 Subject: [PATCH] more harmless critters from events (#2518) * more harmless critters from events * adjust it to be less extreme --------- Co-authored-by: deltanedas <@deltanedas:kde.org> --- .../StationEvents/Events/VentCrittersRule.cs | 4 ++-- Resources/Prototypes/GameRules/pests.yml | 13 +++++++++++++ Resources/Prototypes/_DV/GameRules/events.yml | 7 +++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Content.Server/StationEvents/Events/VentCrittersRule.cs b/Content.Server/StationEvents/Events/VentCrittersRule.cs index 90c0cc262dc..8f508fdb749 100644 --- a/Content.Server/StationEvents/Events/VentCrittersRule.cs +++ b/Content.Server/StationEvents/Events/VentCrittersRule.cs @@ -61,8 +61,8 @@ protected override void Ended(EntityUid uid, VentCrittersRuleComponent comp, Gam return; var players = _antag.GetTotalPlayerCount(_player.Sessions); - var min = comp.Min * players / comp.PlayerRatio; - var max = comp.Max * players / comp.PlayerRatio; + var min = Math.Max(comp.Min, comp.Min * players / comp.PlayerRatio); + var max = Math.Max(comp.Max, comp.Max * players / comp.PlayerRatio); var count = Math.Max(RobustRandom.Next(min, max), 1); Log.Info($"Spawning {count} critters for {ToPrettyString(uid):rule}"); for (int i = 0; i < count; i++) diff --git a/Resources/Prototypes/GameRules/pests.yml b/Resources/Prototypes/GameRules/pests.yml index e156211e367..b7e0a5abab8 100644 --- a/Resources/Prototypes/GameRules/pests.yml +++ b/Resources/Prototypes/GameRules/pests.yml @@ -31,6 +31,9 @@ - type: PrecognitionResult # DeltaV - Precogniton message: psionic-power-precognition-mouse-migration-result-message - type: VentCrittersRule + min: 10 # DeltaV + max: 15 # DeltaV + playerRatio: 55 # DeltaV: Higher base values, less player scaling table: !type:GroupSelector # DeltaV: EntityTable instead of spawn entries children: - id: MobMouse @@ -54,6 +57,9 @@ - type: PrecognitionResult # DeltaV - Precogniton message: psionic-power-precognition-king-rat-migration-result-message - type: VentCrittersRule + min: 10 # DeltaV + max: 20 # DeltaV + playerRatio: 70 # DeltaV: Mostly ignore player scaling table: !type:GroupSelector # DeltaV: EntityTable instead of spawn entries children: - id: MobMouse @@ -77,6 +83,9 @@ - type: PrecognitionResult # DeltaV - Precogniton message: psionic-power-precognition-cockroach-migration-result-message - type: VentCrittersRule + min: 8 # DeltaV + max: 20 # DeltaV + playerRatio: 80 # DeltaV: Mostly ignore player scaling table: !type:GroupSelector # DeltaV: EntityTable instead of spawn entries children: - id: MobCockroach @@ -97,6 +106,9 @@ - type: PrecognitionResult # DeltaV - Precogniton message: psionic-power-precognition-snail-migration-result-message - type: VentCrittersRule + min: 4 # DeltaV + max: 8 # DeltaV + playerRatio: 60 # DeltaV: Somewhat ignore player scaling table: !type:GroupSelector # DeltaV: EntityTable instead of spawn entries children: - id: MobSnail @@ -118,6 +130,7 @@ - type: PrecognitionResult # DeltaV - Precogniton message: psionic-power-precognition-snail-migration-result-message - type: VentCrittersRule + playerRatio: 20 # DeltaV: Snails aren't dangerous, but they should be more special table: !type:GroupSelector # DeltaV: EntityTable instead of spawn entries children: - id: MobSnail diff --git a/Resources/Prototypes/_DV/GameRules/events.yml b/Resources/Prototypes/_DV/GameRules/events.yml index 0522ec99fdc..3ba78e31290 100644 --- a/Resources/Prototypes/_DV/GameRules/events.yml +++ b/Resources/Prototypes/_DV/GameRules/events.yml @@ -49,7 +49,7 @@ - type: PrecognitionResult message: psionic-power-precognition-xeno-vents-result-message - type: VentCrittersRule - table: !type:GroupSelector # DeltaV: EntityTable instead of spawn entries + table: !type:GroupSelector children: - id: MobXeno weight: 0.55 @@ -80,7 +80,10 @@ - type: PrecognitionResult message: psionic-power-precognition-mothroach-spawn-result-message - type: VentCrittersRule - table: # DeltaV: EntityTable instead of spawn entries + min: 5 + max: 10 + playerRatio: 65 # mothroaches aren't dangerous, but don't need as many as mice + table: id: MobMothroach - type: entity