mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 05:31:53 +00:00
fix
This commit is contained in:
@@ -77,7 +77,7 @@ SUBSYSTEM_DEF(atoms)
|
|||||||
|
|
||||||
var/start_tick = world.time
|
var/start_tick = world.time
|
||||||
|
|
||||||
var/result = A.initialize(arglist(arguments))
|
var/result = A.Initialize(arglist(arguments))
|
||||||
|
|
||||||
if(start_tick != world.time)
|
if(start_tick != world.time)
|
||||||
BadInitializeCalls[the_type] |= BAD_INIT_SLEPT
|
BadInitializeCalls[the_type] |= BAD_INIT_SLEPT
|
||||||
|
|||||||
@@ -14,125 +14,123 @@
|
|||||||
//Simple variable to prevent me from doing attack_hand in both this and the child computer
|
//Simple variable to prevent me from doing attack_hand in both this and the child computer
|
||||||
var/zone = "This computer is working on a wireless range, the range is currently limited to 25 meters."
|
var/zone = "This computer is working on a wireless range, the range is currently limited to 25 meters."
|
||||||
|
|
||||||
initialize()
|
/obj/machinery/computer/area_atmos/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
scanscrubbers()
|
scanscrubbers()
|
||||||
|
|
||||||
attack_ai(var/mob/user as mob)
|
/obj/machinery/computer/area_atmos/attack_ai(var/mob/user as mob)
|
||||||
return src.attack_hand(user)
|
return src.attack_hand(user)
|
||||||
|
|
||||||
attack_hand(var/mob/user as mob)
|
|
||||||
if(..(user))
|
|
||||||
return
|
|
||||||
src.add_fingerprint(usr)
|
|
||||||
var/dat = {"
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<style type="text/css">
|
|
||||||
a.green:link
|
|
||||||
{
|
|
||||||
color:#00CC00;
|
|
||||||
}
|
|
||||||
a.green:visited
|
|
||||||
{
|
|
||||||
color:#00CC00;
|
|
||||||
}
|
|
||||||
a.green:hover
|
|
||||||
{
|
|
||||||
color:#00CC00;
|
|
||||||
}
|
|
||||||
a.green:active
|
|
||||||
{
|
|
||||||
color:#00CC00;
|
|
||||||
}
|
|
||||||
a.red:link
|
|
||||||
{
|
|
||||||
color:#FF0000;
|
|
||||||
}
|
|
||||||
a.red:visited
|
|
||||||
{
|
|
||||||
color:#FF0000;
|
|
||||||
}
|
|
||||||
a.red:hover
|
|
||||||
{
|
|
||||||
color:#FF0000;
|
|
||||||
}
|
|
||||||
a.red:active
|
|
||||||
{
|
|
||||||
color:#FF0000;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<center><h1>Area Air Control</h1></center>
|
|
||||||
<font color="red">[status]</font><br>
|
|
||||||
<a href="?src=\ref[src];scan=1">Scan</a>
|
|
||||||
<table border="1" width="90%">"}
|
|
||||||
for(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in connectedscrubbers)
|
|
||||||
dat += {"
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
[scrubber.name]<br>
|
|
||||||
Pressure: [round(scrubber.air_contents.return_pressure(), 0.01)] kPa<br>
|
|
||||||
Flow Rate: [round(scrubber.last_flow_rate,0.1)] L/s<br>
|
|
||||||
</td>
|
|
||||||
<td width="150">
|
|
||||||
<a class="green" href="?src=\ref[src];scrub=\ref[scrubber];toggle=1">Turn On</a>
|
|
||||||
<a class="red" href="?src=\ref[src];scrub=\ref[scrubber];toggle=0">Turn Off</a><br>
|
|
||||||
Load: [round(scrubber.last_power_draw)] W
|
|
||||||
</td>
|
|
||||||
</tr>"}
|
|
||||||
|
|
||||||
|
/obj/machinery/computer/area_atmos/attack_hand(var/mob/user as mob)
|
||||||
|
if(..(user))
|
||||||
|
return
|
||||||
|
src.add_fingerprint(usr)
|
||||||
|
var/dat = {"
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style type="text/css">
|
||||||
|
a.green:link
|
||||||
|
{
|
||||||
|
color:#00CC00;
|
||||||
|
}
|
||||||
|
a.green:visited
|
||||||
|
{
|
||||||
|
color:#00CC00;
|
||||||
|
}
|
||||||
|
a.green:hover
|
||||||
|
{
|
||||||
|
color:#00CC00;
|
||||||
|
}
|
||||||
|
a.green:active
|
||||||
|
{
|
||||||
|
color:#00CC00;
|
||||||
|
}
|
||||||
|
a.red:link
|
||||||
|
{
|
||||||
|
color:#FF0000;
|
||||||
|
}
|
||||||
|
a.red:visited
|
||||||
|
{
|
||||||
|
color:#FF0000;
|
||||||
|
}
|
||||||
|
a.red:hover
|
||||||
|
{
|
||||||
|
color:#FF0000;
|
||||||
|
}
|
||||||
|
a.red:active
|
||||||
|
{
|
||||||
|
color:#FF0000;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<center><h1>Area Air Control</h1></center>
|
||||||
|
<font color="red">[status]</font><br>
|
||||||
|
<a href="?src=\ref[src];scan=1">Scan</a>
|
||||||
|
<table border="1" width="90%">"}
|
||||||
|
for(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in connectedscrubbers)
|
||||||
dat += {"
|
dat += {"
|
||||||
</table><br>
|
<tr>
|
||||||
<i>[zone]</i>
|
<td>
|
||||||
</body>
|
[scrubber.name]<br>
|
||||||
</html>"}
|
Pressure: [round(scrubber.air_contents.return_pressure(), 0.01)] kPa<br>
|
||||||
user << browse("[dat]", "window=miningshuttle;size=400x400")
|
Flow Rate: [round(scrubber.last_flow_rate,0.1)] L/s<br>
|
||||||
status = ""
|
</td>
|
||||||
|
<td width="150">
|
||||||
|
<a class="green" href="?src=\ref[src];scrub=\ref[scrubber];toggle=1">Turn On</a>
|
||||||
|
<a class="red" href="?src=\ref[src];scrub=\ref[scrubber];toggle=0">Turn Off</a><br>
|
||||||
|
Load: [round(scrubber.last_power_draw)] W
|
||||||
|
</td>
|
||||||
|
</tr>"}
|
||||||
|
|
||||||
Topic(href, href_list)
|
dat += {"
|
||||||
if(..())
|
</table><br>
|
||||||
|
<i>[zone]</i>
|
||||||
|
</body>
|
||||||
|
</html>"}
|
||||||
|
user << browse("[dat]", "window=miningshuttle;size=400x400")
|
||||||
|
status = ""
|
||||||
|
|
||||||
|
/obj/machinery/computer/area_atmos/Topic(href, href_list)
|
||||||
|
if(..())
|
||||||
|
return
|
||||||
|
usr.set_machine(src)
|
||||||
|
src.add_fingerprint(usr)
|
||||||
|
|
||||||
|
|
||||||
|
if(href_list["scan"])
|
||||||
|
scanscrubbers()
|
||||||
|
else if(href_list["toggle"])
|
||||||
|
var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber = locate(href_list["scrub"])
|
||||||
|
|
||||||
|
if(!validscrubber(scrubber))
|
||||||
|
spawn(20)
|
||||||
|
status = "ERROR: Couldn't connect to scrubber! (timeout)"
|
||||||
|
connectedscrubbers -= scrubber
|
||||||
|
src.updateUsrDialog()
|
||||||
return
|
return
|
||||||
usr.set_machine(src)
|
|
||||||
src.add_fingerprint(usr)
|
|
||||||
|
|
||||||
|
scrubber.on = text2num(href_list["toggle"])
|
||||||
|
scrubber.update_icon()
|
||||||
|
|
||||||
if(href_list["scan"])
|
/obj/machinery/computer/area_atmos/proc/validscrubber(obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber as obj)
|
||||||
scanscrubbers()
|
if(!isobj(scrubber) || get_dist(scrubber.loc, src.loc) > src.range || scrubber.loc.z != src.loc.z)
|
||||||
else if(href_list["toggle"])
|
return FALSE
|
||||||
var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber = locate(href_list["scrub"])
|
return TRUE
|
||||||
|
|
||||||
if(!validscrubber(scrubber))
|
/obj/machinery/computer/area_atmos/proc/scanscrubbers()
|
||||||
spawn(20)
|
connectedscrubbers = new()
|
||||||
status = "ERROR: Couldn't connect to scrubber! (timeout)"
|
|
||||||
connectedscrubbers -= scrubber
|
|
||||||
src.updateUsrDialog()
|
|
||||||
return
|
|
||||||
|
|
||||||
scrubber.on = text2num(href_list["toggle"])
|
var/found = 0
|
||||||
scrubber.update_icon()
|
for(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in range(range, src.loc))
|
||||||
|
if(istype(scrubber))
|
||||||
|
found = 1
|
||||||
|
connectedscrubbers += scrubber
|
||||||
|
|
||||||
proc/validscrubber( var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber as obj )
|
if(!found)
|
||||||
if(!isobj(scrubber) || get_dist(scrubber.loc, src.loc) > src.range || scrubber.loc.z != src.loc.z)
|
status = "ERROR: No scrubber found!"
|
||||||
return 0
|
|
||||||
|
|
||||||
return 1
|
|
||||||
|
|
||||||
proc/scanscrubbers()
|
|
||||||
connectedscrubbers = new()
|
|
||||||
|
|
||||||
var/found = 0
|
|
||||||
for(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in range(range, src.loc))
|
|
||||||
if(istype(scrubber))
|
|
||||||
found = 1
|
|
||||||
connectedscrubbers += scrubber
|
|
||||||
|
|
||||||
if(!found)
|
|
||||||
status = "ERROR: No scrubber found!"
|
|
||||||
|
|
||||||
src.updateUsrDialog()
|
|
||||||
|
|
||||||
|
updateUsrDialog()
|
||||||
|
|
||||||
/obj/machinery/computer/area_atmos/area
|
/obj/machinery/computer/area_atmos/area
|
||||||
zone = "This computer is working in a wired network limited to this area."
|
zone = "This computer is working in a wired network limited to this area."
|
||||||
|
|||||||
@@ -116,39 +116,37 @@
|
|||||||
var/last_transmission
|
var/last_transmission
|
||||||
var/datum/radio_frequency/radio_connection
|
var/datum/radio_frequency/radio_connection
|
||||||
|
|
||||||
initialize()
|
/obj/item/radio/integrated/signal/Initialize()
|
||||||
if(!radio_controller)
|
if(!radio_controller)
|
||||||
return
|
|
||||||
|
|
||||||
if (src.frequency < PUBLIC_LOW_FREQ || src.frequency > PUBLIC_HIGH_FREQ)
|
|
||||||
src.frequency = sanitize_frequency(src.frequency)
|
|
||||||
|
|
||||||
set_frequency(frequency)
|
|
||||||
|
|
||||||
proc/set_frequency(new_frequency)
|
|
||||||
radio_controller.remove_object(src, frequency)
|
|
||||||
frequency = new_frequency
|
|
||||||
radio_connection = radio_controller.add_object(src, frequency)
|
|
||||||
|
|
||||||
proc/send_signal(message="ACTIVATE")
|
|
||||||
|
|
||||||
if(last_transmission && world.time < (last_transmission + 5))
|
|
||||||
return
|
|
||||||
last_transmission = world.time
|
|
||||||
|
|
||||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
|
||||||
var/turf/T = get_turf(src)
|
|
||||||
lastsignalers.Add("[time] <B>:</B> [usr.key] used [src] @ location ([T.x],[T.y],[T.z]) <B>:</B> [format_frequency(frequency)]/[code]")
|
|
||||||
|
|
||||||
var/datum/signal/signal = new
|
|
||||||
signal.source = src
|
|
||||||
signal.encryption = code
|
|
||||||
signal.data["message"] = message
|
|
||||||
|
|
||||||
radio_connection.post_signal(src, signal)
|
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if (src.frequency < PUBLIC_LOW_FREQ || src.frequency > PUBLIC_HIGH_FREQ)
|
||||||
|
src.frequency = sanitize_frequency(src.frequency)
|
||||||
|
|
||||||
|
set_frequency(frequency)
|
||||||
|
|
||||||
|
/obj/item/radio/integrated/signal/proc/set_frequency(new_frequency)
|
||||||
|
radio_controller.remove_object(src, frequency)
|
||||||
|
frequency = new_frequency
|
||||||
|
radio_connection = radio_controller.add_object(src, frequency)
|
||||||
|
|
||||||
|
/obj/item/radio/integrated/signal/proc/send_signal(message="ACTIVATE")
|
||||||
|
|
||||||
|
if(last_transmission && world.time < (last_transmission + 5))
|
||||||
|
return
|
||||||
|
last_transmission = world.time
|
||||||
|
|
||||||
|
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||||
|
var/turf/T = get_turf(src)
|
||||||
|
lastsignalers.Add("[time] <B>:</B> [usr.key] used [src] @ location ([T.x],[T.y],[T.z]) <B>:</B> [format_frequency(frequency)]/[code]")
|
||||||
|
|
||||||
|
var/datum/signal/signal = new
|
||||||
|
signal.source = src
|
||||||
|
signal.encryption = code
|
||||||
|
signal.data["message"] = message
|
||||||
|
|
||||||
|
radio_connection.post_signal(src, signal)
|
||||||
|
|
||||||
/obj/item/radio/integrated/signal/Destroy()
|
/obj/item/radio/integrated/signal/Destroy()
|
||||||
if(radio_controller)
|
if(radio_controller)
|
||||||
radio_controller.remove_object(src, frequency)
|
radio_controller.remove_object(src, frequency)
|
||||||
|
|||||||
@@ -213,8 +213,9 @@
|
|||||||
takes_underlays = 1
|
takes_underlays = 1
|
||||||
blocks_air = 1 //I'd make these unsimulated but it just fucks with so much stuff so many other places.
|
blocks_air = 1 //I'd make these unsimulated but it just fucks with so much stuff so many other places.
|
||||||
|
|
||||||
initialize()
|
/turf/simulated/shuttle/plating/carry/Initialize()
|
||||||
icon_state = "carry_ingame"
|
. = ..()
|
||||||
|
icon_state = "carry_ingame"
|
||||||
|
|
||||||
/turf/simulated/shuttle/plating/airless/carry
|
/turf/simulated/shuttle/plating/airless/carry
|
||||||
name = "airless carry turf"
|
name = "airless carry turf"
|
||||||
@@ -223,8 +224,9 @@
|
|||||||
takes_underlays = 1
|
takes_underlays = 1
|
||||||
blocks_air = 1
|
blocks_air = 1
|
||||||
|
|
||||||
initialize()
|
/turf/simulated/shuttle/plating/airless/carry/Initialize()
|
||||||
icon_state = "carry_ingame"
|
. = ..()
|
||||||
|
icon_state = "carry_ingame"
|
||||||
|
|
||||||
/turf/simulated/shuttle/plating/skipjack //Skipjack plating
|
/turf/simulated/shuttle/plating/skipjack //Skipjack plating
|
||||||
oxygen = 0
|
oxygen = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user