Axui
This commit is contained in:
@@ -19,9 +19,13 @@ using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Random;
|
||||
using System.Numerics;
|
||||
using Content.Server.IdentityManagement;
|
||||
using Content.Shared._Amour.GrammarSystem;
|
||||
using Content.Shared.IdentityManagement.Components;
|
||||
using Content.Shared.Movement.Pulling.Components;
|
||||
using Content.Shared.Movement.Pulling.Systems;
|
||||
using Robust.Shared.Collections;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.GameObjects.Components.Localization;
|
||||
using Robust.Shared.Map.Components;
|
||||
|
||||
namespace Content.Server.Implants;
|
||||
@@ -41,6 +45,7 @@ public sealed class SubdermalImplantSystem : SharedSubdermalImplantSystem
|
||||
[Dependency] private readonly EntityLookupSystem _lookupSystem = default!;
|
||||
[Dependency] private readonly SharedMapSystem _mapSystem = default!;
|
||||
[Dependency] private readonly IdentitySystem _identity = default!; // WD
|
||||
[Dependency] private readonly GrammarSystem _grammar = default!; //Amour
|
||||
|
||||
private EntityQuery<PhysicsComponent> _physicsQuery;
|
||||
private HashSet<Entity<MapGridComponent>> _targetGrids = [];
|
||||
@@ -56,6 +61,7 @@ public sealed class SubdermalImplantSystem : SharedSubdermalImplantSystem
|
||||
SubscribeLocalEvent<SubdermalImplantComponent, ActivateImplantEvent>(OnActivateImplantEvent);
|
||||
SubscribeLocalEvent<SubdermalImplantComponent, UseScramImplantEvent>(OnScramImplant);
|
||||
SubscribeLocalEvent<SubdermalImplantComponent, UseDnaScramblerImplantEvent>(OnDnaScramblerImplant);
|
||||
SubscribeLocalEvent<SubdermalImplantComponent, UseGenderSwapImplantEvent>(OnGenderSwapImplant); //Amour
|
||||
|
||||
}
|
||||
|
||||
@@ -225,4 +231,42 @@ public sealed class SubdermalImplantSystem : SharedSubdermalImplantSystem
|
||||
args.Handled = true;
|
||||
QueueDel(uid);
|
||||
}
|
||||
|
||||
//Amour Start
|
||||
private void OnGenderSwapImplant(EntityUid uid, SubdermalImplantComponent component, UseGenderSwapImplantEvent args)
|
||||
{
|
||||
if (component.ImplantedEntity is not { } ent)
|
||||
return;
|
||||
|
||||
if (TryComp<HumanoidAppearanceComponent>(ent, out var humanoid) && humanoid.Sex != Sex.Unsexed)
|
||||
{
|
||||
var newSex = humanoid.Sex;
|
||||
|
||||
if (humanoid.Sex == Sex.Male)
|
||||
newSex = Sex.Female;
|
||||
else
|
||||
newSex = Sex.Male;
|
||||
|
||||
_humanoidAppearance.SetSex(ent, newSex);
|
||||
}
|
||||
|
||||
if (TryComp<GrammarComponent>(ent, out var grammar) &&
|
||||
(grammar.Gender != Gender.Neuter || grammar.Gender != Gender.Epicene))
|
||||
{
|
||||
var newGender = grammar.Gender;
|
||||
|
||||
if (grammar.Gender == Gender.Male)
|
||||
newGender = Gender.Female;
|
||||
else
|
||||
newGender = Gender.Male;
|
||||
|
||||
_grammar.SetGender((ent, grammar), newGender);
|
||||
if (HasComp<IdentityComponent>(ent))
|
||||
_identity.QueueIdentityUpdate(ent);
|
||||
}
|
||||
|
||||
args.Handled = true;
|
||||
QueueDel(uid);
|
||||
}
|
||||
//Amour End
|
||||
}
|
||||
|
||||
@@ -89,3 +89,10 @@ public sealed partial class UseDnaScramblerImplantEvent : InstantActionEvent
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//Amour
|
||||
public sealed partial class UseGenderSwapImplantEvent : InstantActionEvent
|
||||
{
|
||||
|
||||
}
|
||||
//Amour
|
||||
|
||||
@@ -358,3 +358,18 @@
|
||||
itemIconStyle: NoItem
|
||||
useDelay: 1 # emote spam
|
||||
event: !type:ToggleActionEvent
|
||||
|
||||
#Amour
|
||||
- type: entity
|
||||
id: ActionActivateGenderSwapImplant
|
||||
name: Swap Gender
|
||||
description: Swaps your gender between male/female.
|
||||
components:
|
||||
- type: InstantAction
|
||||
charges: 1
|
||||
itemIconStyle: BigAction
|
||||
priority: -20
|
||||
icon:
|
||||
sprite: Clothing/OuterClothing/Hardsuits/lingspacesuit.rsi
|
||||
state: icon
|
||||
event: !type:UseGenderSwapImplantEvent
|
||||
|
||||
@@ -918,6 +918,7 @@
|
||||
- Saw
|
||||
- Hemostat
|
||||
- ClothingEyesGlassesChemical
|
||||
- GenderSwapImplanter #Amour
|
||||
dynamicRecipes:
|
||||
- HandheldCrewMonitor
|
||||
- ChemicalPayload
|
||||
|
||||
@@ -254,3 +254,11 @@
|
||||
Steel: 600
|
||||
Plastic: 300
|
||||
|
||||
#Amour
|
||||
- type: latheRecipe
|
||||
id: GenderSwapImplanter
|
||||
result: GenderSwapImplanter
|
||||
completetime: 1
|
||||
materials:
|
||||
Glass: 600
|
||||
Steel: 600
|
||||
|
||||
@@ -42,3 +42,12 @@
|
||||
components:
|
||||
- type: Implanter
|
||||
implant: NeuroStabilizationImplant
|
||||
|
||||
#Amour
|
||||
- type: entity
|
||||
id: GenderSwapImplanter
|
||||
name: gender swap implanter
|
||||
parent: BaseImplantOnlyImplanter
|
||||
components:
|
||||
- type: Implanter
|
||||
implant: GenderSwapImplant
|
||||
|
||||
@@ -49,3 +49,13 @@
|
||||
tags:
|
||||
- NeuroStabilization
|
||||
|
||||
#Amour
|
||||
- type: entity
|
||||
parent: BaseSubdermalImplant
|
||||
id: GenderSwapImplant
|
||||
name: Gender Swap Implant
|
||||
description: This swaps the users gender on activation.
|
||||
noSpawn: true
|
||||
components:
|
||||
- type: SubdermalImplant
|
||||
implantAction: ActionActivateGenderSwapImplant
|
||||
|
||||
Reference in New Issue
Block a user