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:
Lohikar
2017-02-04 00:15:49 +02:00
committed by skull132
parent 2c280c8341
commit 6a1fecbd2a
6 changed files with 47 additions and 33 deletions
+15 -2
View File
@@ -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