Skip to content

Commit

Permalink
Merge branch 'DeltaV-Station:master' into Neptune-Outfit-Sock-Submiti…
Browse files Browse the repository at this point in the history
…on-1
  • Loading branch information
DangerRevolution authored Feb 4, 2024
2 parents b388b99 + 8d7b2f0 commit 7a1da4b
Show file tree
Hide file tree
Showing 96 changed files with 372,223 additions and 98,089 deletions.
3 changes: 2 additions & 1 deletion Content.IntegrationTests/Tests/PostMapInitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public sealed class PostMapInitTest
"Arena", //DeltaV
"Asterisk", //DeltaV
"TheHive", //DeltaV
"Hammurabi" //DeltaV
"Hammurabi", //DeltaV
"Submarine" //DeltaV
};

/// <summary>
Expand Down
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;
}
}
}
}
14 changes: 14 additions & 0 deletions Content.Server/Spawners/EntitySystems/ContainerSpawnPointSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ private void OnSpawnPlayer(PlayerSpawningEvent args)
if (args.SpawnResult != null)
return;

// DeltaV - Ignore these two desired spawn types
if (args.DesiredSpawnPointType is SpawnPointType.Observer or SpawnPointType.LateJoin)
return;

var query = EntityQueryEnumerator<ContainerSpawnPointComponent, ContainerManagerComponent, TransformComponent>();
var possibleContainers = new List<Entity<ContainerSpawnPointComponent, ContainerManagerComponent, TransformComponent>>();

Expand All @@ -34,6 +38,16 @@ private void OnSpawnPlayer(PlayerSpawningEvent args)
if (args.Station != null && _station.GetOwningStation(uid, xform) != args.Station)
continue;

// DeltaV - Custom override for override spawnpoints, only used for prisoners currently. This shouldn't run for any other jobs
if (args.DesiredSpawnPointType == SpawnPointType.Job)
{
if (spawnPoint.SpawnType != SpawnPointType.Job || spawnPoint.Job != args.Job?.Prototype)
continue;

possibleContainers.Add((uid, spawnPoint, container, xform));
continue;
}

// If it's unset, then we allow it to be used for both roundstart and midround joins
if (spawnPoint.SpawnType == SpawnPointType.Unset)
{
Expand Down
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.
87 changes: 87 additions & 0 deletions Resources/Changelog/DeltaVChangelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1427,3 +1427,90 @@ Entries:
message: Updated Asterisk Station.
id: 214
time: '2024-01-30T21:09:41.0000000+00:00'
- author: DebugOk
changes:
- type: Tweak
message: >-
You should be able to exit cryo even after leaving now, meaning it just
keeps your body safe?
id: 215
time: '2024-01-31T07:41:58.0000000+00:00'
- author: DebugOk
changes:
- type: Fix
message: Prisoners will no longer spawn in cryopods instead of in the brig.
id: 216
time: '2024-01-31T09:42:57.0000000+00:00'
- author: leonardo-dabepis
changes:
- type: Tweak
message: Made HCV cocktail less immediately lethal (damnation!!!)
id: 217
time: '2024-01-31T10:34:16.0000000+00:00'
- author: Adrian16199
changes:
- type: Tweak
message: Shoukou has received the cryopods.
id: 218
time: '2024-01-31T15:34:32.0000000+00:00'
- author: DebugOk
changes:
- type: Tweak
message: >-
Prisoners can now spawn from a special cryopod that can be put in
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'
- author: Rose and Unicorn On LSD
changes:
- type: Add
message: >-
Added Submarine Station. A new map with a heavy emphasis on the medical
dept. Features also include a full zoo, park with an ice rink, and some
sort of experiment-gone-bad deep within the epistemics labs.
id: 224
time: '2024-02-01T19:30:23.0000000+00:00'
- author: UnicornOnLSD
changes:
- type: Tweak
message: Submarine station has received adjustments after feedback from HR
id: 225
time: '2024-02-03T06:50:49.0000000+00:00'
- author: Colin-Tel
changes:
- type: Tweak
message: Updated Edge Station.
id: 226
time: '2024-02-04T02:30:44.0000000+00:00'
- author: UnicornOnLSD
changes:
- type: Tweak
message: Submarine has been made better, stronger, and not faster.
id: 227
time: '2024-02-04T02:31:24.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
3 changes: 3 additions & 0 deletions Resources/Locale/en-US/deltav/reagents/generic.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Messages that can be utilized by multiple reagents.

generic-reagent-effect-damnation = Your liver cries out in agony! Damnation!
Loading

0 comments on commit 7a1da4b

Please sign in to comment.