mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 05:51:56 +01:00
Extraction Tweaks (#10289)
This commit is contained in:
@@ -25,43 +25,42 @@
|
||||
return
|
||||
|
||||
/obj/item/implanter/proc/update()
|
||||
if (src.imp)
|
||||
src.icon_state = "implanter1"
|
||||
if (imp)
|
||||
icon_state = "implanter1"
|
||||
else
|
||||
src.icon_state = "implanter0"
|
||||
icon_state = "implanter0"
|
||||
return
|
||||
|
||||
/obj/item/implanter/attack(mob/M as mob, mob/user as mob, var/target_zone)
|
||||
if (!istype(M, /mob/living/carbon))
|
||||
/obj/item/implanter/attack(mob/living/carbon/human/M, mob/user, var/target_zone)
|
||||
if(!istype(M))
|
||||
return
|
||||
if (user && src.imp)
|
||||
M.visible_message("<span class='warning'>[user] is attemping to implant [M].</span>")
|
||||
|
||||
var/obj/item/organ/external/affected = M.get_organ(target_zone)
|
||||
|
||||
if(user && imp && affected)
|
||||
M.visible_message("<span class='warning'>[user] is attempting to implant [M] in \the [affected.name].</span>")
|
||||
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
|
||||
user.do_attack_animation(M)
|
||||
|
||||
var/turf/T1 = get_turf(M)
|
||||
if (T1 && ((M == user) || do_after(user, 50)))
|
||||
if(user && M && (get_turf(M) == T1) && src && src.imp)
|
||||
M.visible_message("<span class='warning'>[M] has been implanted by [user].</span>")
|
||||
if(user && M && (get_turf(M) == T1) && src && imp)
|
||||
M.visible_message("<span class='warning'>[M] has been implanted by [user] in the [affected.name].</span>")
|
||||
|
||||
admin_attack_log(user, M, "Implanted using \the [src.name] ([src.imp.name])", "Implanted with \the [src.name] ([src.imp.name])", "used an implanter, [src.name] ([src.imp.name]), on")
|
||||
admin_attack_log(user, M, "Implanted using \the [name] ([imp.name])", "Implanted with \the [name] ([imp.name])", "used an implanter, [name] ([imp.name]), on")
|
||||
|
||||
if(src.imp.implanted(M, user))
|
||||
src.imp.forceMove(M)
|
||||
src.imp.imp_in = M
|
||||
src.imp.implanted = 1
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affected = H.get_organ(target_zone)
|
||||
affected.implants += src.imp
|
||||
imp.part = affected
|
||||
|
||||
BITSET(H.hud_updateflag, IMPLOYAL_HUD)
|
||||
if(istype(src.imp, /obj/item/implanter/loyalty))
|
||||
if(imp.implanted(M, user))
|
||||
imp.forceMove(M)
|
||||
imp.imp_in = M
|
||||
imp.implanted = TRUE
|
||||
affected.implants += imp
|
||||
imp.part = affected
|
||||
BITSET(M.hud_updateflag, IMPLOYAL_HUD)
|
||||
if(istype(imp, /obj/item/implanter/loyalty))
|
||||
to_chat(M, "<span class ='notice'You feel a sudden surge of loyalty to [current_map.company_name]!</span>")
|
||||
|
||||
src.imp = null
|
||||
imp = null
|
||||
update()
|
||||
|
||||
return
|
||||
@@ -70,7 +69,7 @@
|
||||
name = "implanter-loyalty"
|
||||
|
||||
/obj/item/implanter/loyalty/New()
|
||||
src.imp = new /obj/item/implant/mindshield( src )
|
||||
imp = new /obj/item/implant/mindshield(src)
|
||||
..()
|
||||
update()
|
||||
return
|
||||
@@ -79,7 +78,7 @@
|
||||
name = "implanter (E)"
|
||||
|
||||
/obj/item/implanter/explosive/New()
|
||||
src.imp = new /obj/item/implant/explosive( src )
|
||||
imp = new /obj/item/implant/explosive(src)
|
||||
..()
|
||||
update()
|
||||
return
|
||||
@@ -88,7 +87,7 @@
|
||||
name = "implanter-adrenalin"
|
||||
|
||||
/obj/item/implanter/adrenalin/New()
|
||||
src.imp = new /obj/item/implant/adrenalin(src)
|
||||
imp = new /obj/item/implant/adrenalin(src)
|
||||
..()
|
||||
update()
|
||||
return
|
||||
@@ -160,7 +159,7 @@
|
||||
name = "implanter-augmentation disrupter"
|
||||
|
||||
/obj/item/implanter/anti_augment/New()
|
||||
src.imp = new /obj/item/implant/anti_augment(src)
|
||||
imp = new /obj/item/implant/anti_augment(src)
|
||||
..()
|
||||
update()
|
||||
return
|
||||
@@ -201,9 +200,9 @@
|
||||
|
||||
user.visible_message(SPAN_WARNING("\The [user] tags \the [M] with \the [src]!"), SPAN_NOTICE("You tag \the [M] with \the [src]."), range = 3)
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [src.name] ([src.ipc_tag.name]) by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <span class='warning'>Used the [src.name] ([src.ipc_tag.name]) to implant [M.name] ([M.ckey])</span>")
|
||||
msg_admin_attack("[key_name_admin(user)] implanted [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M))
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [name] ([ipc_tag.name]) by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <span class='warning'>Used the [name] ([ipc_tag.name]) to implant [M.name] ([M.ckey])</span>")
|
||||
msg_admin_attack("[key_name_admin(user)] implanted [key_name_admin(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M))
|
||||
|
||||
ipc_tag.replaced(H, H.organs_by_name[BP_HEAD])
|
||||
ipc_tag.forceMove(M)
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
|
||||
/obj/item/material/knife/verb/extract_shrapnel(var/mob/living/carbon/human/H as mob in view(1))
|
||||
set name = "Extract Shrapnel"
|
||||
/obj/item/material/knife/verb/extract_embedded(var/mob/living/carbon/human/H as mob in view(1))
|
||||
set name = "Extract Embedded Item"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
@@ -42,16 +42,23 @@
|
||||
if(!istype(H))
|
||||
return
|
||||
|
||||
if(!H.get_visible_implants(1))
|
||||
to_chat(usr, "<span class='warning'>There's nothing large enough to remove!</span>")
|
||||
var/list/available_organs = list()
|
||||
for(var/thing in H.organs)
|
||||
var/obj/item/organ/external/O = thing
|
||||
available_organs[capitalize_first_letters(O.name)] = O
|
||||
var/choice = input(usr, "Select an external organ to extract any embedded or implanted item from.", "Organ Selection") as null|anything in available_organs
|
||||
if(!choice)
|
||||
return
|
||||
|
||||
for(var/obj/item/material/shard/S in H.contents)
|
||||
visible_message("<span class='notice'>[usr] starts carefully digging out some of the shrapnel in [H == usr ? "themselves" : H]...</span>")
|
||||
var/obj/item/organ/external/O = available_organs[choice]
|
||||
for(var/thing in O.implants)
|
||||
var/obj/S = thing
|
||||
usr.visible_message("<span class='notice'>[usr] starts carefully digging out something in [H == usr ? "themselves" : H]...</span>")
|
||||
O.take_damage(8, 0, DAM_SHARP|DAM_EDGE, src)
|
||||
H.custom_pain("<font size=3><span class='danger'>It burns!</span></font>", 50)
|
||||
if(do_mob(usr, H, 100))
|
||||
H.remove_implant(S, FALSE)
|
||||
log_and_message_admins("has extracted shrapnel out of [key_name(H)]")
|
||||
log_and_message_admins("has extracted [S] out of [key_name(H)]")
|
||||
if(H.can_feel_pain())
|
||||
H.emote("scream")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user