Adds Photocopier Cooldown when emagged

This commit is contained in:
TullyBurnalot
2016-07-13 04:25:58 +01:00
parent 25f1b9cd6b
commit ed1e6b1305

View File

@@ -1,3 +1,5 @@
#define EMAG_DELAY 50
/obj/machinery/photocopier
name = "photocopier"
icon = 'icons/obj/library.dmi'
@@ -9,6 +11,7 @@
idle_power_usage = 30
active_power_usage = 200
power_channel = EQUIP
var/emag_cooldown
atom_say_verb = "bleeps"
var/obj/item/copyitem = null //what's in the copier!
var/copies = 1 //how many copies to print!
@@ -51,6 +54,9 @@
if(toner <= 0)
break
if(emag_cooldown > world.time)
return
if(istype(copyitem, /obj/item/weapon/paper))
copy(copyitem)
sleep(15)
@@ -237,9 +243,11 @@
G.take_damage(0, 30)
spawn(20)
H.emote("scream")
emag_cooldown = world.time + EMAG_DELAY
else
to_chat(ass, "<span class='notice'>Something smells toasty...</span>")
ass.apply_damage(30, BURN)
emag_cooldown = world.time + EMAG_DELAY
if(ishuman(ass)) //Suit checks are in check_ass
var/mob/living/carbon/human/H = ass
temp_img = icon('icons/obj/butts.dmi', H.species.butt_sprite)
@@ -334,3 +342,5 @@
name = "toner cartridge"
icon_state = "tonercartridge"
var/toner_amount = 30
#undef EMAG_DELAY