Skip to content

Commit

Permalink
Doppler Array Sprites
Browse files Browse the repository at this point in the history
Adds sprites for the tachyon-doppler array machine, makes some minor changes to allow it to be rotated manually and wrenched.

In addition, I missed a few stray pixels in blood.dmi during my whitespace cleanup.
  • Loading branch information
Cheridan committed Aug 3, 2013
1 parent 5968200 commit 88f2d2d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions code/game/machinery/doppler_array.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ var/list/doppler_arrays = list()
/obj/machinery/doppler_array
name = "tachyon-doppler array"
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."
icon = 'icons/obj/machines/research.dmi'
icon_state = "tdoppler"
density = 1
anchored = 1


/obj/machinery/doppler_array/New()
Expand All @@ -14,6 +18,25 @@ var/list/doppler_arrays = list()
/obj/machinery/doppler_array/process()
return PROCESS_KILL

/obj/machinery/doppler_array/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
anchored = !anchored
power_change()
user << "You [anchored ? "wrench" : "unwrench"] [src]."

/obj/machinery/doppler_array/verb/rotate()
set name = "Rotate Tachyon-doppler Dish"
set category = "Object"
set src in oview(1)

if(!usr || !isturf(usr.loc))
return
if(usr.stat || usr.restrained())
return
src.dir = turn(src.dir, 90)
return

/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
Expand All @@ -35,7 +58,7 @@ var/list/doppler_arrays = list()
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."
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='game say'><span class='name'>[src]</span> states coldly, \"[message]\"",2)
Expand All @@ -45,7 +68,7 @@ var/list/doppler_arrays = list()
if(stat & BROKEN)
icon_state = "[initial(icon_state)]-broken"
else
if( powered() )
if(powered() && anchored)
icon_state = initial(icon_state)
stat &= ~NOPOWER
else
Expand Down
Binary file modified icons/effects/blood.dmi
Binary file not shown.
Binary file modified icons/obj/machines/research.dmi
Binary file not shown.

0 comments on commit 88f2d2d

Please sign in to comment.