even-still-though-time-itself-be-shattered

This commit is contained in:
Fox McCloud
2019-09-16 01:35:25 -04:00
parent 788f1926fb
commit d015c0c2b2
52 changed files with 369 additions and 298 deletions
+8 -2
View File
@@ -50,6 +50,7 @@
resistance_flags = FIRE_PROOF
req_access = list(access_engine_equip)
siemens_strength = 1
damage_deflection = 10
var/area/area
var/areastring = null
var/obj/item/stock_parts/cell/cell
@@ -655,6 +656,11 @@
"<span class='warning'>You hit the [src.name] with your [W.name]!</span>", \
"You hear a bang.")
/obj/machinery/power/apc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if((!(stat & BROKEN) || malfai))
return 0
. = ..()
/obj/machinery/power/apc/emag_act(user as mob)
if(!(emagged || malfhack)) // trying to unlock with an emag card
if(opened)
@@ -1355,12 +1361,12 @@
spawn(0)
for(var/obj/machinery/light/L in area)
if(prob(chance))
L.broken(0, 1)
L.break_light_tube(0, 1)
stoplag()
/obj/machinery/power/apc/proc/null_charge()
for(var/obj/machinery/light/L in area)
L.broken(0, 1)
L.break_light_tube(0, 1)
stoplag()
/obj/machinery/power/apc/proc/setsubsystem(val)
+16 -10
View File
@@ -200,12 +200,12 @@
if("tube")
brightness_range = 8
if(prob(2))
broken(1)
break_light_tube(1)
if("bulb")
brightness_range = 4
brightness_color = "#a0a080"
if(prob(5))
broken(1)
break_light_tube()
spawn(1)
update(0)
@@ -354,7 +354,7 @@
if(on && (W.flags & CONDUCT))
if(prob(12))
electrocute_mob(user, get_area(src), src, 0.3, TRUE)
broken()
break_light_tube()
else
user.visible_message("<span class='danger'>[user.name] hits the light.</span>")
@@ -390,6 +390,12 @@
electrocute_mob(user, get_area(src), src, rand(0.7, 1), TRUE)
/obj/machinery/light/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
. = ..()
if(. && !QDELETED(src))
if(prob(damage_amount * 5))
break_light_tube()
// returns whether this light has power
// true if area has power and lightswitch is on
/obj/machinery/light/proc/has_power()
@@ -423,7 +429,7 @@
else if(status == LIGHT_OK||status == LIGHT_BURNED)
user.do_attack_animation(src)
visible_message("<span class='danger'>[user.name] smashed the light!</span>", "You hear a tinkle of breaking glass")
broken()
break_light_tube()
return
/obj/machinery/light/attack_animal(mob/living/simple_animal/M)
@@ -434,7 +440,7 @@
else if(status == LIGHT_OK||status == LIGHT_BURNED)
M.do_attack_animation(src)
visible_message("<span class='danger'>[M.name] smashed the light!</span>", "You hear a tinkle of breaking glass")
broken()
break_light_tube()
return
// attack with hand - remove tube/bulb
// if hands aren't protected and the light is on, burn the player
@@ -529,7 +535,7 @@
status = LIGHT_EMPTY
update()
/obj/machinery/light/proc/broken(skip_sound_and_sparks = 0, overloaded = 0)
/obj/machinery/light/proc/break_light_tube(skip_sound_and_sparks = 0, overloaded = 0)
if(status == LIGHT_EMPTY || status == LIGHT_BROKEN)
return
@@ -562,9 +568,9 @@
qdel(src)
return
if(2.0)
broken()
break_light_tube()
if(3.0)
broken()
break_light_tube()
return
//blob effect
@@ -588,14 +594,14 @@
/obj/machinery/light/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
if(prob(max(0, exposed_temperature - 673))) //0% at <400C, 100% at >500C
broken()
break_light_tube()
// explode the light
/obj/machinery/light/proc/explode()
var/turf/T = get_turf(src.loc)
spawn(0)
broken() // break it first to give a warning
break_light_tube() // break it first to give a warning
sleep(2)
explosion(T, 0, 0, 2, 2)
sleep(1)