Added holosigns, specifically surgery one.

Pretty much a floating sign, toggled by a switch.
This commit is contained in:
Chinsky
2013-01-03 08:21:10 +04:00
parent 88baf11731
commit 16e6e64560
3 changed files with 79 additions and 0 deletions
+1
View File
@@ -317,6 +317,7 @@
#include "code\game\machinery\spaceheater.dm"
#include "code\game\machinery\status_display.dm"
#include "code\game\machinery\suit_storage_unit.dm"
#include "code\game\machinery\holosign.dm"
#include "code\game\machinery\syndicatebeacon.dm"
#include "code\game\machinery\teleporter.dm"
#include "code\game\machinery\transformer.dm"
+78
View File
@@ -0,0 +1,78 @@
////////////////////HOLOSIGN///////////////////////////////////////
/obj/machinery/holosign
name = "holosign"
desc = "Small wall-mounted holographic projector"
icon = 'holosign.dmi'
icon_state = "sign_off"
layer = 4
var/lit = 0
var/id = null
var/on_icon = "sign_on"
proc/toggle()
if (stat & (BROKEN|NOPOWER))
return
lit = !lit
update_icon()
update_icon()
if (!lit)
icon_state = "sign_off"
else
icon_state = on_icon
power_change()
if (stat & NOPOWER)
lit = 0
update_icon()
/obj/machinery/holosign/surgery
name = "surgery holosign"
desc = "Small wall-mounted holographic projector. This one reads SURGERY."
on_icon = "surgery"
////////////////////SWITCH///////////////////////////////////////
/obj/machinery/holosign_switch
name = "holosign switch"
icon = 'icons/obj/power.dmi'
icon_state = "light1"
desc = "A remote control switch for holosign."
var/id = null
var/active = 0
anchored = 1.0
use_power = 1
idle_power_usage = 2
active_power_usage = 4
/obj/machinery/holosign_switch/attack_ai(mob/user as mob)
return src.attack_hand(user)
/
obj/machinery/holosign_switch/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/holosign_switch/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/device/detective_scanner))
return
return src.attack_hand(user)
/obj/machinery/holosign_switch/attack_hand(mob/user as mob)
src.add_fingerprint(usr)
if(stat & (NOPOWER|BROKEN))
return
add_fingerprint(user)
use_power(5)
active = !active
if(active)
icon_state = "light1"
else
icon_state = "light0"
for(var/obj/machinery/holosign/M in world)
if (M.id == src.id)
spawn( 0 )
M.toggle()
return
return
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB