Some adjustments, following suggestions in the PR discussion.

This commit is contained in:
phil235
2016-05-05 21:50:30 +02:00
parent 68da092009
commit 76a7fca8fe
14 changed files with 43 additions and 37 deletions
+2 -5
View File
@@ -1,6 +1,7 @@
/obj/item/bodypart
name = "limb"
desc = "why is it detached..."
var/mob/living/carbon/human/owner = null
var/status = ORGAN_ORGANIC
var/body_zone //"chest", "l_arm", etc , used for def_zone
@@ -264,7 +265,7 @@
/obj/item/bodypart/chest
name = "chest"
desc = "why is it detached..."
desc = "It's impolite to stare at a person's chest."
icon_state = "chest"
max_damage = 200
body_zone = "chest"
@@ -280,7 +281,6 @@
/obj/item/bodypart/l_arm
name = "left arm"
desc = "why is it detached..."
icon_state = "l_arm"
max_damage = 75
body_zone ="l_arm"
@@ -290,7 +290,6 @@
/obj/item/bodypart/r_arm
name = "right arm"
desc = "why is it detached..."
icon_state = "r_arm"
max_damage = 75
body_zone = "r_arm"
@@ -300,7 +299,6 @@
/obj/item/bodypart/l_leg
name = "left leg"
desc = "why is it detached..."
icon_state = "l_leg"
max_damage = 75
body_zone = "l_leg"
@@ -310,7 +308,6 @@
/obj/item/bodypart/r_leg
name = "right leg"
desc = "why is it detached..."
icon_state = "r_leg"
max_damage = 75
body_zone = "r_leg"
@@ -15,7 +15,7 @@
var/direction = pick(cardinal)
var/t_range = rand(2,max(throw_range/2, 2))
var/turf/target_turf = get_turf(src)
for(var/i = 1; i < t_range; i++)
for(var/i in 1 to t_range-1)
var/turf/new_turf = get_step(target_turf, direction)
target_turf = new_turf
if(new_turf.density)
@@ -26,11 +26,12 @@
/obj/item/bodypart/chest/dismember()
var/mob/living/carbon/human/H = owner
if(!istype(H) || !H.dna.species:has_dismemberment) //human's species don't allow dismemberment
if(!istype(H) || !H.dna.species.has_dismemberment) //human's species don't allow dismemberment
return 0
var/organ_spilled = 0
var/turf/T = get_turf(H)
T.add_blood(H)
playsound(get_turf(owner), 'sound/misc/splort.ogg', 80, 1)
for(var/X in owner.internal_organs)
var/obj/item/organ/O = X
@@ -289,12 +290,12 @@
//Regenerates all limbs. Returns amount of limbs regenerated
/mob/living/proc/regenerate_limbs(noheal)
return
return 0
/mob/living/carbon/human/regenerate_limbs(noheal)
var/list/limb_list = list("head", "chest", "r_arm", "l_arm", "r_leg", "l_leg")
for(var/Z in limb_list)
regenerate_limb(Z, noheal)
. += regenerate_limb(Z, noheal)
/mob/living/proc/regenerate_limb(limb_zone, noheal)
return
@@ -302,7 +303,7 @@
/mob/living/carbon/human/regenerate_limb(limb_zone, noheal)
var/obj/item/bodypart/L
if(get_bodypart(limb_zone))
return
return 0
L = newBodyPart(limb_zone, 0, 0, src)
if(L)
if(!noheal)
+1 -1
View File
@@ -2,7 +2,7 @@
/obj/item/bodypart/head
name = "head"
desc = "what a way to get a head in life..."
desc = "Didn't make sense not to live for fun, your brain gets smart but your head gets dumb."
icon_state = "head"
max_damage = 200
body_zone = "head"
+4 -4
View File
@@ -23,11 +23,11 @@
if(!S.possible_locs.Find(selected_zone))
continue
if(affecting)
if(S.requires_missing_bodypart)
if(!S.requires_bodypart)
continue
if(S.requires_organic_bodypart && affecting.status == ORGAN_ROBOTIC)
continue
else if(H && !S.requires_missing_bodypart) //human with no limb in surgery zone when we need a limb
else if(H && S.requires_bodypart) //human with no limb in surgery zone when we need a limb
continue
if(!S.can_start(user, M))
continue
@@ -52,11 +52,11 @@
if(H)
affecting = H.get_bodypart(check_zone(selected_zone))
if(affecting)
if(procedure.requires_missing_bodypart)
if(!procedure.requires_bodypart)
return
if(procedure.requires_organic_bodypart && affecting.status == ORGAN_ROBOTIC)
return
else if(H && !procedure.requires_missing_bodypart)
else if(H && procedure.requires_bodypart)
return
if(!procedure.can_start(user, M))
return
@@ -3,7 +3,7 @@
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)
possible_locs = list("r_arm", "l_arm", "l_leg", "r_leg", "head")
requires_missing_bodypart = 1
requires_bodypart = FALSE //need a missing limb
/datum/surgery/prosthetic_replacement/can_start(mob/user, mob/living/carbon/target)
if(!ishuman(target))
+1 -1
View File
@@ -10,7 +10,7 @@
var/list/possible_locs = list() //Multiple locations -- c0
var/ignore_clothes = 0 //This surgery ignores clothes
var/obj/item/organ/organ //Operable body part
var/requires_missing_bodypart = 0 //Surgery available only when a bodypart is present, or only when it is missing.
var/requires_bodypart = TRUE //Surgery available only when a bodypart is present, or only when it is missing.
/datum/surgery/proc/can_start(mob/user, mob/living/carbon/target)
// if 0 surgery wont show up in list