mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 06:27:26 +01:00
Merge pull request #208 from Miniature/master
Two more runtimes, also atmos computer stuff
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
anchored = 1.0
|
||||
circuit = "/obj/item/weapon/circuitboard/atmoscontrol"
|
||||
var/obj/machinery/alarm/current = ""
|
||||
var/overridden = 0 //not set yet, can't think of a good way to do it
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/attack_hand(mob/user)
|
||||
if(..())
|
||||
@@ -36,7 +37,7 @@
|
||||
return ""
|
||||
var/dat = "<h3>[current.name]</h3><hr>"
|
||||
dat += current.return_status()
|
||||
if(current.remote_control)
|
||||
if(current.remote_control || overridden && current.rcon_setting)
|
||||
dat += "<hr>[src.return_controls()]"
|
||||
return dat
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Tick()
|
||||
for(var/mob/living/L in world)
|
||||
L.radiation += rand(1,7)
|
||||
if (prob(4))
|
||||
if (L && prob(4))
|
||||
if (prob(75))
|
||||
randmutb(L)
|
||||
domutcheck(L,null,1)
|
||||
|
||||
@@ -41,6 +41,11 @@
|
||||
//var/skipprocess = 0 //Experimenting
|
||||
var/alarm_frequency = 1437
|
||||
var/remote_control = 0
|
||||
#define RCON_NO 1
|
||||
#define RCON_AUTO 2
|
||||
#define RCON_YES 3
|
||||
var/rcon_setting = 2
|
||||
var/rcon_time = 0
|
||||
#define AALARM_REPORT_TIMEOUT 100
|
||||
var/datum/radio_frequency/radio_connection
|
||||
var/locked = 1
|
||||
@@ -212,9 +217,9 @@
|
||||
|
||||
/obj/machinery/alarm/proc/return_text()
|
||||
if(!(istype(usr, /mob/living/silicon)) && locked)
|
||||
return "<html><head><title>[src]</title></head><body>[return_status()]<hr><a href='?src=\ref[src]&ctrl=1'>[remote_control ? "Disable" : "Enable"] Remote Control</a><hr><i>(Swipe ID card to unlock interface)</i></body></html>"
|
||||
return "<html><head><title>[src]</title></head><body>[return_status()]<hr>[rcon_text()]<hr><i>(Swipe ID card to unlock interface)</i></body></html>"
|
||||
else
|
||||
return "<html><head><title>[src]</title></head><body>[return_status()]<hr><a href='?src=\ref[src]&ctrl=1'>[remote_control ? "Disable" : "Enable"] Remote Control</a><hr>[return_controls()]</body></html>"
|
||||
return "<html><head><title>[src]</title></head><body>[return_status()]<hr>[rcon_text()]<hr>[return_controls()]</body></html>"
|
||||
|
||||
/obj/machinery/alarm/proc/return_status()
|
||||
var/turf/location = src.loc
|
||||
@@ -298,6 +303,24 @@ Temperature: <span class='dl[temperature_dangerlevel]'>[environment.temperature]
|
||||
|
||||
return output
|
||||
|
||||
/obj/machinery/alarm/proc/rcon_text()
|
||||
var/dat = "<b>Remote Control:</b><br>"
|
||||
if(src.rcon_setting == RCON_NO)
|
||||
dat += "Off"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];rcon=[RCON_NO]'>Off</a>"
|
||||
dat += " | "
|
||||
if(src.rcon_setting == RCON_AUTO)
|
||||
dat += "Auto"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];rcon=[RCON_AUTO]'>Auto</a>"
|
||||
dat += " | "
|
||||
if(src.rcon_setting == RCON_YES)
|
||||
dat += "On"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];rcon=[RCON_YES]'>On</a>"
|
||||
return dat
|
||||
|
||||
/obj/machinery/alarm/proc/return_controls()
|
||||
var/output = ""//"<B>[alarm_zone] Air [name]</B><HR>"
|
||||
|
||||
@@ -492,8 +515,8 @@ table tr:first-child th:first-child { border: none;}
|
||||
/obj/machinery/alarm/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(href_list["ctrl"])
|
||||
remote_control = !remote_control
|
||||
if(href_list["rcon"])
|
||||
rcon_setting = text2num(href_list["rcon"])
|
||||
src.updateUsrDialog()
|
||||
if(href_list["command"])
|
||||
var/device_id = href_list["id_tag"]
|
||||
@@ -675,6 +698,21 @@ table tr:first-child th:first-child { border: none;}
|
||||
mode=AALARM_MODE_SCRUBBING
|
||||
apply_mode()
|
||||
|
||||
//atmos computer remote controll stuff
|
||||
switch(rcon_setting)
|
||||
if(RCON_NO)
|
||||
remote_control = 0
|
||||
if(RCON_AUTO)
|
||||
if(danger_level == 2)
|
||||
remote_control = 1
|
||||
rcon_time = 60
|
||||
if(RCON_YES)
|
||||
remote_control = 1
|
||||
if(rcon_time > 0)
|
||||
rcon_time--
|
||||
else if(rcon_setting == RCON_AUTO)
|
||||
remote_control = 0
|
||||
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
|
||||
@@ -566,7 +566,7 @@
|
||||
reset_view(null)
|
||||
client.adminobs = 0
|
||||
else
|
||||
if(ticker)
|
||||
if(ticker && ticker.mode)
|
||||
// world << "there's a ticker"
|
||||
if(ticker.mode.name == "AI malfunction")
|
||||
// world << "ticker says its malf"
|
||||
|
||||
Reference in New Issue
Block a user