Skip to content

Commit 0e3760d

Browse files
committed
Adds any player-controlled entity with the DogEmotes tag (corgi, mcgriff, etc). not borgi
1 parent dccf0c2 commit 0e3760d

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

Content.Server/_Starlight/GameTicking/Rules/Components/FullMoonHowlRuleComponent.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
using Robust.Shared.Audio;
2+
using Robust.Shared.Prototypes;
3+
using Content.Shared.Tag;
24

35
namespace Content.Server._Starlight.GameTicking.Rules.Components;
46

@@ -10,4 +12,7 @@ public sealed partial class FullMoonHowlRuleComponent : Component
1012

1113
[DataField]
1214
public HashSet<string> EligibleSpecies = new() { "Vulpkanin", "ProtoVulp" };
15+
16+
[DataField]
17+
public HashSet<ProtoId<TagPrototype>> EligibleMobTags = new() { "DogEmotes" };
1318
}

Content.Server/_Starlight/GameTicking/Rules/FullMoonHowlRule.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Content.Shared.Humanoid;
88
using Content.Shared.Pinpointer;
99
using Content.Shared.Station.Components;
10+
using Content.Shared.Tag;
1011
using Robust.Shared.Audio;
1112
using Robust.Shared.Player;
1213
using Robust.Shared.Random;
@@ -17,6 +18,7 @@ namespace Content.Server._Starlight.GameTicking.Rules;
1718
public sealed partial class FullMoonHowlRule : StationEventSystem<FullMoonHowlRuleComponent>
1819
{
1920
[Dependency] private IChatManager _chatManager = default!;
21+
[Dependency] private TagSystem _tag = default!;
2022

2123
protected override void Started(EntityUid uid, FullMoonHowlRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
2224
{
@@ -60,10 +62,17 @@ protected override void Started(EntityUid uid, FullMoonHowlRuleComponent compone
6062
if (Transform(attached).MapID != mainStationMap)
6163
return false;
6264

63-
if (!TryComp<HumanoidAppearanceComponent>(attached, out var humanoid))
64-
return false;
65+
if (TryComp<HumanoidAppearanceComponent>(attached, out var humanoid)
66+
&& component.EligibleSpecies.Contains(humanoid.Species))
67+
return true;
68+
69+
foreach (var tag in component.EligibleMobTags)
70+
{
71+
if (_tag.HasTag(attached, tag))
72+
return true;
73+
}
6574

66-
return component.EligibleSpecies.Contains(humanoid.Species);
75+
return false;
6776
});
6877

6978
// Location candidates are restricted to beacon entities on main station grids only.

Resources/Prototypes/_Starlight/GameRules/passiveevent.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,5 @@
188188
eligibleSpecies:
189189
- Vulpkanin
190190
- ProtoVulp
191+
eligibleMobTags:
192+
- DogEmotes

0 commit comments

Comments
 (0)