mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 06:22:26 +01:00
Shredder Movement & Law Controller (#1700)
Paper shredders can now be detached from the floor with a wrench and moved about. Refactored the law process to not be a process - it didn't tick anyways.
This commit is contained in:
@@ -17,16 +17,29 @@
|
||||
)
|
||||
|
||||
/obj/machinery/papershredder/attackby(var/obj/item/W, var/mob/user)
|
||||
|
||||
if(istype(W, /obj/item/weapon/storage))
|
||||
if (istype(W, /obj/item/weapon/storage))
|
||||
empty_bin(user, W)
|
||||
return
|
||||
|
||||
else if (iswrench(W))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
anchored = !anchored
|
||||
user.visible_message(
|
||||
span("notice", anchored ? "\The [user] fastens \the [src] to \the [loc]." : "\The unfastens \the [src] from \the [loc]."),
|
||||
span("notice", anchored ? "You fasten \the [src] to \the [loc]." : "You unfasten \the [src] from \the [loc]."),
|
||||
"You hear a ratchet."
|
||||
)
|
||||
return
|
||||
|
||||
else
|
||||
var/paper_result
|
||||
for(var/shred_type in shred_amounts)
|
||||
if(istype(W, shred_type))
|
||||
paper_result = shred_amounts[shred_type]
|
||||
if(paper_result)
|
||||
if (!anchored)
|
||||
user << span("warning", "\The [src] must be anchored to the ground to operate!")
|
||||
return
|
||||
if(paperamount == max_paper)
|
||||
user << "<span class='warning'>\The [src] is full; please empty it before you continue.</span>"
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user