diff --git a/baystation12.dme b/baystation12.dme index 9d9778868d9..236a89704bd 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -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" diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm new file mode 100644 index 00000000000..de9d7d832db --- /dev/null +++ b/code/game/machinery/holosign.dm @@ -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 \ No newline at end of file diff --git a/icons/obj/holosign.dmi b/icons/obj/holosign.dmi new file mode 100644 index 00000000000..16236419a38 Binary files /dev/null and b/icons/obj/holosign.dmi differ