-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-Authored-By: Kai5 <[email protected]> Co-Authored-By: sanek31 <[email protected]>
- Loading branch information
1 parent
4c2f775
commit 9de5f00
Showing
428 changed files
with
7,328 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System.Linq; | ||
using Content.Shared.Aliens.Components; | ||
using Content.Shared.Mobs; | ||
using Content.Shared.StatusIcon; | ||
using Content.Shared.StatusIcon.Components; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Client.Overlays; // WWDP SYSTEM | ||
|
||
/// <summary> | ||
/// This handles... | ||
/// </summary> | ||
public sealed class ShowInfectedIconsSystem : EquipmentHudSystem<ShowInfectedIconsComponent> | ||
{ | ||
[Dependency] private readonly IPrototypeManager _prototype = default!; | ||
/// <inheritdoc/> | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<AlienInfectedComponent, GetStatusIconsEvent>(OnGetStatusIconsEvent); | ||
} | ||
|
||
private void OnGetStatusIconsEvent(EntityUid uid, AlienInfectedComponent component, ref GetStatusIconsEvent ev) | ||
{ | ||
if (!IsActive) | ||
return; | ||
if (component.GrowthStage <= 5) | ||
{ | ||
if (_prototype.TryIndex(component.InfectedIcons.ElementAt(component.GrowthStage), out var iconPrototype)) | ||
ev.StatusIcons.Add(iconPrototype); | ||
} | ||
else | ||
{ | ||
if (_prototype.TryIndex(component.InfectedIcons.ElementAt(5), out var iconPrototype)) | ||
ev.StatusIcons.Add(iconPrototype); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Robust.Client.Graphics; | ||
|
||
namespace Content.Client.Aliens; | ||
|
||
/// <summary> | ||
/// This is used for... | ||
/// </summary> | ||
[RegisterComponent] | ||
public sealed partial class JumpVisualsComponent : Component | ||
{ | ||
|
||
} | ||
|
||
public enum JumpLayers : byte | ||
{ | ||
Jumping | ||
} |
13 changes: 13 additions & 0 deletions
13
Content.Client/_White/Xenomorphs/Systems/PlasmaVesselSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace Content.Client.Aliens.Systems; | ||
|
||
/// <summary> | ||
/// This handles... | ||
/// </summary> | ||
public sealed class PlasmaVesselSystem : EntitySystem | ||
{ | ||
/// <inheritdoc/> | ||
public override void Initialize() | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Content.Server.Body.Systems; | ||
using Content.Server.Medical.Components; | ||
using Content.Shared.Medical; | ||
|
||
namespace Content.Server.Medical; // WWDP SYSTEM | ||
|
||
/// <summary> | ||
/// This handles... | ||
/// </summary> | ||
public sealed class VomitActionSystem : SharedVomitActionSystem | ||
{ | ||
/// <inheritdoc/> | ||
[Dependency] private readonly VomitSystem _vomit = default!; | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<VomitActionComponent, VomitActionEvent>(OnVomitAction); | ||
} | ||
|
||
protected void OnVomitAction(EntityUid uid, VomitActionComponent component, VomitActionEvent args) | ||
{ | ||
_vomit.Vomit(uid, component.ThirstAdded, component.HungerAdded); | ||
ContainerSystem.EmptyContainer(component.Stomach, true); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
Content.Server/Polymorph/Components/TimedPolymorphComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Threading; | ||
using Content.Shared.Polymorph; | ||
using Content.Shared.Whitelist; | ||
using Robust.Shared.Audio; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Server.Polymorph.Components; // WWDP SYSTEM | ||
|
||
/// <summary> | ||
/// This is used for polymorphing entity after time | ||
/// </summary> | ||
[RegisterComponent] | ||
public sealed partial class TimedPolymorphComponent : Component | ||
{ | ||
[DataField(required: true)] | ||
public ProtoId<PolymorphPrototype> PolymorphPrototype; | ||
|
||
[DataField] | ||
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Magic/forcewall.ogg"); | ||
|
||
[DataField] | ||
public float PolymorphTime = 5f; | ||
|
||
[DataField] | ||
public bool Enabled = true; | ||
|
||
public CancellationTokenSource? TokenSource; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System.Threading; | ||
using Content.Server.Polymorph.Components; | ||
|
||
namespace Content.Server.Polymorph.Systems; // WWDP SYSTEM | ||
|
||
/// <summary> | ||
/// This handles polymorphing entity after time | ||
/// </summary> | ||
public sealed class TimedPolymorphSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly PolymorphSystem _polymorph = default!; | ||
/// <inheritdoc/> | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
SubscribeLocalEvent<TimedPolymorphComponent, ComponentInit>(OnPolymorphInit); | ||
SubscribeLocalEvent<TimedPolymorphComponent, ComponentShutdown>(OnTimedPolymorphShutdown); | ||
} | ||
|
||
private void OnPolymorphInit(EntityUid uid, TimedPolymorphComponent component, ComponentInit args) | ||
{ | ||
component.TokenSource?.Cancel(); | ||
component.TokenSource = new CancellationTokenSource(); | ||
uid.SpawnRepeatingTimer(TimeSpan.FromSeconds(component.PolymorphTime), () => OnTimerFired(uid, component), component.TokenSource.Token); | ||
} | ||
|
||
private void OnTimerFired(EntityUid uid, TimedPolymorphComponent component) | ||
{ | ||
if (component.Enabled) | ||
_polymorph.PolymorphEntity(uid, component.PolymorphPrototype); | ||
} | ||
|
||
private void OnTimedPolymorphShutdown(EntityUid uid, TimedPolymorphComponent component, ComponentShutdown args) | ||
{ | ||
component.TokenSource?.Cancel(); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
Content.Server/Spawners/Components/AreaSpawnerComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System.Threading; | ||
using Robust.Shared.Prototypes; | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; | ||
|
||
namespace Content.Server.Spawners.Components; // WWDP SYSTEM | ||
|
||
/// <summary> | ||
/// Spawns Entities in area around spawner | ||
/// </summary> | ||
[RegisterComponent] | ||
public sealed partial class AreaSpawnerComponent : Component | ||
{ | ||
// Maximum offset of entities spawned. | ||
[ViewVariables(VVAccess.ReadWrite)] | ||
[DataField] | ||
public float Radius; | ||
|
||
// Prototype of entity spawned | ||
[ViewVariables(VVAccess.ReadWrite)] | ||
[DataField("spawnPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))] | ||
public string SpawnPrototype; | ||
|
||
/// <summary> | ||
/// Length of the interval between spawn attempts. | ||
/// </summary> | ||
[DataField] | ||
public int IntervalSeconds = 20; | ||
|
||
// This will spawn entities to every tile in spawn radius | ||
[DataField] | ||
public bool SpawnToAllValidTiles = true; | ||
|
||
[ViewVariables] | ||
public int SpawnRadius; | ||
|
||
public CancellationTokenSource? TokenSource; | ||
} |
Oops, something went wrong.