mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
[MIRROR] makes beams better (plus small kinesis tweaks) [MDB IGNORE] (#18041)
* makes beams better (plus small kinesis tweaks) * meat hook Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com> Co-authored-by: tastyfish <crazychris32@gmail.com>
This commit is contained in:
co-authored by
Fikou
tastyfish
parent
f3f929c9ec
commit
632e356f81
@@ -66,8 +66,9 @@
|
||||
var/mob/living/grabbed_mob = grabbed_atom
|
||||
grabbed_mob.Stun(mob_stun_time)
|
||||
playsound(grabbed_atom, 'sound/effects/contractorbatonhit.ogg', 75, TRUE)
|
||||
kinesis_icon = mutable_appearance(icon='icons/effects/effects.dmi', icon_state="kinesis", layer=grabbed_atom.layer-0.1)
|
||||
kinesis_icon = mutable_appearance(icon = 'icons/effects/effects.dmi', icon_state = "kinesis", layer = grabbed_atom.layer - 0.1)
|
||||
kinesis_icon.appearance_flags = RESET_ALPHA|RESET_COLOR|RESET_TRANSFORM
|
||||
kinesis_icon.overlays += emissive_appearance(icon = 'icons/effects/effects.dmi', icon_state = "kinesis", offset_spokesman = grabbed_atom)
|
||||
grabbed_atom.add_overlay(kinesis_icon)
|
||||
kinesis_beam = mod.wearer.Beam(grabbed_atom, "kinesis")
|
||||
kinesis_catcher = mod.wearer.overlay_fullscreen("kinesis", /atom/movable/screen/fullscreen/kinesis, 0)
|
||||
@@ -93,13 +94,12 @@
|
||||
balloon_alert(mod.wearer, "out of range!")
|
||||
clear_grab()
|
||||
return
|
||||
kinesis_catcher.calculate_params()
|
||||
if(!kinesis_catcher.given_turf)
|
||||
clear_grab()
|
||||
return
|
||||
drain_power(use_power_cost/10)
|
||||
if(kinesis_catcher.mouse_params)
|
||||
kinesis_catcher.calculate_params()
|
||||
if(!kinesis_catcher.given_turf)
|
||||
return
|
||||
mod.wearer.setDir(get_dir(mod.wearer, grabbed_atom))
|
||||
grabbed_atom.set_glide_size()
|
||||
if(grabbed_atom.loc == kinesis_catcher.given_turf)
|
||||
if(grabbed_atom.pixel_x == kinesis_catcher.given_x - world.icon_size/2 && grabbed_atom.pixel_y == kinesis_catcher.given_y - world.icon_size/2)
|
||||
return //spare us redrawing if we are standing still
|
||||
@@ -109,7 +109,7 @@
|
||||
animate(grabbed_atom, 0.2 SECONDS, pixel_x = grabbed_atom.base_pixel_x + kinesis_catcher.given_x - world.icon_size/2, pixel_y = grabbed_atom.base_pixel_y + kinesis_catcher.given_y - world.icon_size/2)
|
||||
kinesis_beam.redrawing()
|
||||
var/turf/next_turf = get_step_towards(grabbed_atom, kinesis_catcher.given_turf)
|
||||
if(grabbed_atom.Move(next_turf))
|
||||
if(grabbed_atom.Move(next_turf, get_dir(grabbed_atom, next_turf), 8))
|
||||
if(isitem(grabbed_atom) && (mod.wearer in next_turf))
|
||||
var/obj/item/grabbed_item = grabbed_atom
|
||||
clear_grab()
|
||||
@@ -263,8 +263,8 @@
|
||||
|
||||
/atom/movable/screen/fullscreen/kinesis/proc/calculate_params()
|
||||
var/list/modifiers = params2list(mouse_params)
|
||||
var/icon_x = text2num(LAZYACCESS(modifiers, VIS_X)) || view_list[1]*world.icon_size/2
|
||||
var/icon_y = text2num(LAZYACCESS(modifiers, VIS_Y)) || view_list[2]*world.icon_size/2
|
||||
var/icon_x = text2num(LAZYACCESS(modifiers, VIS_X))
|
||||
var/icon_y = text2num(LAZYACCESS(modifiers, VIS_Y))
|
||||
var/our_x = round(icon_x / world.icon_size)
|
||||
var/our_y = round(icon_y / world.icon_size)
|
||||
given_turf = locate(kinesis_user.x+our_x-round(view_list[1]/2),kinesis_user.y+our_y-round(view_list[2]/2),kinesis_user.z)
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
/obj/projectile/tether/fire(setAngle)
|
||||
if(firer)
|
||||
line = firer.Beam(src, "line", 'icons/obj/clothing/modsuit/mod_modules.dmi')
|
||||
line = firer.Beam(src, "line", 'icons/obj/clothing/modsuit/mod_modules.dmi', emissive = FALSE)
|
||||
..()
|
||||
|
||||
/obj/projectile/tether/on_hit(atom/target)
|
||||
|
||||
Reference in New Issue
Block a user