Skip to content

Commit

Permalink
Ebent fixes (#485)
Browse files Browse the repository at this point in the history
* USSP channel fix

* Update ebent species blacklist

* Change ussp energy weapon colors

* Added event role icons
  • Loading branch information
TheArturZh authored Oct 28, 2023
1 parent 0db2a21 commit 44c5e31
Show file tree
Hide file tree
Showing 25 changed files with 301 additions and 20 deletions.
49 changes: 49 additions & 0 deletions Content.Client/SS220/AdmemeEvents/EventRoleIcons.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt
using Content.Client.Antag;
using Content.Shared.Ghost;
using Content.Shared.SS220.AdmemeEvents;
using Content.Shared.StatusIcon;
using Content.Shared.StatusIcon.Components;
using Robust.Client.Player;
using Robust.Shared.Prototypes;

namespace Content.Client.SS220.AdmemeEvents;

/// <summary>
/// Used for the client to get status icons from other event roles.
/// </summary>
public sealed class EventRoleIconsSystem : AntagStatusIconSystem<EventRoleComponent>
{
[Dependency] private readonly IPlayerManager _player = default!;
[Dependency] private readonly IPrototypeManager _prototype = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<EventRoleComponent, GetStatusIconsEvent>(GetRoleIcon);
}

/// <summary>
/// Obtains a status icon from proto id mentioned in component
/// </summary>
private void GetRoleIcon(EntityUid uid, EventRoleComponent comp, ref GetStatusIconsEvent args)
{
GetStatusIcon(comp, ref args);
}

private void GetStatusIcon(EventRoleComponent targetRoleComp, ref GetStatusIconsEvent args)
{
var ent = _player.LocalPlayer?.ControlledEntity;

if (!HasComp<GhostComponent>(ent))
{
if (!TryComp<EventRoleComponent>(ent, out var playerRoleComp))
return;
else if (targetRoleComp.RoleGroupKey != playerRoleComp.RoleGroupKey)
return;
}

args.StatusIcons.Add(_prototype.Index(targetRoleComp.StatusIcon));
}
}
21 changes: 21 additions & 0 deletions Content.Shared/SS220/AdmemeEvents/EventRoleComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt
using Content.Shared.StatusIcon;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;

namespace Content.Shared.SS220.AdmemeEvents;

/// <summary>
/// Компонент добавляет возможность видеть указанный StatusIcon энтити,
/// при условии что у наблюдателя тоже есть этот компонент с одинаковым RoleGroupKey.
/// Используется чтобы ивентовые рольки видели друг-друга.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class EventRoleComponent : Component
{
[DataField(required: true), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public ProtoId<StatusIconPrototype> StatusIcon;

[DataField(required: true), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public string RoleGroupKey;
}
1 change: 1 addition & 0 deletions Resources/Prototypes/Entities/Mobs/Player/observer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
- Service
- Supply
- Syndicate
- USSPChannel
globalReceive: true
- type: Physics
bodyType: KinematicController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
Blunt: 10
Structural: 60
litDisarmMalus: 0.6
colorOptions:
- "#ff0000"
- type: Sprite
sprite: SS220/Objects/Weapons/Melee/e_hammer.rsi
layers:
Expand Down Expand Up @@ -51,4 +53,4 @@
- type: DisarmMalus
malus: 0
- type: Reflect
enabled: false
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
Slash: 30
Blunt: -4.5
litDisarmMalus: 0.6
colorOptions:
- "#ffcc00"
- type: Sprite
sprite: SS220/Objects/Weapons/Melee/e_sickle.rsi
layers:
Expand Down Expand Up @@ -51,4 +53,4 @@
- type: DisarmMalus
malus: 0
- type: Reflect
enabled: false
enabled: false
27 changes: 21 additions & 6 deletions Resources/Prototypes/SS220/Shitspawn/Ebent/Jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@
- type: randomHumanoidSettings
id: EbentIronSquadLeader
randomizeName: true
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth ]
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth, Felinid ]
components:
- type: Loadout
prototypes: [ EbentIronSquadLeaderGear ]
- type: EventRole
roleGroupKey: IronSquad
statusIcon: IOTCommand

