TG: Tonnes of stuff, please check the changelog.

In short: massive updates to security, the library, hydroponics, the kitchen and
the bar, by Flazeo and Ikarrus
Massive updates to the PA, with Invisty's new sprites, done by Sieve
New sprites for field gens too, also by Invisty
Borg and battery updates by Sieve
Fake gloves by Sieve
I messed around with some pressure_resistance stuff on Dumpdavidson's suggestion
(only in paperwork)

PROBABLY A BUNCH OF OTHER SHIT
Revision: r3505
Author: 	 petethegoat
This commit is contained in:
Erthilo
2012-05-06 18:26:41 +01:00
parent 7685e6bef9
commit f2777aa65f
39 changed files with 776 additions and 165 deletions

View File

@@ -1,8 +1,9 @@
/obj/machinery/particle_accelerator/control_box
name = "Particle Accelerator Control Box"
desc = "Part of a Particle Accelerator."
name = "Particle Accelerator Control Computer"
desc = "This controls the density of the particles."
icon = 'particle_accelerator.dmi'
icon_state = "control_box"
reference = "control_box"
anchored = 0
density = 1
use_power = 0
@@ -13,7 +14,7 @@
var
list/obj/structure/particle_accelerator/connected_parts
assembled = 0
strength = 0
parts = null
New()
@@ -40,6 +41,28 @@
return
update_icon()
if(active)
icon_state = "[reference]p1"
else
if(use_power)
icon_state = "[reference]p"
else
icon_state = "[reference]c"
switch(construction_state)
if(0)
icon_state = "[reference]"
if(1)
icon_state = "[reference]"
if(2)
icon_state = "[reference]w"
if(3)
icon_state = "[reference]c"
return
update_icon()
..()
return
Topic(href, href_list)
..()
@@ -61,17 +84,30 @@
src.part_scan()
if(href_list["strengthup"])
src.strength++
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength++
part.update_icon()
if(src.strength > 2)
src.strength = 2
message_admins("[usr] increased particle accelerator power to [strength].")
log_admin("[usr] increased particle accelerator power to [strength].")
message_admins("[usr] increased particle accelerator power to [strength].")
log_admin("[usr] increased particle accelerator power to [strength].")
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength = 2
part.update_icon()
if(href_list["strengthdown"])
src.strength--
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength--
part.update_icon()
if(src.strength < 0)
src.strength = 0
message_admins("[usr] decreased particle accelerator power to [strength].")
log_admin("[usr] decreased particle accelerator power to [strength].")
message_admins("[usr] decreased particle accelerator power to [strength].")
log_admin("[usr] decreased particle accelerator power to [strength].")
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength = 0
part.update_icon()
src.updateDialog()
src.update_icon()
return
@@ -80,7 +116,7 @@
if(stat & NOPOWER)
active = 0
use_power = 0
else if(!stat)
else if(!stat && construction_state == 3)
use_power = 1
return
@@ -150,8 +186,16 @@
src.active = !src.active
if(src.active)
src.use_power = 2
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength = src.strength
part.powered = 1
part.update_icon()
else
src.use_power = 1
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength = null
part.powered = 0
part.update_icon()
return 1