Right. This includes both some updates from myself, as well as some updates to mining from errorage.

My updates: 
-Alert Computer ( as seen in CE's office and bridge) renamed to Station Alert Computer. Object path altered to reflect this change (formerly computer/atmospherics/alerts, now computer/station_alert)
-Circuit board changed to reflect above alteration. Renamed as well (also easier to figure out what it goes to with the new name)
-Alert Computer added to atmospherics. 
-Alert computer will now report on power failures on the station.
-Alert computer will now flash red (similar to atmos alert computer) when an alert is present.
-General Alert computer renamed to Atmospheric Alert Computer. Same as changes to alert computer, however there was no circuit board to fix.
-Fixed bug in which APCs were not properly clearing power alerts for the AI and alert computers.
-Fixed a bug in which atmos alert computers were not properly updating icon_state-wise on a power change (they would just vanish). This bug also affected the updated station alert computer, but as I said this has been resolved. 

I think that's it on my updates. 

Errorage's updates are to the mining station and construction area. He vanished on IRC so I can't get him to cough up more details and I need sleep, so he can comment on this if he wants.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@772 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
hunterluthi
2011-01-04 10:48:45 +00:00
parent 3524d8197c
commit 2e2959d4b4
9 changed files with 7124 additions and 7083 deletions

View File

@@ -11,6 +11,7 @@
music = null
/area/mine/lobby //DO NOT TURN THE SD_LIGHTING STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
name = "Mining station"
requires_power = 0
luminosity = 1
icon_state = "mine"
@@ -353,16 +354,16 @@
new /obj/item/stack/sheet/metal(output.loc)
del(O)
if (istype(O,/obj/item/weapon/ore/diamond))
new /obj/item/weapon/sheet/diamond(output.loc)
new /obj/item/stack/sheet/diamond(output.loc)
del(O)
if (istype(O,/obj/item/weapon/ore/plasma))
new /obj/item/weapon/sheet/plasma(output.loc)
new /obj/item/stack/sheet/plasma(output.loc)
del(O)
if (istype(O,/obj/item/weapon/ore/gold))
new /obj/item/weapon/sheet/gold(output.loc)
new /obj/item/stack/sheet/gold(output.loc)
del(O)
if (istype(O,/obj/item/weapon/ore/silver))
new /obj/item/weapon/sheet/silver(output.loc)
new /obj/item/stack/sheet/silver(output.loc)
del(O)
if (istype(O,/obj/item/weapon/ore/uranium))
new /obj/item/weapon/ore/uranium(output.loc)
@@ -413,21 +414,82 @@
new /obj/item/stack/sheet/metal(output.loc)
del(O)
if (istype(O,/obj/item/weapon/ore/diamond))
new /obj/item/weapon/sheet/diamond(output.loc)
new /obj/item/stack/sheet/diamond(output.loc)
del(O)
if (istype(O,/obj/item/weapon/ore/plasma))
new /obj/item/weapon/sheet/plasma(output.loc)
new /obj/item/stack/sheet/plasma(output.loc)
del(O)
if (istype(O,/obj/item/weapon/ore/gold))
new /obj/item/weapon/sheet/gold(output.loc)
new /obj/item/stack/sheet/gold(output.loc)
del(O)
if (istype(O,/obj/item/weapon/ore/silver))
new /obj/item/weapon/sheet/silver(output.loc)
new /obj/item/stack/sheet/silver(output.loc)
del(O)
if (istype(O,/obj/item/weapon/ore/uranium))
new /obj/item/weapon/ore/uranium(output.loc)
del(O)
/**********************Mineral processing unit**************************/
/obj/machinery/mineral/stacking_machine
name = "Stacking machine"
icon = 'stationobjs.dmi'
icon_state = "controller"
density = 1
anchored = 1.0
var/stk_types = list()
var/stk_amt = list()
var/obj/machinery/mineral/input = null
var/obj/machinery/mineral/output = null
/obj/machinery/mineral/stacking_machine/New()
..()
spawn( 5 )
src.input = locate(/obj/machinery/mineral/input, get_step(src, EAST))
src.output = locate(/obj/machinery/mineral/output, get_step(src, WEST))
processing_items.Add(src)
return
return
/*
/obj/machinery/mineral/stacking_machine/process()
if (src.output && src.input)
var/obj/item/O
O = locate(/obj/item, input.loc)
if (O.type in stk_types)
var/i
for (i = 0; i < stk_types.len; i++)
if (stk_types[i] == O.type)
stk_amt[i]++
else
stk_types += O.type
stk_amt[stk_types.len-1] = 1
if (istype(O,/obj/item/weapon/ore/iron))
new /obj/item/stack/sheet/metal(output.loc)
del(O)
if (istype(O,/obj/item/weapon/ore/diamond))
new /obj/item/stack/sheet/diamond(output.loc)
del(O)
if (istype(O,/obj/item/weapon/ore/plasma))
new /obj/item/stack/sheet/plasma(output.loc)
del(O)
if (istype(O,/obj/item/weapon/ore/gold))
new /obj/item/stack/sheet/gold(output.loc)
del(O)
if (istype(O,/obj/item/weapon/ore/silver))
new /obj/item/stack/sheet/silver(output.loc)
del(O)
if (istype(O,/obj/item/weapon/ore/uranium))
new /obj/item/weapon/ore/uranium(output.loc)
del(O)
*/
/**********************Mint**************************/
@@ -456,12 +518,12 @@
/obj/machinery/mineral/mint/process()
if (src.output && src.input)
var/obj/item/weapon/sheet/O
O = locate(/obj/item/weapon/sheet, input.loc)
if (istype(O,/obj/item/weapon/sheet/gold))
var/obj/item/stack/sheet/O
O = locate(/obj/item/stack/sheet, input.loc)
if (istype(O,/obj/item/stack/sheet/gold))
amt_gold += 100
del(O)
if (istype(O,/obj/item/weapon/sheet/silver))
if (istype(O,/obj/item/stack/sheet/silver))
amt_silver += 100
del(O)
@@ -668,7 +730,7 @@
/******************************Materials****************************/
/obj/item/weapon/sheet/gold
/obj/item/stack/sheet/gold
name = "gold"
icon_state = "sheet-gold"
force = 5.0
@@ -678,11 +740,11 @@
throw_speed = 3
throw_range = 3
/obj/item/weapon/sheet/gold/New()
/obj/item/stack/sheet/gold/New()
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
/obj/item/weapon/sheet/silver
/obj/item/stack/sheet/silver
name = "silver"
icon_state = "sheet-silver"
force = 5.0
@@ -692,11 +754,11 @@
throw_speed = 3
throw_range = 3
/obj/item/weapon/sheet/silver/New()
/obj/item/stack/sheet/silver/New()
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
/obj/item/weapon/sheet/diamond
/obj/item/stack/sheet/diamond
name = "diamond"
icon_state = "sheet-diamond"
force = 5.0
@@ -706,11 +768,11 @@
throw_speed = 3
throw_range = 3
/obj/item/weapon/sheet/diamond/New()
/obj/item/stack/sheet/diamond/New()
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
/obj/item/weapon/sheet/plasma
/obj/item/stack/sheet/plasma
name = "solid plasma"
icon_state = "sheet-plasma"
force = 5.0

View File

@@ -52,13 +52,13 @@
/obj/machinery/computer/atmosphere
name = "atmos"
/obj/machinery/computer/atmosphere/alerts
name = "Alert Computer"
icon_state = "atmos"
var/alarms = list("Fire"=list(), "Atmosphere"=list())
/obj/machinery/computer/station_alert
name = "Station Alert Computer"
icon_state = "alert:0"
var/alarms = list("Fire"=list(), "Atmosphere"=list(), "Power"=list())
/obj/machinery/computer/general_alert
name = "General Alert Computer"
/obj/machinery/computer/atmos_alert
name = "Atmospheric Alert Computer"
icon_state = "alert:0"
var/list/priority_alarms = list()
var/list/minor_alarms = list()

View File

@@ -64,6 +64,11 @@
aiPlayer.cancelAlarm("Power", src, source)
else
aiPlayer.triggerAlarm("Power", src, cameras, source)
for(var/obj/machinery/computer/station_alert/a in world)
if(state == 1)
a.cancelAlarm("Power", src, source)
else
a.triggerAlarm("Power", src, source)
return
/area/proc/atmosalert()
@@ -78,7 +83,7 @@
cameras += C
for(var/mob/living/silicon/aiPlayer in world)
aiPlayer.triggerAlarm("Atmosphere", src, cameras, src)
for(var/obj/machinery/computer/atmosphere/alerts/a in world)
for(var/obj/machinery/computer/station_alert/a in world)
a.triggerAlarm("Atmosphere", src, cameras, src)
return
@@ -89,7 +94,7 @@
//src.updateicon()
for(var/mob/living/silicon/aiPlayer in world)
aiPlayer.cancelAlarm("Atmosphere", src, src)
for(var/obj/machinery/computer/atmosphere/alerts/a in world)
for(var/obj/machinery/computer/station_alert/a in world)
a.cancelAlarm("Atmosphere", src, src)
return
@@ -113,7 +118,7 @@
cameras += C
for (var/mob/living/silicon/ai/aiPlayer in world)
aiPlayer.triggerAlarm("Fire", src, cameras, src)
for (var/obj/machinery/computer/atmosphere/alerts/a in world)
for (var/obj/machinery/computer/station_alert/a in world)
a.triggerAlarm("Fire", src, cameras, src)
return
@@ -131,7 +136,7 @@
D.open()
for (var/mob/living/silicon/ai/aiPlayer in world)
aiPlayer.cancelAlarm("Fire", src, src)
for (var/obj/machinery/computer/atmosphere/alerts/a in world)
for (var/obj/machinery/computer/station_alert/a in world)
a.cancelAlarm("Fire", src, src)
return

View File

@@ -477,7 +477,7 @@ Rate: [volume_rate] L/sec<BR>"}
radio_connection.post_signal(src, signal)
/obj/machinery/computer/general_alert
/obj/machinery/computer/atmos_alert
var/datum/radio_frequency/radio_connection
initialize()
@@ -511,6 +511,7 @@ Rate: [volume_rate] L/sec<BR>"}
onclose(user, "computer")
process()
if(priority_alarms.len)
icon_state = "alert:2"

View File

@@ -6,21 +6,21 @@ Atmos alert computer
//the atmos alerts computer
/obj/machinery/computer/atmosphere/alerts/attack_ai(mob/user)
//the station alerts computer
/obj/machinery/computer/station_alert/attack_ai(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
/obj/machinery/computer/atmosphere/alerts/attack_hand(mob/user)
/obj/machinery/computer/station_alert/attack_hand(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
/obj/machinery/computer/atmosphere/alerts/attackby(I as obj, user as mob)
/obj/machinery/computer/station_alert/attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
@@ -28,7 +28,7 @@ Atmos alert computer
user << "\blue The broken glass falls out."
var/obj/computerframe/A = new /obj/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
var/obj/item/weapon/circuitboard/atmospherealerts/M = new /obj/item/weapon/circuitboard/atmospherealerts( A )
var /obj/item/weapon/circuitboard/stationalert/M = new /obj/item/weapon/circuitboard/stationalert( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
@@ -39,7 +39,7 @@ Atmos alert computer
else
user << "\blue You disconnect the monitor."
var/obj/computerframe/A = new /obj/computerframe( src.loc )
var/obj/item/weapon/circuitboard/atmospherealerts/M = new /obj/item/weapon/circuitboard/atmospherealerts( A )
var/obj/item/weapon/circuitboard/stationalert/M = new /obj/item/weapon/circuitboard/stationalert( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
@@ -52,7 +52,7 @@ Atmos alert computer
return
/obj/machinery/computer/atmosphere/alerts/proc/interact(mob/user)
/obj/machinery/computer/station_alert/proc/interact(mob/user)
usr.machine = src
var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
dat += "<A HREF='?src=\ref[user];mach_close=alerts'>Close</A><br><br>"
@@ -65,9 +65,10 @@ Atmos alert computer
var/area/A = alm[1]
var/list/sources = alm[3]
dat += "<NOBR>"
dat += "&bull; "
dat += "[A.name]"
if (sources.len > 1)
dat += text("- [] sources", sources.len)
dat += text(" - [] sources", sources.len)
dat += "</NOBR><BR>\n"
else
dat += "-- All Systems Nominal<BR>\n"
@@ -75,12 +76,12 @@ Atmos alert computer
user << browse(dat, "window=alerts")
onclose(user, "alerts")
/obj/machinery/computer/atmosphere/alerts/Topic(href, href_list)
/obj/machinery/computer/station_alert/Topic(href, href_list)
if(..())
return
return
/obj/machinery/computer/atmosphere/alerts/proc/triggerAlarm(var/class, area/A, var/O, var/alarmsource)
/obj/machinery/computer/station_alert/proc/triggerAlarm(var/class, area/A, var/O, var/alarmsource)
if(stat & (BROKEN|NOPOWER))
return
var/list/L = src.alarms[class]
@@ -102,7 +103,7 @@ Atmos alert computer
L[A.name] = list(A, (C) ? C : O, list(alarmsource))
return 1
/obj/machinery/computer/atmosphere/alerts/proc/cancelAlarm(var/class, area/A as area, obj/origin)
/obj/machinery/computer/station_alert/proc/cancelAlarm(var/class, area/A as area, obj/origin)
if(stat & (BROKEN|NOPOWER))
return
var/list/L = src.alarms[class]
@@ -117,3 +118,18 @@ Atmos alert computer
cleared = 1
L -= I
return !cleared
/obj/machinery/computer/station_alert/process()
if(stat & (BROKEN|NOPOWER))
icon_state = "atmos0"
return
var/active_alarms = 0
for (var/cat in src.alarms)
var/list/L = src.alarms[cat]
if(L.len) active_alarms = 1
if(active_alarms)
icon_state = "alert:2"
else
icon_state = "alert:0"
..()

View File

@@ -54,9 +54,9 @@
/obj/item/weapon/circuitboard/secure_data
name = "Circuit board (Security Records)"
computertype = "/obj/machinery/computer/secure_data"
/obj/item/weapon/circuitboard/atmospherealerts
name = "Circuit board (Atmosphere alerts)"
computertype = "/obj/machinery/computer/atmosphere/alerts"
/obj/item/weapon/circuitboard/stationalert
name = "Circuit board (Station Alerts)"
computertype = "/obj/machinery/computer/station_alert"
/obj/item/weapon/circuitboard/atmospheresiphonswitch
name = "Circuit board (Atmosphere siphon control)"
computertype = "/obj/machinery/computer/atmosphere/siphonswitch"
@@ -66,9 +66,9 @@
/obj/item/weapon/circuitboard/injector_control
name = "Circuit board (Injector control)"
computertype = "/obj/machinery/computer/general_air_control/fuel_injection"
/obj/item/weapon/circuitboard/general_alert
name = "Circuit board (General Alert)"
computertype = "/obj/machinery/computer/general_alert"
/obj/item/weapon/circuitboard/atmos_alert
name = "Circuit board (Atmospheric Alert)"
computertype = "/obj/machinery/computer/atmos_alert"
/obj/item/weapon/circuitboard/pod
name = "Circuit board (Massdriver control)"
computertype = "/obj/machinery/computer/pod"

View File

@@ -1013,6 +1013,7 @@
equipment = autoset(equipment, 1)
lighting = autoset(lighting, 1)
environ = autoset(environ, 1)
area.poweralert(1, src)
if(cell.percent() > 75)
area.poweralert(1, src)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

File diff suppressed because it is too large Load Diff