[MIRROR] Telekinetic Gloves (#11447)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-08-16 12:36:02 -07:00
committed by GitHub
parent 8030ab6d20
commit 52e8764438
8 changed files with 121 additions and 5 deletions

View File

@@ -5,6 +5,7 @@
#define TECHWEB_NODE_ALIENTECH "alientech" #define TECHWEB_NODE_ALIENTECH "alientech"
#define TECHWEB_NODE_ANOMALY_RESEARCH "anomaly_research" #define TECHWEB_NODE_ANOMALY_RESEARCH "anomaly_research"
#define TECHWEB_NODE_ANOMALY_SHELLS "anomaly_shells" #define TECHWEB_NODE_ANOMALY_SHELLS "anomaly_shells"
#define TECHWEB_NODE_TELEKINETIC_RESEARCH "telekinetic_research"
#define TECHWEB_NODE_APPLIED_BLUESPACE "applied_bluespace" #define TECHWEB_NODE_APPLIED_BLUESPACE "applied_bluespace"
#define TECHWEB_NODE_ATMOS "atmos" #define TECHWEB_NODE_ATMOS "atmos"
#define TECHWEB_NODE_AUGMENTATION "augmentation" #define TECHWEB_NODE_AUGMENTATION "augmentation"

View File

@@ -219,7 +219,7 @@
if(!mutations.len) return if(!mutations.len) return
if((LASER in mutations) && a_intent == I_HURT) if((LASER in mutations) && a_intent == I_HURT)
LaserEyes(A) // moved into a proc below LaserEyes(A) // moved into a proc below
else if(TK in mutations) else if(has_telegrip())
if(get_dist(src, A) > tk_maxrange) if(get_dist(src, A) > tk_maxrange)
return return
A.attack_tk(src) A.attack_tk(src)

View File

@@ -33,6 +33,16 @@
/mob/living/carbon/human/RestrainedClickOn(var/atom/A) /mob/living/carbon/human/RestrainedClickOn(var/atom/A)
return return
/mob/proc/has_telegrip()
return TK in mutations
/mob/living/carbon/human/has_telegrip()
if(istype(gloves,/obj/item/clothing/gloves/telekinetic))
var/obj/item/clothing/gloves/telekinetic/G = gloves
if(G.has_grip_power())
return TRUE
return ..()
/mob/living/carbon/human/RangedAttack(var/atom/A) /mob/living/carbon/human/RangedAttack(var/atom/A)
if(!gloves && !mutations.len && !spitting) if(!gloves && !mutations.len && !spitting)
return return
@@ -43,7 +53,10 @@
else if(istype(G) && G.Touch(A,0)) // for magic gloves else if(istype(G) && G.Touch(A,0)) // for magic gloves
return return
else if(TK in mutations) else if(has_telegrip())
if(istype(gloves,/obj/item/clothing/gloves/telekinetic))
var/obj/item/clothing/gloves/telekinetic/TKG = gloves
TKG.use_grip_power(src,TRUE)
A.attack_tk(src) A.attack_tk(src)
else if(spitting) //Only used by xenos right now, can be expanded. else if(spitting) //Only used by xenos right now, can be expanded.

View File

@@ -39,13 +39,13 @@ var/const/tk_maxrange = 15
/obj/item/attack_tk(mob/user) /obj/item/attack_tk(mob/user)
if(user.stat || !isturf(loc)) return if(user.stat || !isturf(loc)) return
if((TK in user.mutations) && !user.get_active_hand()) // both should already be true to get here if(user.has_telegrip() && !user.get_active_hand()) // both should already be true to get here
var/obj/item/tk_grab/O = new(src) var/obj/item/tk_grab/O = new(src)
user.put_in_active_hand(O) user.put_in_active_hand(O)
O.host = user O.host = user
O.focus_object(src) O.focus_object(src)
else else
warning("Strange attack_tk(): TK([TK in user.mutations]) empty hand([!user.get_active_hand()])") warning("Strange attack_tk(): TK([user.has_telegrip()]) empty hand([!user.get_active_hand()])")
return return
@@ -101,7 +101,7 @@ var/const/tk_maxrange = 15
if(!host || host != user) if(!host || host != user)
qdel(src) qdel(src)
return return
if(!(TK in host.mutations)) if(!host.has_telegrip())
qdel(src) qdel(src)
return return
if(isobj(target) && !isturf(target.loc)) if(isobj(target) && !isturf(target.loc))
@@ -132,6 +132,13 @@ var/const/tk_maxrange = 15
apply_focus_overlay() apply_focus_overlay()
focus.throw_at(target, 10, 1, user) focus.throw_at(target, 10, 1, user)
last_throw = world.time last_throw = world.time
if(ishuman(user))
var/mob/living/carbon/human/H_user = user
if(istype(H_user.gloves,/obj/item/clothing/gloves/telekinetic))
var/obj/item/clothing/gloves/telekinetic/TKG = H_user.gloves
TKG.use_grip_power(user,TRUE)
if(!TKG.has_grip_power())
qdel(src) // Drop TK
return return
/obj/item/tk_grab/attack(mob/living/M as mob, mob/living/user as mob, def_zone) /obj/item/tk_grab/attack(mob/living/M as mob, mob/living/user as mob, def_zone)

View File

@@ -0,0 +1,71 @@
/obj/item/clothing/gloves/telekinetic
desc = "Gloves with a built in telekinesis module, allows for remote interaction with small objects."
name = "kinesis assistance module"
icon_state = "regen"
item_state = "graygloves"
var/use_power_amount = 12
origin_tech = list(TECH_ENGINEERING = 4, TECH_BLUESPACE = 4)
/obj/item/clothing/gloves/telekinetic/Initialize(mapload)
. = ..()
cell = new /obj/item/cell/device(src)
/obj/item/clothing/gloves/telekinetic/proc/has_grip_power()
if(cell && cell.charge >= use_power_amount)
return TRUE
return FALSE
/obj/item/clothing/gloves/telekinetic/proc/use_grip_power(var/mob/user,var/play_sound)
if(cell)
cell.checked_use(use_power_amount)
if(play_sound)
if(cell.charge < use_power_amount)
to_chat(user,span_danger("\The [src] bwoop as it runs out of power."))
playsound(src,'sound/machines/synth_no.ogg')
else
playsound(src,'sound/machines/generator/generator_end.ogg',70,1)
/obj/item/clothing/gloves/telekinetic/attack_hand(mob/user as mob)
if(user.get_inactive_hand() == src)
if(cell)
cell.update_icon()
user.put_in_hands(cell)
cell = null
to_chat(user, span_notice("You remove the cell from the [src]."))
playsound(src, 'sound/machines/button.ogg', 30, 1, 0)
return
..()
else
return ..()
/obj/item/clothing/gloves/telekinetic/attackby(obj/item/W, mob/user as mob)
if(istype(W, /obj/item/cell))
if(istype(W, /obj/item/cell/device))
if(!cell)
user.drop_item()
W.loc = src
cell = W
to_chat(user, span_notice("You install a cell in \the [src]."))
playsound(src, 'sound/machines/button.ogg', 30, 1, 0)
else
to_chat(user, span_warning("\The [src] already has a cell."))
else
to_chat(user, span_warning("\The [src] cannot use that type of cell."))
else
..()
/obj/item/clothing/gloves/telekinetic/examine(mob/user)
. = ..()
if(cell)
. += span_info("\The [src] has a \the [cell] attached.")
if(cell.charge <= cell.maxcharge*0.25)
. += span_warning("It appears to have a low amount of power remaining.")
else if(cell.charge > cell.maxcharge*0.25 && cell.charge <= cell.maxcharge*0.5)
. += span_notice("It appears to have an average amount of power remaining.")
else if(cell.charge > cell.maxcharge*0.5 && cell.charge <= cell.maxcharge*0.75)
. += span_info("It appears to have an above average amount of power remaining.")
else if(cell.charge > cell.maxcharge*0.75 && cell.charge <= cell.maxcharge)
. += span_info("It appears to have a high amount of power remaining.")
else
. += span_warning("\The [src] has an empty powercell slot.")

View File

@@ -874,3 +874,15 @@
RND_CATEGORY_CYBERNETICS + RND_SUBCATEGORY_CYBERNETICS_ORGANS_MISC RND_CATEGORY_CYBERNETICS + RND_SUBCATEGORY_CYBERNETICS_ORGANS_MISC
) )
departmental_flags = DEPARTMENT_BITFLAG_SCIENCE departmental_flags = DEPARTMENT_BITFLAG_SCIENCE
/datum/design_techweb/telekinetic_gloves
name = "Kinesis Assistance Module"
id = "tk_gloves"
// req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3, TECH_BLUESPACE = 4)
build_type = PROTOLATHE
materials = list(MAT_VERDANTIUM = 1000, MAT_SILVER = 300, MAT_PLASTEEL = 1000)
build_path = /obj/item/clothing/gloves/telekinetic
category = list(
RND_CATEGORY_TOOLS + RND_SUBCATEGORY_TOOLS_ENGINEERING_ADVANCED
)
departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING

