module things, jfc

This commit is contained in:
Poojawa
2018-09-11 07:51:01 -05:00
parent 8b9ef1e400
commit 284e9d0325
695 changed files with 11343 additions and 5661 deletions
@@ -1,10 +1,6 @@
/obj/item/disk/surgery/nerve_grounding
name = "Nerve Grounding Surgery Disk"
desc = "The disk provides instructions on how to reroute the nervous system to ground electric shocks."
surgeries = list(/datum/surgery/advanced/bioware/nerve_grounding)
/datum/surgery/advanced/bioware/nerve_grounding
name = "nerve grounding"
name = "Nerve Grounding"
desc = "A surgical procedure which makes the patient's nerves act as grounding rods, protecting them from electrical shocks."
steps = list(/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/clamp_bleeders,
@@ -1,10 +1,6 @@
/obj/item/disk/surgery/nerve_splicing
name = "Nerve Splicing Surgery Disk"
desc = "The disk provides instructions on how to splice the circulatory system to counter stuns and paralysis."
surgeries = list(/datum/surgery/advanced/bioware/nerve_splicing)
/datum/surgery/advanced/bioware/nerve_splicing
name = "nerve splicing"
name = "Nerve Splicing"
desc = "A surgical procedure which splices the patient's nerves, making them more resistant to stuns."
steps = list(/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/clamp_bleeders,
@@ -1,10 +1,6 @@
/obj/item/disk/surgery/vein_threading
name = "Vein Threading Surgery Disk"
desc = "The disk provides instructions on how to modify the circulatory system to greatly slow down bleeding."
surgeries = list(/datum/surgery/advanced/bioware/vein_threading)
/datum/surgery/advanced/bioware/vein_threading
name = "vein threading"
name = "Vein Threading"
desc = "A surgical procedure which severely reduces the amount of blood lost in case of injury."
steps = list(/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/clamp_bleeders,
@@ -4,7 +4,8 @@
surgeries = list(/datum/surgery/advanced/brainwashing)
/datum/surgery/advanced/brainwashing
name = "brainwashing"
name = "Brainwashing"
desc = "A surgical procedure which directly implants a directive into the patient's brain, making it their absolute priority. It can be cleared using a mindshield implant."
steps = list(
/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
+2 -6
View File
@@ -1,10 +1,6 @@
/obj/item/disk/surgery/lobotomy
name = "Lobotomy Surgery Disk"
desc = "The disk provides instructions on how to perform a lobotomy, to cure the most resilient brain ailments."
surgeries = list(/datum/surgery/advanced/lobotomy)
/datum/surgery/advanced/lobotomy
name = "lobotomy"
name = "Lobotomy"
desc = "An invasive surgical procedure which guarantees removal of almost all brain traumas, but might cause another permanent trauma in return."
steps = list(
/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
@@ -1,10 +1,6 @@
/obj/item/disk/surgery/necrotic_revival
name = "Necrotic Revival Surgery Disk"
desc = "The disk provides instructions on how to make bodies keep working past death."
surgeries = list(/datum/surgery/advanced/necrotic_revival)
/datum/surgery/advanced/necrotic_revival
name = "necrotic revival"
name = "Necrotic Revival"
desc = "An experimental surgical procedure that stimulates the growth of a Romerol tumor inside the patient's brain. Requires zombie powder or rezadone."
steps = list(/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/saw,
@@ -1,10 +1,6 @@
/obj/item/disk/surgery/pacification
name = "Pacification Surgery Disk"
desc = "The disk provides instructions on how to suppress violence by manipulating the patient's brain."
surgeries = list(/datum/surgery/advanced/pacify)
/datum/surgery/advanced/pacify
name = "violence neutralization"
name = "Pacification"
desc = "A surgical procedure which permanently inhibits the aggression center of the brain, making the patient unwilling to cause direct harm."
steps = list(/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/saw,
@@ -1,10 +1,6 @@
/obj/item/disk/surgery/reconstruction
name = "Reconstruction Surgery Disk"
desc = "The disk provides instructions on how to repair a body without the use of chemicals."
surgeries = list(/datum/surgery/advanced/reconstruction)
/datum/surgery/advanced/reconstruction
name = "body 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,
+2 -6
View File
@@ -1,10 +1,6 @@
/obj/item/disk/surgery/revival
name = "Revival Surgery Disk"
desc = "The disk provides instructions on how to bring a corpse back to life."
surgeries = list(/datum/surgery/advanced/revival)
/datum/surgery/advanced/revival
name = "revival"
name = "Revival"
desc = "An experimental surgical procedure which involves reconstruction and reactivation of the patient's brain even long after death. The body must still be able to sustain life."
steps = list(/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/saw,
@@ -1,10 +1,6 @@
/obj/item/disk/surgery/viral_bonding
name = "Viral Bonding Surgery Disk"
desc = "The disk provides instructions on how to force symbiosis between a virus and its host."
surgeries = list(/datum/surgery/advanced/viral_bonding)
/datum/surgery/advanced/viral_bonding
name = "viral bonding"
name = "Viral Bonding"
desc = "A surgical procedure that forces a symbiotic relationship between a virus and its host. The patient must be dosed with spaceacillin, virus food, and formaldehyde."
steps = list(/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/clamp_bleeders,
+125 -29
View File
@@ -10,20 +10,31 @@
var/mob/living/carbon/owner = null
var/mob/living/carbon/original_owner = null
var/status = BODYPART_ORGANIC
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/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()
var/held_index = 0 //are we a hand? if so, which one!
var/is_pseudopart = FALSE //For limbs that don't really exist, eg chainsaws
var/disabled = FALSE //If TRUE, limb is as good as missing
var/body_damage_coeff = 1 //Multiplier of the limb's damage that gets applied to the mob
var/stam_damage_coeff = 0.5
var/brutestate = 0
var/burnstate = 0
var/brute_dam = 0
var/burn_dam = 0
var/stamina_dam = 0
var/max_stamina_damage = 0
var/max_damage = 0
var/list/embedded_objects = list()
var/held_index = 0 //are we a hand? if so, which one!
var/is_pseudopart = FALSE //For limbs that don't really exist, eg chainsaws
var/stam_heal_tick = 3 //per Life().
var/brute_reduction = 0 //Subtracted to brute damage taken
var/burn_reduction = 0 //Subtracted to burn damage taken
//Coloring and proper item icon update
var/skin_tone = ""
@@ -55,9 +66,9 @@
/obj/item/bodypart/examine(mob/user)
..()
if(brute_dam > 0)
if(brute_dam > DAMAGE_PRECISION)
to_chat(user, "<span class='warning'>This limb has [brute_dam > 30 ? "severe" : "minor"] bruising.</span>")
if(burn_dam > 0)
if(burn_dam > DAMAGE_PRECISION)
to_chat(user, "<span class='warning'>This limb has [burn_dam > 30 ? "severe" : "minor"] burns.</span>")
/obj/item/bodypart/blob_act()
@@ -114,6 +125,20 @@
for(var/obj/item/I in src)
I.forceMove(T)
/obj/item/bodypart/proc/consider_processing()
if(stamina_dam > DAMAGE_PRECISION)
. = TRUE
//else if.. else if.. so on.
else
. = FALSE
needs_processing = .
//Return TRUE to get whatever mob this is in to update health.
/obj/item/bodypart/proc/on_life()
if(stamina_dam > DAMAGE_PRECISION) //DO NOT update health here, it'll be done in the carbon's life.
if(heal_damage(brute = 0, burn = 0, stamina = stam_heal_tick, only_robotic = FALSE, only_organic = FALSE, updating_health = FALSE))
. |= BODYPART_LIFE_UPDATE_HEALTH
//Applies brute and burn damage to the organ. Returns 1 if the damage-icon states changed at all.
//Damage will not exceed max_damage using this proc
//Cannot apply negative damage
@@ -121,22 +146,21 @@
if(owner && (owner.status_flags & GODMODE))
return FALSE //godmode
var/dmg_mlt = CONFIG_GET(number/damage_multiplier)
brute = max(brute * dmg_mlt, 0)
burn = max(burn * dmg_mlt, 0)
stamina = max(stamina * dmg_mlt, 0)
if(status == BODYPART_ROBOTIC) //This makes robolimbs not damageable by chems and makes it stronger
brute = max(0, brute - 5)
burn = max(0, burn - 4)
//No stamina scaling.. for now..
brute = round(max(brute * dmg_mlt, 0),DAMAGE_PRECISION)
burn = round(max(burn * dmg_mlt, 0),DAMAGE_PRECISION)
stamina = round(max(stamina * dmg_mlt, 0),DAMAGE_PRECISION)
brute = max(0, brute - brute_reduction)
burn = max(0, burn - burn_reduction)
//No stamina scaling.. for now..
if(!brute && !burn && !stamina)
return FALSE
switch(animal_origin)
if(ALIEN_BODYPART,LARVA_BODYPART) //aliens take double burn
if(ALIEN_BODYPART,LARVA_BODYPART) //aliens take double burn //nothing can burn with so much snowflake code around
burn *= 2
var/can_inflict = max_damage - (brute_dam + burn_dam)
var/can_inflict = max_damage - get_damage()
if(can_inflict <= 0)
return FALSE
@@ -144,21 +168,23 @@
if(total_damage > can_inflict)
var/excess = total_damage - can_inflict
brute = brute * (excess / total_damage)
burn = burn * (excess / total_damage)
brute = round(brute * (excess / total_damage),DAMAGE_PRECISION)
burn = round(burn * (excess / total_damage),DAMAGE_PRECISION)
brute_dam += brute
burn_dam += burn
//We've dealt the physical damages, if there's room lets apply the stamina damage.
var/current_damage = brute_dam + burn_dam + stamina_dam //This time around, count stamina loss too.
var/current_damage = get_damage(TRUE) //This time around, count stamina loss too.
var/available_damage = max_damage - current_damage
stamina_dam += CLAMP(stamina, 0, available_damage)
stamina_dam += round(CLAMP(stamina, 0, min(max_stamina_damage - stamina_dam, available_damage)), DAMAGE_PRECISION)
if(owner && updating_health)
owner.updatehealth()
if(stamina)
owner.update_stamina()
if(stamina > DAMAGE_PRECISION)
owner.update_stamina()
consider_processing()
check_disabled()
return update_bodypart_damage_state()
//Heals brute and burn damage for the organ. Returns 1 if the damage-icon states changed at all.
@@ -172,18 +198,38 @@
if(only_organic && status != BODYPART_ORGANIC) //This makes robolimbs not healable by chems.
return
brute_dam = max(brute_dam - brute, 0)
burn_dam = max(burn_dam - burn, 0)
stamina_dam = max(stamina_dam - stamina, 0)
brute_dam = round(max(brute_dam - brute, 0), DAMAGE_PRECISION)
burn_dam = round(max(burn_dam - burn, 0), DAMAGE_PRECISION)
stamina_dam = round(max(stamina_dam - stamina, 0), DAMAGE_PRECISION)
if(owner && updating_health)
owner.updatehealth()
consider_processing()
check_disabled()
return update_bodypart_damage_state()
//Returns total damage.
/obj/item/bodypart/proc/get_damage(include_stamina = FALSE)
var/total = brute_dam + burn_dam
if(include_stamina)
total += stamina_dam
return total
//Returns total damage...kinda pointless really
/obj/item/bodypart/proc/get_damage()
return brute_dam + burn_dam
//Checks disabled status thresholds
/obj/item/bodypart/proc/check_disabled()
if(!can_dismember() || owner.has_trait(TRAIT_NODISMEMBER))
return
if(!disabled && (get_damage(TRUE) >= max_damage))
set_disabled(TRUE)
else if(disabled && (get_damage(TRUE) <= (max_damage * 0.5)))
set_disabled(FALSE)
/obj/item/bodypart/proc/set_disabled(new_disabled = TRUE)
if(disabled == new_disabled)
return
disabled = new_disabled
owner.update_health_hud() //update the healthdoll
owner.update_body()
owner.update_canmove()
//Updates an organ's brute/burn states for use by update_damage_overlays()
//Returns 1 if we need to update overlays. 0 otherwise.
@@ -196,8 +242,6 @@
return TRUE
return FALSE
//Change organ status
/obj/item/bodypart/proc/change_bodypart_status(new_limb_status, heal_limb, change_icon_to_default)
status = new_limb_status
@@ -350,6 +394,7 @@
limb.icon_state = "[species_id]_[body_zone]_[icon_gender]"
else
limb.icon_state = "[species_id]_[body_zone]"
// Citadel Start
if(should_draw_citadel)
limb.icon = 'modular_citadel/icons/mob/mutant_bodyparts.dmi'
@@ -358,6 +403,7 @@
else
limb.icon_state = "[species_id]_[body_zone]"
// Citadel End
if(aux_zone)
aux = image(limb.icon, "[species_id]_[aux_zone]", -aux_layer, image_dir)
. += aux
@@ -394,6 +440,8 @@
body_part = CHEST
px_x = 0
px_y = 0
stam_damage_coeff = 1
max_stamina_damage = 100
var/obj/item/cavity_item
/obj/item/bodypart/chest/Destroy()
@@ -440,13 +488,28 @@
icon_state = "default_human_l_arm"
attack_verb = list("slapped", "punched")
max_damage = 50
body_zone =BODY_ZONE_L_ARM
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
body_damage_coeff = 0.75
held_index = 1
px_x = -6
px_y = 0
stam_heal_tick = 2
/obj/item/bodypart/l_arm/set_disabled(new_disabled = TRUE)
..()
if(disabled)
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
owner.emote("scream")
if(held_index)
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
if(owner.hud_used)
var/obj/screen/inventory/hand/L = owner.hud_used.hand_slots["[held_index]"]
if(L)
L.update_icon()
/obj/item/bodypart/l_arm/monkey
icon = 'icons/mob/animal_parts.dmi'
@@ -480,9 +543,24 @@
body_part = ARM_RIGHT
aux_zone = BODY_ZONE_PRECISE_R_HAND
aux_layer = HANDS_PART_LAYER
body_damage_coeff = 0.75
held_index = 2
px_x = 6
px_y = 0
stam_heal_tick = 2
max_stamina_damage = 50
/obj/item/bodypart/r_arm/set_disabled(new_disabled = TRUE)
..()
if(disabled)
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
owner.emote("scream")
if(held_index)
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
if(owner.hud_used)
var/obj/screen/inventory/hand/R = owner.hud_used.hand_slots["[held_index]"]
if(R)
R.update_icon()
/obj/item/bodypart/r_arm/monkey
icon = 'icons/mob/animal_parts.dmi'
@@ -514,8 +592,17 @@
max_damage = 50
body_zone = BODY_ZONE_L_LEG
body_part = LEG_LEFT
body_damage_coeff = 0.75
px_x = -2
px_y = 12
stam_heal_tick = 2
max_stamina_damage = 50
/obj/item/bodypart/l_leg/set_disabled(new_disabled = TRUE)
..()
if(disabled)
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
owner.emote("scream")
/obj/item/bodypart/l_leg/digitigrade
name = "left digitigrade leg"
@@ -552,8 +639,17 @@
max_damage = 50
body_zone = BODY_ZONE_R_LEG
body_part = LEG_RIGHT
body_damage_coeff = 0.75
px_x = 2
px_y = 12
max_stamina_damage = 50
stam_heal_tick = 2
/obj/item/bodypart/r_leg/set_disabled(new_disabled = TRUE)
..()
if(disabled)
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
owner.emote("scream")
/obj/item/bodypart/r_leg/digitigrade
name = "right digitigrade leg"
@@ -1,7 +1,7 @@
/obj/item/bodypart/proc/can_dismember(obj/item/I)
if(dismemberable)
. = (get_damage() >= (max_damage - I.armour_penetration/2))
return TRUE
//Dismember a limb
/obj/item/bodypart/proc/dismember(dam_type = BRUTE)
@@ -16,7 +16,7 @@
return FALSE
var/obj/item/bodypart/affecting = C.get_bodypart(BODY_ZONE_CHEST)
affecting.receive_damage(CLAMP(brute_dam/2, 15, 50), CLAMP(burn_dam/2, 0, 50)) //Damage the chest based on limb's existing damage
affecting.receive_damage(CLAMP(brute_dam/2 * affecting.body_damage_coeff, 15, 50), CLAMP(burn_dam/2 * affecting.body_damage_coeff, 0, 50)) //Damage the chest based on limb's existing damage
C.visible_message("<span class='danger'><B>[C]'s [src.name] has been violently dismembered!</B></span>")
C.emote("scream")
SEND_SIGNAL(C, COMSIG_ADD_MOOD_EVENT, "dismembered", /datum/mood_event/dismembered)
@@ -51,7 +51,7 @@
return FALSE
if(C.has_trait(TRAIT_NODISMEMBER))
return FALSE
. = list()
var/organ_spilled = 0
var/turf/T = get_turf(C)
C.add_splatter_floor(T)
@@ -64,14 +64,15 @@
O.Remove(C)
O.forceMove(T)
organ_spilled = 1
. += X
if(cavity_item)
cavity_item.forceMove(T)
. += cavity_item
cavity_item = null
organ_spilled = 1
if(organ_spilled)
C.visible_message("<span class='danger'><B>[C]'s internal organs spill out onto the floor!</B></span>")
return 1
@@ -158,7 +159,8 @@
..()
/obj/item/bodypart/chest/drop_limb(special)
return
if(special)
..()
/obj/item/bodypart/r_arm/drop_limb(special)
var/mob/living/carbon/C = owner
@@ -242,16 +244,11 @@
name = "[owner.real_name]'s head"
..()
//Attach a limb to a human and drop any existing limb of that type.
/obj/item/bodypart/proc/replace_limb(mob/living/carbon/C, special)
if(!istype(C))
return
var/obj/item/bodypart/O = locate(src.type) in C.bodyparts
var/obj/item/bodypart/O = C.get_bodypart(body_zone)
if(O)
O.drop_limb(1)
attach_limb(C, special)
@@ -259,7 +256,7 @@
/obj/item/bodypart/head/replace_limb(mob/living/carbon/C, special)
if(!istype(C))
return
var/obj/item/bodypart/head/O = locate(src.type) in C.bodyparts
var/obj/item/bodypart/head/O = C.get_bodypart(body_zone)
if(O)
if(!special)
return
+7
View File
@@ -11,6 +11,8 @@
throw_range = 2 //No head bowling
px_x = 0
px_y = -8
stam_damage_coeff = 1
max_stamina_damage = 100
var/mob/living/brain/brainmob = null //The current occupant.
var/obj/item/organ/brain/brain = null //The brain organ
@@ -31,6 +33,11 @@
var/lip_style = null
var/lip_color = "white"
/obj/item/bodypart/head/can_dismember(obj/item/I)
if(!((owner.stat == DEAD) || owner.InFullCritical()))
return FALSE
return ..()
/obj/item/bodypart/head/drop_organs(mob/user)
var/turf/T = get_turf(src)
if(status != BODYPART_ROBOTIC)
+42 -15
View File
@@ -13,33 +13,35 @@
/mob/living/carbon/has_hand_for_held_index(i)
if(i)
var/obj/item/bodypart/L = hand_bodyparts[i]
if(L)
if(L && !L.disabled)
return L
return FALSE
/mob/proc/has_left_hand()
/mob/proc/has_left_hand(check_disabled = TRUE)
return TRUE
/mob/living/carbon/has_left_hand()
/mob/living/carbon/has_left_hand(check_disabled = TRUE)
for(var/obj/item/bodypart/L in hand_bodyparts)
if(L.held_index % 2)
return TRUE
if(!check_disabled || !L.disabled)
return TRUE
return FALSE
/mob/living/carbon/alien/larva/has_left_hand()
return 1
/mob/proc/has_right_hand()
/mob/proc/has_right_hand(check_disabled = TRUE)
return TRUE
/mob/living/carbon/has_right_hand()
/mob/living/carbon/has_right_hand(check_disabled = TRUE)
for(var/obj/item/bodypart/L in hand_bodyparts)
if(!(L.held_index % 2))
return TRUE
if(!check_disabled || !L.disabled)
return TRUE
return FALSE
/mob/living/carbon/alien/larva/has_right_hand()
@@ -48,17 +50,19 @@
//Limb numbers
/mob/proc/get_num_arms()
/mob/proc/get_num_arms(check_disabled = TRUE)
return 2
/mob/living/carbon/get_num_arms()
/mob/living/carbon/get_num_arms(check_disabled = TRUE)
. = 0
for(var/X in bodyparts)
var/obj/item/bodypart/affecting = X
if(affecting.body_part == ARM_RIGHT)
.++
if(!check_disabled || !affecting.disabled)
.++
if(affecting.body_part == ARM_LEFT)
.++
if(!check_disabled || !affecting.disabled)
.++
//sometimes we want to ignore that we don't have the required amount of arms.
@@ -69,17 +73,19 @@
return 1 //so we can still handcuff larvas.
/mob/proc/get_num_legs()
/mob/proc/get_num_legs(check_disabled = TRUE)
return 2
/mob/living/carbon/get_num_legs()
/mob/living/carbon/get_num_legs(check_disabled = TRUE)
. = 0
for(var/X in bodyparts)
var/obj/item/bodypart/affecting = X
if(affecting.body_part == LEG_RIGHT)
.++
if(!check_disabled || !affecting.disabled)
.++
if(affecting.body_part == LEG_LEFT)
.++
if(!check_disabled || !affecting.disabled)
.++
//sometimes we want to ignore that we don't have the required amount of legs.
/mob/proc/get_leg_ignore()
@@ -110,6 +116,27 @@
full -= zone
return full
/mob/living/proc/get_disabled_limbs()
return list()
/mob/living/carbon/get_disabled_limbs()
var/list/full = list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG)
var/list/disabled = list()
for(var/zone in full)
var/obj/item/bodypart/affecting = get_bodypart(zone)
if(affecting && affecting.disabled)
disabled += zone
return disabled
/mob/living/carbon/alien/larva/get_disabled_limbs()
var/list/full = list(BODY_ZONE_HEAD, BODY_ZONE_CHEST)
var/list/disabled = list()
for(var/zone in full)
var/obj/item/bodypart/affecting = get_bodypart(zone)
if(affecting && affecting.disabled)
disabled += zone
return disabled
//Remove all embedded objects from all limbs on the carbon mob
/mob/living/carbon/proc/remove_all_embedded_objects()
var/turf/T = get_turf(src)
@@ -19,6 +19,9 @@
flags_1 = CONDUCT_1
icon_state = "borg_l_arm"
status = BODYPART_ROBOTIC
brute_reduction = 5
burn_reduction = 4
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
@@ -37,6 +40,9 @@
flags_1 = CONDUCT_1
icon_state = "borg_r_arm"
status = BODYPART_ROBOTIC
brute_reduction = 5
burn_reduction = 4
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
@@ -55,6 +61,9 @@
flags_1 = CONDUCT_1
icon_state = "borg_l_leg"
status = BODYPART_ROBOTIC
brute_reduction = 5
burn_reduction = 4
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
@@ -73,6 +82,9 @@
flags_1 = CONDUCT_1
icon_state = "borg_r_leg"
status = BODYPART_ROBOTIC
brute_reduction = 5
burn_reduction = 4
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
@@ -90,6 +102,9 @@
flags_1 = CONDUCT_1
icon_state = "borg_chest"
status = BODYPART_ROBOTIC
brute_reduction = 5
burn_reduction = 4
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
@@ -149,6 +164,9 @@
flags_1 = CONDUCT_1
icon_state = "borg_head"
status = BODYPART_ROBOTIC
brute_reduction = 5
burn_reduction = 4
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
@@ -222,24 +240,32 @@
name = "surplus prosthetic left arm"
desc = "A skeletal, robotic limb. Outdated and fragile, but it's still better than nothing."
icon = 'icons/mob/augmentation/surplus_augments.dmi'
brute_reduction = 0
burn_reduction = 0
max_damage = 20
/obj/item/bodypart/r_arm/robot/surplus
name = "surplus prosthetic right arm"
desc = "A skeletal, robotic limb. Outdated and fragile, but it's still better than nothing."
icon = 'icons/mob/augmentation/surplus_augments.dmi'
brute_reduction = 0
burn_reduction = 0
max_damage = 20
/obj/item/bodypart/l_leg/robot/surplus
name = "surplus prosthetic left leg"
desc = "A skeletal, robotic limb. Outdated and fragile, but it's still better than nothing."
icon = 'icons/mob/augmentation/surplus_augments.dmi'
brute_reduction = 0
burn_reduction = 0
max_damage = 20
/obj/item/bodypart/r_leg/robot/surplus
name = "surplus prosthetic right leg"
desc = "A skeletal, robotic limb. Outdated and fragile, but it's still better than nothing."
icon = 'icons/mob/augmentation/surplus_augments.dmi'
brute_reduction = 0
burn_reduction = 0
max_damage = 20
+1 -1
View File
@@ -32,7 +32,7 @@
if(!..())
return 0
to_chat(owner, "<span class='caution'>You grit your teeth and burst the implanted [target.name]!</span>")
add_logs(owner, null, "swallowed an implanted pill", target)
log_combat(owner, null, "swallowed an implanted pill", target)
if(target.reagents.total_volume)
target.reagents.reaction(owner, INGEST)
target.reagents.trans_to(owner, target.reagents.total_volume)
+1 -1
View File
@@ -68,7 +68,7 @@
user.visible_message("[user] drapes [I] over [M]'s [parse_zone(selected_zone)] to prepare for \an [procedure.name].", \
"<span class='notice'>You drape [I] over [M]'s [parse_zone(selected_zone)] to prepare for \an [procedure.name].</span>")
add_logs(user, M, "operated on", null, "(OPERATION TYPE: [procedure.name]) (TARGET AREA: [selected_zone])")
log_combat(user, M, "operated on", null, "(OPERATION TYPE: [procedure.name]) (TARGET AREA: [selected_zone])")
else
to_chat(user, "<span class='warning'>You need to expose [M]'s [parse_zone(selected_zone)] first!</span>")
+9 -14
View File
@@ -14,14 +14,14 @@
user.visible_message("[user] begins to sever the muscles on [target]'s [parse_zone(user.zone_selected)].", "<span class ='notice'>You begin to sever the muscles on [target]'s [parse_zone(user.zone_selected)]...</span>")
/datum/surgery_step/add_limb
/datum/surgery_step/replace_limb
name = "replace limb"
implements = list(/obj/item/bodypart = 100, /obj/item/organ_storage = 100)
time = 32
var/obj/item/bodypart/L = null // L because "limb"
/datum/surgery_step/add_limb/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
/datum/surgery_step/replace_limb/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(istype(tool, /obj/item/organ_storage) && istype(tool.contents[1], /obj/item/bodypart))
tool = tool.contents[1]
var/obj/item/bodypart/aug = tool
@@ -42,29 +42,24 @@
/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/add_limb)
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)
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
/datum/surgery_step/add_limb/success(mob/user, mob/living/carbon/target, target_zone, obj/item/bodypart/tool, datum/surgery/surgery)
/datum/surgery_step/replace_limb/success(mob/user, mob/living/carbon/target, target_zone, obj/item/bodypart/tool, datum/surgery/surgery)
if(L)
user.visible_message("[user] successfully augments [target]'s [parse_zone(target_zone)]!", "<span class='notice'>You successfully augment [target]'s [parse_zone(target_zone)].</span>")
if(istype(tool, /obj/item/organ_storage))
tool.icon_state = initial(tool.icon_state)
tool.desc = initial(tool.desc)
tool.cut_overlays()
tool = tool.contents[1]
L.change_bodypart_status(BODYPART_ROBOTIC, TRUE)
L.icon = tool.icon
L.max_damage = tool.max_damage
qdel(tool)
target.update_body_parts()
target.updatehealth()
target.update_hair()
add_logs(user, target, "augmented", addition="by giving him new [parse_zone(target_zone)] INTENT: [uppertext(user.a_intent)]")
if(istype(tool) && user.temporarilyRemoveItemFromInventory(tool))
tool.replace_limb(target, TRUE)
user.visible_message("[user] successfully augments [target]'s [parse_zone(target_zone)]!", "<span class='notice'>You successfully augment [target]'s [parse_zone(target_zone)].</span>")
log_combat(user, target, "augmented", addition="by giving him new [parse_zone(target_zone)] INTENT: [uppertext(user.a_intent)]")
else
to_chat(user, "<span class='warning'>[target] has no organic [parse_zone(target_zone)] there!</span>")
return 1
return TRUE
+1 -1
View File
@@ -141,7 +141,7 @@
if(I && I.owner == target)
user.visible_message("[user] successfully extracts [I] from [target]'s [parse_zone(target_zone)]!",
"<span class='notice'>You successfully extract [I] from [target]'s [parse_zone(target_zone)].</span>")
add_logs(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]")
log_combat(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]")
I.Remove(target)
I.forceMove(get_turf(target))
else
+1 -1
View File
@@ -89,7 +89,7 @@
//drill bone
/datum/surgery_step/drill
name = "drill bone"
implements = list(/obj/item/surgicaldrill = 100, /obj/item/pickaxe/drill = 60, /obj/item/mecha_parts/mecha_equipment/drill = 60, TOOL_SCREWDRIVER = 20)
implements = list(/obj/item/surgicaldrill = 100, /obj/item/screwdriver/power = 80, /obj/item/pickaxe/drill = 60, /obj/item/mecha_parts/mecha_equipment/drill = 60, TOOL_SCREWDRIVER = 20)
time = 30
/datum/surgery_step/drill/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -42,6 +42,9 @@
to_chat(user, "<span class='info'>[src] is assembled in the [zone == BODY_ZONE_R_ARM ? "right" : "left"] arm configuration. You can use a screwdriver to reassemble it.</span>")
/obj/item/organ/cyberimp/arm/screwdriver_act(mob/living/user, obj/item/I)
. = ..()
if(.)
return TRUE
I.play_tool_sound(src)
if(zone == BODY_ZONE_R_ARM)
zone = BODY_ZONE_L_ARM
@@ -106,7 +106,7 @@
..()
if(crit_fail)
return
owner.adjustStaminaLoss(-3.5)
if(owner.AmountStun() > STUN_SET_AMOUNT)
owner.SetStun(STUN_SET_AMOUNT)
if(owner.AmountKnockdown() > STUN_SET_AMOUNT)
@@ -58,6 +58,8 @@
return ..()
/obj/item/autosurgeon/screwdriver_act(mob/living/user, obj/item/I)
if(..())
return TRUE
if(!storedorgan)
to_chat(user, "<span class='notice'>There's no implant in [src] for you to remove.</span>")
else
+2 -2
View File
@@ -242,7 +242,7 @@
if (mobhook && mobhook.parent != M)
QDEL_NULL(mobhook)
if (!mobhook)
mobhook = M.AddComponent(/datum/component/redirect, list(COMSIG_ATOM_DIR_CHANGE), CALLBACK(src, .proc/update_visuals))
mobhook = M.AddComponent(/datum/component/redirect, list(COMSIG_ATOM_DIR_CHANGE = CALLBACK(src, .proc/update_visuals)))
/obj/item/organ/eyes/robotic/glow/Remove(mob/living/carbon/M)
. = ..()
@@ -266,7 +266,7 @@
active = FALSE
remove_mob_overlay()
/obj/item/organ/eyes/robotic/glow/proc/update_visuals(olddir, newdir)
/obj/item/organ/eyes/robotic/glow/proc/update_visuals(datum/source, olddir, newdir)
if((LAZYLEN(eye_lighting) < light_beam_distance) || !on_mob)
regenerate_light_effects()
var/turf/scanfrom = get_turf(owner)
+2 -2
View File
@@ -54,11 +54,11 @@
var/sound/fastbeat = sound('sound/health/fastbeat.ogg', repeat = TRUE)
var/mob/living/carbon/H = owner
if(H.health <= HEALTH_THRESHOLD_CRIT && beat != BEAT_SLOW)
if(H.health <= H.crit_threshold && beat != BEAT_SLOW)
beat = BEAT_SLOW
H.playsound_local(get_turf(H), slowbeat,40,0, channel = CHANNEL_HEARTBEAT)
to_chat(owner, "<span class = 'notice'>You feel your heart slow down...</span>")
if(beat == BEAT_SLOW && H.health > HEALTH_THRESHOLD_CRIT)
if(beat == BEAT_SLOW && H.health > H.crit_threshold)
H.stop_sound_channel(CHANNEL_HEARTBEAT)
beat = BEAT_NONE
+1 -1
View File
@@ -40,7 +40,7 @@
C.reagents.metabolize(C, can_overdose=TRUE)
if(damage > 10 && prob(damage/3))//the higher the damage the higher the probability
to_chat(C, "<span class='notice'>You feel [pick("nauseated", "a dull pain in your lower body", "confused")].</span>")
to_chat(C, "<span class='warning'>You feel a dull pain in your abdomen.</span>")
if(damage > maxHealth)//cap liver damage
damage = maxHealth
+54 -5
View File
@@ -64,7 +64,7 @@
if(!breath || (breath.total_moles() == 0))
if(H.reagents.has_reagent(crit_stabilizing_reagent))
return
if(H.health >= HEALTH_THRESHOLD_CRIT)
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(HUMAN_MAX_OXYLOSS)
else if(!H.has_trait(TRAIT_NOCRITDAMAGE))
H.adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
@@ -111,7 +111,7 @@
H.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
else
H.failed_last_breath = FALSE
if(H.health >= HEALTH_THRESHOLD_CRIT)
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5)
gas_breathed = breath_gases[/datum/gas/oxygen][MOLES]
H.clear_alert("not_enough_oxy")
@@ -139,7 +139,7 @@
H.throw_alert("nitro", /obj/screen/alert/not_enough_nitro)
else
H.failed_last_breath = FALSE
if(H.health >= HEALTH_THRESHOLD_CRIT)
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5)
gas_breathed = breath_gases[/datum/gas/nitrogen][MOLES]
H.clear_alert("nitro")
@@ -176,7 +176,7 @@
H.throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
else
H.failed_last_breath = FALSE
if(H.health >= HEALTH_THRESHOLD_CRIT)
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5)
gas_breathed = breath_gases[/datum/gas/carbon_dioxide][MOLES]
H.clear_alert("not_enough_co2")
@@ -206,7 +206,7 @@
H.throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
else
H.failed_last_breath = FALSE
if(H.health >= HEALTH_THRESHOLD_CRIT)
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5)
gas_breathed = breath_gases[/datum/gas/plasma][MOLES]
H.clear_alert("not_enough_tox")
@@ -270,12 +270,61 @@
H.reagents.add_reagent("no2",1)
breath_gases[/datum/gas/nitryl][MOLES]-=gas_breathed
// Stimulum
gas_breathed = breath_gases[/datum/gas/stimulum][MOLES]
if (gas_breathed > gas_stimulation_min)
var/existing = H.reagents.get_reagent_amount("stimulum")
H.reagents.add_reagent("stimulum",max(0, 1 - existing))
breath_gases[/datum/gas/stimulum][MOLES]-=gas_breathed
// Miasma
if (breath_gases[/datum/gas/miasma])
var/miasma_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/miasma][MOLES])
//Miasma sickness
if(prob(0.5 * miasma_pp))
var/datum/disease/advance/miasma_disease = new /datum/disease/advance/random(2,3)
miasma_disease.name = "Unknown"
miasma_disease.try_infect(owner)
// Miasma side effects
switch(miasma_pp)
if(1 to 5)
// At lower pp, give out a little warning
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "smell")
if(prob(5))
to_chat(owner, "<span class='notice'>There is an unpleasant smell in the air.</span>")
if(5 to 15)
//At somewhat higher pp, warning becomes more obvious
if(prob(15))
to_chat(owner, "<span class='warning'>You smell something horribly decayed inside this room.</span>")
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "smell", /datum/mood_event/disgust/bad_smell)
if(15 to 30)
//Small chance to vomit. By now, people have internals on anyway
if(prob(5))
to_chat(owner, "<span class='warning'>The stench of rotting carcasses is unbearable!</span>")
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "smell", /datum/mood_event/disgust/nauseating_stench)
owner.vomit()
if(30 to INFINITY)
//Higher chance to vomit. Let the horror start
if(prob(15))
to_chat(owner, "<span class='warning'>The stench of rotting carcasses is unbearable!</span>")
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "smell", /datum/mood_event/disgust/nauseating_stench)
owner.vomit()
else
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "smell")
// In a full miasma atmosphere with 101.34 pKa, about 10 disgust per breath, is pretty low compared to threshholds
// Then again, this is a purely hypothetical scenario and hardly reachable
owner.adjust_disgust(0.1 * miasma_pp)
breath_gases[/datum/gas/miasma][MOLES]-=gas_breathed
// Clear out moods when no miasma at all
else
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "smell")
handle_breath_temperature(breath, H)
breath.garbage_collect()
return TRUE
+3 -3
View File
@@ -42,13 +42,13 @@
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "disgust")
if(DISGUST_LEVEL_GROSS to DISGUST_LEVEL_VERYGROSS)
H.throw_alert("disgust", /obj/screen/alert/gross)
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "disgust", /datum/mood_event/disgust/gross)
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "disgust", /datum/mood_event/gross)
if(DISGUST_LEVEL_VERYGROSS to DISGUST_LEVEL_DISGUSTED)
H.throw_alert("disgust", /obj/screen/alert/verygross)
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "disgust", /datum/mood_event/disgust/verygross)
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "disgust", /datum/mood_event/verygross)
if(DISGUST_LEVEL_DISGUSTED to INFINITY)
H.throw_alert("disgust", /obj/screen/alert/disgusted)
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "disgust", /datum/mood_event/disgust/disgusted)
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "disgust", /datum/mood_event/disgusted)
/obj/item/organ/stomach/Remove(mob/living/carbon/M, special = 0)
var/mob/living/carbon/human/H = owner
+2 -3
View File
@@ -10,9 +10,8 @@
/obj/item/organ/tail/Remove(mob/living/carbon/human/H, special = 0)
..()
if(istype(H))
H.endTailWag()
if(H && H.dna && H.dna.species)
H.dna.species.stop_wagging_tail(H)
/obj/item/organ/tail/cat
name = "cat tail"
+1 -1
View File
@@ -83,7 +83,7 @@
//Hacks
var/mob/living/carbon/human/user = usr
var/rendered = "<span class='abductor'><b>[user.name]:</b> [message]</span>"
log_talk(user,"ABDUCTOR:[key_name(user)] : [rendered]",LOGSAY)
user.log_talk(message, LOG_SAY, tag="abductor")
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
var/obj/item/organ/tongue/T = H.getorganslot(ORGAN_SLOT_TONGUE)
if(!T || T.type != type)
+10 -2
View File
@@ -1,5 +1,6 @@
/datum/surgery
var/name = "surgery"
var/desc = "surgery description"
var/status = 1
var/list/steps = list() //Steps in a surgery
var/step_in_progress = 0 //Actively performing a Surgery
@@ -92,7 +93,15 @@
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)
@@ -129,7 +138,6 @@
//TODO
//specific steps for some surgeries (fluff text)
//R&D researching new surgeries (especially for non-humans)
//more interesting failure options
//randomised complications
//more surgeries!
+2
View File
@@ -14,6 +14,8 @@
if(accept_hand)
if(!tool)
success = TRUE
if(iscyborg(user))
success = TRUE
if(accept_any_item)
if(tool && tool_check(user, tool))
+27
View File
@@ -198,6 +198,7 @@
icon_state = "evidenceobj"
/obj/item/organ_storage/afterattack(obj/item/I, mob/user, proximity)
. = ..()
if(!proximity)
return
if(contents.len)
@@ -234,3 +235,29 @@
else
to_chat(user, "[src] is empty.")
return
/obj/item/surgical_processor //allows medical cyborgs to scan and initiate advanced surgeries
name = "\improper Surgical Processor"
desc = "A device for scanning and initiating surgeries from a disk or operating computer."
icon = 'icons/obj/device.dmi'
icon_state = "spectrometer"
item_flags = NOBLUDGEON
var/list/advanced_surgeries = list()
/obj/item/surgical_processor/afterattack(obj/item/O, mob/user, proximity)
. = ..()
if(!proximity)
return
if(istype(O, /obj/item/disk/surgery))
to_chat(user, "<span class='notice'>You load the surgery protocol from [O] into [src].</span>")
var/obj/item/disk/surgery/D = O
if(do_after(user, 10, target = O))
advanced_surgeries |= D.surgeries
return TRUE
if(istype(O, /obj/machinery/computer/operating))
to_chat(user, "<span class='notice'>You copy surgery protocols from [O] into [src].</span>")
var/obj/machinery/computer/operating/OC = O
if(do_after(user, 10, target = O))
advanced_surgeries |= OC.advanced_surgeries
return TRUE
return