-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* inner anomaly * anomaly pulse action * test anom mine * Update anomalies.yml * fix action cooldown * pyro_eyes * clientsystem * experiments * blya * some telegraphy * shock eyes! * shadow eyes * separate files * frosty eyes * fix * flora eyes * bluespace eyes * flesh eyes * redoing injction * auto add layers * пипяу * new injector component * stupid me * nice marker injectors * anomaly spawn on shutdown * gravity anom * dead anomaly spawning * add VOX states * sprite specific layers support * technology anom infection * auto detach anomalies that have moved away * Update anomaly_injections.yml * anomalyspawner integration * rock anomaly! * Update anomaly_injections.yml * fix crash bug * tag filter * fix anom dublication spawns * Update anomaly.yml * Update InnerBodyAnomalyComponent.cs * Update anomaly_injections.yml * dont spawn anomalies after decay * fix morb sprite, add end message * gravity resprite * admin logging, double injection fix * make flesh and living light mobs friendly to anomaly hosts * popups * severity feedback * sloth review * A * keep organs after gib * punpun host * sloth synchronization * Update arachnid.yml * increase infections spawnrate
- Loading branch information
Showing
49 changed files
with
1,859 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using Content.Shared.Anomaly.Components; | ||
using Content.Shared.Anomaly.Effects; | ||
using Content.Shared.Body.Components; | ||
using Robust.Client.GameObjects; | ||
|
||
namespace Content.Client.Anomaly.Effects; | ||
|
||
public sealed class ClientInnerBodyAnomalySystem : SharedInnerBodyAnomalySystem | ||
{ | ||
public override void Initialize() | ||
{ | ||
SubscribeLocalEvent<InnerBodyAnomalyComponent, AfterAutoHandleStateEvent>(OnAfterHandleState); | ||
SubscribeLocalEvent<InnerBodyAnomalyComponent, ComponentShutdown>(OnCompShutdown); | ||
} | ||
|
||
private void OnAfterHandleState(Entity<InnerBodyAnomalyComponent> ent, ref AfterAutoHandleStateEvent args) | ||
{ | ||
if (!TryComp<SpriteComponent>(ent, out var sprite)) | ||
return; | ||
|
||
if (ent.Comp.FallbackSprite is null) | ||
return; | ||
|
||
if (!sprite.LayerMapTryGet(ent.Comp.LayerMap, out var index)) | ||
index = sprite.LayerMapReserveBlank(ent.Comp.LayerMap); | ||
|
||
if (TryComp<BodyComponent>(ent, out var body) && | ||
body.Prototype is not null && | ||
ent.Comp.SpeciesSprites.TryGetValue(body.Prototype.Value, out var speciesSprite)) | ||
{ | ||
sprite.LayerSetSprite(index, speciesSprite); | ||
} | ||
else | ||
{ | ||
sprite.LayerSetSprite(index, ent.Comp.FallbackSprite); | ||
} | ||
|
||
sprite.LayerSetVisible(index, true); | ||
sprite.LayerSetShader(index, "unshaded"); | ||
} | ||
|
||
private void OnCompShutdown(Entity<InnerBodyAnomalyComponent> ent, ref ComponentShutdown args) | ||
{ | ||
if (!TryComp<SpriteComponent>(ent, out var sprite)) | ||
return; | ||
|
||
var index = sprite.LayerMapGet(ent.Comp.LayerMap); | ||
sprite.LayerSetVisible(index, false); | ||
} | ||
} |
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
Oops, something went wrong.