Skip to content

Commit

Permalink
Merge pull request #27 from Ossa88/Wing-Reconstruction
Browse files Browse the repository at this point in the history
Wing reconstruction
  • Loading branch information
Constellado authored Aug 13, 2024
2 parents b2f63d2 + 6496339 commit 2fec35b
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
67 changes: 67 additions & 0 deletions code/modules/surgery/wing_reconstruction.dm
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 ..()
1 change: 1 addition & 0 deletions shiptest.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3371,6 +3371,7 @@
#include "code\modules\surgery\surgery_helpers.dm"
#include "code\modules\surgery\surgery_step.dm"
#include "code\modules\surgery\tools.dm"
#include "code\modules\surgery\wing_reconstruction.dm"
#include "code\modules\surgery\advanced\brainwashing.dm"
#include "code\modules\surgery\advanced\lobotomy.dm"
#include "code\modules\surgery\advanced\necrotic_revival.dm"
Expand Down

0 comments on commit 2fec35b

Please sign in to comment.