add global cap on printing papers

This commit is contained in:
datlo
2018-12-14 02:41:52 +00:00
parent 207a4527fa
commit 1a7aaab0ff
2 changed files with 17 additions and 2 deletions
+11 -1
View File
@@ -62,6 +62,16 @@
if(toner <= 0)
break
if(items_printed >= max_items_printed)
if(prob(10))
visible_message("<span class='warning'>The printer screen reads \"!Attención! La máquina se encontra parada! Retire pantalones de lo toner!\".</span>")
else
visible_message("<span class='warning'>The printer screen reads \"PHOTOCOPIER NETWORK OFFLINE, PLEASE CONTACT SYSTEM ADMINISTRATOR\".</span>")
if(!items_printed_logged)
log_admin("Photocopier cap of [max_items_printed] papers reached, all photocopiers are now disabled. This may be the cause of any lag.")
items_printed_logged = TRUE
break
if(emag_cooldown > world.time)
return
@@ -86,7 +96,7 @@
else
to_chat(usr, "<span class='warning'>\The [copyitem] can't be copied by \the [src].</span>")
break
items_printed++
use_power(active_power_usage)
updateUsrDialog()
else if(href_list["remove"])