mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 20:47:10 +01:00
Adds the Alien Organ Extractor (#24737)
* Almost done * Adds pricings * Lowers price to 2 * Update code/game/gamemodes/miniantags/abduction/machinery/console.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/game/gamemodes/miniantags/abduction/machinery/console.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Unequip issue fix * Fixes it not working * Extra spacing * Update code/modules/surgery/organs/organ_extractor.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/surgery/organs/organ_extractor.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Adds Sprites --------- Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
co-authored by
Burzah
Henri215
parent
68e56bd71a
commit
6a25040d16
@@ -7,6 +7,9 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
origin_tech = "biotech=6;materials=5;syndicate=2"
|
||||
var/obj/item/organ/internal/storedorgan
|
||||
var/insert_time = 12 SECONDS
|
||||
var/self_insert_time = 7 SECONDS
|
||||
var/advanced = FALSE
|
||||
|
||||
/obj/item/organ_extractor/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -46,6 +49,7 @@
|
||||
if(!iscarbon(M))
|
||||
to_chat(user, "<span class='warning'>ERROR: [M] has no organs to harvest!</span>")
|
||||
return
|
||||
|
||||
var/mob/living/carbon/C = M
|
||||
if(!length(C.client_mobs_in_contents)) //Basically, we don't want someone putting organs in monkeys then extracting from it. Has to be someone who had a client in the past
|
||||
to_chat(user, "<span class='warning'>ERROR: [C] has no soul trace to assist in targeting the drill bit!</span>")
|
||||
@@ -57,6 +61,7 @@
|
||||
to_chat(user, "<span class='warning'>NOTICE: Internal organ deteced. Beginning insertion procedure!</span>")
|
||||
insert_organ(user, C)
|
||||
return
|
||||
|
||||
in_use = TRUE
|
||||
var/obj/item/chosen_organ = tgui_input_list(user, "Please select an organ for removal", "Organ Selection", C.internal_organs)
|
||||
if(!chosen_organ || !user.Adjacent(C))
|
||||
@@ -74,13 +79,16 @@
|
||||
to_chat(user, "<span class='warning'>ERROR: [chosen_organ] was inserted when [C] was dead, and has no soul trace to lock onto!</span>")
|
||||
in_use = FALSE
|
||||
return
|
||||
|
||||
var/obj/item/organ/internal/internal_organ = chosen_organ
|
||||
var/drilled_organ = internal_organ.parent_organ
|
||||
user.visible_message("<span class='danger'>[user] activates [src] and begins to drill into [C]!</span>", "<span class='warning'>You level the extractor at [M] and hold down the trigger.</span>")
|
||||
to_chat(C, "<span class='danger'>You feel a lot of pain as [user] drills into your [drilled_organ]!</span>")
|
||||
playsound(get_turf(user), 'sound/weapons/circsawhit.ogg', 75, TRUE)
|
||||
C.apply_damage(15, BRUTE, drilled_organ)
|
||||
if(!do_after_once(user, 12 SECONDS, target = C))// Slightly longer than stamina crit, at least cuff and buckle them to a pipe or something
|
||||
|
||||
if(!advanced)
|
||||
C.apply_damage(15, BRUTE, drilled_organ)
|
||||
if(!do_after_once(user, insert_time, target = C))// Slightly longer than stamina crit, at least cuff and buckle them to a pipe or something
|
||||
to_chat(user, "<span class='warning'>ERROR: Process interrupted!</span>")
|
||||
in_use = FALSE
|
||||
return
|
||||
@@ -88,27 +96,13 @@
|
||||
to_chat(user, "<span class='warning'>ERROR: unable to find the desired organ!</span>")
|
||||
in_use = FALSE
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'>[user] removes [internal_organ] from [C]!</span>", "<span class='warning'>You remove [internal_organ] from [C] as it gets sucked into [src]'s internal container!</span>")
|
||||
playsound(get_turf(user), 'sound/weapons/circsawhit.ogg', 75, TRUE)
|
||||
C.apply_damage(10, BRUTE, drilled_organ)
|
||||
internal_organ.remove(C)
|
||||
internal_organ.forceMove(src)
|
||||
storedorgan = internal_organ
|
||||
storedorgan.rejuvenate() //Organ gets dumped into the internal mito tank, heals it up. And nanites for robotic organs, I guess.
|
||||
in_use = FALSE
|
||||
var/organ_x = internal_organ.pixel_x
|
||||
var/organ_y = internal_organ.pixel_y
|
||||
internal_organ.pixel_x = 2
|
||||
internal_organ.pixel_y = -2
|
||||
var/image/img = image("icon" = internal_organ, "layer" = FLOAT_LAYER)
|
||||
var/matrix/MA = matrix(transform)
|
||||
MA.Scale(0.66, 0.66)
|
||||
img.transform = MA
|
||||
img.plane = FLOAT_PLANE
|
||||
overlays += img
|
||||
internal_organ.pixel_x = organ_x
|
||||
internal_organ.pixel_y = organ_y
|
||||
overlays += "organ_extractor_2" //should look nicer for transparent stuff.
|
||||
insert_internal_organ_in_extractor(internal_organ)
|
||||
|
||||
/obj/item/organ_extractor/proc/insert_organ(mob/user, mob/our_target)
|
||||
if(!storedorgan)
|
||||
@@ -117,6 +111,7 @@
|
||||
if(in_use)
|
||||
to_chat(user, "<span class='warning'>[src] is already busy!</span>")
|
||||
return
|
||||
|
||||
var/user_is_target = FALSE
|
||||
if(user == our_target)
|
||||
user_is_target = TRUE
|
||||
@@ -125,23 +120,22 @@
|
||||
return
|
||||
if(!iscarbon(our_target))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/C = our_target
|
||||
in_use = TRUE
|
||||
user.visible_message("<span class='danger'>[user] activates [src] and begins to drill into [C]!</span>", "<span class='warning'>You level the extractor at [user_is_target ? "yourself" : C] and hold down the trigger.</span>")
|
||||
var/drilled_organ = storedorgan.parent_organ
|
||||
C.apply_damage(5, BRUTE, drilled_organ)
|
||||
if(!advanced)
|
||||
C.apply_damage(5, BRUTE, drilled_organ)
|
||||
playsound(get_turf(C), 'sound/weapons/circsawhit.ogg', 50, TRUE)
|
||||
if(user_is_target)
|
||||
if(!do_after_once(C, 7 SECONDS, target = C))
|
||||
to_chat(user, "<span class='warning'>ERROR: Process interrupted!</span>")
|
||||
in_use = FALSE
|
||||
return
|
||||
else
|
||||
if(!do_after_once(C, 12 SECONDS, target = C))
|
||||
to_chat(user, "<span class='warning'>ERROR: Process interrupted!</span>")
|
||||
in_use = FALSE
|
||||
return
|
||||
C.apply_damage(10, BRUTE, drilled_organ)
|
||||
|
||||
if(!do_after_once(C, (user_is_target ? self_insert_time : insert_time), target = C))
|
||||
to_chat(user, "<span class='warning'>ERROR: Process interrupted!</span>")
|
||||
in_use = FALSE
|
||||
return
|
||||
|
||||
if(!advanced)
|
||||
C.apply_damage(10, BRUTE, drilled_organ)
|
||||
var/obj/item/organ/internal/replaced = C.get_organ_slot(storedorgan.slot)
|
||||
if(replaced) //Lets not destroy someones brain fully by putting someone elses brain in that slot.
|
||||
replaced.remove(C)
|
||||
@@ -154,3 +148,39 @@
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
H.set_heartattack(FALSE) //Otherwise you die if you try to do an organic heart, very funny, very bad
|
||||
|
||||
/obj/item/organ_extractor/proc/insert_internal_organ_in_extractor(obj/item/organ/organ_to_be_inserted)
|
||||
organ_to_be_inserted.forceMove(src)
|
||||
storedorgan = organ_to_be_inserted
|
||||
storedorgan.rejuvenate() //Organ gets dumped into the internal mito tank, heals it up. And nanites for robotic organs, I guess.
|
||||
var/organ_x = storedorgan.pixel_x
|
||||
var/organ_y = storedorgan.pixel_y
|
||||
storedorgan.pixel_x = 2
|
||||
storedorgan.pixel_y = -2
|
||||
var/image/img = image("icon" = storedorgan, "layer" = FLOAT_LAYER)
|
||||
var/matrix/MA = matrix(transform)
|
||||
MA.Scale(0.66, 0.66)
|
||||
img.transform = MA
|
||||
img.plane = FLOAT_PLANE
|
||||
overlays += img
|
||||
storedorgan.pixel_x = organ_x
|
||||
storedorgan.pixel_y = organ_y
|
||||
overlays += "[icon_state]_2" //should look nicer for transparent stuff.
|
||||
|
||||
/// Advanced abductor version. Is a lot faster with implanting into others
|
||||
/obj/item/organ_extractor/abductor
|
||||
name = "alien organ extractor"
|
||||
origin_tech = "biotech=6;materials=5;alien=4"
|
||||
icon_state = "abductor_extractor"
|
||||
insert_time = 3 SECONDS
|
||||
self_insert_time = 1 SECONDS
|
||||
advanced = TRUE
|
||||
|
||||
/obj/item/organ_extractor/abductor/attackby(obj/item/I, mob/user, params)
|
||||
. = ..()
|
||||
if(istype(I, /obj/item/organ/internal) && !storedorgan)
|
||||
user.unEquip(I)
|
||||
insert_internal_organ_in_extractor(I)
|
||||
|
||||
/obj/item/organ_extractor/abductor/emp_act(severity)
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user