Files
Bubberstation/code/modules/surgery/eye_surgery.dm
SkyratBot 0a1f06a2d1 [MIRROR] This tail refactor turned into an organ refactor. Funny how that works. [MDB IGNORE] (#14017)
* This tail refactor turned into an organ refactor. Funny how that works.

* Firstly, fixing all the conflicts.

* Fixes all our maps (hopefully)

* Actually, this should fix pod people hair :)

* Almost everything is working, just two major things to fix

* Fixed a certain kind of external organ

* Cleaning up some more stuff

* Turned tail_cat into tail because why the fuck are they separate?

* Moved all the tails into tails.dmi because that was just dumb to have like 3 in a different file

* Adds relevant_layers to organs to help with rendering

* Makes stored_feature_id also check mutant_bodyparts

* Fixes the icon_state names of ALL the tails (pain)

* Fixes wagging, gotta refactor most mutant bodyparts later on

* I Love Added Failures

* Fixed some organs that slipped through my searches

* This could possibly fix the CI for this?

* It doesn't look like it did fix it

* This will make it pass, even if it's ugly as sin.

* Fixed Felinids having a weird ghost tail

* Fixes instances of snouts and tails not being properly colored

Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-06-11 23:20:16 -04:00

63 lines
3.2 KiB
Plaintext

/datum/surgery/eye_surgery
name = "Eye surgery"
steps = list(
/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/fix_eyes,
/datum/surgery_step/close)
target_mobtypes = list(/mob/living/carbon/human)
possible_locs = list(BODY_ZONE_PRECISE_EYES)
requires_bodypart_type = 0
organ_to_manipulate = ORGAN_SLOT_EYES
//fix eyes
/datum/surgery_step/fix_eyes
name = "fix eyes"
implements = list(
TOOL_HEMOSTAT = 100,
TOOL_SCREWDRIVER = 45,
/obj/item/pen = 25)
time = 64
/datum/surgery/eye_surgery/can_start(mob/user, mob/living/carbon/target)
var/obj/item/organ/internal/eyes/target_eyes = target.getorganslot(ORGAN_SLOT_EYES)
if(!target_eyes)
to_chat(user, span_warning("It's hard to do surgery on someone's eyes when [target.p_they()] [target.p_do()]n't have any."))
return FALSE
return TRUE
/datum/surgery_step/fix_eyes/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, span_notice("You begin to fix [target]'s eyes..."),
span_notice("[user] begins to fix [target]'s eyes."),
span_notice("[user] begins to perform surgery on [target]'s eyes."))
display_pain(target, "You feel a stabbing pain in your eyes!")
/datum/surgery_step/fix_eyes/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
var/obj/item/organ/internal/eyes/target_eyes = target.getorganslot(ORGAN_SLOT_EYES)
user.visible_message(span_notice("[user] successfully fixes [target]'s eyes!"), span_notice("You succeed in fixing [target]'s eyes."))
display_results(user, target, span_notice("You succeed in fixing [target]'s eyes."),
span_notice("[user] successfully fixes [target]'s eyes!"),
span_notice("[user] completes the surgery on [target]'s eyes."))
display_pain(target, "Your vision blurs, but it seems like you can see a little better now!")
target.cure_blind(list(EYE_DAMAGE))
target.set_blindness(0)
target.cure_nearsighted(list(EYE_DAMAGE))
target.blur_eyes(35) //this will fix itself slowly.
target_eyes.setOrganDamage(0)
return ..()
/datum/surgery_step/fix_eyes/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(target.getorgan(/obj/item/organ/internal/brain))
display_results(user, target, span_warning("You accidentally stab [target] right in the brain!"),
span_warning("[user] accidentally stabs [target] right in the brain!"),
span_warning("[user] accidentally stabs [target] right in the brain!"))
display_pain(target, "You feel a visceral stabbing pain right through your head, into your brain!")
target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 70)
else
display_results(user, target, span_warning("You accidentally stab [target] right in the brain! Or would have, if [target] had a brain."),
span_warning("[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain."),
span_warning("[user] accidentally stabs [target] right in the brain!"))
display_pain(target, "You feel a visceral stabbing pain right through your head!") // dunno who can feel pain w/o a brain but may as well be consistent.
return FALSE