forked from shiptest-ss13/Shiptest
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from Ossa88/Wing-Reconstruction
Wing reconstruction
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/datum/surgery/wing_reconstruction | ||
name = "Wing Reconstruction" | ||
steps = list( | ||
/datum/surgery_step/incise, | ||
/datum/surgery_step/retract_skin, | ||
/datum/surgery_step/clamp_bleeders, | ||
/datum/surgery_step/wing_reconstruction,) | ||
possible_locs = list(BODY_ZONE_CHEST) | ||
|
||
/datum/surgery/wing_reconstruction/can_start(mob/user, mob/living/carbon/target) | ||
/* | ||
Condition - Target has moth_wings loaded to dna.species.mutant_bodyparts | ||
Note 1: This should also work on subjects who have had moth wings inserted into their body via "organ manipulation" surgery | ||
Note 2: Whatever wing variation the target had prior to the surgery will be overwrote. To include "Burned Off" which is its own variation | ||
*/ | ||
if("moth_wings" in target.dna.species.mutant_bodyparts) | ||
return TRUE //Yes surgery | ||
return FALSE //No surgery | ||
|
||
/datum/surgery_step/wing_reconstruction | ||
name = "start wing reconstruction (hemostat)" | ||
//success chance per tool | ||
implements = list( | ||
TOOL_HEMOSTAT = 85, | ||
TOOL_SCREWDRIVER = 35, | ||
/obj/item/pen = 15) | ||
time = 10 SECONDS | ||
preop_sound = 'sound/surgery/scalpel1.ogg' | ||
success_sound = 'sound/surgery/scalpel2.ogg' | ||
failure_sound = 'sound/surgery/organ2.ogg' | ||
experience_given = MEDICAL_SKILL_ORGAN_FIX | ||
|
||
/datum/surgery_step/wing_reconstruction/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) | ||
display_results( | ||
user, | ||
target, | ||
"<span class='notice'>You begin to fix [target]'s charred wing membranes...</span>", | ||
"<span class='notice'>[user] begins to fix [target]'s charred wing membranes.</span>", | ||
"<span class='notice'>[user] begins to perform surgery on [target]'s charred wing membranes.</span>") | ||
|
||
/datum/surgery_step/wing_reconstruction/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) | ||
if(ishuman(target)) | ||
display_results( | ||
user, | ||
target, | ||
"<span class='notice'>You succeed in reconstructing [target]'s wings...</span>", | ||
"<span class='notice'>[user] successfully reconstructs [target]'s wings!", | ||
"<span class='notice'>[user] completes the surgery on [target]'s wings.",) | ||
/* | ||
Condition 1 - List of wing types for new wings | ||
Condition 2 - Sets moth_wings to wing_type. This overrides previous wing variation - Including "Burnt Off" | ||
Condition 3 - Update target body | ||
Warning: Do not run on 515.1636 - Disconnecting while the input is up causes surgery lockout on chest. Requires VV editing to fix | ||
*/ | ||
var/wing_type = input("Choose a new wing look:", "Wing Reconstruction") as null|anything in GLOB.moth_wings_list | ||
if(!wing_type) | ||
return | ||
target.dna.features["moth_wings"] = wing_type | ||
target.update_body() | ||
display_results( | ||
user, | ||
target, | ||
"<span class='notice'>You alter [target]'s wings completely, [target] now has [wing_type] wings.</span>", | ||
"<span class='notice'>[user] alters [target]'s winga completely, [target] now has [wing_type] wings!</span>", | ||
"<span class='notice'>[user] finishes the operation on [target]'s wings.</span>") | ||
return ..() |
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