Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shitmed Surgery Popups #1241

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion Content.Shared/Medical/Surgery/SharedSurgerySystem.Steps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes;
using Content.Shared.DoAfter;
using Content.Shared.IdentityManagement;
using Content.Shared.Medical.Surgery.Conditions;
using Content.Shared.Medical.Surgery.Effects.Step;
using Content.Shared.Medical.Surgery.Steps;
Expand Down Expand Up @@ -622,7 +623,21 @@ private void OnSurgeryTargetStepChosen(Entity<SurgeryTargetComponent> ent, ref S
BreakOnHandChange = true,
};

_doAfter.TryStartDoAfter(doAfter);
if (_doAfter.TryStartDoAfter(doAfter))
{
var userName = Identity.Entity(user, EntityManager);
var targetName = Identity.Entity(ent.Owner, EntityManager);

var locName = $"surgery-popup-procedure-{args.Surgery}-step-{args.Step}";
var locResult = Loc.GetString(locName,
("user", userName), ("target", targetName), ("part", part));

if (locResult == locName)
locResult = Loc.GetString($"surgery-popup-step-{args.Step}",
("user", userName), ("target", targetName), ("part", part));

_popup.PopupEntity(locResult, user);
}
}

private (Entity<SurgeryComponent> Surgery, int Step)? GetNextStep(EntityUid body, EntityUid part, Entity<SurgeryComponent?> surgery, List<EntityUid> requirements)
Expand Down
52 changes: 52 additions & 0 deletions Resources/Locale/en-US/surgery/surgery-popup.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
surgery-popup-step-SurgeryStepOpenIncisionScalpel = {$user} is making an incision on {$target}'s {$part}.
surgery-popup-step-SurgeryStepClampBleeders = {$user} is clamping the bleeders on {$target}'s {$part}.
surgery-popup-step-SurgeryStepRetractSkin = {$user} is retracting the skin on {$target}'s {$part}.
surgery-popup-step-SurgeryStepSawBones = {$user} is sawing through the bones on {$target}'s {$part}.
surgery-popup-step-SurgeryStepPriseOpenBones = {$user} is prising the bones open on {$target}'s {$part}.
surgery-popup-step-SurgeryStepCloseBones = {$user} is closing the bones on {$target}'s {$part}.
surgery-popup-step-SurgeryStepMendRibcage = {$user} is mending the ribcage on {$target}'s {$part}.
surgery-popup-step-SurgeryStepCloseIncision = {$user} is closing the incision on {$target}'s {$part}.

surgery-popup-step-SurgeryStepInsertFeature = {$user} is inserting something onto {$target}'s {$part}!
surgery-popup-procedure-SurgeryAttachHead-step-SurgeryStepInsertFeature = {$user} is attaching a head onto {$target}'s {$part}!
surgery-popup-procedure-SurgeryAttachLeftArm-step-SurgeryStepInsertFeature = {$user} is attaching a left arm onto {$target}'s {$part}!
surgery-popup-procedure-SurgeryAttachRightArm-step-SurgeryStepInsertFeature = {$user} is attaching a right arm onto {$target}'s {$part}!
surgery-popup-procedure-SurgeryAttachLeftLeg-step-SurgeryStepInsertFeature = {$user} is attaching a left leg onto {$target}'s {$part}!
surgery-popup-procedure-SurgeryAttachRightLeg-step-SurgeryStepInsertFeature = {$user} is attaching a right leg onto {$target}'s {$part}!
surgery-popup-procedure-SurgeryAttachLeftHand-step-SurgeryStepInsertFeature = {$user} is attaching a left hand onto {$target}'s {$part}!
surgery-popup-procedure-SurgeryAttachRightHand-step-SurgeryStepInsertFeature = {$user} is attaching a right hand onto {$target}'s {$part}!
surgery-popup-procedure-SurgeryAttachLeftFoot-step-SurgeryStepInsertFeature = {$user} is attaching a left foot onto {$target}'s {$part}!
surgery-popup-procedure-SurgeryAttachRightFoot-step-SurgeryStepInsertFeature = {$user} is attaching a right foot onto {$target}'s {$part}!
surgery-popup-procedure-SurgeryAttachLegs-step-SurgeryStepInsertFeature = {$user} is attaching legs onto {$target}'s {$part}!
surgery-popup-procedure-SurgeryAttachHands-step-SurgeryStepInsertFeature = {$user} is attaching hands onto {$target}'s {$part}!
surgery-popup-procedure-SurgeryAttachFeet-step-SurgeryStepInsertFeature = {$user} is attaching feet onto {$target}'s {$part}!