- type: job
id: IronSquadLeader
Expand Down Expand Up @@ -200,10 +203,13 @@
- type: randomHumanoidSettings
id: EbentIronSquadEngineer
randomizeName: true
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth ]
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth, Felinid ]
components:
- type: Loadout
prototypes: [ EbentIronSquadEngineerGear ]
- type: EventRole
roleGroupKey: IronSquad
statusIcon: IOTEngineerOfficer

- type: job
id: IronSquadEngineer
Expand Down Expand Up @@ -314,14 +320,17 @@
- type: randomHumanoidSettings
id: EbentIronSquadCorpsman
randomizeName: true
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth ]
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth, Felinid ]
components:
- type: Loadout
prototypes: [ EbentIronSquadCorpsmanGear ]
- type: GhostRole
makeSentient: true
name: Полевой медик Железного Отряда
- type: GhostTakeoverAvailable
- type: EventRole
roleGroupKey: IronSquad
statusIcon: IOTMedic

- type: job
id: IronSquadCorpsman
Expand Down Expand Up @@ -442,10 +451,13 @@
- type: randomHumanoidSettings
id: EbentIronSquadCMO
randomizeName: true
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth ]
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth, Felinid ]
components:
- type: Loadout
prototypes: [ EbentIronSquadCMOGear ]
- type: EventRole
roleGroupKey: IronSquad
statusIcon: IOTMedicalOfficer

- type: job
id: IronSquadCMO
Expand Down Expand Up @@ -554,14 +566,17 @@
- type: randomHumanoidSettings
id: EbentIronSquadTrooper
randomizeName: true
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth ]
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth, Felinid ]
components:
- type: Loadout
prototypes: [ EbentIronSquadTrooperGear ]
- type: GhostRole
makeSentient: true
name: Боец Железного Отряда
- type: GhostTakeoverAvailable
- type: EventRole
roleGroupKey: IronSquad
statusIcon: IOTCombatant

- type: job
id: IronSquadFighter
Expand Down Expand Up @@ -599,4 +614,4 @@
suffix: Агент, Щитспавн, Ebent
components:
- type: Pda
id: AgentIDCardCmd
id: AgentIDCardCmd
27 changes: 21 additions & 6 deletions Resources/Prototypes/SS220/Shitspawn/Ebent/JobsERT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,13 @@
- type: randomHumanoidSettings
id: EbentSpecOpsLeader
randomizeName: true
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth ]
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth, Felinid ]
components:
- type: Loadout
prototypes: [ EbentSpecOpsLeaderGear ]
- type: EventRole
roleGroupKey: SpecOps
statusIcon: NTSpecOpsOfficer

- type: job
id: SpecOpsLeader
Expand Down Expand Up @@ -156,10 +159,13 @@
- type: randomHumanoidSettings
id: EbentSpecOpsEngineer
randomizeName: true
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth ]
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth, Felinid ]
components:
- type: Loadout
prototypes: [ EbentSpecOpsEngineerGear ]
- type: EventRole
roleGroupKey: SpecOps
statusIcon: NTEngineerOfficer

- type: job
id: SpecOpsEngineer
Expand Down Expand Up @@ -226,14 +232,17 @@
- type: randomHumanoidSettings
id: EbentSpecOpsCorpsman
randomizeName: true
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth ]
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth, Felinid ]
components:
- type: Loadout
prototypes: [ EbentSpecOpsCorpsmanGear ]
- type: GhostRole
makeSentient: true
name: Парамедик Специальных Операций
- type: GhostTakeoverAvailable
- type: EventRole
roleGroupKey: SpecOps
statusIcon: NTMedic

