Dramatically Cuts Object Processing Down (#13564)

This commit is contained in:
Fox McCloud
2020-06-07 17:32:25 -04:00
committed by GitHub
parent f4a0790514
commit 40968ce907
6 changed files with 62 additions and 48 deletions
+15 -8
View File
@@ -35,10 +35,12 @@
..()
create_reagents(maximum_fuel)
reagents.add_reagent("fuel", maximum_fuel)
if(refills_over_time)
reagents.reagents_generated_per_cycle += list("fuel" = 1)
update_icon()
/obj/item/weldingtool/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/weldingtool/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0)
@@ -49,11 +51,15 @@
return FIRELOSS
/obj/item/weldingtool/process()
var/turf/T = get_turf(src)
if(T) // Implants for instance won't find a turf
T.hotspot_expose(2500, 5)
if(prob(5))
remove_fuel(1)
if(tool_enabled)
var/turf/T = get_turf(src)
if(T) // Implants for instance won't find a turf
T.hotspot_expose(2500, 5)
if(prob(5))
remove_fuel(1)
if(refills_over_time)
if(GET_FUEL < maximum_fuel)
reagents.add_reagent("fuel", 1)
..()
/obj/item/weldingtool/attack_self(mob/user)
@@ -77,7 +83,8 @@
playsound(loc, activation_sound, 50, 1)
set_light(light_intensity)
else
STOP_PROCESSING(SSobj, src)
if(!refills_over_time)
STOP_PROCESSING(SSobj, src)
damtype = BRUTE
force = 3
hitsound = "swing_hit"