-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Port] Surgety Update: Outer Content (#944)
* Shitmed Update 2 - bottom text (#956) * full fucking send * ope forgot to remove the EE scripts * fix test * fix shitcode fail * DELTA THAT VALUE IS NULLABLE * whoopsie daysie * fixed??? * chat is this real * Hotfix for broken organ transplants (#933) * full fucking send * ope forgot to remove the EE scripts * fix test * fix shitcode fail * DELTA THAT VALUE IS NULLABLE * whoopsie daysie * fixed??? * allow cloning living people (#932) * allow cloning living people * fix client --------- Co-authored-by: deltanedas <@deltanedas:kde.org> * Added missing locale strings for limb targeting bindings (#921) * Added missing locale strings for limb targeting bindings * Moved the strings down where the rest of shitmed goes * Shitmed Update 1 - Forma de Goob (#897) * full fucking send * ope forgot to remove the EE scripts * fix test * fix shitcode fail * DELTA THAT VALUE IS NULLABLE * whoopsie daysie * fixes fixes add and fix shit * Fix Harpies --------- Co-authored-by: gluesniffler <[email protected]> Co-authored-by: deltanedas <[email protected]> Co-authored-by: AstroDogeDX <[email protected]>
- Loading branch information
1 parent
636da48
commit 32f98d3
Showing
408 changed files
with
5,440 additions
and
627 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,9 @@ | ||
// Shitmed Change Start | ||
|
||
using Content.Shared.Smoking.Systems; | ||
|
||
namespace Content.Client.Smoking; | ||
|
||
public sealed class MatchstickSystem : SharedMatchstickSystem; | ||
|
||
// Shitmed Change End |
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,62 @@ | ||
using Content.Server.Backmen.DelayedDeath; | ||
using Content.Shared.Body.Systems; | ||
using Content.Server.Popups; | ||
using Content.Shared.Backmen.Surgery.Body; | ||
using Content.Shared.Backmen.Surgery.Body.Organs; | ||
using Content.Shared.Speech; | ||
using Content.Shared.Standing; | ||
using Content.Shared.Stunnable; | ||
|
||
namespace Content.Server.Backmen.Body.Systems; | ||
|
||
/// <summary> | ||
/// This system handles behavior on entities when they lose their head or their brains are removed. | ||
/// MindComponent fuckery should still be mainly handled on BrainSystem as usual. | ||
/// </summary> | ||
public sealed class DebrainedSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly SharedBodySystem _bodySystem = default!; | ||
[Dependency] private readonly PopupSystem _popupSystem = default!; | ||
[Dependency] private readonly StandingStateSystem _standingSystem = default!; | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<DebrainedComponent, ComponentInit>(OnComponentInit); | ||
SubscribeLocalEvent<DebrainedComponent, ComponentRemove>(OnComponentRemove); | ||
SubscribeLocalEvent<DebrainedComponent, SpeakAttemptEvent>(OnSpeakAttempt); | ||
SubscribeLocalEvent<DebrainedComponent, StandAttemptEvent>(OnStandAttempt); | ||
} | ||
|
||
private void OnComponentInit(EntityUid uid, DebrainedComponent _, ComponentInit args) | ||
{ | ||
if (TerminatingOrDeleted(uid)) | ||
return; | ||
|
||
EnsureComp<DelayedDeathComponent>(uid); | ||
EnsureComp<StunnedComponent>(uid); | ||
_standingSystem.Down(uid); | ||
} | ||
|
||
private void OnComponentRemove(EntityUid uid, DebrainedComponent _, ComponentRemove args) | ||
{ | ||
if (TerminatingOrDeleted(uid)) | ||
return; | ||
|
||
RemComp<DelayedDeathComponent>(uid); | ||
RemComp<StunnedComponent>(uid); | ||
if (_bodySystem.TryGetBodyOrganEntityComps<HeartComponent>(uid, out var _)) | ||
RemComp<DelayedDeathComponent>(uid); | ||
} | ||
|
||
private void OnSpeakAttempt(EntityUid uid, DebrainedComponent _, SpeakAttemptEvent args) | ||
{ | ||
_popupSystem.PopupEntity(Loc.GetString("speech-muted"), uid, uid); | ||
args.Cancel(); | ||
} | ||
|
||
private void OnStandAttempt(EntityUid uid, DebrainedComponent _, StandAttemptEvent args) | ||
{ | ||
args.Cancel(); | ||
} | ||
} |
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,86 @@ | ||
using Content.Server.Body.Systems; | ||
using Content.Shared.Body.Components; | ||
using Content.Shared.Backmen.Surgery.Body.Organs; | ||
using Content.Shared.Eye.Blinding.Components; | ||
using Content.Shared.Eye.Blinding.Systems; | ||
|
||
namespace Content.Server.Backmen.Body.Systems | ||
{ | ||
public sealed class EyesSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly IEntityManager _entityManager = default!; | ||
[Dependency] private readonly BlindableSystem _blindableSystem = default!; | ||
[Dependency] private readonly BodySystem _bodySystem = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<EyesComponent, OrganEnabledEvent>(OnOrganEnabled); | ||
SubscribeLocalEvent<EyesComponent, OrganDisabledEvent>(OnOrganDisabled); | ||
} | ||
|
||
private void HandleSight(EntityUid newEntity, EntityUid oldEntity) | ||
{ | ||
if (TerminatingOrDeleted(newEntity) || TerminatingOrDeleted(oldEntity)) | ||
return; | ||
|
||
BlindableComponent? newSight; | ||
BlindableComponent? oldSight; | ||
//transfer existing component to organ | ||
if (!TryComp(newEntity, out newSight)) | ||
newSight = EnsureComp<BlindableComponent>(newEntity); | ||
|
||
if (!TryComp(oldEntity, out oldSight)) | ||
oldSight = EnsureComp<BlindableComponent>(oldEntity); | ||
|
||
//give new sight all values of old sight | ||
_blindableSystem.TransferBlindness(newSight, oldSight, newEntity); | ||
|
||
var hasOtherEyes = false; | ||
//check for other eye components on owning body and owning body organs (if old entity has a body) | ||
if (TryComp<BodyComponent>(oldEntity, out var body)) | ||
{ | ||
if (TryComp<EyesComponent>(oldEntity, out var bodyEyes)) //some bodies see through their skin!!! (slimes) | ||
hasOtherEyes = true; | ||
else | ||
{ | ||
foreach (var (organ, _) in _bodySystem.GetBodyOrgans(oldEntity, body)) | ||
{ | ||
if (TryComp<EyesComponent>(organ, out var eyes)) | ||
{ | ||
hasOtherEyes = true; | ||
break; | ||
} | ||
} | ||
//TODO (MS14): Should we do this for body parts too? might be a little overpowered but could be funny/interesting | ||
} | ||
} | ||
|
||
//if there are no existing eye components for the old entity - set old sight to be blind otherwise leave it as is | ||
if (!hasOtherEyes && !TryComp<EyesComponent>(oldEntity, out var self)) | ||
_blindableSystem.AdjustEyeDamage((oldEntity, oldSight), oldSight.MaxDamage); | ||
|
||
} | ||
|
||
private void OnOrganEnabled(EntityUid uid, EyesComponent component, OrganEnabledEvent args) | ||
{ | ||
if (TerminatingOrDeleted(uid) | ||
|| args.Organ.Comp.Body is not { Valid: true } body) | ||
return; | ||
|
||
RemComp<TemporaryBlindnessComponent>(body); | ||
HandleSight(uid, body); | ||
} | ||
|
||
private void OnOrganDisabled(EntityUid uid, EyesComponent component, OrganDisabledEvent args) | ||
{ | ||
if (TerminatingOrDeleted(uid) | ||
|| args.Organ.Comp.Body is not { Valid: true } body) | ||
return; | ||
|
||
EnsureComp<TemporaryBlindnessComponent>(body); | ||
HandleSight(body, uid); | ||
} | ||
} | ||
} |
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,55 @@ | ||
using Content.Server.Emp; | ||
using Content.Shared.Backmen.Surgery.Body; | ||
using Content.Shared.Backmen.Surgery.Body.Events; | ||
using Content.Shared.Backmen.Surgery.Body.Organs; | ||
using Content.Shared.Body.Part; | ||
using Content.Shared.Body.Organ; | ||
|
||
namespace Content.Server.Backmen.Cybernetics; | ||
|
||
internal sealed class CyberneticsSystem : EntitySystem | ||
{ | ||
public override void Initialize() | ||
{ | ||
SubscribeLocalEvent<CyberneticsComponent, EmpPulseEvent>(OnEmpPulse); | ||
SubscribeLocalEvent<CyberneticsComponent, EmpDisabledRemoved>(OnEmpDisabledRemoved); | ||
} | ||
private void OnEmpPulse(Entity<CyberneticsComponent> cyberEnt, ref EmpPulseEvent ev) | ||
{ | ||
if (!cyberEnt.Comp.Disabled) | ||
{ | ||
ev.Affected = true; | ||
ev.Disabled = true; | ||
cyberEnt.Comp.Disabled = true; | ||
|
||
if (HasComp<OrganComponent>(cyberEnt)) | ||
{ | ||
var disableEvent = new OrganEnableChangedEvent(false); | ||
RaiseLocalEvent(cyberEnt, ref disableEvent); | ||
} | ||
else if (HasComp<BodyPartComponent>(cyberEnt)) | ||
{ | ||
var disableEvent = new BodyPartEnableChangedEvent(false); | ||
RaiseLocalEvent(cyberEnt, ref disableEvent); | ||
} | ||
} | ||
} | ||
|
||
private void OnEmpDisabledRemoved(Entity<CyberneticsComponent> cyberEnt, ref EmpDisabledRemoved ev) | ||
{ | ||
if (cyberEnt.Comp.Disabled) | ||
{ | ||
cyberEnt.Comp.Disabled = false; | ||
if (HasComp<OrganComponent>(cyberEnt)) | ||
{ | ||
var enableEvent = new OrganEnableChangedEvent(true); | ||
RaiseLocalEvent(cyberEnt, ref enableEvent); | ||
} | ||
else if (HasComp<BodyPartComponent>(cyberEnt)) | ||
{ | ||
var enableEvent = new BodyPartEnableChangedEvent(true); | ||
RaiseLocalEvent(cyberEnt, ref enableEvent); | ||
} | ||
} | ||
} | ||
} |
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.