Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit229
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
name = "enhancement surgery"
|
||||
var/bioware_target = BIOWARE_GENERIC
|
||||
|
||||
/datum/surgery/advanced/bioware/can_start(mob/user, mob/living/carbon/human/target)
|
||||
/datum/surgery/advanced/bioware/can_start(mob/user, mob/living/carbon/human/target, obj/item/tool)
|
||||
if(!..())
|
||||
return FALSE
|
||||
if(!istype(target))
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
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)
|
||||
/datum/surgery/advanced/brainwashing/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
|
||||
if(!..())
|
||||
return FALSE
|
||||
var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
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)
|
||||
/datum/surgery/advanced/lobotomy/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
|
||||
if(!..())
|
||||
return FALSE
|
||||
var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/datum/surgery_step/bionecrosis,
|
||||
/datum/surgery_step/close)
|
||||
possible_locs = list(BODY_ZONE_HEAD)
|
||||
/datum/surgery/advanced/necrotic_revival/can_start(mob/user, mob/living/carbon/target)
|
||||
/datum/surgery/advanced/necrotic_revival/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
|
||||
. = ..()
|
||||
var/obj/item/organ/zombie_infection/ZI = target.getorganslot(ORGAN_SLOT_ZOMBIE)
|
||||
if(ZI)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
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)
|
||||
/datum/surgery/advanced/pacify/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
|
||||
. = ..()
|
||||
var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(!B)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
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)
|
||||
/datum/surgery/advanced/revival/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
|
||||
if(!..())
|
||||
return FALSE
|
||||
if(target.stat != DEAD)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
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)
|
||||
/datum/surgery/advanced/viral_bonding/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
|
||||
if(!..())
|
||||
return FALSE
|
||||
if(!LAZYLEN(target.diseases))
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
force = 3
|
||||
throwforce = 3
|
||||
icon = 'icons/mob/human_parts.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon_state = ""
|
||||
layer = BELOW_MOB_LAYER //so it isn't hidden behind objects when on the floor
|
||||
var/mob/living/carbon/owner = null
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
name = "fix brain"
|
||||
implements = list(TOOL_HEMOSTAT = 85, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15) //don't worry, pouring some alcohol on their open brain will get that chance to 100
|
||||
time = 120 //long and complicated
|
||||
/datum/surgery/brain_surgery/can_start(mob/user, mob/living/carbon/target)
|
||||
/datum/surgery/brain_surgery/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
|
||||
var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(!B)
|
||||
return FALSE
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
lying_required = FALSE
|
||||
ignore_clothes = TRUE
|
||||
|
||||
/datum/surgery/core_removal/can_start(mob/user, mob/living/target)
|
||||
/datum/surgery/core_removal/can_start(mob/user, mob/living/target, obj/item/tool)
|
||||
if(target.stat == DEAD)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/datum/surgery_step/incise_heart, /datum/surgery_step/coronary_bypass, /datum/surgery_step/close)
|
||||
possible_locs = list(BODY_ZONE_CHEST)
|
||||
|
||||
/datum/surgery/coronary_bypass/can_start(mob/user, mob/living/carbon/target)
|
||||
/datum/surgery/coronary_bypass/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
|
||||
var/obj/item/organ/heart/H = target.getorganslot(ORGAN_SLOT_HEART)
|
||||
if(H)
|
||||
if(H.damage > 60 && !H.operated)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
requires_tech = FALSE
|
||||
var/value_multiplier = 1
|
||||
|
||||
/datum/surgery/advanced/experimental_dissection/can_start(mob/user, mob/living/target)
|
||||
/datum/surgery/advanced/experimental_dissection/can_start(mob/user, mob/living/target, obj/item/tool)
|
||||
. = ..()
|
||||
if(HAS_TRAIT_FROM(target, TRAIT_DISSECTED,"[name]"))
|
||||
return FALSE
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
/datum/surgery_step/dissection
|
||||
name = "dissection"
|
||||
implements = list(/obj/item/scalpel/augment = 75, /obj/item/scalpel/advanced = 60, /obj/item/scalpel = 45, /obj/item/kitchen/knife = 20, /obj/item/shard = 10)// special tools not only cut down time but also improve probability, doesn't use TOOL_SCALPEL because different scalpels have different probs
|
||||
time = 125
|
||||
implements = list(/obj/item/scalpel/alien = 100, /obj/item/scalpel/advanced = 99, /obj/item/scalpel = 90, /obj/item/kitchen/knife = 45, /obj/item/shard = 25)// special tools not only cut down time but also improve probability, doesn't use TOOL_SCALPEL because different scalpels have different probs
|
||||
time = 100
|
||||
silicons_obey_prob = TRUE
|
||||
repeatable = TRUE
|
||||
|
||||
@@ -110,4 +110,4 @@
|
||||
requires_tech = TRUE
|
||||
replaced_by = null
|
||||
|
||||
#undef BASE_HUMAN_REWARD
|
||||
#undef BASE_HUMAN_REWARD
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
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)
|
||||
/datum/surgery/eye_surgery/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
|
||||
var/obj/item/organ/eyes/E = target.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(!E)
|
||||
to_chat(user, "It's hard to do surgery on someone's eyes when [target.p_they()] [target.p_do()]n't have any.")
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
continue
|
||||
if(S.lying_required && !(M.lying))
|
||||
continue
|
||||
if(!S.can_start(user, M))
|
||||
if(!S.can_start(user, M, I))
|
||||
continue
|
||||
for(var/path in S.target_mobtypes)
|
||||
if(istype(M, path))
|
||||
@@ -64,7 +64,7 @@
|
||||
return
|
||||
if(S.lying_required && !(M.lying))
|
||||
return
|
||||
if(!S.can_start(user, M))
|
||||
if(!S.can_start(user, M, I))
|
||||
return
|
||||
|
||||
if(S.ignore_clothes || get_location_accessible(M, selected_zone))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Lipoplasty"
|
||||
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/cut_fat, /datum/surgery_step/remove_fat, /datum/surgery_step/close)
|
||||
possible_locs = list(BODY_ZONE_CHEST)
|
||||
/datum/surgery/lipoplasty/can_start(mob/user, mob/living/carbon/target)
|
||||
/datum/surgery/lipoplasty/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
|
||||
if(HAS_TRAIT(target, TRAIT_FAT))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/datum/surgery_step/lobectomy, /datum/surgery_step/close)
|
||||
possible_locs = list(BODY_ZONE_CHEST)
|
||||
|
||||
/datum/surgery/lobectomy/can_start(mob/user, mob/living/carbon/target)
|
||||
/datum/surgery/lobectomy/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
|
||||
var/obj/item/organ/lungs/L = target.getorganslot(ORGAN_SLOT_LUNGS)
|
||||
if(L)
|
||||
if(L.damage > 60 && !L.operated)
|
||||
|
||||
@@ -51,12 +51,12 @@
|
||||
clear_eye_trauma()
|
||||
. = ..()
|
||||
var/mob/living/carbon/C = .
|
||||
if(C)
|
||||
if(!QDELETED(C))
|
||||
if(ishuman(C) && eye_color)
|
||||
var/mob/living/carbon/human/H = C
|
||||
H.eye_color = old_eye_color
|
||||
if(!special)
|
||||
H.dna.species.handle_body()
|
||||
H.dna.species.handle_body(H)
|
||||
if(!special)
|
||||
C.update_tint()
|
||||
C.update_sight()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
slot = ORGAN_SLOT_HEART
|
||||
|
||||
healing_factor = STANDARD_ORGAN_HEALING
|
||||
decay_factor = 2.5 * STANDARD_ORGAN_DECAY //designed to fail about 5 minutes after death
|
||||
decay_factor = 2 * STANDARD_ORGAN_DECAY
|
||||
|
||||
low_threshold_passed = "<span class='info'>Prickles of pain appear then die out from within your chest...</span>"
|
||||
high_threshold_passed = "<span class='warning'>Something inside your chest hurts, and the pain isn't subsiding. You notice yourself breathing far faster than before.</span>"
|
||||
|
||||
@@ -23,45 +23,30 @@
|
||||
/datum/language/aphasia,
|
||||
/datum/language/slime,
|
||||
/datum/language/vampiric,
|
||||
/datum/language/dwarf,
|
||||
))
|
||||
healing_factor = STANDARD_ORGAN_HEALING*5 //Fast!!
|
||||
decay_factor = STANDARD_ORGAN_DECAY/2
|
||||
|
||||
/obj/item/organ/tongue/Initialize(mapload)
|
||||
. = ..()
|
||||
low_threshold_passed = "<span class='info'>Your [name] feels a little sore.</span>"
|
||||
low_threshold_cleared = "<span class='info'>Your [name] soreness has subsided.</span>"
|
||||
high_threshold_passed = "<span class='warning'>Your [name] is really starting to hurt.</span>"
|
||||
high_threshold_cleared = "<span class='info'>The pain of your [name] has subsided a little.</span>"
|
||||
now_failing = "<span class='warning'>Your [name] feels like it's about to fall out!.</span>"
|
||||
now_fixed = "<span class='info'>The excruciating pain of your [name] has subsided.</span>"
|
||||
languages_possible = languages_possible_base
|
||||
|
||||
/obj/item/organ/tongue/proc/handle_speech(datum/source, list/speech_args)
|
||||
return
|
||||
|
||||
/obj/item/organ/tongue/emp_act(severity)
|
||||
/obj/item/organ/tongue/applyOrganDamage(d, maximum = maxHealth)
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(organ_flags & ORGAN_SYNTHETIC)
|
||||
var/errormessage = list("Runtime in tongue.dm, line 39: Undefined operation \"zapzap ow my tongue\"", "afhsjifksahgjkaslfhashfjsak", "-1.#IND", "Graham's number", "inside you all along", "awaiting at least 1 approving review before merging this taste request")
|
||||
owner.say("The pH is appropriately [pick(errormessage)].")
|
||||
|
||||
/obj/item/organ/tongue/applyOrganDamage(var/d, var/maximum = maxHealth)
|
||||
|
||||
if(!d) //Micro-optimization.
|
||||
return
|
||||
if(maximum < damage)
|
||||
return
|
||||
damage = CLAMP(damage + d, 0, maximum)
|
||||
var/mess = check_damage_thresholds(owner)
|
||||
prev_damage = damage
|
||||
if(mess && owner)
|
||||
to_chat(owner, mess)
|
||||
|
||||
if ((damage / maxHealth) > 1)
|
||||
if (damage >= maxHealth)
|
||||
to_chat(owner, "<span class='userdanger'>Your tongue is singed beyond recognition, and disintegrates!</span>")
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, "Tongues lost to Fermi")
|
||||
qdel(src)
|
||||
else if ((damage / maxHealth) > 0.85)
|
||||
to_chat(owner, "<span class='warning'>Your tongue feels like it's about to fall out!.</span>")
|
||||
else if ((damage / maxHealth) > 0.5)
|
||||
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, drop_if_replaced = TRUE)
|
||||
..()
|
||||
@@ -310,6 +295,13 @@
|
||||
maxHealth = 60 //It's robotic!
|
||||
organ_flags = ORGAN_SYNTHETIC
|
||||
|
||||
/obj/item/organ/tongue/cybernetic/emp_act(severity)
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
var/errormessage = list("Runtime in tongue.dm, line 39: Undefined operation \"zapzap ow my tongue\"", "afhsjifksahgjkaslfhashfjsak", "-1.#IND", "Graham's number", "inside you all along", "awaiting at least 1 approving review before merging this taste request")
|
||||
owner.say("The pH is appropriately [pick(errormessage)].", forced = "EMPed synthetic tongue")
|
||||
|
||||
/obj/item/organ/tongue/cybernetic/handle_speech(datum/source, list/speech_args)
|
||||
speech_args[SPEECH_SPANS] |= SPAN_ROBOT
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
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
|
||||
/datum/surgery/prosthetic_replacement/can_start(mob/user, mob/living/carbon/target)
|
||||
/datum/surgery/prosthetic_replacement/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
|
||||
if(!iscarbon(target))
|
||||
return 0
|
||||
var/mob/living/carbon/C = target
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/surgery/proc/can_start(mob/user, mob/living/patient) //FALSE to not show in list
|
||||
/datum/surgery/proc/can_start(mob/user, mob/living/patient, obj/item/tool) //FALSE to not show in list
|
||||
. = TRUE
|
||||
if(replaced_by == /datum/surgery)
|
||||
return FALSE
|
||||
@@ -55,27 +55,26 @@
|
||||
if(requires_tech)
|
||||
. = FALSE
|
||||
|
||||
var/list/advanced_surgeries = list()
|
||||
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
|
||||
|
||||
advanced_surgeries |= SP.advanced_surgeries
|
||||
|
||||
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
|
||||
if(table?.computer && !CHECK_BITFIELD(table.computer.stat, NOPOWER|BROKEN))
|
||||
advanced_surgeries |= table.computer.advanced_surgeries
|
||||
|
||||
if(istype(tool, /obj/item/surgical_drapes/advanced))
|
||||
var/obj/item/surgical_drapes/advanced/A = tool
|
||||
advanced_surgeries |= A.get_advanced_surgeries()
|
||||
|
||||
if(replaced_by in advanced_surgeries)
|
||||
return FALSE
|
||||
if(type in advanced_surgeries)
|
||||
return TRUE
|
||||
|
||||
/datum/surgery/proc/next_step(mob/user, intent)
|
||||
if(step_in_progress)
|
||||
|
||||
@@ -287,6 +287,26 @@
|
||||
if(!attempt_initiate_surgery(src, M, user))
|
||||
..()
|
||||
|
||||
/obj/item/surgical_drapes/advanced
|
||||
name = "smart surgical drapes"
|
||||
desc = "A quite quirky set of drapes with wireless synchronization to the station's research networks, with an integrated display allowing users to execute advanced surgeries without the aid of an operating computer."
|
||||
var/datum/techweb/linked_techweb
|
||||
|
||||
/obj/item/surgical_drapes/advanced/Initialize(mapload)
|
||||
. = ..()
|
||||
linked_techweb = SSresearch.science_tech
|
||||
|
||||
/obj/item/surgical_drapes/advanced/proc/get_advanced_surgeries()
|
||||
. = list()
|
||||
if(!linked_techweb)
|
||||
return
|
||||
for(var/subtype in subtypesof(/datum/design/surgery))
|
||||
var/datum/design/surgery/prototype = subtype
|
||||
var/id = initial(prototype.id)
|
||||
if(id in linked_techweb.researched_designs)
|
||||
prototype = SSresearch.techweb_design_by_id(id)
|
||||
. |= prototype.surgery
|
||||
|
||||
/obj/item/organ_storage //allows medical cyborgs to manipulate organs without hands
|
||||
name = "organ storage bag"
|
||||
desc = "A container for holding body parts."
|
||||
|
||||
Reference in New Issue
Block a user