Merge pull request #810 from Zuhayr/bayupdate

Bay update.
This commit is contained in:
Neerti
2016-02-05 23:21:07 -05:00
136 changed files with 1163 additions and 1513 deletions
+2 -1
View File
@@ -58,7 +58,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()
@@ -247,6 +247,7 @@ var/list/organ_cache = list()
status |= ORGAN_ASSISTED
status |= ORGAN_ROBOT
/obj/item/organ/proc/mechassist() //Used to add things like pacemakers, etc
status = 0
status |= ORGAN_ASSISTED
+34 -41
View File
@@ -100,15 +100,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()
..()
@@ -181,8 +181,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)
@@ -215,8 +215,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
@@ -460,11 +458,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)
@@ -503,7 +501,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
@@ -680,8 +678,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
@@ -710,14 +706,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, var/silent)
/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)
@@ -741,16 +734,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)
@@ -758,7 +751,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()
@@ -985,9 +977,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))
@@ -1006,7 +996,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
@@ -1015,14 +1005,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()
@@ -1041,6 +1030,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[organ_tag] = null // Remove from owner's vars.
@@ -1117,7 +1110,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)
+2 -1
View File
@@ -190,7 +190,8 @@
return ..(user, 1)
/obj/item/organ/internal/diona/node
name = "receptor node"
name = "response node"
parent_organ = "head"
organ_tag = "receptor node"
icon = 'icons/mob/alien.dmi'
icon_state = "claw"
+1
View File
@@ -18,6 +18,7 @@
owner.stat = 0
owner.visible_message("<span class='danger'>\The [owner] twitches visibly!</span>")
// Used for an MMI or posibrain being installed into a human.
/obj/item/organ/internal/mmi_holder
name = "brain interface"