mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
Nano printers (computer component) will now refuse papers that are already written onto. (#19890)
Nano printers (computer component) will now refuse papers that are already written onto. Fixes #19889
This commit is contained in:
@@ -32,15 +32,24 @@
|
||||
return P
|
||||
|
||||
/obj/item/computer_hardware/nano_printer/attackby(obj/item/attacking_item, mob/user)
|
||||
if(istype(attacking_item, /obj/item/paper))
|
||||
if(stored_paper >= max_paper)
|
||||
to_chat(user, SPAN_WARNING("You try to add \the [attacking_item] to the [src], but its paper bin is full."))
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You insert \the [attacking_item] into [src]."))
|
||||
qdel(attacking_item)
|
||||
stored_paper++
|
||||
else
|
||||
..()
|
||||
//We only care about papers here
|
||||
if(!istype(attacking_item, /obj/item/paper))
|
||||
return ..()
|
||||
|
||||
var/obj/item/paper/attacking_paper = attacking_item
|
||||
|
||||
//If the paper is already written onto, we can't add it to the printer
|
||||
if(attacking_paper.free_space != initial(attacking_paper.free_space))
|
||||
to_chat(user, SPAN_WARNING("You try to add \the [attacking_paper] to the [src], but the paper is written onto already."))
|
||||
return
|
||||
|
||||
if(stored_paper >= max_paper)
|
||||
to_chat(user, SPAN_WARNING("You try to add \the [attacking_paper] to the [src], but its paper bin is full."))
|
||||
return
|
||||
|
||||
to_chat(user, SPAN_NOTICE("You insert \the [attacking_paper] into [src]."))
|
||||
qdel(attacking_paper)
|
||||
stored_paper++
|
||||
|
||||
/obj/item/computer_hardware/nano_printer/Destroy()
|
||||
if(parent_computer?.nano_printer == src)
|
||||
|
||||
Reference in New Issue
Block a user