View File

@@ -103,3 +103,14 @@
) )
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_3_POINTS) research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_3_POINTS)
announce_channels = list(CHANNEL_SCIENCE) announce_channels = list(CHANNEL_SCIENCE)
/datum/techweb_node/telekinetics
id = TECHWEB_NODE_TELEKINETIC_RESEARCH
display_name = "Applied Telekinetics Research"
description = "Altering the physical behavior of objects to allow remote interaction and movement."
prereq_ids = list(TECHWEB_NODE_APPLIED_BLUESPACE,TECHWEB_NODE_CYBER_IMPLANTS)
design_ids = list(
"tk_gloves",
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_4_POINTS)
announce_channels = list(CHANNEL_SCIENCE)

View File

@@ -2450,6 +2450,7 @@
#include "code\modules\clothing\gloves\gauntlets.dm" #include "code\modules\clothing\gloves\gauntlets.dm"
#include "code\modules\clothing\gloves\miscellaneous.dm" #include "code\modules\clothing\gloves\miscellaneous.dm"
#include "code\modules\clothing\gloves\miscellaneous_vr.dm" #include "code\modules\clothing\gloves\miscellaneous_vr.dm"
#include "code\modules\clothing\gloves\telekinetic.dm"
#include "code\modules\clothing\head\collectable.dm" #include "code\modules\clothing\head\collectable.dm"
#include "code\modules\clothing\head\fishing.dm" #include "code\modules\clothing\head\fishing.dm"
#include "code\modules\clothing\head\flowercrowns.dm" #include "code\modules\clothing\head\flowercrowns.dm"