Implant Refactor Part II

This commit is contained in:
Fox-McCloud
2016-01-17 20:03:41 -05:00
parent 69f6c178aa
commit 1bd3da4521
16 changed files with 41 additions and 107 deletions
@@ -520,12 +520,9 @@ client/proc/one_click_antag()
limb.status &= ~(ORGAN_DESTROYED | ORGAN_ROBOT)
//Now apply cortical stack.
var/obj/item/organ/external/E = new_vox.get_organ("head")
var/obj/item/weapon/implant/cortical/I = new(new_vox)
I.imp_in = new_vox
I.implanted = 1
I.part = E
E.implants += I
cortical_stacks += I
ticker.mode.traitors += new_vox.mind
+1 -2
View File
@@ -160,8 +160,7 @@ var/global/sent_strike_team = 0
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src)//Here you go Deuryn
L.imp_in = src
L.implanted = 1
sec_hud_set_implants()
var/obj/item/weapon/card/id/W = new(src)
W.name = "[real_name]'s ID Card"
-3
View File
@@ -63,9 +63,6 @@ var/global/vox_tick = 1
var/obj/item/weapon/implant/cortical/I = new(src)
I.imp_in = src
I.implanted = 1
var/obj/item/organ/external/affected = src.get_organ("head")
affected.implants += I
I.part = affected
if(ticker.mode && ( istype(ticker.mode,/datum/game_mode/vox/heist) ) )
var/datum/game_mode/vox/heist/M = ticker.mode
@@ -455,14 +455,6 @@
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block)
/mob/living/carbon/human/proc/is_loyalty_implanted()
for(var/L in contents)
if(istype(L, /obj/item/weapon/implant/loyalty))
for(var/obj/item/organ/external/O in organs)
if(L in O.implants)
return 1
return 0
/mob/living/carbon/human/attack_slime(mob/living/carbon/slime/M as mob)
if(M.Victim) return // can't attack while eating!
@@ -91,9 +91,6 @@
var/obj/item/weapon/implant/freedom/L = new/obj/item/weapon/implant/freedom(H)
L.imp_in = H
L.implanted = 1
var/obj/item/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
return 1
+21 -20
View File
@@ -156,7 +156,7 @@
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/obj/item/weapon/implant/I = locate(/obj/item/weapon/implant) in target
if (affected.implants.len)
@@ -166,8 +166,6 @@
"\blue You take [obj] out of [target]'s [affected.name]s with \the [tool]." )
affected.implants -= obj
target.sec_hud_set_implants()
//Handle possessive brain borers.
if(istype(obj,/mob/living/simple_animal/borer))
var/mob/living/simple_animal/borer/worm = obj
@@ -177,26 +175,29 @@
worm.leave_host()
obj.loc = get_turf(target)
if(istype(obj,/obj/item/weapon/implant))
var/obj/item/weapon/implant/imp = obj
imp.removed(target)
var/obj/item/weapon/implantcase/case
else if(I && target_zone == "chest") //implant removal only works on the chest.
user.visible_message("<span class='notice'>[user] takes something out of [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You take [I] out of [target]'s [affected.name]s with \the [tool].</span>" )
if(istype(user.get_item_by_slot(slot_l_hand), /obj/item/weapon/implantcase))
case = user.get_item_by_slot(slot_l_hand)
else if(istype(user.get_item_by_slot(slot_r_hand), /obj/item/weapon/implantcase))
case = user.get_item_by_slot(slot_r_hand)
else
case = locate(/obj/item/weapon/implantcase) in get_turf(target)
I.removed(target)
if(case && !case.imp)
case.imp = imp
imp.loc = case
case.update_icon()
user.visible_message("[user] places [imp] into [case]!", "<span class='notice'>You place [imp] into [case].</span>")
else
qdel(imp)
var/obj/item/weapon/implantcase/case
if(istype(user.get_item_by_slot(slot_l_hand), /obj/item/weapon/implantcase))
case = user.get_item_by_slot(slot_l_hand)
else if(istype(user.get_item_by_slot(slot_r_hand), /obj/item/weapon/implantcase))
case = user.get_item_by_slot(slot_r_hand)
else
case = locate(/obj/item/weapon/implantcase) in get_turf(target)
if(case && !case.imp)
case.imp = I
I.loc = case
case.update_icon()
user.visible_message("[user] places [I] into [case]!", "<span class='notice'>You place [I] into [case].</span>")
else
qdel(I)
else if (affected.hidden)
user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.name] with \the [tool].", \