TG: Emitters emp_act now uses severity properly.

The PA can no longer be remotely controlled by humans and cyborgs can only
control it if they are nearby.
The spawn PA can now be taken apart.
FireAx/Extinguisher closets got their own files.
Food closets are now with their defines.
Freezer closet/crates override return_air() to cooldown the contents.
The var isinfreezer has been eliminated.
The old player panel has been readded as an alt for the new one, it may be found
under the Player Panel verb.
The new player panel may be accessed by the Player Panel-New verb.
Crates.dm moved from the storage folder as it is not a storage object.
Fixed  Issue 227  about the PA shooting when it should not be. r2851
This commit is contained in:
Ren Erthilo
2012-03-26 18:45:48 +01:00
parent ab9f1cc121
commit f7e8bcd591
10 changed files with 151 additions and 428 deletions

View File

@@ -62,9 +62,9 @@
return 1
emp_act()//Emitters are hardened but still might have issues
emp_act(var/severity)//Emitters are hardened but still might have issues
use_power(50)
if(prob(1)&&prob(1))
if((severity == 1)&&prob(1)&&prob(1))
if(src.active)
src.active = 0
src.use_power = 1

View File

@@ -67,7 +67,7 @@ PE|PE|PE
examine()
set src in usr
set src in oview(1)
switch(src.construction_state)
if(0)
src.desc = text("Part of a Particle Accelerator, looks like its not attached to the flooring")
@@ -161,9 +161,9 @@ PE|PE|PE
if(temp_state == src.construction_state)//Nothing changed
return 0
else
if(src.construction_state >= 3)//Was taken apart, update state
update_state()
src.construction_state = temp_state
if(src.construction_state < 3)//Was taken apart, update state
update_state()
update_icon()
return 1
return 0
@@ -266,7 +266,7 @@ PE|PE|PE
if(temp_state == src.construction_state)//Nothing changed
return 0
else
if(src.construction_state >= 3)//Was taken apart, update state
if(src.construction_state < 3)//Was taken apart, update state
update_state()
if(use_power)
use_power = 0

View File

@@ -34,12 +34,21 @@
connected_parts = list()
return
if(!part_scan())
assembled = 0
use_power = 1
active = 0
connected_parts = list()
return
Topic(href, href_list)
..()
//Ignore input if we are broken, !silicon guy cant touch us, or nonai controlling from super far away
if(stat & (BROKEN|NOPOWER) || (get_dist(src, usr) > 1 && !istype(usr, /mob/living/silicon)) || (get_dist(src, usr) > 8 && !istype(usr, /mob/living/silicon/ai)))
usr.machine = null
usr << browse(null, "window=pacontrol")
return
if( href_list["close"] )
usr << browse(null, "window=pacontrol")
usr.machine = null
@@ -63,6 +72,7 @@
message_admins("[usr] decreased particle accelerator power to [strength].")
log_admin("[usr] decreased particle accelerator power to [strength].")
src.updateDialog()
return
power_change()
@@ -74,6 +84,7 @@
use_power = 1
return
process()
if(src.active)
for(var/obj/structure/particle_accelerator/particle_emitter/PE in connected_parts)
@@ -145,8 +156,8 @@
interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
if(!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=pacontrol")
return
@@ -172,3 +183,4 @@
user << browse(dat, "window=pacontrol;size=420x500")
onclose(user, "pacontrol")
return