Revert "pls"

This reverts commit 8c97511871.
This commit is contained in:
Fermi
2019-11-24 03:04:04 +00:00
parent 4c1c257035
commit c8b206a4cf
3003 changed files with 63963 additions and 157107 deletions
@@ -5,6 +5,8 @@
/datum/surgery/advanced/bioware/can_start(mob/user, mob/living/carbon/human/target)
if(!..())
return FALSE
if(!istype(target))
return FALSE
for(var/X in target.bioware)
var/datum/bioware/B = X
if(B.mod_type == bioware_target)
@@ -1,72 +0,0 @@
/datum/surgery/advanced/bioware/experimental_dissection
name = "Experimental Dissection"
desc = "A surgical procedure which deeply analyzes the biology of a corpse, and automatically adds new findings to the research database."
steps = list(/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/incise,
/datum/surgery_step/dissection,
/datum/surgery_step/close)
possible_locs = list(BODY_ZONE_CHEST)
bioware_target = BIOWARE_DISSECTION
/datum/surgery/advanced/bioware/experimental_dissection/can_start(mob/user, mob/living/carbon/target)
. = ..()
if(iscyborg(user))
return FALSE //robots cannot be creative
//(also this surgery shouldn't be consistently successful, and cyborgs have a 100% success rate on surgery)
if(target.stat != DEAD)
return FALSE
/datum/surgery_step/dissection
name = "dissection"
implements = list(TOOL_SCALPEL = 60, /obj/item/kitchen/knife = 30, /obj/item/shard = 15)
time = 125
/datum/surgery_step/dissection/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You start dissecting [target].</span>",
"[user] starts dissecting [target].",
"[user] starts dissecting [target].")
/datum/surgery_step/dissection/proc/check_value(mob/living/carbon/target)
if(isalienroyal(target))
return 10000
else if(isalienadult(target))
return 5000
else if(ismonkey(target))
return 1000
else if(ishuman(target))
var/mob/living/carbon/human/H = target
if(H.dna && H.dna.species)
if(isabductor(H))
return 8000
if(isgolem(H) || iszombie(H))
return 4000
if(isjellyperson(H) || ispodperson(H))
return 3000
return 2000
/datum/surgery_step/dissection/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You dissect [target], and add your discoveries to the research database!</span>",
"[user] dissects [target], adding [user.p_their()] discoveries to the research database!",
"[user] dissects [target]!")
SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = check_value(target)))
var/obj/item/bodypart/L = target.get_bodypart(BODY_ZONE_CHEST)
target.apply_damage(80, BRUTE, L)
new /datum/bioware/dissected(target)
return TRUE
/datum/surgery_step/dissection/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You dissect [target], but do not find anything particularly interesting.</span>",
"[user] dissects [target], however it seems [user.p_they()] didn't find anything useful.",
"[user] dissects [target], but looks a little dissapointed.")
SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = (check_value(target) * 0.2)))
var/obj/item/bodypart/L = target.get_bodypart(BODY_ZONE_CHEST)
target.apply_damage(80, BRUTE, L)
new /datum/bioware/dissected(target)
return TRUE
/datum/bioware/dissected
name = "Dissected"
desc = "This body has been dissected and analyzed. It is no longer worth experimenting on."
mod_type = BIOWARE_DISSECTION
@@ -0,0 +1,42 @@
/datum/surgery/advanced/bioware/muscled_veins
name = "Vein Muscle Membrane"
desc = "A surgical procedure which adds a muscled membrane to blood vessels, allowing them to pump blood without a heart."
steps = list(/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/incise,
/datum/surgery_step/incise,
/datum/surgery_step/muscled_veins,
/datum/surgery_step/close)
possible_locs = list(BODY_ZONE_CHEST)
bioware_target = BIOWARE_CIRCULATION
/datum/surgery_step/muscled_veins
name = "shape vein muscles"
accept_hand = TRUE
time = 125
/datum/surgery_step/muscled_veins/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You start wrapping muscles around [target]'s circulatory system.</span>",
"[user] starts wrapping muscles around [target]'s circulatory system.",
"[user] starts manipulating [target]'s circulatory system.")
/datum/surgery_step/muscled_veins/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You reshape [target]'s circulatory system, adding a muscled membrane!</span>",
"[user] reshapes [target]'s circulatory system, adding a muscled membrane!",
"[user] finishes manipulating [target]'s circulatory system.")
new /datum/bioware/muscled_veins(target)
return TRUE
/datum/bioware/muscled_veins
name = "Threaded Veins"
desc = "The circulatory system is woven into a mesh, severely reducing the amount of blood lost from wounds."
mod_type = BIOWARE_CIRCULATION
/datum/bioware/muscled_veins/on_gain()
..()
ADD_TRAIT(owner, TRAIT_STABLEHEART, "muscled_veins")
/datum/bioware/muscled_veins/on_lose()
..()
REMOVE_TRAIT(owner, TRAIT_STABLEHEART, "muscled_veins")
@@ -13,8 +13,9 @@
/datum/surgery_step/brainwash,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human)
target_mobtypes = list(/mob/living/carbon/human)
possible_locs = list(BODY_ZONE_HEAD)
/datum/surgery/advanced/brainwashing/can_start(mob/user, mob/living/carbon/target)
if(!..())
return FALSE
+2 -2
View File
@@ -9,7 +9,7 @@
/datum/surgery_step/lobotomize,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_HEAD)
requires_bodypart_type = 0
/datum/surgery/advanced/lobotomy/can_start(mob/user, mob/living/carbon/target)
@@ -25,7 +25,7 @@
/obj/item/shard = 25, /obj/item = 20)
time = 100
/datum/surgery_step/lobotomize/tool_check(mob/user, obj/item/tool)
if(implement_type == /obj/item && !tool.is_sharp())
if(implement_type == /obj/item && !tool.get_sharpness())
return FALSE
return TRUE
@@ -7,7 +7,8 @@
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/pacify,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_HEAD)
requires_bodypart_type = 0
/datum/surgery/advanced/pacify/can_start(mob/user, mob/living/carbon/target)
@@ -1,35 +0,0 @@
/datum/surgery/advanced/reconstruction
name = "Reconstruction"
desc = "A surgical procedure that gradually repairs damage done to a body without the assistance of chemicals. Unlike classic medicine, it is effective on corpses."
steps = list(/datum/surgery_step/incise,
/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/incise,
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/reconstruct,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
requires_bodypart_type = 0
/datum/surgery_step/reconstruct
name = "repair body"
implements = list(TOOL_HEMOSTAT = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15)
repeatable = TRUE
time = 25
/datum/surgery_step/reconstruct/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] starts knitting some of [target]'s flesh back together.", "<span class='notice'>You start knitting some of [target]'s flesh back together.</span>")
/datum/surgery_step/reconstruct/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] fixes some of [target]'s wounds.", "<span class='notice'>You succeed in fixing some of [target]'s wounds.</span>")
target.heal_bodypart_damage(10,10)
return TRUE
/datum/surgery_step/reconstruct/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] screws up!", "<span class='warning'>You screwed up!</span>")
target.take_bodypart_damage(5,0)
return FALSE
+2 -1
View File
@@ -8,7 +8,8 @@
/datum/surgery_step/incise,
/datum/surgery_step/revive,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_HEAD)
requires_bodypart_type = 0
/datum/surgery/advanced/revival/can_start(mob/user, mob/living/carbon/target)
@@ -11,7 +11,7 @@
/datum/surgery_step/toxichealing,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
requires_bodypart_type = 0
@@ -7,7 +7,8 @@
/datum/surgery_step/incise,
/datum/surgery_step/viral_bond,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
/datum/surgery/advanced/viral_bonding/can_start(mob/user, mob/living/carbon/target)
if(!..())
@@ -23,7 +24,7 @@
/datum/surgery_step/viral_bond/tool_check(mob/user, obj/item/tool)
if(implement_type == TOOL_WELDER || implement_type == /obj/item)
return tool.is_hot()
return tool.get_temperature()
return TRUE
/datum/surgery_step/viral_bond/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+1 -1
View File
@@ -1,7 +1,7 @@
/datum/surgery/amputation
name = "Amputation"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/saw, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/sever_limb)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_HEAD)
requires_bodypart_type = 0
/datum/surgery_step/sever_limb
+38 -29
View File
@@ -13,8 +13,7 @@
var/needs_processing = FALSE
var/body_zone //BODY_ZONE_CHEST, BODY_ZONE_L_ARM, etc , used for def_zone
var/aux_zone // used for hands
var/aux_layer
var/list/aux_icons // associative list, currently used for hands
var/body_part = null //bitflag used to check which clothes cover this bodypart
var/use_digitigrade = NOT_DIGITIGRADE //Used for alternate legs, useless elsewhere
var/list/embedded_objects = list()
@@ -434,9 +433,9 @@
. += image(body_markings_icon, "[body_markings]_[digitigrade_type]_[use_digitigrade]_[body_zone]", -MARKING_LAYER, image_dir)
var/image/limb = image(layer = -BODYPARTS_LAYER, dir = image_dir)
var/image/aux
var/list/aux = list()
var/image/marking
var/image/auxmarking
var/list/auxmarking = list()
. += limb
@@ -502,13 +501,15 @@
// Citadel End
if(aux_zone)
aux = image(limb.icon, "[species_id]_[aux_zone]", -aux_layer, image_dir)
if(!isnull(aux_marking))
if(species_id == "husk")
auxmarking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[aux_zone]", -aux_layer, image_dir)
else
auxmarking = image(body_markings_icon, "[body_markings]_[aux_zone]", -aux_layer, image_dir)
if(aux_icons)
for(var/I in aux_icons)
var/aux_layer = aux_icons[I]
aux += image(limb.icon, "[species_id]_[I]", -aux_layer, image_dir)
if(!isnull(aux_marking))
if(species_id == "husk")
auxmarking += image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[I]", -aux_layer, image_dir)
else
auxmarking += image(body_markings_icon, "[body_markings]_[I]", -aux_layer, image_dir)
. += aux
. += auxmarking
@@ -519,15 +520,17 @@
else
limb.icon_state = "[body_zone]"
if(aux_zone)
aux = image(limb.icon, "[aux_zone]", -aux_layer, image_dir)
if(aux_icons)
for(var/I in aux_icons)
var/aux_layer = aux_icons[I]
aux += image(limb.icon, "[I]", -aux_layer, image_dir)
if(!isnull(aux_marking))
if(species_id == "husk")
auxmarking += image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[I]", -aux_layer, image_dir)
else
auxmarking += image(body_markings_icon, "[body_markings]_[I]", -aux_layer, image_dir)
. += auxmarking
. += aux
if(!isnull(aux_marking))
if(species_id == "husk")
auxmarking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[aux_zone]", -aux_layer, image_dir)
else
auxmarking = image(body_markings_icon, "[body_markings]_[aux_zone]", -aux_layer, image_dir)
. += auxmarking
if(!isnull(body_markings))
if(species_id == "husk")
@@ -549,13 +552,17 @@
var/draw_color = mutation_color || species_color || (skin_tone && skintone2hex(skin_tone))
if(draw_color)
limb.color = "#[draw_color]"
if(aux_zone)
aux.color = "#[draw_color]"
if(aux_icons)
for(var/a in aux)
var/image/I = a
I.color = "#[draw_color]"
if(!isnull(aux_marking))
if(species_id == "husk")
auxmarking.color = "#141414"
else
auxmarking.color = list(markings_color)
for(var/a in auxmarking)
var/image/I = a
if(species_id == "husk")
I.color = "#141414"
else
I.color = list(markings_color)
if(!isnull(body_markings))
if(species_id == "husk")
@@ -633,8 +640,7 @@
max_stamina_damage = 50
body_zone = BODY_ZONE_L_ARM
body_part = ARM_LEFT
aux_zone = BODY_ZONE_PRECISE_L_HAND
aux_layer = HANDS_PART_LAYER
aux_icons = list(BODY_ZONE_PRECISE_L_HAND = HANDS_PART_LAYER, "l_hand_behind" = BODY_BEHIND_LAYER)
body_damage_coeff = 0.75
held_index = 1
px_x = -6
@@ -697,8 +703,7 @@
max_damage = 50
body_zone = BODY_ZONE_R_ARM
body_part = ARM_RIGHT
aux_zone = BODY_ZONE_PRECISE_R_HAND
aux_layer = HANDS_PART_LAYER
aux_icons = list(BODY_ZONE_PRECISE_R_HAND = HANDS_PART_LAYER, "r_hand_behind" = BODY_BEHIND_LAYER)
body_damage_coeff = 0.75
held_index = 2
px_x = 6
@@ -768,6 +773,8 @@
px_y = 12
stam_heal_tick = 2
max_stamina_damage = 50
var/blood_state = BLOOD_STATE_NOT_BLOODY
var/list/bloody_legs = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
/obj/item/bodypart/l_leg/is_disabled()
if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_LEG))
@@ -828,6 +835,8 @@
px_y = 12
max_stamina_damage = 50
stam_heal_tick = 2
var/blood_state = BLOOD_STATE_NOT_BLOODY
var/list/bloody_legs = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
/obj/item/bodypart/r_leg/is_disabled()
if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_LEG))
@@ -334,12 +334,13 @@
//Regenerates all limbs. Returns amount of limbs regenerated
/mob/living/proc/regenerate_limbs(noheal, excluded_limbs)
return 0
/mob/living/proc/regenerate_limbs(noheal = FALSE, list/excluded_limbs = list())
SEND_SIGNAL(src, COMSIG_LIVING_REGENERATE_LIMBS, noheal, excluded_limbs)
/mob/living/carbon/regenerate_limbs(noheal, list/excluded_limbs)
/mob/living/carbon/regenerate_limbs(noheal = FALSE, list/excluded_limbs = list())
. = ..()
var/list/limb_list = list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG)
if(excluded_limbs)
if(excluded_limbs.len)
limb_list -= excluded_limbs
for(var/Z in limb_list)
. += regenerate_limb(Z, noheal)
+2
View File
@@ -120,6 +120,8 @@
..()
/obj/item/bodypart/head/update_icon_dropped()
if(custom_head)
return
var/list/standing = get_limb_icon(1)
if(!standing.len)
icon_state = initial(icon_state)//no overlays found, we default back to initial icon.
+42 -7
View File
@@ -18,8 +18,6 @@
return FALSE
/mob/proc/has_left_hand(check_disabled = TRUE)
return TRUE
@@ -49,6 +47,27 @@
/mob/proc/has_left_leg()
return TRUE
/mob/living/carbon/has_left_leg()
var/obj/item/bodypart/l_leg = get_bodypart(BODY_ZONE_L_LEG)
if(l_leg)
return TRUE
else
return FALSE
/mob/proc/has_right_leg()
return TRUE
/mob/living/carbon/has_right_leg()
var/obj/item/bodypart/r_leg = get_bodypart(BODY_ZONE_R_LEG)
if(r_leg)
return TRUE
else
return FALSE
//Limb numbers
/mob/proc/get_num_arms(check_disabled = TRUE)
return 2
@@ -91,14 +110,14 @@
/mob/proc/get_leg_ignore()
return FALSE
/mob/living/carbon/alien/larva/get_leg_ignore()
return TRUE
/mob/living/carbon/human/get_leg_ignore()
if((movement_type & FLYING) || floating)
/mob/living/carbon/get_leg_ignore()
if(movement_type & (FLYING|FLOATING))
return TRUE
return FALSE
/mob/living/carbon/alien/larva/get_leg_ignore()
return TRUE
/mob/living/proc/get_missing_limbs()
return list()
@@ -314,3 +333,19 @@
else
S.adjusted = ALT_STYLE
H.update_inv_wear_suit()
/mob/living/carbon/proc/get_body_parts_flags()
for(var/X in bodyparts)
var/obj/item/bodypart/L = X
switch(L.body_part)
if(CHEST)
. |= GROIN
if(LEG_LEFT)
. |= FOOT_LEFT
if(LEG_RIGHT)
. |= FOOT_RIGHT
if(ARM_LEFT)
. |= HAND_LEFT
if(ARM_RIGHT)
. |= HAND_RIGHT
. |= L.body_part
+2 -1
View File
@@ -7,7 +7,8 @@
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/fix_brain,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_HEAD)
requires_bodypart_type = 0
/datum/surgery_step/fix_brain
+2 -2
View File
@@ -1,7 +1,7 @@
/datum/surgery/cavity_implant
name = "Cavity implant"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/incise, /datum/surgery_step/handle_cavity, /datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
//handle cavity
/datum/surgery_step/handle_cavity
@@ -15,7 +15,7 @@
/datum/surgery_step/handle_cavity/tool_check(mob/user, obj/item/tool)
if(istype(tool, /obj/item/cautery) || istype(tool, /obj/item/gun/energy/laser))
return FALSE
return !tool.is_hot()
return !tool.get_temperature()
/datum/surgery_step/handle_cavity/preop(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/obj/item/bodypart/chest/CH = target.get_bodypart(BODY_ZONE_CHEST)
IC = CH.cavity_item
+3 -1
View File
@@ -1,8 +1,10 @@
/datum/surgery/core_removal
name = "Core removal"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/extract_core)
species = list(/mob/living/simple_animal/slime)
target_mobtypes = list(/mob/living/simple_animal/slime)
possible_locs = list(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_CHEST,BODY_ZONE_HEAD)
lying_required = FALSE
ignore_clothes = TRUE
/datum/surgery/core_removal/can_start(mob/user, mob/living/target)
if(target.stat == DEAD)
+1 -1
View File
@@ -48,7 +48,7 @@
//grafts a coronary bypass onto the individual's heart, success chance is 90% base again
/datum/surgery_step/coronary_bypass
name = "graft coronary bypass"
implements = list(/obj/item/hemostat = 90, TOOL_WIRECUTTER = 35, /obj/item/stack/packageWrap = 15, /obj/item/stack/cable_coil = 5)
implements = list(TOOL_HEMOSTAT = 90, TOOL_WIRECUTTER = 35, /obj/item/stack/packageWrap = 15, /obj/item/stack/cable_coil = 5)
time = 90
/datum/surgery_step/coronary_bypass/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+3 -4
View File
@@ -5,14 +5,13 @@
/datum/surgery_step/embalming,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
requires_bodypart_type = 0
/datum/surgery_step/embalming
name = "embalming body"
implements = list(/obj/item/reagent_containers/syringe = 100, /obj/item/pen = 30)
time = 10
implements = list(TOOL_HEMOSTAT = 100, TOOL_SCREWDRIVER = 35)
chems_needed = list("drying_agent", "sterilizine")
require_all_chems = FALSE
@@ -22,7 +21,7 @@
/datum/surgery_step/embalming/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] embalms [target]'s body.", "<span class='notice'>You succeed in embalming [target]'s body.</span>")
ADD_TRAIT(target, TRAIT_HUSK, MAGIC_TRAIT) //Husk's prevent body smell
return FALSE
return TRUE
/datum/surgery_step/embalming/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] screws up!", "<span class='warning'>You screwed up!</span>")
+1 -1
View File
@@ -1,7 +1,7 @@
/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)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_PRECISE_EYES)
requires_bodypart_type = 0
//fix eyes
+1 -1
View File
@@ -4,7 +4,7 @@
/datum/surgery/graft_synthtissue
name = "Graft synthtissue"
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN, BODY_ZONE_PRECISE_EYES)
steps = list(
/datum/surgery_step/incise,
+215
View File
@@ -0,0 +1,215 @@
/datum/surgery/healing
steps = list(/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/incise,
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/heal,
/datum/surgery_step/close)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
requires_bodypart_type = FALSE
replaced_by = /datum/surgery
ignore_clothes = TRUE
var/healing_step_type
var/antispam = FALSE
/datum/surgery/healing/New(surgery_target, surgery_location, surgery_bodypart)
..()
if(healing_step_type)
steps = list(/datum/surgery_step/incise/nobleed,
healing_step_type, //hehe cheeky
/datum/surgery_step/close)
/datum/surgery_step/heal
name = "repair body"
implements = list(TOOL_HEMOSTAT = 100, TOOL_SCREWDRIVER = 65, /obj/item/pen = 55)
repeatable = TRUE
time = 25
var/brutehealing = 0
var/burnhealing = 0
var/missinghpbonus = 0 //heals an extra point of damager per X missing damage of type (burn damage for burn healing, brute for brute). Smaller Number = More Healing!
/datum/surgery_step/heal/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/woundtype
if(brutehealing && burnhealing)
woundtype = "wounds"
else if(brutehealing)
woundtype = "bruises"
else //why are you trying to 0,0...?
woundtype = "burns"
if(istype(surgery,/datum/surgery/healing))
var/datum/surgery/healing/the_surgery = surgery
if(!the_surgery.antispam)
display_results(user, target, "<span class='notice'>You attempt to patch some of [target]'s [woundtype].</span>",
"<span class='notice'>[user] attempts to patch some of [target]'s [woundtype].</span>",
"<span class='notice'>[user] attempts to patch some of [target]'s [woundtype].</span>")
/datum/surgery_step/heal/initiate(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, try_to_fail = FALSE)
if(..())
while((brutehealing && target.getBruteLoss()) || (burnhealing && target.getFireLoss()))
if(!..())
break
/datum/surgery_step/heal/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/umsg = "You succeed in fixing some of [target]'s wounds" //no period, add initial space to "addons"
var/tmsg = "[user] fixes some of [target]'s wounds" //see above
var/urhealedamt_brute = brutehealing
var/urhealedamt_burn = burnhealing
if(missinghpbonus)
if(target.stat != DEAD)
urhealedamt_brute += round((target.getBruteLoss()/ missinghpbonus),0.1)
urhealedamt_burn += round((target.getFireLoss()/ missinghpbonus),0.1)
else //less healing bonus for the dead since they're expected to have lots of damage to begin with (to make TW into defib not TOO simple)
urhealedamt_brute += round((target.getBruteLoss()/ (missinghpbonus*5)),0.1)
urhealedamt_burn += round((target.getFireLoss()/ (missinghpbonus*5)),0.1)
if(!get_location_accessible(target, target_zone))
urhealedamt_brute *= 0.55
urhealedamt_burn *= 0.55
umsg += " as best as you can while they have clothing on"
tmsg += " as best as they can while [target] has clothing on"
target.heal_bodypart_damage(urhealedamt_brute,urhealedamt_burn)
display_results(user, target, "<span class='notice'>[umsg].</span>",
"[tmsg].",
"[tmsg].")
if(istype(surgery, /datum/surgery/healing))
var/datum/surgery/healing/the_surgery = surgery
the_surgery.antispam = TRUE
return TRUE
/datum/surgery_step/heal/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='warning'>You screwed up!</span>",
"<span class='warning'>[user] screws up!</span>",
"<span class='notice'>[user] fixes some of [target]'s wounds.</span>", TRUE)
var/urdamageamt_burn = brutehealing * 0.8
var/urdamageamt_brute = burnhealing * 0.8
if(missinghpbonus)
urdamageamt_brute += round((target.getBruteLoss()/ (missinghpbonus*2)),0.1)
urdamageamt_burn += round((target.getFireLoss()/ (missinghpbonus*2)),0.1)
target.take_bodypart_damage(urdamageamt_brute, urdamageamt_burn)
return FALSE
/***************************BRUTE***************************/
/datum/surgery/healing/brute
name = "Tend Wounds (Bruises)"
/datum/surgery/healing/brute/basic
name = "Tend Wounds (Bruises, Basic)"
replaced_by = /datum/surgery/healing/brute/upgraded
healing_step_type = /datum/surgery_step/heal/brute/basic
desc = "A surgical procedure that provides basic treatment for a patient's brute traumas. Heals slightly more when the patient is severely injured."
/datum/surgery/healing/brute/upgraded
name = "Tend Wounds (Bruises, Adv.)"
replaced_by = /datum/surgery/healing/brute/upgraded/femto
requires_tech = TRUE
healing_step_type = /datum/surgery_step/heal/brute/upgraded
desc = "A surgical procedure that provides advanced treatment for a patient's brute traumas. Heals more when the patient is severely injured."
/datum/surgery/healing/brute/upgraded/femto
name = "Tend Wounds (Bruises, Exp.)"
replaced_by = /datum/surgery/healing/combo/upgraded/femto
requires_tech = TRUE
healing_step_type = /datum/surgery_step/heal/brute/upgraded/femto
desc = "A surgical procedure that provides experimental treatment for a patient's brute traumas. Heals considerably more when the patient is severely injured."
/********************BRUTE STEPS********************/
/datum/surgery_step/heal/brute/basic
name = "tend bruises"
brutehealing = 5
missinghpbonus = 15
/datum/surgery_step/heal/brute/upgraded
brutehealing = 5
missinghpbonus = 10
/datum/surgery_step/heal/brute/upgraded/femto
brutehealing = 5
missinghpbonus = 5
/***************************BURN***************************/
/datum/surgery/healing/burn
name = "Tend Wounds (Burn)"
/datum/surgery/healing/burn/basic
name = "Tend Wounds (Burn, Basic)"
replaced_by = /datum/surgery/healing/burn/upgraded
healing_step_type = /datum/surgery_step/heal/burn/basic
desc = "A surgical procedure that provides basic treatment for a patient's burns. Heals slightly more when the patient is severely injured."
/datum/surgery/healing/burn/upgraded
name = "Tend Wounds (Burn, Adv.)"
replaced_by = /datum/surgery/healing/burn/upgraded/femto
requires_tech = TRUE
healing_step_type = /datum/surgery_step/heal/burn/upgraded
desc = "A surgical procedure that provides advanced treatment for a patient's burns. Heals more when the patient is severely injured."
/datum/surgery/healing/burn/upgraded/femto
name = "Tend Wounds (Burn, Exp.)"
replaced_by = /datum/surgery/healing/combo/upgraded/femto
requires_tech = TRUE
healing_step_type = /datum/surgery_step/heal/burn/upgraded/femto
desc = "A surgical procedure that provides experimental treatment for a patient's burns. Heals considerably more when the patient is severely injured."
/********************BURN STEPS********************/
/datum/surgery_step/heal/burn/basic
name = "tend burn wounds"
burnhealing = 5
missinghpbonus = 15
/datum/surgery_step/heal/burn/upgraded
burnhealing = 5
missinghpbonus = 10
/datum/surgery_step/heal/burn/upgraded/femto
burnhealing = 5
missinghpbonus = 5
/***************************COMBO***************************/
/datum/surgery/healing/combo
/datum/surgery/healing/combo
name = "Tend Wounds (Mixture, Basic)"
replaced_by = /datum/surgery/healing/combo/upgraded
requires_tech = TRUE
healing_step_type = /datum/surgery_step/heal/combo
desc = "A surgical procedure that provides basic treatment for a patient's burns and brute traumas. Heals slightly more when the patient is severely injured."
/datum/surgery/healing/combo/upgraded
name = "Tend Wounds (Mixture, Adv.)"
replaced_by = /datum/surgery/healing/combo/upgraded/femto
healing_step_type = /datum/surgery_step/heal/combo/upgraded
desc = "A surgical procedure that provides advanced treatment for a patient's burns and brute traumas. Heals more when the patient is severely injured."
/datum/surgery/healing/combo/upgraded/femto //no real reason to type it like this except consistency, don't worry you're not missing anything
name = "Tend Wounds (Mixture, Exp.)"
replaced_by = null
healing_step_type = /datum/surgery_step/heal/combo/upgraded/femto
desc = "A surgical procedure that provides experimental treatment for a patient's burns and brute traumas. Heals considerably more when the patient is severely injured."
/********************COMBO STEPS********************/
/datum/surgery_step/heal/combo
name = "tend physical wounds"
brutehealing = 3
burnhealing = 3
missinghpbonus = 15
time = 10
/datum/surgery_step/heal/combo/upgraded
brutehealing = 3
burnhealing = 3
missinghpbonus = 10
/datum/surgery_step/heal/combo/upgraded/femto
brutehealing = 1
burnhealing = 1
missinghpbonus = 2.5
/datum/surgery_step/heal/combo/upgraded/femto/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='warning'>You screwed up!</span>",
"<span class='warning'>[user] screws up!</span>",
"<span class='notice'>[user] fixes some of [target]'s wounds.</span>", TRUE)
target.take_bodypart_damage(5,5)
+8 -4
View File
@@ -10,9 +10,6 @@
C = M
affecting = C.get_bodypart(check_zone(selected_zone))
if(!M.lying && !isslime(M)) //if they're prone or a slime
return
var/datum/surgery/current_surgery
for(var/datum/surgery/S in M.surgeries)
@@ -35,13 +32,18 @@
continue
else if(C && S.requires_bodypart) //mob with no limb in surgery zone when we need a limb
continue
if(S.lying_required && !(M.lying))
continue
if(!S.can_start(user, M))
continue
for(var/path in S.species)
for(var/path in S.target_mobtypes)
if(istype(M, path))
available_surgeries[S.name] = S
break
if(!available_surgeries.len)
return
var/P = input("Begin which procedure?", "Surgery", null, null) as null|anything in available_surgeries
if(P && user && user.Adjacent(M) && (I in user))
var/datum/surgery/S = available_surgeries[P]
@@ -60,6 +62,8 @@
return
else if(C && S.requires_bodypart)
return
if(S.lying_required && !(M.lying))
return
if(!S.can_start(user, M))
return
+1 -1
View File
@@ -1,7 +1,7 @@
/datum/surgery/implant_removal
name = "implant removal"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/extract_implant, /datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
//extract implant
/datum/surgery_step/extract_implant
+1 -1
View File
@@ -38,7 +38,7 @@
/datum/surgery/augmentation
name = "Augmentation"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/replace, /datum/surgery_step/saw, /datum/surgery_step/replace_limb)
species = list(/mob/living/carbon/human)
target_mobtypes = list(/mob/living/carbon/human)
possible_locs = list(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_CHEST,BODY_ZONE_HEAD)
requires_real_bodypart = TRUE
//SURGERY STEP SUCCESSES
+1 -1
View File
@@ -15,7 +15,7 @@
//lobectomy, removes the most damaged lung lobe with a 95% base success chance
/datum/surgery_step/lobectomy
name = "excise damaged lung node"
implements = list(/obj/item/scalpel = 95, /obj/item/melee/transforming/energy/sword = 65, /obj/item/kitchen/knife = 45,
implements = list(TOOL_SCALPEL = 95, /obj/item/melee/transforming/energy/sword = 65, /obj/item/kitchen/knife = 45,
/obj/item/shard = 35)
time = 42
+2 -2
View File
@@ -14,7 +14,7 @@
"[user] begins to unscrew the shell of [target]'s [parse_zone(target_zone)].")
/datum/surgery_step/mechanic_incise/tool_check(mob/user, obj/item/tool)
if(implement_type == /obj/item && !tool.is_sharp())
if(implement_type == /obj/item && !tool.get_sharpness())
return FALSE
return TRUE
//close shell
@@ -33,7 +33,7 @@
"[user] begins to screw the shell of [target]'s [parse_zone(target_zone)].")
/datum/surgery_step/mechanic_close/tool_check(mob/user, obj/item/tool)
if(implement_type == /obj/item && !tool.is_sharp())
if(implement_type == /obj/item && !tool.get_sharpness())
return FALSE
return TRUE
//prepare electronics
+3 -3
View File
@@ -1,6 +1,6 @@
/datum/surgery/organ_manipulation
name = "Organ manipulation"
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
name = "organ manipulation"
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD)
requires_real_bodypart = 1
steps = list(
@@ -26,7 +26,7 @@
/datum/surgery/organ_manipulation/alien
name = "Alien organ manipulation"
possible_locs = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD, BODY_ZONE_PRECISE_GROIN, BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)
species = list(/mob/living/carbon/alien/humanoid)
target_mobtypes = list(/mob/living/carbon/alien/humanoid)
steps = list(
/datum/surgery_step/saw,
/datum/surgery_step/incise,
+12 -2
View File
@@ -11,7 +11,7 @@
"[user] begins to make an incision in [target]'s [parse_zone(target_zone)].")
/datum/surgery_step/incise/tool_check(mob/user, obj/item/tool)
if(implement_type == /obj/item && !tool.is_sharp())
if(implement_type == /obj/item && !tool.get_sharpness())
return FALSE
return TRUE
/datum/surgery_step/incise/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -24,6 +24,16 @@
H.bleed_rate += 3
return TRUE
/datum/surgery_step/incise/nobleed //silly friendly!
/datum/surgery_step/incise/nobleed/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 <i>carefully</i> make an incision in [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to <i>carefully</i> make an incision in [target]'s [parse_zone(target_zone)].",
"[user] begins to <i>carefully</i> make an incision in [target]'s [parse_zone(target_zone)].")
/datum/surgery_step/incise/nobleed/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
return TRUE
//clamp bleeders
/datum/surgery_step/clamp_bleeders
name = "clamp bleeders"
@@ -69,7 +79,7 @@
/datum/surgery_step/close/tool_check(mob/user, obj/item/tool)
if(implement_type == TOOL_WELDER || implement_type == /obj/item)
return tool.is_hot()
return tool.get_temperature()
return TRUE
/datum/surgery_step/close/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(locate(/datum/surgery_step/saw) in surgery.steps)
+1 -1
View File
@@ -34,7 +34,7 @@
update_icon()
..()
/obj/item/organ/appendix/Insert(mob/living/carbon/M, special = 0)
/obj/item/organ/appendix/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
..()
if(inflamed)
M.ForceContractDisease(new /datum/disease/appendicitis(), FALSE, TRUE)
@@ -128,8 +128,8 @@
var/on = FALSE
var/datum/effect_system/trail_follow/ion/ion_trail
/obj/item/organ/cyberimp/chest/thrusters/Insert(mob/living/carbon/M, special = 0)
..()
/obj/item/organ/cyberimp/chest/thrusters/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
. = ..()
if(!ion_trail)
ion_trail = new
ion_trail.set_up(M)
@@ -151,10 +151,14 @@
on = TRUE
if(allow_thrust(0.01))
ion_trail.start()
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, .proc/move_react)
owner.add_movespeed_modifier(MOVESPEED_ID_CYBER_THRUSTER, priority=100, multiplicative_slowdown=-2, movetypes=FLOATING, conflict=MOVE_CONFLICT_JETPACK)
if(!silent)
to_chat(owner, "<span class='notice'>You turn your thrusters set on.</span>")
else
ion_trail.stop()
UnregisterSignal(owner, COMSIG_MOVABLE_MOVED)
owner.remove_movespeed_modifier(MOVESPEED_ID_CYBER_THRUSTER)
if(!silent)
to_chat(owner, "<span class='notice'>You turn your thrusters set off.</span>")
on = FALSE
@@ -169,6 +173,9 @@
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/organ/cyberimp/chest/thrusters/proc/move_react()
allow_thrust(0.01)
/obj/item/organ/cyberimp/chest/thrusters/proc/allow_thrust(num)
if(!on || !owner)
return 0
@@ -142,22 +142,3 @@
if(prob(60/severity))
to_chat(owner, "<span class='warning'>Your breathing tube suddenly closes!</span>")
owner.losebreath += 2
//BOX O' IMPLANTS
/obj/item/storage/box/cyber_implants
name = "boxed cybernetic implants"
desc = "A sleek, sturdy box."
icon_state = "cyber_implants"
var/list/boxed = list(
/obj/item/autosurgeon/thermal_eyes,
/obj/item/autosurgeon/xray_eyes,
/obj/item/autosurgeon/anti_stun,
/obj/item/autosurgeon/reviver)
var/amount = 5
/obj/item/storage/box/cyber_implants/PopulateContents()
var/implant
while(contents.len <= amount)
implant = pick(boxed)
new implant(src)
@@ -103,6 +103,26 @@
/obj/item/autosurgeon/anti_drop
starting_organ = /obj/item/organ/cyberimp/brain/anti_drop
//BOX O' IMPLANTS
/obj/item/storage/box/cyber_implants
name = "boxed cybernetic implants"
desc = "A sleek, sturdy box."
icon_state = "syndiebox"
illustration = "cyber_implants"
var/list/boxed = list(
/obj/item/autosurgeon/thermal_eyes,
/obj/item/autosurgeon/xray_eyes,
/obj/item/autosurgeon/anti_stun,
/obj/item/autosurgeon/reviver)
var/amount = 5
/obj/item/storage/box/cyber_implants/PopulateContents()
var/implant
while(contents.len <= amount)
implant = pick(boxed)
new implant(src)
/obj/item/autosurgeon/penis
desc = "A single use autosurgeon that contains a penis. A screwdriver can be used to remove it, but implants can't be placed back in."
uses = 1
+2 -2
View File
@@ -227,7 +227,7 @@
terminate_effects()
. = ..()
/obj/item/organ/eyes/robotic/glow/Remove()
/obj/item/organ/eyes/robotic/glow/Remove(mob/living/carbon/M, special = FALSE)
terminate_effects()
. = ..()
@@ -338,7 +338,7 @@
/obj/item/organ/eyes/robotic/glow/proc/start_visuals()
if(!islist(eye_lighting))
regenerate_light_effects()
if((eye_lighting.len < light_beam_distance) || !on_mob)
if((LAZYLEN(eye_lighting) < light_beam_distance) || !on_mob)
regenerate_light_effects()
sync_light_effects()
update_visuals()
+21 -2
View File
@@ -57,7 +57,7 @@
/obj/item/organ/heart/prepare_eat()
var/obj/S = ..()
S.icon_state = "heart-off"
S.icon_state = "[icon_base]-off"
return S
/obj/item/organ/heart/on_life()
@@ -90,6 +90,12 @@
owner.set_heartattack(TRUE)
failed = TRUE
obj/item/organ/heart/slime
name = "slime heart"
desc = "It seems we've gotten to the slimy core of the matter."
icon_state = "heart-s-on"
icon_base = "heart-s"
/obj/item/organ/heart/cursed
name = "cursed heart"
desc = "A heart that, when inserted, will force you to pump it manually."
@@ -129,7 +135,7 @@
else
last_pump = world.time //lets be extra fair *sigh*
/obj/item/organ/heart/cursed/Insert(mob/living/carbon/M, special = 0)
/obj/item/organ/heart/cursed/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
..()
if(owner)
to_chat(owner, "<span class ='userdanger'>Your heart has been replaced with a cursed one, you have to pump this one manually otherwise you'll die!</span>")
@@ -211,6 +217,19 @@ obj/item/organ/heart/cybernetic/upgraded/on_life()
/obj/item/organ/heart/ipc
name = "IPC heart"
desc = "An electronic pump that regulates hydraulic functions, they have an auto-restart after EMPs."
icon_state = "heart-c"
organ_flags = ORGAN_SYNTHETIC
/obj/item/organ/heart/ipc/emp_act()
. = ..()
if(. & EMP_PROTECT_SELF)
return
Stop()
addtimer(CALLBACK(src, .proc/Restart), 10)
/obj/item/organ/heart/freedom
name = "heart of freedom"
desc = "This heart pumps with the passion to give... something freedom."
@@ -28,7 +28,7 @@
/obj/item/organ/proc/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
if(!iscarbon(M) || owner == M)
return
return FALSE
var/obj/item/organ/replaced = M.getorganslot(slot)
if(replaced)
@@ -50,6 +50,8 @@
A.Grant(M)
STOP_PROCESSING(SSobj, src)
return TRUE
//Special is for instant replacement like autosurgeons
/obj/item/organ/proc/Remove(mob/living/carbon/M, special = FALSE)
owner = null
@@ -64,6 +66,8 @@
A.Remove(M)
START_PROCESSING(SSobj, src)
return TRUE
/obj/item/organ/proc/on_find(mob/living/finder)
return
@@ -181,7 +185,7 @@
if(owner)
// The special flag is important, because otherwise mobs can die
// while undergoing transformation into different mobs.
Remove(owner, special=TRUE)
Remove(owner, TRUE)
return ..()
/obj/item/organ/attack(mob/living/carbon/M, mob/user)
+1 -2
View File
@@ -62,7 +62,7 @@
to_chat(owner, "<span class='notice'>Your tongue is really starting to hurt.</span>")
/obj/item/organ/tongue/Insert(mob/living/carbon/M, special = 0)
/obj/item/organ/tongue/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
..()
if(say_mod && M.dna && M.dna.species)
M.dna.species.say_mod = say_mod
@@ -233,7 +233,6 @@
name = "plasma bone \"tongue\""
desc = "Like animated skeletons, Plasmamen vibrate their teeth in order to produce speech."
icon_state = "tongueplasma"
maxHealth = "alien"
modifies_speech = FALSE
/obj/item/organ/tongue/robot
+3 -3
View File
@@ -140,7 +140,7 @@
user.say(message, spans = span_list, sanitize = FALSE)
message = lowertext(message)
var/mob/living/list/listeners = list()
var/list/mob/living/listeners = list()
for(var/mob/living/L in get_hearers_in_view(8, user))
if(L.can_hear() && !L.anti_magic_check(FALSE, TRUE) && L.stat != DEAD)
if(L == user && !include_speaker)
@@ -663,7 +663,7 @@
//FIND THRALLS
message = lowertext(message)
var/mob/living/list/listeners = list()
var/list/mob/living/listeners = list()
for(var/mob/living/L in get_hearers_in_view(8, user))
if(L.can_hear() && !L.anti_magic_check(FALSE, TRUE) && L.stat != DEAD)
if(L.has_status_effect(/datum/status_effect/chem/enthrall))//Check to see if they have the status
@@ -917,7 +917,7 @@
speaktrigger += "[(H.client?.prefs.lewdchem?"You are my whole world and all of my being belongs to you, ":"I cannot think of anything else but aiding your cause, ")] "//Redflags!!
//mood
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
var/datum/component/mood/mood = H.GetComponent(/datum/component/mood)
switch(mood.sanity)
if(SANITY_GREAT to INFINITY)
speaktrigger += "I'm beyond elated!! " //did you mean byond elated? hohoho
@@ -1,7 +1,7 @@
/datum/surgery/prosthetic_replacement
name = "Prosthetic replacement"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/add_prosthetic)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_HEAD)
requires_bodypart = FALSE //need a missing limb
requires_bodypart_type = 0
+53 -36
View File
@@ -5,8 +5,8 @@
var/list/steps = list() //Steps in a surgery
var/step_in_progress = 0 //Actively performing a Surgery
var/can_cancel = 1 //Can cancel this surgery after step 1 with cautery
var/list/species = list(/mob/living/carbon/human) //Acceptable Species
var/location = BODY_ZONE_CHEST //Surgery location
var/list/target_mobtypes = list(/mob/living/carbon/human) //Acceptable Species
var/location = BODY_ZONE_CHEST //Surgery location
var/requires_bodypart_type = BODYPART_ORGANIC //Prevents you from performing an operation on incorrect limbs. 0 for any limb type
var/list/possible_locs = list() //Multiple locations
var/ignore_clothes = 0 //This surgery ignores clothes
@@ -15,6 +15,9 @@
var/requires_bodypart = TRUE //Surgery available only when a bodypart is present, or only when it is missing.
var/success_multiplier = 0 //Step success propability multiplier
var/requires_real_bodypart = 0 //Some surgeries don't work on limbs that don't really exist
var/lying_required = TRUE //Does the vicitm needs to be lying down.
var/requires_tech = FALSE
var/replaced_by
/datum/surgery/New(surgery_target, surgery_location, surgery_bodypart)
..()
@@ -34,10 +37,45 @@
return ..()
/datum/surgery/proc/can_start(mob/user, mob/living/carbon/target)
// if 0 surgery wont show up in list
// put special restrictions here
return 1
/datum/surgery/proc/can_start(mob/user, mob/living/patient) //FALSE to not show in list
. = TRUE
if(replaced_by == /datum/surgery)
return FALSE
if(HAS_TRAIT(user, TRAIT_SURGEON) || HAS_TRAIT(user.mind, TRAIT_SURGEON))
if(replaced_by)
return FALSE
else
return TRUE
if(!requires_tech && !replaced_by)
return TRUE
// True surgeons (like abductor scientists) need no instructions
if(requires_tech)
. = FALSE
if(iscyborg(user))
var/mob/living/silicon/robot/R = user
var/obj/item/surgical_processor/SP = locate() in R.module.modules
if(SP)
if (replaced_by in SP.advanced_surgeries)
return .
if(type in SP.advanced_surgeries)
return TRUE
var/turf/T = get_turf(patient)
var/obj/structure/table/optable/table = locate(/obj/structure/table/optable, T)
if(table)
if(!table.computer)
return .
if(table.computer.stat & (NOPOWER|BROKEN))
return .
if(replaced_by in table.computer.advanced_surgeries)
return FALSE
if(type in table.computer.advanced_surgeries)
return TRUE
/datum/surgery/proc/next_step(mob/user, intent)
if(step_in_progress)
@@ -54,7 +92,7 @@
return TRUE
if(iscyborg(user) && user.a_intent != INTENT_HARM) //to save asimov borgs a LOT of heartache
return TRUE
if(tool.item_flags & SURGICAL_TOOL) //Just because you used the wrong tool it doesn't mean you meant to whack the patient with it
if(tool && tool.item_flags & SURGICAL_TOOL) //Just because you used the wrong tool it doesn't mean you meant to whack the patient with it
to_chat(user, "<span class='warning'>This step requires a different tool!</span>")
return TRUE
@@ -88,33 +126,7 @@
/datum/surgery/advanced
name = "advanced surgery"
/datum/surgery/advanced/can_start(mob/user, mob/living/carbon/target)
if(!..())
return FALSE
//Abductor scientists need no instructions
if(isabductor(user))
var/mob/living/carbon/human/H = user
var/datum/species/abductor/S = H.dna.species
if(S.scientist)
return TRUE
if(iscyborg(user))
var/mob/living/silicon/robot/R = user
var/obj/item/surgical_processor/SP = locate() in R.module.modules
if(!SP)
return FALSE
if(type in SP.advanced_surgeries)
return TRUE
var/turf/T = get_turf(target)
var/obj/structure/table/optable/table = locate(/obj/structure/table/optable, T)
if(!table || !table.computer)
return FALSE
if(table.computer.stat & (NOPOWER|BROKEN))
return FALSE
if(type in table.computer.advanced_surgeries)
return TRUE
requires_tech = TRUE
/obj/item/disk/surgery
name = "Surgery Procedure Disk"
@@ -131,7 +143,12 @@
/obj/item/disk/surgery/debug/Initialize()
. = ..()
surgeries = subtypesof(/datum/surgery/advanced)
surgeries = list()
var/list/req_tech_surgeries = subtypesof(/datum/surgery)
for(var/i in req_tech_surgeries)
var/datum/surgery/beep = i
if(initial(beep.requires_tech))
surgeries += beep
//INFO
//Check /mob/living/carbon/attackby for how surgery progresses, and also /mob/living/carbon/attack_hand.
@@ -152,4 +169,4 @@
//RESOLVED ISSUES //"Todo" jobs that have been completed
//combine hands/feet into the arms - Hands/feet were removed - RR
//surgeries (not steps) that can be initiated on any body part (corresponding with damage locations) - Call this one done, see possible_locs var - c0
//surgeries (not steps) that can be initiated on any body part (corresponding with damage locations) - Call this one done, see possible_locs var - c0
+12 -8
View File
@@ -8,7 +8,9 @@
var/repeatable = FALSE //can this step be repeated? Make shure it isn't last step, or it used in surgery with `can_cancel = 1`. Or surgion will be stuck in the loop
var/list/chems_needed = list() //list of chems needed to complete the step. Even on success, the step will have no effect if there aren't the chems required in the mob.
var/require_all_chems = TRUE //any on the list or all on the list?
/datum/surgery_step/proc/try_op(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, try_to_fail = FALSE)
var/silicons_obey_prob = FALSE
/datum/surgery_step/proc/try_op(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, try_to_fail = FALSE)
var/success = FALSE
if(accept_hand)
if(!tool)
@@ -46,7 +48,8 @@
else
surgery.status--
return FALSE
/datum/surgery_step/proc/initiate(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, try_to_fail = FALSE)
/datum/surgery_step/proc/initiate(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, try_to_fail = FALSE)
surgery.step_in_progress = TRUE
var/speed_mod = 1
var/advance = FALSE
@@ -60,7 +63,8 @@
if(implement_type) //this means it isn't a require hand or any item step.
prob_chance = implements[implement_type]
prob_chance *= surgery.get_propability_multiplier()
if((prob(prob_chance) || iscyborg(user)) && chem_check(target) && !try_to_fail)
if((prob(prob_chance) || (iscyborg(user) && !silicons_obey_prob)) && chem_check(target) && !try_to_fail)
if(success(user, target, target_zone, tool, surgery))
advance = TRUE
else
@@ -73,19 +77,18 @@
surgery.step_in_progress = FALSE
return advance
/datum/surgery_step/proc/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
/datum/surgery_step/proc/preop(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You begin to perform surgery on [target]...</span>",
"[user] begins to perform surgery on [target].",
"[user] begins to perform surgery on [target].")
/datum/surgery_step/proc/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
/datum/surgery_step/proc/success(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You succeed.</span>",
"[user] succeeds!",
"[user] finishes.")
return TRUE
/datum/surgery_step/proc/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
/datum/surgery_step/proc/failure(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='warning'>You screw up!</span>",
"<span class='warning'>[user] screws up!</span>",
"[user] finishes.", TRUE) //By default the patient will notice if the wrong thing has been cut
@@ -93,7 +96,8 @@
/datum/surgery_step/proc/tool_check(mob/user, obj/item/tool)
return TRUE
/datum/surgery_step/proc/chem_check(mob/living/carbon/target)
/datum/surgery_step/proc/chem_check(mob/living/target)
if(!LAZYLEN(chems_needed))
return TRUE
if(require_all_chems)