Revert "Bay update."

This commit is contained in:
Zuhayr
2016-02-07 16:07:05 +10:30
parent 2d2e60f6c6
commit 98d983577c
136 changed files with 1512 additions and 1162 deletions
+1 -2
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.get_organ(parent_organ)
var/obj/item/organ/external/E = H.organs_by_name[src.parent_organ]
if(E)
if(E.internal_organs == null)
E.internal_organs = list()
@@ -247,7 +247,6 @@ 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
+41 -34
View File
@@ -100,15 +100,15 @@
if(istype(I,/obj/item/organ))
continue
removable_objects |= I
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 ..()
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>")
/obj/item/organ/external/examine()
..()
@@ -181,8 +181,8 @@
return
/obj/item/organ/external/New(var/mob/living/carbon/holder)
..(holder, 0)
/obj/item/organ/external/New(var/mob/living/carbon/holder, var/internal)
..()
if(owner)
replaced(owner)
sync_colour_to_human(owner)
@@ -215,6 +215,8 @@
/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
@@ -458,11 +460,11 @@ This function completely restores a damaged organ to perfect condition.
/obj/item/organ/external/process()
if(owner)
//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
if(parent)
if(parent.status & ORGAN_DESTROYED)
status |= ORGAN_DESTROYED
owner.update_body(1)
return
// Process wounds, doing healing etc. Only do this every few ticks to save processing power
if(owner.life_tick % wound_update_accuracy == 0)
@@ -501,7 +503,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) || (owner.species && owner.species.flags & IS_PLANT)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs.
if(status & (ORGAN_ROBOT|ORGAN_DESTROYED) || (owner.species && owner.species.flags & IS_PLANT)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs.
germ_level = 0
return
@@ -678,6 +680,8 @@ 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
@@ -706,11 +710,14 @@ 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 = DROPLIMB_EDGE, var/ignore_children = null)
/obj/item/organ/external/proc/droplimb(var/clean, var/disintegrate, var/ignore_children, var/silent)
if(cannot_amputate || !owner)
return
if(!disintegrate)
disintegrate = DROPLIMB_EDGE
switch(disintegrate)
if(DROPLIMB_EDGE)
if(!clean)
@@ -734,16 +741,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_organ)
if(parent)
var/datum/wound/lost_limb/W = new (src, disintegrate, clean)
parent.children -= src
if(clean)
parent_organ.wounds |= W
parent_organ.update_damages()
parent.wounds |= W
parent.update_damages()
else
var/obj/item/organ/external/stump/stump = new (victim, 0, src)
if(status & ORGAN_ROBOT)
@@ -751,6 +758,7 @@ 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()
@@ -977,7 +985,9 @@ Note that amputating the affected organ does in fact remove the infection from t
return 0
/obj/item/organ/external/proc/is_usable()
return !is_dislocated() && !(status & (ORGAN_MUTATED|ORGAN_DEAD))
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))
/obj/item/organ/external/proc/is_malfunctioning()
return ((status & ORGAN_ROBOT) && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam))
@@ -996,7 +1006,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 = 0)
/obj/item/organ/external/removed(var/mob/living/user, var/ignore_children)
if(!owner)
return
@@ -1005,13 +1015,14 @@ Note that amputating the affected organ does in fact remove the infection from t
..()
status |= ORGAN_DESTROYED
victim.bad_external_organs -= src
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)
for(var/obj/item/implant in implants)
if(!istype(implant))
return
if(implant.w_class <= 2)
qdel(implant)
else
implant.loc = src
implants.Cut()
@@ -1030,10 +1041,6 @@ 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.
@@ -1110,7 +1117,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") //note to self make this more robust
"huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area")
for(var/wound in wound_descriptors)
switch(wound_descriptors[wound])
if(1)
+1 -2
View File
@@ -190,8 +190,7 @@
return ..(user, 1)
/obj/item/organ/internal/diona/node
name = "response node"
parent_organ = "head"
name = "receptor node"
organ_tag = "receptor node"
icon = 'icons/mob/alien.dmi'
icon_state = "claw"
-1
View File
@@ -18,7 +18,6 @@
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"