mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 14:44:05 +01:00
Implant Refactor Part II
This commit is contained in:
+6
-15
@@ -147,7 +147,7 @@
|
||||
var/mob/living/carbon/human/H = current
|
||||
if (istype(current, /mob/living/carbon/human))
|
||||
/** Impanted**/
|
||||
if(H.is_loyalty_implanted())
|
||||
if(isloyal(H))
|
||||
text = "Loyalty Implant:<a href='?src=\ref[src];implant=remove'>Remove</a>|<b>Implanted</b></br>"
|
||||
else
|
||||
text = "Loyalty Implant:<b>No Implant</b>|<a href='?src=\ref[src];implant=add'>Implant him!</a></br>"
|
||||
@@ -157,7 +157,7 @@
|
||||
if (ticker.mode.config_tag=="revolution")
|
||||
text += uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (H.is_loyalty_implanted())
|
||||
if (isloyal(H))
|
||||
text += "<b>LOYAL EMPLOYEE</b>|headrev|rev"
|
||||
else if (src in ticker.mode.head_revolutionaries)
|
||||
text = "<a href='?src=\ref[src];revolution=clear'>employee</a>|<b>HEADREV</b>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
|
||||
@@ -193,7 +193,7 @@
|
||||
if (ticker.mode.config_tag=="cult")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (H.is_loyalty_implanted())
|
||||
if (isloyal(H))
|
||||
text += "<B>LOYAL EMPLOYEE</B>|cultist"
|
||||
else if (src in ticker.mode.cult)
|
||||
text += "<a href='?src=\ref[src];cult=clear'>employee</a>|<b>CULTIST</b>"
|
||||
@@ -307,7 +307,7 @@
|
||||
if (ticker.mode.config_tag=="traitor" || ticker.mode.config_tag=="traitorchan")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (H.is_loyalty_implanted())
|
||||
if (isloyal(H))
|
||||
text +="traitor|<b>LOYAL EMPLOYEE</b>"
|
||||
else
|
||||
if (src in ticker.mode.traitors)
|
||||
@@ -619,9 +619,8 @@
|
||||
switch(href_list["implant"])
|
||||
if("remove")
|
||||
for(var/obj/item/weapon/implant/loyalty/I in H.contents)
|
||||
for(var/obj/item/organ/external/organs in H.organs)
|
||||
if(I in organs.implants)
|
||||
qdel(I)
|
||||
if(I && I.implanted)
|
||||
I.removed(H)
|
||||
H << "\blue <Font size =3><B>Your loyalty implant has been deactivated.</B></FONT>"
|
||||
log_admin("[key_name(usr)] has deactivated [key_name(current)]'s loyalty implant")
|
||||
message_admins("[key_name_admin(usr)] has deactivated [key_name_admin(current)]'s loyalty implant")
|
||||
@@ -629,9 +628,6 @@
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(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
|
||||
H.sec_hud_set_implants()
|
||||
|
||||
log_admin("[key_name(usr)] has given [key_name(current)] a loyalty implant")
|
||||
@@ -655,11 +651,6 @@
|
||||
cult.memorize_cult_objectives(src)
|
||||
current << "\red <FONT size = 3><B>The nanobots in the loyalty implant remove all thoughts about being in a cult. Have a productive day!</B></FONT>"
|
||||
memory = ""
|
||||
if(src in ticker.mode.traitors)
|
||||
ticker.mode.traitors -= src
|
||||
special_role = null
|
||||
current << "\red <FONT size = 3><B>The nanobots in the loyalty implant remove all thoughts about being a traitor to Nanotrasen. Have a nice day!</B></FONT>"
|
||||
log_admin("[key_name_admin(usr)] has de-traitor'ed [current].")
|
||||
|
||||
else if (href_list["revolution"])
|
||||
|
||||
|
||||
@@ -92,9 +92,8 @@
|
||||
if(ishuman(player.current))
|
||||
var/mob/living/carbon/human/H = player.current
|
||||
for(var/obj/item/weapon/implant/loyalty/I in H.contents)
|
||||
for(var/obj/item/organ/external/organs in H.organs)
|
||||
if(I in organs.implants)
|
||||
possible_traitors -= player
|
||||
if(I && I.implanted)
|
||||
possible_traitors -= player
|
||||
|
||||
//message_admins("Live Players: [playercount]")
|
||||
//message_admins("Live Traitors: [traitorcount]")
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
return 0
|
||||
if(ishuman(mind.current))
|
||||
var/mob/living/carbon/human/H = mind.current
|
||||
if(H.is_loyalty_implanted())
|
||||
if(isloyal(H))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -113,12 +113,9 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind'
|
||||
limb.status &= ~(ORGAN_DESTROYED | ORGAN_ROBOT)
|
||||
|
||||
//Now apply cortical stack.
|
||||
var/obj/item/organ/external/E = vox.get_organ("head")
|
||||
var/obj/item/weapon/implant/cortical/I = new(vox)
|
||||
I.imp_in = vox
|
||||
I.implanted = 1
|
||||
I.part = E
|
||||
E.implants += I
|
||||
cortical_stacks += I
|
||||
|
||||
vox.equip_vox_raider()
|
||||
|
||||
@@ -43,9 +43,6 @@
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(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
|
||||
H.sec_hud_set_implants()
|
||||
return 1
|
||||
|
||||
@@ -90,9 +87,6 @@
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(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
|
||||
H.sec_hud_set_implants()
|
||||
return 1
|
||||
|
||||
@@ -146,9 +140,6 @@
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(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
|
||||
H.sec_hud_set_implants()
|
||||
|
||||
H.dna.SetSEState(SOBERBLOCK,1)
|
||||
@@ -194,9 +185,6 @@
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(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
|
||||
H.sec_hud_set_implants()
|
||||
return 1
|
||||
|
||||
@@ -233,9 +221,6 @@
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(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
|
||||
H.sec_hud_set_implants()
|
||||
return 1
|
||||
|
||||
@@ -274,8 +259,5 @@
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(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
|
||||
H.sec_hud_set_implants()
|
||||
return 1
|
||||
@@ -38,11 +38,8 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
captain_announcement.Announce("All hands, captain [H.real_name] on deck!")
|
||||
var/obj/item/organ/external/affected = H.organs_by_name["head"]
|
||||
affected.implants += L
|
||||
L.part = affected
|
||||
H.sec_hud_set_implants()
|
||||
captain_announcement.Announce("All hands, captain [H.real_name] on deck!")
|
||||
callHook("captain_spawned", list("captain" = H))
|
||||
return 1
|
||||
|
||||
@@ -137,9 +134,6 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(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
|
||||
H.sec_hud_set_implants()
|
||||
return 1
|
||||
|
||||
@@ -187,9 +181,6 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(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
|
||||
H.sec_hud_set_implants()
|
||||
return 1
|
||||
|
||||
@@ -231,9 +222,6 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(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
|
||||
H.sec_hud_set_implants()
|
||||
return 1
|
||||
|
||||
@@ -274,8 +262,5 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(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
|
||||
H.sec_hud_set_implants()
|
||||
return 1
|
||||
@@ -196,7 +196,6 @@
|
||||
|
||||
/obj/machinery/body_scanconsole
|
||||
var/obj/machinery/bodyscanner/connected
|
||||
var/known_implants = list(/obj/item/weapon/implant/chem, /obj/item/weapon/implant/death_alarm, /obj/item/weapon/implant/loyalty, /obj/item/weapon/implant/tracking)
|
||||
var/delete
|
||||
var/temphtml
|
||||
name = "Body Scanner Console"
|
||||
@@ -363,8 +362,6 @@
|
||||
for(var/obj/I in E.implants)
|
||||
var/implantSubData[0]
|
||||
implantSubData["name"] = I.name
|
||||
if(is_type_in_list(I, known_implants))
|
||||
implantSubData["known"] = 1
|
||||
|
||||
implantData.Add(list(implantSubData))
|
||||
|
||||
@@ -571,10 +568,7 @@
|
||||
|
||||
var/unknown_body = 0
|
||||
for(var/I in e.implants)
|
||||
if(is_type_in_list(I,known_implants))
|
||||
imp += "[I] implanted:"
|
||||
else
|
||||
unknown_body++
|
||||
unknown_body++
|
||||
|
||||
if(unknown_body || e.hidden)
|
||||
imp += "Unknown body present:"
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
var/activated = 1 //1 for implant types that can be activated, 0 for ones that are "always on" like loyalty implants
|
||||
var/implanted = null
|
||||
var/mob/living/imp_in = null
|
||||
var/obj/item/organ/external/part = null
|
||||
item_color = "b"
|
||||
var/allow_multiple = 0
|
||||
var/uses = -1
|
||||
@@ -49,10 +48,6 @@
|
||||
implanted = 1
|
||||
if(istype(source, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = source
|
||||
if(user)
|
||||
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
|
||||
affected.implants += src
|
||||
part = affected
|
||||
H.sec_hud_set_implants()
|
||||
|
||||
if(user)
|
||||
|
||||
@@ -248,6 +248,7 @@ var/send_emergency_team
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M)
|
||||
L.imp_in = M
|
||||
L.implanted = 1
|
||||
M.sec_hud_set_implants()
|
||||
|
||||
switch(officer_type)
|
||||
if("Engineer")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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].", \
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
author: Fox McCloud
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- tweaks: "Tweaks implant behavior to be more consistent and unified."
|
||||
Reference in New Issue
Block a user