Files
Aurora.3/code/game/machinery/Beacon.dm
BurgerLUA 8519dcc393 .loc = to forceMove() (#4937)
As requested, this PR is changed to only include all .loc = to forceMove() changes.
2018-08-04 01:48:58 +03:00

56 lines
1.1 KiB
Plaintext

/obj/machinery/bluespace_beacon
icon = 'icons/obj/objects.dmi'
icon_state = "floor_beaconf"
name = "Bluespace Gigabeacon"
desc = "A device that draws power from bluespace and creates a permanent tracking beacon."
level = 1 // underfloor
layer = 2.5
anchored = 1
use_power = 1
idle_power_usage = 0
var/obj/item/device/radio/beacon/Beacon
New()
..()
var/turf/T = loc
Beacon = new /obj/item/device/radio/beacon
Beacon.invisibility = INVISIBILITY_MAXIMUM
Beacon.forceMove(T)
hide(!T.is_plating())
Destroy()
if(Beacon)
qdel(Beacon)
return ..()
// update the invisibility and icon
hide(var/intact)
invisibility = intact ? 101 : 0
updateicon()
// update the icon_state
proc/updateicon()
var/state="floor_beacon"
if(invisibility)
icon_state = "[state]f"
else
icon_state = "[state]"
process()
if(!Beacon)
var/turf/T = loc
Beacon = new /obj/item/device/radio/beacon
Beacon.invisibility = INVISIBILITY_MAXIMUM
Beacon.forceMove(T)
if(Beacon)
if(Beacon.loc != loc)
Beacon.forceMove(loc)
updateicon()