mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-31 07:57:47 +01:00
Fixes issue 854. I have very little confidence in the longevity of my fix, so if any issues with the nuke shuttle doors arise in the future, please inform me!
Added a little bar for nuke ops to relax in, following a job well done. Updated pod control computers to only show time controls if a mass driver is attached. Doors don't need to be on a timer. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4703 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -8,13 +8,14 @@
|
||||
var/obj/machinery/mass_driver/connected = null
|
||||
var/timing = 0.0
|
||||
var/time = 30.0
|
||||
var/title = "Mass Driver Controls"
|
||||
|
||||
|
||||
/obj/machinery/computer/pod/New()
|
||||
..()
|
||||
spawn( 5 )
|
||||
for(var/obj/machinery/mass_driver/M in world)
|
||||
if (M.id == id)
|
||||
if(M.id == id)
|
||||
connected = M
|
||||
else
|
||||
return
|
||||
@@ -25,18 +26,16 @@
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if (!( connected ))
|
||||
if(!( connected ))
|
||||
viewers(null, null) << "Cannot locate mass driver connector. Cancelling firing sequence!"
|
||||
return
|
||||
|
||||
for(var/obj/machinery/door/poddoor/M in world)
|
||||
if (M.id == id)
|
||||
spawn( 0 )
|
||||
M.open()
|
||||
return
|
||||
if(M.id == id)
|
||||
M.open()
|
||||
return
|
||||
sleep(20)
|
||||
|
||||
//connected.drive() *****RM from 40.93.3S
|
||||
for(var/obj/machinery/mass_driver/M in world)
|
||||
if(M.id == id)
|
||||
M.power = connected.power
|
||||
@@ -44,10 +43,9 @@
|
||||
|
||||
sleep(50)
|
||||
for(var/obj/machinery/door/poddoor/M in world)
|
||||
if (M.id == id)
|
||||
spawn( 0 )
|
||||
M.close()
|
||||
return
|
||||
if(M.id == id)
|
||||
M.close()
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
@@ -55,7 +53,7 @@
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (stat & BROKEN)
|
||||
if(stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
|
||||
new /obj/item/weapon/shard( loc )
|
||||
@@ -119,40 +117,38 @@
|
||||
if(..())
|
||||
return
|
||||
|
||||
var/dat = "<HTML><BODY><TT><B>Mass Driver Controls</B>"
|
||||
var/dat = "<HTML><BODY><TT><B>[title]</B>"
|
||||
user.machine = src
|
||||
var/d2
|
||||
if (timing)
|
||||
d2 = text("<A href='?src=\ref[];time=0'>Stop Time Launch</A>", src)
|
||||
else
|
||||
d2 = text("<A href='?src=\ref[];time=1'>Initiate Time Launch</A>", src)
|
||||
var/second = time % 60
|
||||
var/minute = (time - second) / 60
|
||||
dat += text("<HR>\nTimer System: []\nTime Left: [][] <A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>", d2, (minute ? text("[]:", minute) : null), second, src, src, src, src)
|
||||
if (connected)
|
||||
if(connected)
|
||||
var/d2
|
||||
if(timing) //door controls do not need timers.
|
||||
d2 = "<A href='?src=\ref[src];time=0'>Stop Time Launch</A>"
|
||||
else
|
||||
d2 = "<A href='?src=\ref[src];time=1'>Initiate Time Launch</A>"
|
||||
var/second = time % 60
|
||||
var/minute = (time - second) / 60
|
||||
dat += "<HR>\nTimer System: [d2]\nTime Left: [minute ? "[minute]:" : null][second] <A href='?src=\ref[src];tp=-30'>-</A> <A href='?src=\ref[src];tp=-1'>-</A> <A href='?src=\ref[src];tp=1'>+</A> <A href='?src=\ref[src];tp=30'>+</A>"
|
||||
var/temp = ""
|
||||
var/list/L = list( 0.25, 0.5, 1, 2, 4, 8, 16 )
|
||||
for(var/t in L)
|
||||
if (t == connected.power)
|
||||
temp += text("[] ", t)
|
||||
if(t == connected.power)
|
||||
temp += "[t] "
|
||||
else
|
||||
temp += text("<A href = '?src=\ref[];power=[]'>[]</A> ", src, t, t)
|
||||
//Foreach goto(172)
|
||||
dat += text("<HR>\nPower Level: []<BR>\n<A href = '?src=\ref[];alarm=1'>Firing Sequence</A><BR>\n<A href = '?src=\ref[];drive=1'>Test Fire Driver</A><BR>\n<A href = '?src=\ref[];door=1'>Toggle Outer Door</A><BR>", temp, src, src, src)
|
||||
//*****RM from 40.93.3S
|
||||
temp += "<A href = '?src=\ref[src];power=[t]'>[t]</A> "
|
||||
dat += "<HR>\nPower Level: [temp]<BR>\n<A href = '?src=\ref[src];alarm=1'>Firing Sequence</A><BR>\n<A href = '?src=\ref[src];drive=1'>Test Fire Driver</A><BR>\n<A href = '?src=\ref[src];door=1'>Toggle Outer Door</A><BR>"
|
||||
else
|
||||
dat += text("<BR>\n<A href = '?src=\ref[];door=1'>Toggle Outer Door</A><BR>", src)
|
||||
//*****
|
||||
dat += text("<BR><BR><A href='?src=\ref[];mach_close=computer'>Close</A></TT></BODY></HTML>", user)
|
||||
dat += "<BR>\n<A href = '?src=\ref[src];door=1'>Toggle Outer Door</A><BR>"
|
||||
dat += "<BR><BR><A href='?src=\ref[user];mach_close=computer'>Close</A></TT></BODY></HTML>"
|
||||
user << browse(dat, "window=computer;size=400x500")
|
||||
add_fingerprint(usr)
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/pod/process()
|
||||
..()
|
||||
if (timing)
|
||||
if (time > 0)
|
||||
if(timing)
|
||||
if(time > 0)
|
||||
time = round(time) - 1
|
||||
else
|
||||
alarm()
|
||||
@@ -170,34 +166,23 @@
|
||||
if(href_list["power"])
|
||||
var/t = text2num(href_list["power"])
|
||||
t = min(max(0.25, t), 16)
|
||||
if (connected)
|
||||
if(connected)
|
||||
connected.power = t
|
||||
else
|
||||
if(href_list["alarm"])
|
||||
alarm()
|
||||
else
|
||||
if(href_list["time"])
|
||||
timing = text2num(href_list["time"])
|
||||
else
|
||||
if(href_list["tp"])
|
||||
var/tp = text2num(href_list["tp"])
|
||||
time += tp
|
||||
time = min(max(round(time), 0), 120)
|
||||
if(href_list["alarm"])
|
||||
alarm()
|
||||
if(href_list["time"])
|
||||
timing = text2num(href_list["time"])
|
||||
if(href_list["tp"])
|
||||
var/tp = text2num(href_list["tp"])
|
||||
time += tp
|
||||
time = min(max(round(time), 0), 120)
|
||||
if(href_list["door"])
|
||||
for(var/obj/machinery/door/poddoor/M in world)
|
||||
if(M.id == id)
|
||||
if(M.density)
|
||||
M.open()
|
||||
else
|
||||
if(href_list["door"])
|
||||
if(istype(src, /obj/machinery/computer/pod/old/syndicate))//Added here so Nuke ops don't go running naked into space before moving the shuttle.
|
||||
if(syndicate_station_at_station == 0)
|
||||
usr << "\red You need to launch the Syndicate Shuttle via the computer terminal at the head of the ship before departing."
|
||||
return
|
||||
for(var/obj/machinery/door/poddoor/M in world)
|
||||
if(M.id == id)
|
||||
if(M.density)
|
||||
M.open()
|
||||
return
|
||||
else
|
||||
M.close()
|
||||
return
|
||||
add_fingerprint(usr)
|
||||
M.close()
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -206,12 +191,14 @@
|
||||
/obj/machinery/computer/pod/old
|
||||
icon_state = "old"
|
||||
name = "DoorMex Control Computer"
|
||||
title = "Door Controls"
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/pod/old/syndicate
|
||||
name = "ProComp Executive IIc"
|
||||
desc = "The Syndicate operate on a tight budget. Operates external airlocks."
|
||||
title = "External Airlock Controls"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -596,7 +596,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
if("Toggle Door")
|
||||
if(cartridge && cartridge.access_remote_door)
|
||||
for(var/obj/machinery/door/poddoor/M in machines)
|
||||
for(var/obj/machinery/door/poddoor/M in world)
|
||||
if(M.id == cartridge.remote_door_id)
|
||||
if(M.density)
|
||||
M.open()
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
name = "Detomatix Cartridge"
|
||||
icon_state = "cart"
|
||||
access_remote_door = 1
|
||||
remote_door_id = "syndicate" //Make sure this matches the syndicate shuttle's shield/door id!!
|
||||
remote_door_id = "smindicate" //Make sure this matches the syndicate shuttle's shield/door id!! //don't ask about the name, testing.
|
||||
var/shock_charges = 4
|
||||
|
||||
proc/unlock()
|
||||
|
||||
+3024
-2989
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user