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
+1 -1
View File
@@ -19,7 +19,7 @@
var/layer_used = MUTATIONS_LAYER //which mutation layer to use
var/list/species_allowed = list() //to restrict mutation to only certain species
var/health_req //minimum health required to acquire the mutation
var/limb_req //required limbs to qcquire this mutation
var/limb_req //required limbs to acquire this mutation
var/time_coeff = 1 //coefficient for timed mutations
/datum/mutation/human/proc/force_give(mob/living/carbon/human/owner)
@@ -31,7 +31,7 @@
H.restore_blood()
H.remove_all_embedded_objects()
if(H.get_missing_limbs())
playsound(get_turf(H), 'sound/effects/blobattack.ogg', 30, 1)
playsound(user, 'sound/magic/Demon_consume.ogg', 50, 1)
H.visible_message("<span class='warning'>[user]'s missing limbs reform, making a loud, grotesque sound!</span>", "<span class='userdanger'>Your limbs regrow, making a loud, crunchy sound and giving you great pain!</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
H.emote("scream")
H.regenerate_limbs(1)
@@ -48,7 +48,7 @@
else
limb_regen = user.regenerate_limb("r_arm", 1)
if(limb_regen)
user.visible_message("<span class='warning'>[user]'s missing arm reform, making a loud, grotesque sound!</span>", "<span class='userdanger'>Your arm regrow, making a loud, crunchy sound and giving you great pain!</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
user.visible_message("<span class='warning'>[user]'s missing arm reforms, making a loud, grotesque sound!</span>", "<span class='userdanger'>Your arm regrow, making a loud, crunchy sound and giving you great pain!</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
user.emote("scream")
var/obj/item/W = new weapon_type(user)
user.put_in_hands(W)
+2 -2
View File
@@ -34,7 +34,7 @@
var/mob/living/carbon/human/H = M
affecting = H.get_bodypart(check_zone(user.zone_selected))
if(!affecting) //Missing limb?
user << "<span class='warning'>[H] doesn't have [parse_zone(user.zone_selected)]!</span>"
user << "<span class='warning'>[H] doesn't have \a [parse_zone(user.zone_selected)]!</span>"
return
if(stop_bleeding)
if(H.bleedsuppress)
@@ -79,7 +79,7 @@
var/mob/living/carbon/human/H = M
affecting = H.get_bodypart(check_zone(user.zone_selected))
if(!affecting) //Missing limb?
user << "<span class='warning'>[H] doesn't have [parse_zone(user.zone_selected)]!</span>"
user << "<span class='warning'>[H] doesn't have \a [parse_zone(user.zone_selected)]!</span>"
return
if(stop_bleeding)
if(!H.bleedsuppress) //so you can't stack bleed suppression
+1 -1
View File
@@ -362,7 +362,7 @@ var/list/TYPES_SHORTCUTS = list(
/obj/machinery/portable_atmospherics = "PORT_ATMOS",
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/missile_rack = "MECHA_MISSILE_RACK",
/obj/item/mecha_parts/mecha_equipment = "MECHA_EQUIP",
/obj/item/organ = "ORGAN_INT",
/obj/item/organ = "ORGAN",
)
var/global/list/g_fancy_list_of_types = null
@@ -148,7 +148,8 @@
take_overall_damage(b_loss,f_loss)
//attempt to dismember bodyparts
for(var/obj/item/bodypart/BP in bodyparts)
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
if(prob(50/severity) && BP.body_zone != "head" && BP.body_zone != "chest")
BP.dismember()
..()
@@ -193,7 +193,7 @@
H.remove_overlay(HAIR_LAYER)
var/obj/item/bodypart/head/HD = H.get_bodypart("head")
if(!HD || HD.status == ORGAN_ROBOTIC) //Decapitated or robotic head
if(!HD) //Decapitated
return
if(H.disabilities & HUSK)
@@ -488,8 +488,8 @@
if(!(type in I.species_exception))
return 0
var/R = H.has_right_hand(1)
var/L = H.has_left_hand(1)
var/R = H.has_right_hand()
var/L = H.has_left_hand()
var/num_arms = H.get_num_arms()
var/num_legs = H.get_num_legs()
+17 -10
View File
@@ -28,21 +28,28 @@
return zone
/proc/ran_zone(zone, probability = 80, list/exceptions)
/proc/ran_zone(zone, probability = 80)
zone = check_zone(zone)
if(!islist(exceptions))
exceptions = list()
if(prob(probability) && !locate(zone) in exceptions)
if(prob(probability))
return zone
var/list/choices = list("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg")
choices = difflist(choices, exceptions) //Strip away zones to ignore
if(!choices.len)
return 0
var/t = rand(1, 18) // randomly pick a different zone, or maybe the same one
switch(t)
if(1)
return "head"
if(2)
return "chest"
if(3 to 6)
return "l_arm"
if(7 to 10)
return "r_arm"
if(11 to 14)
return "l_leg"
if(15 to 18)
return "r_leg"
zone = pick(choices) //Pick a random zone
return zone
/proc/above_neck(zone)
+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