mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-18 06:01:56 +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
|
/obj/machinery/computer/atmosphere
|
||||||
name = "atmos"
|
name = "atmos"
|
||||||
|
|
||||||
/obj/machinery/computer/atmosphere/alerts
|
/obj/machinery/computer/station_alert
|
||||||
name = "Alert Computer"
|
name = "Station Alert Computer"
|
||||||
icon_state = "atmos"
|
icon_state = "alert:0"
|
||||||
var/alarms = list("Fire"=list(), "Atmosphere"=list())
|
var/alarms = list("Fire"=list(), "Atmosphere"=list(), "Power"=list())
|
||||||
|
|
||||||
/obj/machinery/computer/general_alert
|
/obj/machinery/computer/atmos_alert
|
||||||
name = "General Alert Computer"
|
name = "Atmospheric Alert Computer"
|
||||||
icon_state = "alert:0"
|
icon_state = "alert:0"
|
||||||
var/list/priority_alarms = list()
|
var/list/priority_alarms = list()
|
||||||
var/list/minor_alarms = list()
|
var/list/minor_alarms = list()
|
||||||
|
|||||||
@@ -64,6 +64,11 @@
|
|||||||
aiPlayer.cancelAlarm("Power", src, source)
|
aiPlayer.cancelAlarm("Power", src, source)
|
||||||
else
|
else
|
||||||
aiPlayer.triggerAlarm("Power", src, cameras, source)
|
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
|
return
|
||||||
|
|
||||||
/area/proc/atmosalert()
|
/area/proc/atmosalert()
|
||||||
@@ -78,7 +83,7 @@
|
|||||||
cameras += C
|
cameras += C
|
||||||
for(var/mob/living/silicon/aiPlayer in world)
|
for(var/mob/living/silicon/aiPlayer in world)
|
||||||
aiPlayer.triggerAlarm("Atmosphere", src, cameras, src)
|
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)
|
a.triggerAlarm("Atmosphere", src, cameras, src)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -89,7 +94,7 @@
|
|||||||
//src.updateicon()
|
//src.updateicon()
|
||||||
for(var/mob/living/silicon/aiPlayer in world)
|
for(var/mob/living/silicon/aiPlayer in world)
|
||||||
aiPlayer.cancelAlarm("Atmosphere", src, src)
|
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)
|
a.cancelAlarm("Atmosphere", src, src)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -113,7 +118,7 @@
|
|||||||
cameras += C
|
cameras += C
|
||||||
for (var/mob/living/silicon/ai/aiPlayer in world)
|
for (var/mob/living/silicon/ai/aiPlayer in world)
|
||||||
aiPlayer.triggerAlarm("Fire", src, cameras, src)
|
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)
|
a.triggerAlarm("Fire", src, cameras, src)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -131,7 +136,7 @@
|
|||||||
D.open()
|
D.open()
|
||||||
for (var/mob/living/silicon/ai/aiPlayer in world)
|
for (var/mob/living/silicon/ai/aiPlayer in world)
|
||||||
aiPlayer.cancelAlarm("Fire", src, src)
|
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)
|
a.cancelAlarm("Fire", src, src)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -477,7 +477,7 @@ Rate: [volume_rate] L/sec<BR>"}
|
|||||||
|
|
||||||
radio_connection.post_signal(src, signal)
|
radio_connection.post_signal(src, signal)
|
||||||
|
|
||||||
/obj/machinery/computer/general_alert
|
/obj/machinery/computer/atmos_alert
|
||||||
var/datum/radio_frequency/radio_connection
|
var/datum/radio_frequency/radio_connection
|
||||||
|
|
||||||
initialize()
|
initialize()
|
||||||
@@ -511,6 +511,7 @@ Rate: [volume_rate] L/sec<BR>"}
|
|||||||
onclose(user, "computer")
|
onclose(user, "computer")
|
||||||
|
|
||||||
process()
|
process()
|
||||||
|
|
||||||
if(priority_alarms.len)
|
if(priority_alarms.len)
|
||||||
icon_state = "alert:2"
|
icon_state = "alert:2"
|
||||||
|
|
||||||
|
|||||||
@@ -6,21 +6,21 @@ Atmos alert computer
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//the atmos alerts computer
|
//the station alerts computer
|
||||||
/obj/machinery/computer/atmosphere/alerts/attack_ai(mob/user)
|
/obj/machinery/computer/station_alert/attack_ai(mob/user)
|
||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
|
|
||||||
if(stat & (BROKEN|NOPOWER))
|
if(stat & (BROKEN|NOPOWER))
|
||||||
return
|
return
|
||||||
interact(user)
|
interact(user)
|
||||||
|
|
||||||
/obj/machinery/computer/atmosphere/alerts/attack_hand(mob/user)
|
/obj/machinery/computer/station_alert/attack_hand(mob/user)
|
||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
if(stat & (BROKEN|NOPOWER))
|
if(stat & (BROKEN|NOPOWER))
|
||||||
return
|
return
|
||||||
interact(user)
|
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))
|
if(istype(I, /obj/item/weapon/screwdriver))
|
||||||
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
|
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
|
||||||
if(do_after(user, 20))
|
if(do_after(user, 20))
|
||||||
@@ -28,7 +28,7 @@ Atmos alert computer
|
|||||||
user << "\blue The broken glass falls out."
|
user << "\blue The broken glass falls out."
|
||||||
var/obj/computerframe/A = new /obj/computerframe( src.loc )
|
var/obj/computerframe/A = new /obj/computerframe( src.loc )
|
||||||
new /obj/item/weapon/shard( 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)
|
for (var/obj/C in src)
|
||||||
C.loc = src.loc
|
C.loc = src.loc
|
||||||
A.circuit = M
|
A.circuit = M
|
||||||
@@ -39,7 +39,7 @@ Atmos alert computer
|
|||||||
else
|
else
|
||||||
user << "\blue You disconnect the monitor."
|
user << "\blue You disconnect the monitor."
|
||||||
var/obj/computerframe/A = new /obj/computerframe( src.loc )
|
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)
|
for (var/obj/C in src)
|
||||||
C.loc = src.loc
|
C.loc = src.loc
|
||||||
A.circuit = M
|
A.circuit = M
|
||||||
@@ -52,7 +52,7 @@ Atmos alert computer
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/atmosphere/alerts/proc/interact(mob/user)
|
/obj/machinery/computer/station_alert/proc/interact(mob/user)
|
||||||
usr.machine = src
|
usr.machine = src
|
||||||
var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
|
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>"
|
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/area/A = alm[1]
|
||||||
var/list/sources = alm[3]
|
var/list/sources = alm[3]
|
||||||
dat += "<NOBR>"
|
dat += "<NOBR>"
|
||||||
|
dat += "• "
|
||||||
dat += "[A.name]"
|
dat += "[A.name]"
|
||||||
if (sources.len > 1)
|
if (sources.len > 1)
|
||||||
dat += text("- [] sources", sources.len)
|
dat += text(" - [] sources", sources.len)
|
||||||
dat += "</NOBR><BR>\n"
|
dat += "</NOBR><BR>\n"
|
||||||
else
|
else
|
||||||
dat += "-- All Systems Nominal<BR>\n"
|
dat += "-- All Systems Nominal<BR>\n"
|
||||||
@@ -75,12 +76,12 @@ Atmos alert computer
|
|||||||
user << browse(dat, "window=alerts")
|
user << browse(dat, "window=alerts")
|
||||||
onclose(user, "alerts")
|
onclose(user, "alerts")
|
||||||
|
|
||||||
/obj/machinery/computer/atmosphere/alerts/Topic(href, href_list)
|
/obj/machinery/computer/station_alert/Topic(href, href_list)
|
||||||
if(..())
|
if(..())
|
||||||
return
|
return
|
||||||
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))
|
if(stat & (BROKEN|NOPOWER))
|
||||||
return
|
return
|
||||||
var/list/L = src.alarms[class]
|
var/list/L = src.alarms[class]
|
||||||
@@ -102,7 +103,7 @@ Atmos alert computer
|
|||||||
L[A.name] = list(A, (C) ? C : O, list(alarmsource))
|
L[A.name] = list(A, (C) ? C : O, list(alarmsource))
|
||||||
return 1
|
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))
|
if(stat & (BROKEN|NOPOWER))
|
||||||
return
|
return
|
||||||
var/list/L = src.alarms[class]
|
var/list/L = src.alarms[class]
|
||||||
@@ -116,4 +117,19 @@ Atmos alert computer
|
|||||||
if (srcs.len == 0)
|
if (srcs.len == 0)
|
||||||
cleared = 1
|
cleared = 1
|
||||||
L -= I
|
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
|
/obj/item/weapon/circuitboard/secure_data
|
||||||
name = "Circuit board (Security Records)"
|
name = "Circuit board (Security Records)"
|
||||||
computertype = "/obj/machinery/computer/secure_data"
|
computertype = "/obj/machinery/computer/secure_data"
|
||||||
/obj/item/weapon/circuitboard/atmospherealerts
|
/obj/item/weapon/circuitboard/stationalert
|
||||||
name = "Circuit board (Atmosphere alerts)"
|
name = "Circuit board (Station Alerts)"
|
||||||
computertype = "/obj/machinery/computer/atmosphere/alerts"
|
computertype = "/obj/machinery/computer/station_alert"
|
||||||
/obj/item/weapon/circuitboard/atmospheresiphonswitch
|
/obj/item/weapon/circuitboard/atmospheresiphonswitch
|
||||||
name = "Circuit board (Atmosphere siphon control)"
|
name = "Circuit board (Atmosphere siphon control)"
|
||||||
computertype = "/obj/machinery/computer/atmosphere/siphonswitch"
|
computertype = "/obj/machinery/computer/atmosphere/siphonswitch"
|
||||||
@@ -66,9 +66,9 @@
|
|||||||
/obj/item/weapon/circuitboard/injector_control
|
/obj/item/weapon/circuitboard/injector_control
|
||||||
name = "Circuit board (Injector control)"
|
name = "Circuit board (Injector control)"
|
||||||
computertype = "/obj/machinery/computer/general_air_control/fuel_injection"
|
computertype = "/obj/machinery/computer/general_air_control/fuel_injection"
|
||||||
/obj/item/weapon/circuitboard/general_alert
|
/obj/item/weapon/circuitboard/atmos_alert
|
||||||
name = "Circuit board (General Alert)"
|
name = "Circuit board (Atmospheric Alert)"
|
||||||
computertype = "/obj/machinery/computer/general_alert"
|
computertype = "/obj/machinery/computer/atmos_alert"
|
||||||
/obj/item/weapon/circuitboard/pod
|
/obj/item/weapon/circuitboard/pod
|
||||||
name = "Circuit board (Massdriver control)"
|
name = "Circuit board (Massdriver control)"
|
||||||
computertype = "/obj/machinery/computer/pod"
|
computertype = "/obj/machinery/computer/pod"
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
src.updateicon()
|
src.updateicon()
|
||||||
spawn(5)
|
spawn(5)
|
||||||
src.update()
|
src.update()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/power/apc/proc/make_terminal()
|
/obj/machinery/power/apc/proc/make_terminal()
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
terminal = new/obj/machinery/power/terminal(src.loc)
|
terminal = new/obj/machinery/power/terminal(src.loc)
|
||||||
terminal.dir = tdir
|
terminal.dir = tdir
|
||||||
terminal.master = src
|
terminal.master = src
|
||||||
|
|
||||||
/obj/machinery/power/apc/proc/init()
|
/obj/machinery/power/apc/proc/init()
|
||||||
has_electronics = 2 //installed and secured
|
has_electronics = 2 //installed and secured
|
||||||
// is starting with a power cell installed, create it and set its charge level
|
// is starting with a power cell installed, create it and set its charge level
|
||||||
@@ -137,7 +137,7 @@
|
|||||||
updateicon()
|
updateicon()
|
||||||
|
|
||||||
make_terminal()
|
make_terminal()
|
||||||
|
|
||||||
spawn(5)
|
spawn(5)
|
||||||
src.update()
|
src.update()
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
usr << "Electronics installed but not wired."
|
usr << "Electronics installed but not wired."
|
||||||
else /* if (!has_electronics && !terminal) */
|
else /* if (!has_electronics && !terminal) */
|
||||||
usr << "There is no electronics nor connected wires."
|
usr << "There is no electronics nor connected wires."
|
||||||
|
|
||||||
else
|
else
|
||||||
if (stat & MAINT)
|
if (stat & MAINT)
|
||||||
usr << "The cover is closed. Something wrong with it: it's doesn't work."
|
usr << "The cover is closed. Something wrong with it: it's doesn't work."
|
||||||
@@ -1013,6 +1013,7 @@
|
|||||||
equipment = autoset(equipment, 1)
|
equipment = autoset(equipment, 1)
|
||||||
lighting = autoset(lighting, 1)
|
lighting = autoset(lighting, 1)
|
||||||
environ = autoset(environ, 1)
|
environ = autoset(environ, 1)
|
||||||
|
area.poweralert(1, src)
|
||||||
if(cell.percent() > 75)
|
if(cell.percent() > 75)
|
||||||
area.poweralert(1, src)
|
area.poweralert(1, src)
|
||||||
|
|
||||||
@@ -1105,7 +1106,7 @@
|
|||||||
switch(severity)
|
switch(severity)
|
||||||
if(1.0)
|
if(1.0)
|
||||||
//set_broken() //now Del() do what we need
|
//set_broken() //now Del() do what we need
|
||||||
if (cell)
|
if (cell)
|
||||||
cell.ex_act(1.0) // more lags woohoo
|
cell.ex_act(1.0) // more lags woohoo
|
||||||
del(src)
|
del(src)
|
||||||
return
|
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