mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 13:05:44 +01:00
Added telefreedom implants (#19124)
Added telefreedom implants, including a box with (almost) everything you need to make them work for 4 people, and added it to the uplink. Fixed implanters not taking the implant and dropping it to the ground when hit by one (while keeping it referenced).
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
if(!imp && istype(attacking_item, /obj/item/implant) && user.unEquip(attacking_item, src))
|
||||
to_chat(usr, SPAN_NOTICE("You slide \the [attacking_item] into \the [src]."))
|
||||
imp = attacking_item
|
||||
attacking_item.forceMove(src)
|
||||
update_icon()
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
uses = rand(1, 5)
|
||||
..()
|
||||
|
||||
/obj/item/implant/freedom/activate(cause)
|
||||
/obj/item/implant/freedom/activate()
|
||||
if(malfunction || !imp_in)
|
||||
return
|
||||
if(uses < 1)
|
||||
@@ -75,3 +75,60 @@ No Implant Specifics"}
|
||||
/obj/item/implanter/freedom
|
||||
name = "implanter (F)"
|
||||
imp = /obj/item/implant/freedom
|
||||
|
||||
/**
|
||||
* # Teleport freedom implant
|
||||
*
|
||||
* This implant allows you to teleport to a linked teleporter in desperate times
|
||||
*/
|
||||
/obj/item/implant/telefreedom
|
||||
name = "telefreedom implant"
|
||||
desc = "Use this to teleport to a linked teleporter in desperate times. Melts after being used."
|
||||
desc_info = "Click a telepad to link your telefreedom implant to it before implanting."
|
||||
|
||||
//////Edit these when you can give it an unique sprite//////
|
||||
icon_state = "implant_freedom"
|
||||
implant_icon = "freedom"
|
||||
|
||||
implant_color = "#15695b"
|
||||
hidden = TRUE
|
||||
default_action_type = /datum/action/item_action/hands_free/activate/implant/freedom
|
||||
action_button_name = "Activate Telefreedom Implant"
|
||||
|
||||
/**
|
||||
* The linked telepad to teleport to, a weakref to an `/obj/machinery/telepad` object
|
||||
*/
|
||||
var/datum/weakref/linked_telepad = null
|
||||
|
||||
/obj/item/implant/telefreedom/activate()
|
||||
if(!imp_in)
|
||||
return
|
||||
|
||||
if(!linked_telepad)
|
||||
to_chat(imp_in, SPAN_NOTICE("You need to link a telepad first."))
|
||||
return
|
||||
|
||||
if(malfunction)
|
||||
to_chat(imp_in, SPAN_WARNING("The telefreedom implant is malfunctioning!"))
|
||||
return
|
||||
|
||||
//Effects
|
||||
spark(get_turf(imp_in), 5, GLOB.alldirs)
|
||||
var/datum/effect/effect/system/smoke_spread/smoke_effect = new /datum/effect/effect/system/smoke_spread
|
||||
smoke_effect.set_up(4, 1, get_turf(imp_in))
|
||||
smoke_effect.smoke_duration = 5 SECONDS
|
||||
smoke_effect.start()
|
||||
|
||||
var/turf/T = get_turf(linked_telepad.resolve())
|
||||
if(!T)
|
||||
stack_trace("telefreedom implant: telepad turf is null")
|
||||
return
|
||||
|
||||
imp_in.forceMove(T)
|
||||
meltdown()
|
||||
|
||||
/obj/item/implant/telefreedom/resolve_attackby(atom/A, mob/user, click_parameters)
|
||||
. = ..()
|
||||
if(istype(A, /obj/machinery/telepad))
|
||||
linked_telepad = WEAKREF(A)
|
||||
to_chat(user, SPAN_NOTICE("You link the telepad to your telefreedom implant."))
|
||||
|
||||
@@ -1329,3 +1329,19 @@
|
||||
/obj/item/reagent_containers/food/snacks/grown/konyang_tea/jaekseol = 7
|
||||
)
|
||||
|
||||
/obj/item/storage/box/telefreedom_kit
|
||||
name = "telefreedom kit"
|
||||
desc = "A box containing a telefreedom full kit."
|
||||
starts_with = list(/obj/item/implant/telefreedom = 4,
|
||||
/obj/item/implanter = 1,
|
||||
//Telepad construction items
|
||||
/obj/item/circuitboard/telesci_pad = 1,
|
||||
/obj/item/bluespace_crystal/artificial = 2,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
)
|
||||
|
||||
/obj/item/storage/box/telefreedom_kit/fill()
|
||||
. = ..()
|
||||
new /obj/item/stack/cable_coil(src, 6)
|
||||
new /obj/item/stack/material/steel(src, 2)
|
||||
|
||||
Reference in New Issue
Block a user