-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: closet skeleton locker clothing
* split skeletons loadouts to be on the locker * add closet skeleton gear
- Loading branch information
1 parent
828556b
commit 0ca6e7a
Showing
12 changed files
with
447 additions
and
4 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,11 @@ | ||
using Content.Shared.Roles; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Server.ClosetSkeleton; | ||
|
||
[RegisterComponent] | ||
public sealed partial class ClosetSkeletonComponent : Component | ||
{ | ||
[DataField] | ||
public ProtoId<StartingGearPrototype>? FallbackEquipment; | ||
} |
11 changes: 11 additions & 0 deletions
11
Content.Server/ClosetSkeleton/ClosetSkeletonLockerComponent.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,11 @@ | ||
using Content.Shared.Roles; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Server.ClosetSkeleton; | ||
|
||
[RegisterComponent] | ||
public sealed partial class ClosetSkeletonLockerComponent : Component | ||
{ | ||
[DataField] | ||
public ProtoId<StartingGearPrototype> Equipment; | ||
} |
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.Shared.Station; | ||
using Content.Server.StationEvents.Components; | ||
|
||
namespace Content.Server.ClosetSkeleton; | ||
|
||
public sealed partial class ClosetSkeletonSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly SharedStationSpawningSystem _station = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
SubscribeLocalEvent<ClosetSkeletonComponent, RandomEntityStorageSpawnedEvent>(OnSpawned); | ||
} | ||
|
||
private void OnSpawned(EntityUid uid, ClosetSkeletonComponent component, RandomEntityStorageSpawnedEvent args) | ||
{ | ||
if (!TryComp<ClosetSkeletonLockerComponent>(args.Storage, out var lockerComp)) | ||
{ | ||
_station.EquipStartingGear(uid, component.FallbackEquipment); | ||
return; | ||
} | ||
|
||
_station.EquipStartingGear(uid, lockerComp.Equipment); | ||
} | ||
} |
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
Oops, something went wrong.