Skip to content

Commit

Permalink
more harmless critters from events (#2518)
Browse files Browse the repository at this point in the history
* more harmless critters from events

* adjust it to be less extreme

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
  • Loading branch information
deltanedas authored Jan 2, 2025
1 parent 3adee14 commit e2b7907
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Content.Server/StationEvents/Events/VentCrittersRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down
13 changes: 13 additions & 0 deletions Resources/Prototypes/GameRules/pests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
7 changes: 5 additions & 2 deletions Resources/Prototypes/_DV/GameRules/events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e2b7907

Please sign in to comment.