-
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.
Merge branch 'space-wizards:master' into CE-clothing
- Loading branch information
Showing
306 changed files
with
54,792 additions
and
36,192 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
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,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
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,30 @@ | ||
using Content.Client.UserInterface.Fragments; | ||
using Content.Shared.CartridgeLoader.Cartridges; | ||
using Robust.Client.UserInterface; | ||
|
||
namespace Content.Client.CartridgeLoader.Cartridges; | ||
|
||
public sealed partial class WantedListUi : UIFragment | ||
{ | ||
private WantedListUiFragment? _fragment; | ||
|
||
public override Control GetUIFragmentRoot() | ||
{ | ||
return _fragment!; | ||
} | ||
|
||
public override void Setup(BoundUserInterface userInterface, EntityUid? fragmentOwner) | ||
{ | ||
_fragment = new WantedListUiFragment(); | ||
} | ||
|
||
public override void UpdateState(BoundUserInterfaceState state) | ||
{ | ||
switch (state) | ||
{ | ||
case WantedListUiState cast: | ||
_fragment?.UpdateState(cast.Records); | ||
break; | ||
} | ||
} | ||
} |
Oops, something went wrong.