Skip to content

Commit

Permalink
Merge branch 'master' into BorgBorgBorg
Browse files Browse the repository at this point in the history
  • Loading branch information
DangerRevolution committed Feb 1, 2024
2 parents 96b493c + 4e6fca6 commit f1adb74
Show file tree
Hide file tree
Showing 25 changed files with 26,773 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Content.Server.StationEvents.Events;
using Robust.Shared.Prototypes;

namespace Content.Server.StationEvents.Components;

[RegisterComponent, Access(typeof(GlimmerMobRule))]
public sealed partial class GlimmerMobRuleComponent : Component
{
[DataField(required: true)]
public EntProtoId MobPrototype = string.Empty;
}
56 changes: 56 additions & 0 deletions Content.Server/DeltaV/StationEvents/Events/GlimmerMobSpawnRule.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
using System.Linq;
using Robust.Shared.Random;
using Content.Server.GameTicking.Rules.Components;
using Content.Server.NPC.Components;
using Content.Server.Psionics.Glimmer;
using Content.Server.StationEvents.Components;
using Content.Shared.Psionics.Glimmer;
using Content.Shared.Abilities.Psionics;

namespace Content.Server.StationEvents.Events;

public sealed class GlimmerMobRule : StationEventSystem<GlimmerMobRuleComponent>
{
[Dependency] private readonly IRobustRandom _robustRandom = default!;
[Dependency] private readonly GlimmerSystem _glimmerSystem = default!;


protected override void Started(EntityUid uid, GlimmerMobRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
{
base.Started(uid, component, gameRule, args);

var glimmerSources = EntityQuery<GlimmerSourceComponent, TransformComponent>().ToList();
var normalSpawnLocations = EntityQuery<VentCritterSpawnLocationComponent, TransformComponent>().ToList();
var hiddenSpawnLocations = EntityQuery<MidRoundAntagSpawnLocationComponent, TransformComponent>().ToList();

var baseCount = Math.Max(1, EntityQuery<PsionicComponent, NpcFactionMemberComponent>().Count() / 10);
int multiplier = Math.Max(1, (int) _glimmerSystem.GetGlimmerTier() - 2);

var total = baseCount * multiplier;

int i = 0;
while (i < total)
{
if (glimmerSources.Count != 0 && _robustRandom.Prob(0.4f))
{
Spawn(component.MobPrototype, _robustRandom.Pick(glimmerSources).Item2.Coordinates);
i++;
continue;
}

if (normalSpawnLocations.Count != 0)
{
Spawn(component.MobPrototype, _robustRandom.Pick(normalSpawnLocations).Item2.Coordinates);
i++;
continue;
}

if (hiddenSpawnLocations.Count != 0)
{
Spawn(component.MobPrototype, _robustRandom.Pick(hiddenSpawnLocations).Item2.Coordinates);
i++;
continue;
}
}
}
}
4 changes: 4 additions & 0 deletions Resources/Audio/DeltaV/Glimmer_Creatures/attributions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- files: [mite.ogg]
copyright: '"mite.ogg" by leonardo-dabepis'
license: CC0-1.0
source: https://github.com/DeltaV-Station/Delta-v/pull/564
Binary file added Resources/Audio/DeltaV/Glimmer_Creatures/mite.ogg
Binary file not shown.
26 changes: 26 additions & 0 deletions Resources/Changelog/DeltaVChangelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1461,3 +1461,29 @@ Entries:
security, instead of magically appearing in a cell.
id: 219
time: '2024-01-31T22:02:05.0000000+00:00'
- author: DangerRevolution
changes:
- type: Add
message: Added sprites for Syndicate Listener's Headsets
id: 220
time: '2024-02-01T18:29:24.0000000+00:00'
- author: leonardo-dabepis
changes:
- type: Add
message: a new pest from beyond the noosphere!
id: 221
time: '2024-02-01T18:32:28.0000000+00:00'
- author: Adrian16199
changes:
- type: Add
message: An alternative wagging tail for felinids.
id: 222
time: '2024-02-01T18:32:54.0000000+00:00'
- author: ODJ
changes:
- type: Tweak
message: Moth's now take less heat dmg.
- type: Tweak
message: You now move a little faster when hurt than previously
id: 223
time: '2024-02-01T18:34:18.0000000+00:00'
2 changes: 2 additions & 0 deletions Resources/Locale/en-US/deltav/markings/felinid.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ marking-FelinidFluffyTailRings-Felinid_fluffy_tail_full = Fluffy tail
marking-FelinidFluffyTailRings-felinid_fluffy_tail_rings = Fluffy Tail Rings
marking-FelinidFluffyTail = Fluffy Tail
marking-FelinidFluffyTailRings = Fluffy Tail with rings
marking-FelinidAlternativeTail = Alternative Wagging Tail
marking-FelinidAlternativeTail-m_waggingtail_cat_FRONT = Alternative Wagging Tail
12,883 changes: 12,883 additions & 0 deletions Resources/Maps/Shuttles/DeltaV/NTES_BC20.yml

Large diffs are not rendered by default.

Loading

0 comments on commit f1adb74

Please sign in to comment.