[MIRROR] adds the kinesis+ module [MDB IGNORE] (#13842)

* adds the kinesis+ module (#67157)

* adds the kinesis+ module

* adds the kinesis+ module

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-05-24 01:01:59 +01:00
committed by GitHub
co-authored by Fikou
parent 746900d6ec
commit 4f0cd20cbc
2 changed files with 29 additions and 8 deletions
+2
View File
@@ -330,6 +330,7 @@
/obj/item/mod/module/timestopper,
/obj/item/mod/module/rewinder,
/obj/item/mod/module/tem,
/obj/item/mod/module/anomaly_locked/kinesis/plus,
)
/obj/item/mod/control/pre_equipped/debug
@@ -356,6 +357,7 @@
/obj/item/mod/module/quick_carry/advanced,
/obj/item/mod/module/magboot/advanced,
/obj/item/mod/module/jetpack,
/obj/item/mod/module/anomaly_locked/kinesis/plus,
)
//these exist for the prefs menu
+27 -8
View File
@@ -15,14 +15,25 @@
overlay_state_inactive = "module_kinesis"
overlay_state_active = "module_kinesis_on"
accepted_anomalies = list(/obj/item/assembly/signaler/anomaly/grav)
/// Range of the knesis grab.
var/grab_range = 5
/// Time between us hitting objects with kinesis.
var/hit_cooldown_time = 1 SECONDS
var/movement_animation
/// Stat required for us to grab a mob.
var/stat_required = DEAD
/// How long we stun a mob for.
var/mob_stun_time = 5 SECONDS
/// Atom we grabbed with kinesis.
var/atom/movable/grabbed_atom
/// Ref of the beam following the grabbed atom.
var/datum/beam/kinesis_beam
/// Overlay we add to each grabbed atom.
var/mutable_appearance/kinesis_icon
/// Our mouse movement catcher.
var/atom/movable/screen/fullscreen/kinesis/kinesis_catcher
/// The sounds playing while we grabbed an object.
var/datum/looping_sound/gravgen/kinesis/soundloop
/// The cooldown between us hitting objects with kinesis.
COOLDOWN_DECLARE(hit_cooldown)
/obj/item/mod/module/anomaly_locked/kinesis/Initialize(mapload)
@@ -30,12 +41,6 @@
soundloop = new(src)
/obj/item/mod/module/anomaly_locked/kinesis/Destroy()
if(grabbed_atom)
kinesis_catcher = null
mod.wearer.clear_fullscreen("kinesis")
grabbed_atom.cut_overlay(kinesis_icon)
QDEL_NULL(kinesis_beam)
grabbed_atom.animate_movement = movement_animation
QDEL_NULL(soundloop)
return ..()
@@ -55,6 +60,9 @@
return
drain_power(use_power_cost)
grabbed_atom = target
if(isliving(grabbed_atom))
var/mob/living/grabbed_mob = grabbed_atom
grabbed_mob.Stun(mob_stun_time)
playsound(grabbed_atom, 'sound/effects/contractorbatonhit.ogg', 75, TRUE)
START_PROCESSING(SSfastprocess, src)
kinesis_icon = mutable_appearance(icon='icons/effects/effects.dmi', icon_state="kinesis", layer=grabbed_atom.layer-0.1)
@@ -143,7 +151,7 @@
if(!isliving(movable_target))
return FALSE
var/mob/living/living_target = movable_target
if(living_target.stat != DEAD)
if(living_target.stat < stat_required)
return FALSE
else if(isitem(movable_target))
var/obj/item/item_target = movable_target
@@ -251,3 +259,14 @@
given_turf = locate(mob_x+our_x-round(view[1]/2),mob_y+our_y-round(view[2]/2),mob_z)
given_x = round(icon_x - world.icon_size * our_x, 1)
given_y = round(icon_y - world.icon_size * our_y, 1)
/obj/item/mod/module/anomaly_locked/kinesis/plus
name = "MOD kinesis+ module"
desc = "A modular plug-in to the forearm, this module was recently redeveloped in secret. \
The bane of all ne'er-do-wells, the kinesis+ module is a powerful tool that allows the user \
to manipulate the world around them. Like it's older counterpart, it's capable of manipulating \
structures, machinery, vehicles, and, thanks to the fruitful efforts of it's creators - living \
beings. They can, however, still struggle after an initial burst of inertia."
complexity = 0
prebuilt = TRUE
stat_required = CONSCIOUS