Skip to content

Commit

Permalink
adjust it to be less extreme
Browse files Browse the repository at this point in the history
  • Loading branch information
deltanedas committed Dec 25, 2024
1 parent f086690 commit 94f504c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 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
4 changes: 3 additions & 1 deletion Resources/Prototypes/DeltaV/GameRules/events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@
- type: PrecognitionResult
message: psionic-power-precognition-mothroach-spawn-result-message
- type: VentCrittersRule
playerRatio: 15 # mothroaches aren't dangerous, but don't need as many as mice
min: 5
max: 10
playerRatio: 65 # mothroaches aren't dangerous, but don't need as many as mice
table:
id: MobMothroach

Expand Down
20 changes: 12 additions & 8 deletions Resources/Prototypes/GameRules/pests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
- type: PrecognitionResult # DeltaV - Precogniton
message: psionic-power-precognition-mouse-migration-result-message
- type: VentCrittersRule
min: 3 # DeltaV
max: 4 # DeltaV
playerRatio: 8 # DeltaV: Mice aren't dangerous
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 @@ -57,9 +57,9 @@
- type: PrecognitionResult # DeltaV - Precogniton
message: psionic-power-precognition-king-rat-migration-result-message
- type: VentCrittersRule
min: 3 # DeltaV
max: 4 # DeltaV
playerRatio: 8 # DeltaV: Mice aren't dangerous
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 @@ -83,7 +83,9 @@
- type: PrecognitionResult # DeltaV - Precogniton
message: psionic-power-precognition-cockroach-migration-result-message
- type: VentCrittersRule
playerRatio: 8 # DeltaV: Cockroaches aren't dangerous
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 @@ -104,7 +106,9 @@
- 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
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 Down

0 comments on commit 94f504c

Please sign in to comment.