- type: job
id: SpecOpsCorpsman
Expand Down Expand Up @@ -300,10 +309,13 @@
- type: randomHumanoidSettings
id: EbentSpecOpsCMO
randomizeName: true
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth ]
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth, Felinid ]
components:
- type: Loadout
prototypes: [ EbentSpecOpsCMOGear ]
- type: EventRole
roleGroupKey: SpecOps
statusIcon: NTMedicalOfficer

- type: job
id: SpecOpsCMO
Expand Down Expand Up @@ -370,14 +382,17 @@
- type: randomHumanoidSettings
id: EbentSpecOpsTrooper
randomizeName: true
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth ]
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth, Felinid ]
components:
- type: Loadout
prototypes: [ EbentSpecOpsTrooperGear ]
- type: GhostRole
makeSentient: true
name: Рядовой Специальных Операций
- type: GhostTakeoverAvailable
- type: EventRole
roleGroupKey: SpecOps
statusIcon: NTCombatant

- type: job
id: SpecOpsFighter
Expand Down Expand Up @@ -410,4 +425,4 @@
suffix: СпецОпер, Щитспавн, Ebent
components:
- type: Pda
id: IDCardSpecOpsFighter
id: IDCardSpecOpsFighter
27 changes: 21 additions & 6 deletions Resources/Prototypes/SS220/Shitspawn/Ebent/JobsUssp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,13 @@
- type: randomHumanoidSettings
id: EbentUSSPLeader
randomizeName: true
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth ]
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth, Felinid ]
components:
- type: Loadout
prototypes: [ EbentUSSPLeaderGear ]
- type: EventRole
roleGroupKey: USSPEbent
statusIcon: USSPMarshal

- type: job
id: USSPLeader
Expand Down Expand Up @@ -165,10 +168,13 @@
- type: randomHumanoidSettings
id: EbentUSSPEngineer
randomizeName: true
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth ]
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth, Felinid ]
components:
- type: Loadout
prototypes: [ EbentUSSPEngineerGear ]
- type: EventRole
roleGroupKey: USSPEbent
statusIcon: USSPCombatant

- type: job
id: USSPEngineer
Expand Down Expand Up @@ -250,14 +256,17 @@
- type: randomHumanoidSettings
id: EbentUSSPCorpsman
randomizeName: true
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth ]
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth, Felinid ]
components:
- type: Loadout
prototypes: [ EbentUSSPCorpsmanGear ]
- type: GhostRole
makeSentient: true
name: Полевой медик СССП
- type: GhostTakeoverAvailable
- type: EventRole
roleGroupKey: USSPEbent
statusIcon: USSPMedic

- type: job
id: USSPCorpsman
Expand Down Expand Up @@ -339,10 +348,13 @@
- type: randomHumanoidSettings
id: EbentUSSPCMO
randomizeName: true
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth ]
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth, Felinid ]
components:
- type: Loadout
prototypes: [ EbentUSSPCMOGear ]
- type: EventRole
roleGroupKey: USSPEbent
statusIcon: USSPMedicalOfficer

- type: job
id: USSPCMO
Expand Down Expand Up @@ -424,14 +436,17 @@
- type: randomHumanoidSettings
id: EbentUSSPTrooper
randomizeName: true
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth ]
speciesBlacklist: [ Arachnid, Diona, Dwarf, Reptilian, Skeleton, SlimePerson, Vox, Moth, Felinid ]
components:
- type: Loadout
prototypes: [ EbentUSSPTrooperGear ]
- type: GhostRole
makeSentient: true
name: Красноармеец
- type: GhostTakeoverAvailable
- type: EventRole
roleGroupKey: USSPEbent
statusIcon: USSPCombatant

- type: job
id: USSPFighter
Expand Down Expand Up @@ -461,4 +476,4 @@
suffix: СССП, Ebent
components:
- type: Pda
id: UsspIDCardFighter
id: UsspIDCardFighter
Loading

0 comments on commit 44c5e31

Please sign in to comment.