mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
add global cap on printing papers
This commit is contained in:
@@ -78,4 +78,9 @@ GLOBAL_VAR_INIT(timezoneOffset, 0) // The difference betwen midnight (of the hos
|
||||
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
|
||||
var/fileaccess_timer = 0
|
||||
|
||||
GLOBAL_VAR_INIT(gametime_offset, 432000) // 12:00 in seconds
|
||||
GLOBAL_VAR_INIT(gametime_offset, 432000) // 12:00 in seconds
|
||||
|
||||
//printers shutdown if too much shit printed
|
||||
var/items_printed = 0
|
||||
var/max_items_printed = 300
|
||||
var/items_printed_logged = FALSE
|
||||
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user