Fixes RND

This commit is contained in:
kevinz000
2017-12-22 00:58:46 -08:00
parent a990811cee
commit a82d0e13ce
20 changed files with 556 additions and 374 deletions
+14 -15
View File
@@ -1,5 +1,4 @@
//All devices that link into the R&D console fall into thise type for easy identification and some shared procs.
@@ -11,12 +10,14 @@
use_power = IDLE_POWER_USE
var/busy = FALSE
var/hacked = FALSE
var/console_link = TRUE //allow console link.
var/requires_console = TRUE
var/disabled = FALSE
var/shocked = FALSE
var/obj/machinery/computer/rdconsole/linked_console
var/obj/item/loaded_item = null //the item loaded inside the machine (currently only used by experimentor and destructive analyzer)
var/allowed_department_flags = ALL
/obj/machinery/rnd/proc/reset_busy()
busy = FALSE
@@ -79,28 +80,26 @@
/obj/machinery/rnd/proc/is_insertion_ready(mob/user)
if(panel_open)
to_chat(user, "<span class='warning'>You can't load [src] while it's opened!</span>")
return
if (disabled)
return
if (!linked_console) // Try to auto-connect to new RnD consoles nearby.
if(!linked_console)
to_chat(user, "<span class='warning'>[src] must be linked to an R&D console first!</span>")
return
if (busy)
return FALSE
if(disabled)
return FALSE
if(requires_console && !linked_console)
to_chat(user, "<span class='warning'>[src] must be linked to an R&D console first!</span>")
return FALSE
if(busy)
to_chat(user, "<span class='warning'>[src] is busy right now.</span>")
return
return FALSE
if(stat & BROKEN)
to_chat(user, "<span class='warning'>[src] is broken.</span>")
return
return FALSE
if(stat & NOPOWER)
to_chat(user, "<span class='warning'>[src] has no power.</span>")
return
return FALSE
if(loaded_item)
to_chat(user, "<span class='warning'>[src] is already loaded.</span>")
return
return FALSE
return TRUE
//we eject the loaded item when deconstructing the machine
/obj/machinery/rnd/on_deconstruction()
if(loaded_item)