-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shitmed Update 2 - [Insert Snarky Remark] (#1271)
# Description  Honey wake up, another shitmed PR with 5 features and a trillion bugs! I love bloat. --- # Known Bugs - A lot of shit with changelings lol - Markings suddenly disappear from your entity apparently at random. Wizden exclusive issue as of now. - Fire heretics explode when ascending due to part damage shitcode (sorry) - Some exceptions/null point references at round end, tentatively related to salvage corpses. - Slots having wonky behavior due to not being networked. More of a broad issue with how I implemented them initially. - Arachne are FUCKED with surgery, I was incredibly tempted to set them to roundstart: false, but I'll try to hotfix it this week. --- # Changelog :cl: Mocho, Deltanedas - add: Ported Ghetto Surgery from Deltanedas! - add: Ported fishops organs from Deltanedas! - add: Added different step durations to each surgery step. - add: Added a T2 research for advanced surgical tools - add: Added a T3 research for an omnitool for surgery. - add: Added Surgical and Advanced Surgical modules for Mediborgs - add: Mediborgs can now perform surgery! - add: Added lobotomies as an operation. Godspeed you psychopaths. - add: Added cybernetic arms, legs and eyes. - add: Added EMP weaknesses to all cybernetic parts (the day of reckoning will come for IPCs soon) - add: Losing your eyes now blinds you. - fix: Fixed a few species that did not inherit from BasePart's, thus taking damage types they shouldn't on their limbs. - fix: Fixed harpy lungs not being usable in surgeries. - fix: Fixed biosynthetic and other printable parts not allowing you to attach body parts to them. - fix: Fixed fire being able to destroy your chest. - fix: Fixed entities being able to take over your body by just inserting a brain or another head on top of you. - fix: Fixed some shitcode that didnt let rejuvenate or godmode work properly. - fix: Fixed bionic arm, and cybernetic eyes traits not working properly due to shitty networking. - tweak: Increased tend wounds's speed by double, and bumped up the values on its calculations. DEATH TO TOPICALS, LEAVE THOSE TO TIDERS. - tweak: Beheading an entity now doesnt let it move, speak, and forces it to the ground immediately (literally 1984!!11!!) - tweak: Changed sprites on most surgical tools to now use /tg/ sprites. - tweak: Unbound shitmed targeting doll keybinds by default (did you know we have those). --------- Signed-off-by: gluesniffler <[email protected]> Co-authored-by: FoxxoTrystan <[email protected]> Co-authored-by: goet <[email protected]> Co-authored-by: Saphire Lattice <[email protected]>
- Loading branch information
1 parent
7d802e3
commit 2eafa0d
Showing
227 changed files
with
3,351 additions
and
475 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
using Content.Shared.Smoking.Systems; | ||
|
||
namespace Content.Client.Smoking; | ||
|
||
public sealed class MatchstickSystem : SharedMatchstickSystem; |
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,6 @@ | ||
namespace Content.Client.Speech.Components; | ||
|
||
// We keep this here because of surgery checks being client-side. | ||
[RegisterComponent] | ||
public sealed partial class OhioAccentComponent : Component | ||
{ } |
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,62 @@ | ||
using Content.Shared.Body.Systems; | ||
using Content.Shared.Body.Organ; | ||
using Content.Server.DelayedDeath; | ||
using Content.Shared.Mind; | ||
using Content.Server.Popups; | ||
using Content.Shared.Speech; | ||
using Content.Shared.Standing; | ||
using Content.Shared.Stunnable; | ||
|
||
namespace Content.Server.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.TryGetBodyOrganComponents<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,87 @@ | ||
using Content.Server.Body.Components; | ||
using Content.Shared.Body.Components; | ||
using Content.Shared.Body.Events; | ||
using Content.Shared.Body.Organ; | ||
using Content.Shared.Eye.Blinding.Components; | ||
using Content.Shared.Eye.Blinding.Systems; | ||
|
||
namespace Content.Server.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,54 @@ | ||
using Content.Server.Emp; | ||
using Content.Server.Body.Systems; | ||
using Content.Shared.Body.Part; | ||
using Content.Shared.Body.Organ; | ||
using Content.Shared.Cybernetics; | ||
|
||
namespace Content.Server.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); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.