mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Made transformations between mobs with organs work better. Destroying a limb removes implants. Implants now go where you select. Fixed some runtimes and retardedness.
This commit is contained in:
@@ -13,53 +13,43 @@
|
||||
|
||||
|
||||
update()
|
||||
if (src.imp)
|
||||
src.icon_state = "implanter1"
|
||||
if (imp)
|
||||
icon_state = "implanter1"
|
||||
else
|
||||
src.icon_state = "implanter0"
|
||||
icon_state = "implanter0"
|
||||
return
|
||||
|
||||
|
||||
attack(mob/M as mob, mob/user as mob)
|
||||
if (!istype(M, /mob/living/carbon))
|
||||
return
|
||||
if (user && src.imp)
|
||||
for (var/mob/O in viewers(M, null))
|
||||
if (M != user)
|
||||
O.show_message(text("\red <B>[] is trying to implant [] with [src.name]!</B>", user, M), 1)
|
||||
else
|
||||
O.show_message("\red <B>[user] is trying to inject themselves with [src.name]!</B>", 1)
|
||||
if (user && imp)
|
||||
if (M != user)
|
||||
user.visible_message("\red You try to implant yourself with \the [src]!","\red [user] tries to implant [user.gender == MALE? "himself":"herself"] with \the [src]!")
|
||||
else
|
||||
user.visible_message("\red You try to implant [M] with \the [src]!","\red [user] tries to implant [M] with \the [src]!")
|
||||
if(!do_mob(user, M,60))
|
||||
return
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/picked = 0
|
||||
var/mob/living/carbon/human/T = M
|
||||
var/list/datum/organ/external/E = T.GetOrgans()
|
||||
while(picked == 0 && E.len > 0)
|
||||
var/datum/organ/external/O = pick(E)
|
||||
E -= O
|
||||
if(!E.implant)
|
||||
O.implant = src.imp
|
||||
picked = 1
|
||||
if(picked == 0)
|
||||
for (var/mob/O in viewers(M, null))
|
||||
O.show_message(text("[user.name] can't find anywhere to implant [M.name]"), 1)
|
||||
if(hasorgans(M))
|
||||
var/datum/organ/external/target = M:get_organ(check_zone(user.zone_sel.selecting))
|
||||
if(target.destroyed)
|
||||
user << "What [target.display_name]?"
|
||||
return
|
||||
for (var/mob/O in viewers(M, null))
|
||||
target.implant += imp
|
||||
imp.loc = target
|
||||
if (M != user)
|
||||
O.show_message(text("\red [] implants [] with [src.name]!", user, M), 1)
|
||||
user.visible_message("\red You implant your [target.display_name] with \the [src]!","\red [user] implants [user.gender == MALE? "his own ":"her own "][target.display_name] with \the [src]!")
|
||||
else
|
||||
O.show_message("\red [user] implants themself with [src.name]!", 1)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [src.name] ([src.imp.name]) by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] ([src.imp.name]) to implant [M.name] ([M.ckey])</font>")
|
||||
user.visible_message("\red You implant [M]'s [target.display_name] with \the [src]!","\red [user] implants [M]'s [target.display_name] with \the [src]!")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [src] ([imp]) by [user] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src] ([imp]) to implant [M] ([M.ckey])</font>")
|
||||
log_admin("ATTACK: [user] ([user.ckey]) implanted [M] ([M.ckey]) with [src].")
|
||||
message_admins("ATTACK: [user] ([user.ckey]) implanted [M] ([M.ckey]) with [src].")
|
||||
src.imp.loc = M
|
||||
src.imp.imp_in = M
|
||||
src.imp.implanted = 1
|
||||
src.imp.implanted(M)
|
||||
src.imp = null
|
||||
src.icon_state = "implanter0"
|
||||
imp.imp_in = M
|
||||
imp.implanted = 1
|
||||
imp.implanted(M)
|
||||
imp = null
|
||||
icon_state = "implanter0"
|
||||
return
|
||||
|
||||
|
||||
@@ -68,7 +58,7 @@
|
||||
name = "implanter-loyalty"
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/loyalty( src )
|
||||
imp = new /obj/item/weapon/implant/loyalty( src )
|
||||
..()
|
||||
update()
|
||||
return
|
||||
@@ -79,7 +69,7 @@
|
||||
name = "implanter-explosive"
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/explosive( src )
|
||||
imp = new /obj/item/weapon/implant/explosive( src )
|
||||
..()
|
||||
update()
|
||||
return
|
||||
@@ -89,24 +79,24 @@
|
||||
icon_state = "cimplanter0"
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/compressed( src )
|
||||
imp = new /obj/item/weapon/implant/compressed( src )
|
||||
..()
|
||||
update()
|
||||
return
|
||||
|
||||
update()
|
||||
if (src.imp)
|
||||
var/obj/item/weapon/implant/compressed/c = src.imp
|
||||
if (imp)
|
||||
var/obj/item/weapon/implant/compressed/c = imp
|
||||
if(!c.scanned)
|
||||
src.icon_state = "cimplanter0"
|
||||
icon_state = "cimplanter0"
|
||||
else
|
||||
src.icon_state = "cimplanter1"
|
||||
icon_state = "cimplanter1"
|
||||
else
|
||||
src.icon_state = "cimplanter2"
|
||||
icon_state = "cimplanter2"
|
||||
return
|
||||
|
||||
attack(mob/M as mob, mob/user as mob)
|
||||
var/obj/item/weapon/implant/compressed/c = src.imp
|
||||
var/obj/item/weapon/implant/compressed/c = imp
|
||||
if (c.scanned == null)
|
||||
user << "Please scan an object with the implanter first."
|
||||
return
|
||||
@@ -114,7 +104,7 @@
|
||||
|
||||
afterattack(atom/A, mob/user as mob)
|
||||
if(istype(A,/obj/item))
|
||||
var/obj/item/weapon/implant/compressed/c = src.imp
|
||||
var/obj/item/weapon/implant/compressed/c = imp
|
||||
c.scanned = A
|
||||
A.loc.contents.Remove(A)
|
||||
src.update()
|
||||
update()
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
New()
|
||||
src.activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
|
||||
activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
|
||||
src.uses = rand(1, 5)
|
||||
..()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user