mirror of
https://github.com/Yawn-Wider/YWPolarisVore.git
synced 2026-08-23 21:17:20 +01:00
* Update settings * Whitespace changes * Comment out merger hooks in gitattributes Corrupt maps would have to be resolved in repo before hooks could be updated * Revert "Whitespace changes" This reverts commit afbdd1d8442973f5d570c30920d9d865b5acd479. * Whitespace again minus example * Gitignore example changelog * Restore changelog merge setting * Keep older dmi hook attribute until hooks can be updated * update vscode settings too * Renormalize remaining * Revert "Gitignore example changelog" This reverts commit de22ad375d3ee4d5930c550da2fd23a29a86e616. * Attempt to normalize example.yml (and another file I guess) * Try again
52 lines
1.6 KiB
Plaintext
52 lines
1.6 KiB
Plaintext
var/list/doppler_arrays = list()
|
|
|
|
/obj/machinery/doppler_array
|
|
anchored = TRUE
|
|
name = "tachyon-doppler array"
|
|
density = TRUE
|
|
desc = "A highly precise directional sensor array which measures the release of quants from decaying tachyons. The doppler shifting of the mirror-image formed by these quants can reveal the size, location and temporal affects of energetic disturbances within a large radius ahead of the array."
|
|
dir = NORTH
|
|
|
|
icon_state = "doppler"
|
|
|
|
/obj/machinery/doppler_array/New()
|
|
..()
|
|
doppler_arrays += src
|
|
|
|
/obj/machinery/doppler_array/Destroy()
|
|
doppler_arrays -= src
|
|
..()
|
|
|
|
/obj/machinery/doppler_array/proc/sense_explosion(var/x0,var/y0,var/z0,var/devastation_range,var/heavy_impact_range,var/light_impact_range,var/took)
|
|
if(stat & NOPOWER) return
|
|
if(z != z0) return
|
|
|
|
var/dx = abs(x0-x)
|
|
var/dy = abs(y0-y)
|
|
var/distance
|
|
var/direct
|
|
|
|
if(dx > dy)
|
|
distance = dx
|
|
if(x0 > x) direct = EAST
|
|
else direct = WEST
|
|
else
|
|
distance = dy
|
|
if(y0 > y) direct = NORTH
|
|
else direct = SOUTH
|
|
|
|
if(distance > 100) return
|
|
if(!(direct & dir)) return
|
|
|
|
var/message = "Explosive disturbance detected - Epicenter at: grid ([x0],[y0]). Epicenter radius: [devastation_range]. Outer radius: [heavy_impact_range]. Shockwave radius: [light_impact_range]. Temporal displacement of tachyons: [took]seconds."
|
|
|
|
for(var/mob/O in hearers(src, null))
|
|
O.show_message("<span class='npcsay'><span class='name'>[src]</span> states coldly, \"[message]\"</span>",2)
|
|
|
|
/obj/machinery/doppler_array/power_change()
|
|
..()
|
|
if(!(stat & NOPOWER))
|
|
icon_state = initial(icon_state)
|
|
else
|
|
icon_state = "[initial(icon_state)]_off"
|