Merge pull request #2903 from Aurorablade/OrganRefactor

[HOLY SHIT!]Charlie, lets go to candy mountain, charlie
This commit is contained in:
Fox McCloud
2016-03-04 19:51:50 -05:00
138 changed files with 4384 additions and 2426 deletions
+4 -5
View File
@@ -1,4 +1,3 @@
// reference: /client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
/client/proc/debug_variables(datum/D in world)
@@ -992,8 +991,8 @@ body
if(locate(new_organ) in M.internal_organs)
usr << "Mob already has that organ."
return
new new_organ(M)
var/obj/item/organ/internal/organ = new new_organ
organ.insert(M)
message_admins("[key_name_admin(usr)] has given [key_name_admin(M)] the organ [new_organ]")
log_admin("[key_name(usr)] has given [key_name(M)] the organ [new_organ]")
@@ -1005,7 +1004,7 @@ body
usr << "This can only be done to instances of type /mob/living/carbon"
return
var/obj/item/organ/rem_organ = input("Please choose an organ to remove.","Organ",null) as null|anything in M.internal_organs
var/obj/item/organ/internal/rem_organ = input("Please choose an organ to remove.","Organ",null) as null|anything in M.internal_organs
if(!M)
usr << "Mob doesn't exist anymore"
@@ -1016,7 +1015,7 @@ body
return
usr << "Removed [rem_organ] from [M]."
rem_organ.removed()
rem_organ.remove(M)
message_admins("[key_name_admin(usr)] has removed the organ [rem_organ] from [key_name_admin(M)]")
log_admin("[key_name(usr)] has removed the organ [rem_organ] from [key_name(M)]")
qdel(rem_organ)
+2 -2
View File
@@ -24,8 +24,8 @@ var/datum/atom_hud/huds = list( \
/datum/atom_hud/proc/remove_hud_from(mob/M)
if(!M)
return
//if(src in M.permanent_huds)//I will deal with you later -Fethas
// return
if(src in M.permanent_huds)//I will deal with you later -Fethas
return
for(var/atom/A in hudatoms)
remove_from_single_hud(M, A)
hudusers -= M
-7
View File
@@ -25,13 +25,6 @@
switch(destroys)
if("gib")
target.gib()
if("gib_brain")
if(ishuman(target))
var/mob/living/carbon/C = target
if(C.brain_op_stage != 4) // Their brain is already taken out
var/obj/item/organ/brain/B = new(C.loc)
B.transfer_identity(C)
target.gib()
if("disintegrate")
target.dust()
+1 -1
View File
@@ -24,7 +24,7 @@
if(!marked_item) //linking item to the spell
message = "<span class='notice'>"
for(var/obj/item in hand_items)
if(istype(item, /obj/item/organ/brain)) //Yeah, sadly this doesn't work due to the organ system.
if(istype(item, /obj/item/organ/internal/brain)) //Yeah, sadly this doesn't work due to the organ system.
break
marked_item = item
message += "You mark [item] for recall.</span>"