Files
Bubberstation/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm
T
Ryll Ryll f55aafcc68 Adds the Marksman Revolver from Ultrakill, with coinflipping and splitshotting! (#70612)
## About The Pull Request
Ultrakill is a neat game that I like, and I like to add fun things from
things I like. This PR adds the marksman revolver as an admin-only
weapon, complete with coin flipping and splitshotting mechanics! [Have a
video demonstration!](https://streamable.com/5x4mnj)

Basically, right clicking on a visible tile flips a coin towards a
random adjacent tile to the one you targeted. Shooting the coin
projectile with the hitscan primary fire while it's within one tile of
the target will trigger a splitshot. Those two child splitshots will
roughly follow the priority order of Ultrakill (prioritizing coins [for
even more splits!], then nearby mobs, then less nearby mobs, then other
random stuff nearby). I plan to add other stuff for the shots to
prioritize like fuel tanks, windows, and others.

I'm still working out some of the finer details of balance and more
closely matching how it works to UK (while still working in the realm of
SS13), and of course I hope to get unique sprites/sounds/whatever.

<img src='https://imgur.com/XUTqksD.png'>

## Why It's Good For The Game
Adds more funny/unique things for admins to spawn in.

## Changelog

🆑 Ryll/Shaps
add: Added the Marksman Revolver, for admins to spawn.
/🆑
2022-11-21 23:21:18 -08:00

85 lines
2.6 KiB
Plaintext

/proc/generate_tracer_between_points(datum/point/starting, datum/point/ending, beam_type, color, qdel_in = 5, light_range = 2, light_color_override, light_intensity = 1, instance_key) //Do not pass z-crossing points as that will not be properly (and likely will never be properly until it's absolutely needed) supported!
if(!istype(starting) || !istype(ending) || !ispath(beam_type))
return
var/datum/point/midpoint = point_midpoint_points(starting, ending)
var/obj/effect/projectile/tracer/PB = new beam_type
if(isnull(light_color_override))
light_color_override = color
PB.apply_vars(angle_between_points(starting, ending), midpoint.return_px(), midpoint.return_py(), color, pixel_length_between_points(starting, ending) / world.icon_size, midpoint.return_turf(), 0)
. = PB
if(light_range > 0 && light_intensity > 0)
var/list/turf/line = get_line(starting.return_turf(), ending.return_turf())
tracing_line:
for(var/i in line)
var/turf/T = i
for(var/obj/effect/projectile_lighting/PL in T)
if(PL.owner == instance_key)
continue tracing_line
QDEL_IN(new /obj/effect/projectile_lighting(T, light_color_override, light_range, light_intensity, instance_key), qdel_in > 0? qdel_in : 5)
line = null
if(qdel_in)
QDEL_IN(PB, qdel_in)
/obj/effect/projectile/tracer
name = "beam"
icon = 'icons/obj/weapons/guns/projectiles_tracer.dmi'
/obj/effect/projectile/tracer/laser
name = "laser"
icon_state = "beam"
/obj/effect/projectile/tracer/laser/blue
icon_state = "beam_blue"
/obj/effect/projectile/tracer/disabler
name = "disabler"
icon_state = "beam_omni"
/obj/effect/projectile/tracer/xray
name = "\improper X-ray laser"
icon_state = "xray"
/obj/effect/projectile/tracer/pulse
name = "pulse laser"
icon_state = "u_laser"
/obj/effect/projectile/tracer/plasma_cutter
name = "plasma blast"
icon_state = "plasmacutter"
/obj/effect/projectile/tracer/stun
name = "stun beam"
icon_state = "stun"
/obj/effect/projectile/tracer/heavy_laser
name = "heavy laser"
icon_state = "beam_heavy"
/obj/effect/projectile/tracer/solar
name = "solar beam"
icon_state = "solar"
/obj/effect/projectile/tracer/solar/thin
icon_state = "solar_thin"
/obj/effect/projectile/tracer/solar/thinnest
icon_state = "solar_thinnest"
//BEAM RIFLE
/obj/effect/projectile/tracer/tracer/beam_rifle
icon_state = "tracer_beam"
/obj/effect/projectile/tracer/tracer/aiming
icon_state = "pixelbeam_greyscale"
plane = ABOVE_LIGHTING_PLANE
/obj/effect/projectile/tracer/wormhole
icon_state = "wormhole_g"
/obj/effect/projectile/tracer/laser/emitter
name = "emitter beam"
icon_state = "emitter"
/obj/effect/projectile/tracer/sniper
icon_state = "sniper"