This commit is contained in:
SoundScopes
2014-12-12 13:50:52 +00:00
parent 0ddadf1a0d
commit c37679121e
3 changed files with 24 additions and 13 deletions
@@ -138,29 +138,33 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
/obj/structure/particle_accelerator/ex_act(severity)
switch(severity)
if(1.0)
del(src)
Del(src)
return
if(2.0)
if (prob(50))
del(src)
Del(src)
return
if(3.0)
if (prob(25))
del(src)
Del(src)
return
else
return
/obj/structure/particle_accelerator/Del()
if(master && master.connected_parts)
master.connected_parts.Remove(src)
..()
/obj/structure/particle_accelerator/blob_act()
if(prob(50))
del(src)
Del(src)
return
/obj/structure/particle_accelerator/meteorhit()
if(prob(50))
del(src)
Del(src)
return
/obj/structure/particle_accelerator/update_icon()
@@ -202,7 +206,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
return 1
return 0
/obj/structure/particle_accelerator/proc/process_tool_hit(var/obj/O, var/mob/user)
if(!(O) || !(user))
return 0
@@ -325,15 +328,15 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
/obj/machinery/particle_accelerator/ex_act(severity)
switch(severity)
if(1.0)
del(src)
Del(src)
return
if(2.0)
if (prob(50))
del(src)
Del(src)
return
if(3.0)
if (prob(25))
del(src)
Del(src)
return
else
return
@@ -341,13 +344,13 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
/obj/machinery/particle_accelerator/blob_act()
if(prob(50))
del(src)
Del(src)
return
/obj/machinery/particle_accelerator/meteorhit()
if(prob(50))
del(src)
Del(src)
return
@@ -23,6 +23,10 @@
active_power_usage = initial(active_power_usage) * (strength + 1)
..()
/obj/machinery/particle_accelerator/control_box/Del()
if(src.active)
src.toggle_power()
..()
/obj/machinery/particle_accelerator/control_box/attack_hand(mob/user as mob)
if(construction_state >= 3)
@@ -100,7 +104,7 @@
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength = strength
part.update_icon()
if (strength != old_strength)
active_power_usage = initial(active_power_usage) * (strength + 1)
use_power(0) //update power usage
@@ -118,7 +122,7 @@
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength = strength
part.update_icon()
if (strength != old_strength)
active_power_usage = initial(active_power_usage) * (strength + 1)
use_power(0) //update power usage
@@ -130,6 +134,8 @@
/obj/machinery/particle_accelerator/control_box/power_change()
..()
if(stat & NOPOWER)
if(active)
toggle_power()
active = 0
update_use_power(0)
else if(!stat && construction_state == 3)
@@ -143,6 +149,7 @@
if( length(connected_parts) < 6 )
investigate_log("lost a connected part; It <font color='red'>powered down</font>.","singulo")
src.toggle_power()
assembled = 0
return
//emit some particles
for(var/obj/structure/particle_accelerator/particle_emitter/PE in connected_parts)