surgery-popup-step-SurgeryStepSealWounds = {$user} is sealing the wounds on {$target}'s {$part}.
surgery-popup-step-SurgeryStepSawFeature = {$user} is sawing through the bones on {$target}'s {$part}.
surgery-popup-step-SurgeryStepClampInternalBleeders = {$user} is clamping the internal bleeders on {$target}'s {$part}.
surgery-popup-step-SurgeryStepRemoveFeature = {$user} is amputating {$target}'s {$part}!
surgery-popup-step-SurgeryStepCarefulIncisionScalpel = {$user} is carefully making an incision on {$target}'s {$part}.
surgery-popup-step-SurgeryStepRepairBruteTissue = {$user} is repairing the damaged tissues on {$target}'s {$part}!
surgery-popup-step-SurgeryStepRepairBurnTissue = {$user} is repairing the burnt tissues on {$target}'s {$part}!
surgery-popup-step-SurgeryStepSealTendWound = {$user} is sealing the wounds on {$target}'s {$part}.
surgery-popup-step-SurgeryStepInsertItem = {$user} is inserting something into {$target}'s {$part}!
surgery-popup-step-SurgeryStepRemoveItem = {$user} is removing something from {$target}'s {$part}!

surgery-popup-step-SurgeryStepRemoveOrgan = {$user} is removing an organ from {$target}'s {$part}!
surgery-popup-step-SurgeryStepInsertOrgan = {$user} is inserting an organ into {$target}'s {$part}!

surgery-popup-procedure-SurgeryRemoveBrain-step-SurgeryStepRemoveOrgan = {$user} is removing the brain from {$target}'s {$part}!
surgery-popup-procedure-SurgeryRemoveHeart-step-SurgeryStepRemoveOrgan = {$user} is removing the heart from {$target}'s {$part}!
surgery-popup-procedure-SurgeryRemoveLiver-step-SurgeryStepRemoveOrgan = {$user} is removing the liver from {$target}'s {$part}!
surgery-popup-procedure-SurgeryRemoveLungs-step-SurgeryStepRemoveOrgan = {$user} is removing the lungs from {$target}'s {$part}!
surgery-popup-procedure-SurgeryRemoveEyes-step-SurgeryStepRemoveOrgan = {$user} is removing the eyes from {$target}'s {$part}!
surgery-popup-procedure-SurgeryRemoveStomach-step-SurgeryStepRemoveOrgan = {$user} is removing the stomach from {$target}'s {$part}!

surgery-popup-procedure-SurgeryInsertBrain-step-SurgeryStepInsertOrgan = {$user} is inserting a brain into {$target}'s {$part}!
surgery-popup-step-SurgeryStepInsertLungs = {$user} is inserting lungs into {$target}'s {$part}!
surgery-popup-step-SurgeryStepInsertLiver = {$user} is inserting a liver into {$target}'s {$part}!
surgery-popup-step-SurgeryStepInsertEyes = {$user} is inserting eyes into {$target}'s {$part}!
surgery-popup-step-SurgeryStepInsertHeart = {$user} is inserting a heart into {$target}'s {$part}!
surgery-popup-step-SurgeryStepInsertStomach = {$user} is inserting a stomach into {$target}'s {$part}!

surgery-popup-step-SurgeryStepSealOrganWound = {$user} is sealing the wounds on {$target}'s {$part}.
Loading