mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
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:
File diff suppressed because it is too large
Load Diff
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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 += "• "
|
||||
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]
|
||||
@@ -116,4 +117,19 @@ Atmos alert computer
|
||||
if (srcs.len == 0)
|
||||
cleared = 1
|
||||
L -= I
|
||||
return !cleared
|
||||
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"
|
||||
|
||||
..()
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
src.updateicon()
|
||||
spawn(5)
|
||||
src.update()
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/power/apc/proc/make_terminal()
|
||||
@@ -118,7 +118,7 @@
|
||||
terminal = new/obj/machinery/power/terminal(src.loc)
|
||||
terminal.dir = tdir
|
||||
terminal.master = src
|
||||
|
||||
|
||||
/obj/machinery/power/apc/proc/init()
|
||||
has_electronics = 2 //installed and secured
|
||||
// is starting with a power cell installed, create it and set its charge level
|
||||
@@ -137,7 +137,7 @@
|
||||
updateicon()
|
||||
|
||||
make_terminal()
|
||||
|
||||
|
||||
spawn(5)
|
||||
src.update()
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
usr << "Electronics installed but not wired."
|
||||
else /* if (!has_electronics && !terminal) */
|
||||
usr << "There is no electronics nor connected wires."
|
||||
|
||||
|
||||
else
|
||||
if (stat & MAINT)
|
||||
usr << "The cover is closed. Something wrong with it: it's doesn't work."
|
||||
@@ -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)
|
||||
|
||||
@@ -1105,7 +1106,7 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//set_broken() //now Del() do what we need
|
||||
if (cell)
|
||||
if (cell)
|
||||
cell.ex_act(1.0) // more lags woohoo
|
||||
del(src)
|
||||
return
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
11774
maps/tgstation.2.0.0.dmm
11774
maps/tgstation.2.0.0.dmm
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user