Merge remote-tracking branch 'upstream/master' into dev-freeze

Conflicts:
	code/game/objects/items/weapons/surgery_limbattachment.dm
	code/modules/mob/living/carbon/human/human_defense.dm
	code/modules/mob/living/carbon/human/species/species.dm
	code/modules/organs/organ.dm
	code/modules/organs/organ_external.dm
	code/setup.dm
This commit is contained in:
PsiOmegaDelta
2015-12-08 08:09:37 +01:00
30 changed files with 140 additions and 129 deletions
+1 -2
View File
@@ -64,7 +64,7 @@ var/list/organ_cache = list()
var/mob/living/carbon/human/H = holder
if(istype(H))
if(internal)
var/obj/item/organ/external/E = H.organs_by_name[src.parent_organ]
var/obj/item/organ/external/E = H.get_organ(parent_organ)
if(E)
if(E.internal_organs == null)
E.internal_organs = list()
@@ -249,7 +249,6 @@ var/list/organ_cache = list()
src.status &= ~ORGAN_BLEEDING
src.status &= ~ORGAN_SPLINTED
src.status &= ~ORGAN_CUT_AWAY
src.status &= ~ORGAN_DESTROYED
src.status |= ORGAN_ROBOT
src.status |= ORGAN_ASSISTED
+34 -41
View File
@@ -81,15 +81,15 @@
if(istype(I,/obj/item/organ))
continue
removable_objects |= I
if(!removable_objects.len)
return ..()
var/obj/item/I = pick(removable_objects)
if(!istype(I))
return ..()
I.loc = get_turf(user)
if(!(user.l_hand && user.r_hand))
user.put_in_hands(I)
user.visible_message("<span class='danger'>\The [user] rips \the [I] out of \the [src]!</span>")
if(removable_objects.len)
var/obj/item/I = pick(removable_objects)
I.loc = get_turf(user) //just in case something was embedded that is not an item
if(istype(I))
if(!(user.l_hand && user.r_hand))
user.put_in_hands(I)
user.visible_message("<span class='danger'>\The [user] rips \the [I] out of \the [src]!</span>")
return //no eating the limb until everything's been removed
return ..()
/obj/item/organ/external/examine()
..()
@@ -162,8 +162,8 @@
return
/obj/item/organ/external/New(var/mob/living/carbon/holder, var/internal)
..()
/obj/item/organ/external/New(var/mob/living/carbon/holder)
..(holder, 0)
if(owner)
replaced(owner)
sync_colour_to_human(owner)
@@ -202,8 +202,6 @@
/obj/item/organ/external/take_damage(brute, burn, sharp, edge, used_weapon = null, list/forbidden_limbs = list())
if((brute <= 0) && (burn <= 0))
return 0
if(status & ORGAN_DESTROYED)
return 0
brute *= brute_mod
burn *= burn_mod
@@ -432,11 +430,11 @@ This function completely restores a damaged organ to perfect condition.
/obj/item/organ/external/process()
if(owner)
if(parent)
if(parent.status & ORGAN_DESTROYED)
status |= ORGAN_DESTROYED
owner.update_body(1)
return
//Dismemberment
//if(parent && parent.is_stump()) //should never happen
// warning("\The [src] ([src.type]) belonging to [owner] ([owner.type]) was attached to a stump")
// remove()
// return
// Process wounds, doing healing etc. Only do this every few ticks to save processing power
if(owner.life_tick % wound_update_accuracy == 0)
@@ -478,7 +476,7 @@ Note that amputating the affected organ does in fact remove the infection from t
*/
/obj/item/organ/external/proc/update_germs()
if(status & (ORGAN_ROBOT|ORGAN_DESTROYED) || (owner.species && owner.species.flags & IS_PLANT)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs.
if(status & (ORGAN_ROBOT) || (owner.species && owner.species.flags & IS_PLANT)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs.
germ_level = 0
return
@@ -655,8 +653,6 @@ Note that amputating the affected organ does in fact remove the infection from t
// new damage icon system
// returns just the brute/burn damage code
/obj/item/organ/external/proc/damage_state_text()
if(status & ORGAN_DESTROYED)
return "--"
var/tburn = 0
var/tbrute = 0
@@ -685,14 +681,11 @@ Note that amputating the affected organ does in fact remove the infection from t
****************************************************/
//Handles dismemberment
/obj/item/organ/external/proc/droplimb(var/clean, var/disintegrate, var/ignore_children)
/obj/item/organ/external/proc/droplimb(var/clean, var/disintegrate = DROPLIMB_EDGE, var/ignore_children = null)
if(cannot_amputate || !owner)
return
if(!disintegrate)
disintegrate = DROPLIMB_EDGE
switch(disintegrate)
if(DROPLIMB_EDGE)
if(!clean)
@@ -716,16 +709,16 @@ Note that amputating the affected organ does in fact remove the infection from t
"<span class='danger'>You hear the [gore_sound].</span>")
var/mob/living/carbon/human/victim = owner //Keep a reference for post-removed().
var/obj/item/organ/external/parent_organ = parent
removed(null, ignore_children)
victim.traumatic_shock += 60
wounds.Cut()
if(parent)
if(parent_organ)
var/datum/wound/lost_limb/W = new (src, disintegrate, clean)
parent.children -= src
if(clean)
parent.wounds |= W
parent.update_damages()
parent_organ.wounds |= W
parent_organ.update_damages()
else
var/obj/item/organ/external/stump/stump = new (victim, 0, src)
if(status & ORGAN_ROBOT)
@@ -733,7 +726,6 @@ Note that amputating the affected organ does in fact remove the infection from t
stump.wounds |= W
victim.organs |= stump
stump.update_damages()
parent = null
spawn(1)
victim.updatehealth()
@@ -928,9 +920,7 @@ Note that amputating the affected organ does in fact remove the infection from t
return 0
/obj/item/organ/external/proc/is_usable()
if((status & ORGAN_ROBOT) && get_damage() >= max_damage) //robot limbs just become inoperable at max damage
return
return !is_dislocated() && !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
return !is_dislocated() && !(status & (ORGAN_MUTATED|ORGAN_DEAD))
/obj/item/organ/external/proc/is_malfunctioning()
return ((status & ORGAN_ROBOT) && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam))
@@ -949,7 +939,7 @@ Note that amputating the affected organ does in fact remove the infection from t
H.drop_from_inventory(W)
W.loc = owner
/obj/item/organ/external/removed(var/mob/living/user, var/ignore_children)
/obj/item/organ/external/removed(var/mob/living/user, var/ignore_children = 0)
if(!owner)
return
@@ -958,14 +948,13 @@ Note that amputating the affected organ does in fact remove the infection from t
..()
status |= ORGAN_DESTROYED
victim.bad_external_organs -= src
for(var/obj/item/implant in implants)
if(!istype(implant))
return
if(implant.w_class <= 2)
qdel(implant)
for(var/atom/movable/implant in implants)
//large items and non-item objs fall to the floor, everything else stays
var/obj/item/I = implant
if(istype(I) && I.w_class < 3)
implant.loc = get_turf(victim.loc)
else
implant.loc = src
implants.Cut()
@@ -984,6 +973,10 @@ Note that amputating the affected organ does in fact remove the infection from t
organ.removed()
organ.loc = src
// Remove parent references
parent.children -= src
parent = null
release_restraints(victim)
victim.organs -= src
victim.organs_by_name[limb_name] = null // Remove from owner's vars.
@@ -1060,7 +1053,7 @@ Note that amputating the affected organ does in fact remove the infection from t
if(wound_descriptors.len)
var/list/flavor_text = list()
var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\
"huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area")
"huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area") //note to self make this more robust
for(var/wound in wound_descriptors)
switch(wound_descriptors[wound])
if(1)
+5 -11
View File
@@ -166,14 +166,6 @@
name = "anchoring ligament"
parent_organ = "groin"
/obj/item/organ/diona/node
name = "receptor node"
parent_organ = "head"
/obj/item/organ/diona/nutrients
name = "nutrient vessel"
parent_organ = "chest"
/obj/item/organ/diona
name = "diona nymph"
icon = 'icons/obj/objects.dmi'
@@ -191,8 +183,9 @@
// These are different to the standard diona organs as they have a purpose in other
// species (absorbing radiation and light respectively)
/obj/item/organ/diona/nutrients
name = "nutrient vessel"
organ_tag = "nutrient vessel"
name = "nutrient channel"
parent_organ = "chest"
organ_tag = "nutrient channel"
icon = 'icons/mob/alien.dmi'
icon_state = "claw"
@@ -200,7 +193,8 @@
return
/obj/item/organ/diona/node
name = "receptor node"
name = "response node"
parent_organ = "head"
organ_tag = "receptor node"
icon = 'icons/mob/alien.dmi'
icon_state = "claw"