New implanters for uplink (#18038)
* New implants for uplink * made changes based on reviews * was meant to be 3
This commit is contained in:
@@ -6,6 +6,7 @@ using Content.Shared.Implants;
|
||||
using Content.Shared.Implants.Components;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Server.Polymorph.Systems;
|
||||
|
||||
namespace Content.Server.Implants;
|
||||
|
||||
@@ -14,6 +15,7 @@ public sealed class SubdermalImplantSystem : SharedSubdermalImplantSystem
|
||||
[Dependency] private readonly CuffableSystem _cuffable = default!;
|
||||
[Dependency] private readonly StoreSystem _store = default!;
|
||||
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
||||
[Dependency] private readonly PolymorphSystem _polymorph = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -21,6 +23,9 @@ public sealed class SubdermalImplantSystem : SharedSubdermalImplantSystem
|
||||
|
||||
SubscribeLocalEvent<SubdermalImplantComponent, UseFreedomImplantEvent>(OnFreedomImplant);
|
||||
SubscribeLocalEvent<StoreComponent, ImplantRelayEvent<AfterInteractUsingEvent>>(OnStoreRelay);
|
||||
SubscribeLocalEvent<SubdermalImplantComponent, ActivateImplantEvent>(OnActivateImplantEvent);
|
||||
SubscribeLocalEvent<SubdermalImplantComponent, UseDnaScramblerImplantEvent>(OnDnaScramblerImplant);
|
||||
|
||||
}
|
||||
|
||||
private void OnStoreRelay(EntityUid uid, StoreComponent store, ImplantRelayEvent<AfterInteractUsingEvent> implantRelay)
|
||||
@@ -56,4 +61,29 @@ public sealed class SubdermalImplantSystem : SharedSubdermalImplantSystem
|
||||
_cuffable.Uncuff(component.ImplantedEntity.Value, cuffs.LastAddedCuffs, cuffs.LastAddedCuffs);
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
private void OnActivateImplantEvent(EntityUid uid, SubdermalImplantComponent component, ActivateImplantEvent args)
|
||||
{
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
private void OnDnaScramblerImplant(EntityUid uid, SubdermalImplantComponent component, UseDnaScramblerImplantEvent args)
|
||||
{
|
||||
if (component.ImplantedEntity == null)
|
||||
return;
|
||||
|
||||
var newIdentity = _polymorph.PolymorphEntity(component.ImplantedEntity.Value, "Scrambled");
|
||||
|
||||
//checks if someone is trying to use a dna scrambler implant while already scrambled
|
||||
if (newIdentity == null)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("scramble-attempt-while-scrambled-popup"), component.ImplantedEntity.Value, component.ImplantedEntity.Value);
|
||||
return;
|
||||
}
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("scramble-implant-activated-popup", ("identity", newIdentity.Value)), newIdentity.Value, newIdentity.Value);
|
||||
|
||||
args.Handled = true;
|
||||
QueueDel(uid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,3 +61,8 @@ public sealed class OpenUplinkImplantEvent : InstantActionEvent
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public sealed class UseDnaScramblerImplantEvent : InstantActionEvent
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,18 @@ open-uplink-implant-action-description = Opens the syndicate uplink embedded und
|
||||
action-name-honk = Honk!
|
||||
action-desc-honk = Activates your honking implant, which will produce the signature sound of the clown.
|
||||
|
||||
## Implanter Messages
|
||||
use-emp-implant-action-name = Activate EMP
|
||||
use-emp-implant-action-description = Triggers a small EMP pulse around you
|
||||
|
||||
use-dna-scrambler-implant-action-name = Scramble DNA
|
||||
use-dna-scrambler-implant-action-description = LING IN MAINTS!
|
||||
|
||||
## Implant Popups
|
||||
|
||||
scramble-attempt-while-scrambled-popup = Scrambled DNA detected, please extract implant before undoing the current scramble.
|
||||
scramble-implant-activated-popup = You transformed into {$identity}
|
||||
|
||||
## Implant Messages
|
||||
|
||||
deathrattle-implant-dead-message = {$user} has died at {$position}.
|
||||
deathrattle-implant-critical-message = {$user} life signs critical, immediate assistance required at {$position}.
|
||||
|
||||
@@ -109,6 +109,12 @@ uplink-storage-implanter-desc = Hide goodies inside of yourself with new bluespa
|
||||
uplink-freedom-implanter-name = Freedom Implanter
|
||||
uplink-freedom-implanter-desc = Get away from those nasty sec officers with this three use implant!
|
||||
|
||||
uplink-dna-scrambler-implanter-name = DNA Scrambler Implanter
|
||||
uplink-dna-scrambler-implanter-desc = A single use implant that can be activated to modify your DNA and give you a completely new look, also has the function of undoing the change. Unable to scramble already scrambled DNA.
|
||||
|
||||
uplink-emp-implanter-name = EMP Implanter
|
||||
uplink-emp-implanter-desc = Detonates a small EMP pulse on activation that drains nearby electronics of their power, can be used three times before the internal battery runs out.
|
||||
|
||||
uplink-macro-bomb-implanter-name = Macro Bomb Implanter
|
||||
uplink-macro-bomb-implanter-desc = Inject this and on death you'll create a large explosion. Huge team casualty cost, use at own risk. Replaces internal micro bomb.
|
||||
|
||||
|
||||
@@ -69,6 +69,31 @@
|
||||
state: old-radio
|
||||
event: !type:OpenUplinkImplantEvent
|
||||
|
||||
- type: instantAction
|
||||
id: ActivateEmpImplant
|
||||
name: use-emp-implant-action-name
|
||||
description: use-emp-implant-action-description
|
||||
charges: 3
|
||||
useDelay: 5
|
||||
itemIconStyle: BigAction
|
||||
priority: -20
|
||||
icon:
|
||||
sprite: Objects/Weapons/Grenades/empgrenade.rsi
|
||||
state: icon
|
||||
event: !type:ActivateImplantEvent
|
||||
|
||||
- type: instantAction
|
||||
id: ActivateDnaScramblerImplant
|
||||
name: use-dna-scrambler-implant-action-name
|
||||
description: use-dna-scrambler-implant-action-description
|
||||
charges: 1
|
||||
itemIconStyle: BigAction
|
||||
priority: -20
|
||||
icon:
|
||||
sprite: Clothing/OuterClothing/Hardsuits/lingspacesuit.rsi
|
||||
state: icon
|
||||
event: !type:UseDnaScramblerImplantEvent
|
||||
|
||||
- type: instantAction
|
||||
id: ToggleSuitHelmet
|
||||
name: action-name-hardsuit
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
description: uplink-emp-grenade-desc
|
||||
productEntity: EmpGrenade
|
||||
cost:
|
||||
Telecrystal: 4
|
||||
Telecrystal: 3
|
||||
categories:
|
||||
- UplinkExplosives
|
||||
|
||||
@@ -398,6 +398,28 @@
|
||||
tags:
|
||||
- NukeOpsUplink
|
||||
|
||||
- type: listing
|
||||
id: UplinkDnaScramblerImplant
|
||||
name: uplink-dna-scrambler-implanter-name
|
||||
description: uplink-dna-scrambler-implanter-desc
|
||||
icon: { sprite: /Textures/Mobs/Species/Human/parts.rsi, state: full }
|
||||
productEntity: DnaScramblerImplanter
|
||||
cost:
|
||||
Telecrystal: 10
|
||||
categories:
|
||||
- UplinkImplants
|
||||
|
||||
- type: listing
|
||||
id: UplinkEmpImplanter
|
||||
name: uplink-emp-implanter-name
|
||||
description: uplink-emp-implanter-desc
|
||||
icon: { sprite: /Textures/Objects/Magic/magicactions.rsi, state: shield }
|
||||
productEntity: EmpImplanter
|
||||
cost:
|
||||
Telecrystal: 5
|
||||
categories:
|
||||
- UplinkImplants
|
||||
|
||||
- type: listing
|
||||
id: UplinkMacroBombImplanter
|
||||
name: uplink-macro-bomb-implanter-name
|
||||
|
||||
@@ -77,3 +77,11 @@
|
||||
- type: NpcFactionMember
|
||||
factions:
|
||||
- Syndicate
|
||||
|
||||
# DNA Scrambler
|
||||
- type: entity
|
||||
parent: MobHuman
|
||||
id: MobHumanScrambled
|
||||
name: Scrambled Human
|
||||
components:
|
||||
- type: RandomHumanoidAppearance
|
||||
|
||||
@@ -141,6 +141,26 @@
|
||||
- type: Implanter
|
||||
implant: UplinkImplant
|
||||
|
||||
- type: entity
|
||||
id: EmpImplanter
|
||||
name: EMP implanter
|
||||
description: a single use implanter, the implant creates an EMP pulse when you activate it.
|
||||
parent: BaseImplantOnlyImplanter
|
||||
components:
|
||||
- type: Implanter
|
||||
implant: EmpImplant
|
||||
|
||||
- type: entity
|
||||
id: DnaScramblerImplanter
|
||||
name: dna scrambler implanter
|
||||
description: a single use implanter, the implant allows you to randomly change your appearance and name once.
|
||||
parent: BaseImplantOnlyImplanter
|
||||
components:
|
||||
- type: Implanter
|
||||
implant: DnaScramblerImplant
|
||||
currentMode: Inject
|
||||
implantOnly: false
|
||||
|
||||
#Nuclear Operative/Special implanters
|
||||
|
||||
- type: entity
|
||||
|
||||
@@ -156,6 +156,31 @@
|
||||
- key: enum.StoreUiKey.Key
|
||||
type: StoreBoundUserInterface
|
||||
|
||||
- type: entity
|
||||
parent: BaseSubdermalImplant
|
||||
id: EmpImplant
|
||||
name: EMP implant
|
||||
description: allows the user to release a small EMP pulse
|
||||
noSpawn: true
|
||||
components:
|
||||
- type: SubdermalImplant
|
||||
implantAction: ActivateEmpImplant
|
||||
- type: TriggerImplantAction
|
||||
- type: EmpOnTrigger
|
||||
range: 1.75
|
||||
energyConsumption: 50000
|
||||
disableDuration: 10
|
||||
|
||||
- type: entity
|
||||
parent: BaseSubdermalImplant
|
||||
id: DnaScramblerImplant
|
||||
name: DNA scrambler implant
|
||||
description: allows the user to change their appearance and name
|
||||
noSpawn: true
|
||||
components:
|
||||
- type: SubdermalImplant
|
||||
implantAction: ActivateDnaScramblerImplant
|
||||
|
||||
#Nuclear Operative/Special Exclusive implants
|
||||
|
||||
- type: entity
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
forced: true
|
||||
duration: 30
|
||||
|
||||
- type: polymorph
|
||||
id: Scrambled
|
||||
entity: MobHumanScrambled
|
||||
forced: false
|
||||
inventory: Transfer
|
||||
revertOnCrit: true
|
||||
revertOnDeath: true
|
||||
|
||||
- type: polymorph
|
||||
id: Chicken
|
||||
entity: MobChicken
|
||||
|
||||
Reference in New Issue
Block a user