more tweaks and fixes

Signed-off-by: caelaislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
caelaislinn
2012-06-25 08:50:03 +10:00
parent 40c17c5afb
commit beb863020b

View File

@@ -38,7 +38,9 @@
/obj/item/weapon/anodevice/proc/interact(var/mob/user)
user.machine = src
var/dat = "<b>Anomalous Materials Energy Utiliser</b><br>"
if(cooldown)
if(activated)
dat += "Device active, stand by.<BR>"
else if(cooldown)
dat += "Cooldown in progress, please wait.<BR>"
else
if(!inserted_battery)
@@ -86,16 +88,16 @@
/obj/item/weapon/anodevice/proc/pulse()
if(activated)
time -= 10
stored_charge -= 10 + rand(-1,1)
cooldown += 10
if(time <= 0)
if(time <= 0 || !inserted_battery)
time = 0
activated = 0
var/turf/T = get_turf(src)
T.visible_message("\icon[src]\blue The utiliser device buzzes.", "\icon[src]\blue You hear something buzz.")
else
inserted_battery.battery_effect.DoEffect(src)
time -= 10
inserted_battery.stored_charge -= 10 + rand(-1,1)
cooldown += 10
else if(cooldown > 0)
cooldown -= 10
if(cooldown <= 0)