First commit, migrated from SS13.net repository.

This commit is contained in:
stephen001
2008-04-06 21:28:08 +00:00
commit 0f26696a9e
109 changed files with 48990 additions and 0 deletions
File diff suppressed because one or more lines are too long
+23
View File
@@ -0,0 +1,23 @@
/proc/dd_run_tests()
var/test_classes = typesof(/obj/test)
for(var/class in test_classes)
var/obj/test/tester = new class( )
for(var/test in tester.verbs)
call(tester, test)()
if (!( tester.success ))
else
//Foreach continue //goto(59)
if (!( tester.success ))
world << "Test failed."
return
//Foreach goto(26)
world << "All tests passed."
return
/obj/test/proc/die(message)
src.success = 0
CRASH(message)
return
+140
View File
@@ -0,0 +1,140 @@
/proc/dd_file2list(file_path, separator)
var/file
if (separator == null)
separator = "\n"
if (isfile(file_path))
file = file_path
else
file = file( file_path )
return dd_text2list(file2text(file), separator)
return
/proc/dd_replacetext(text, search_string, replacement_string)
var/textList = dd_text2list(text, search_string)
return dd_list2text(textList, replacement_string)
return
/proc/dd_replaceText(text, search_string, replacement_string)
var/textList = dd_text2List(text, search_string)
return dd_list2text(textList, replacement_string)
return
/proc/dd_hasprefix(text, prefix)
var/start = 1
var/end = length(prefix) + 1
return findtext(text, prefix, start, end)
return
/proc/dd_hasPrefix(text, prefix)
var/start = 1
var/end = length(prefix) + 1
return findText(text, prefix, start, end)
return
/proc/dd_hassuffix(text, suffix)
var/start = length(text) - length(suffix)
if (start)
return findtext(text, suffix, start, null)
return
/proc/dd_hasSuffix(text, suffix)
var/start = length(text) - length(suffix)
if (start)
return findText(text, suffix, start, null)
return
/proc/dd_text2list(text, separator)
var/textlength = length(text)
var/separatorlength = length(separator)
var/textList = new /list( )
var/searchPosition = 1
var/findPosition = 1
while(1)
findPosition = findtext(text, separator, searchPosition, 0)
var/buggyText = copytext(text, searchPosition, findPosition)
textList += text("[]", buggyText)
searchPosition = findPosition + separatorlength
if (findPosition == 0)
return textList
else
if (searchPosition > textlength)
textList += ""
return textList
return
/proc/dd_text2List(text, separator)
var/textlength = length(text)
var/separatorlength = length(separator)
var/textList = new /list( )
var/searchPosition = 1
var/findPosition = 1
while(1)
findPosition = findText(text, separator, searchPosition, 0)
var/buggyText = copytext(text, searchPosition, findPosition)
textList += text("[]", buggyText)
searchPosition = findPosition + separatorlength
if (findPosition == 0)
return textList
else
if (searchPosition > textlength)
textList += ""
return textList
return
/proc/dd_list2text(var/list/the_list, separator)
var/total = the_list.len
if (total == 0)
return
var/newText = text("[]", the_list[1])
var/count = 2
while(count <= total)
if (separator)
newText += separator
newText += text("[]", the_list[count])
count++
return newText
return
/proc/dd_centertext(message, length)
var/new_message = message
var/size = length(message)
if (size == length)
return new_message
if (size > length)
return copytext(new_message, 1, length + 1)
var/delta = length - size
if (delta == 1)
return new_message + " "
if (delta % 2)
new_message = " " + new_message
delta--
delta = delta / 2
var/spaces = ""
var/count = null
count = 1
while(count <= delta)
spaces += " "
count++
return spaces + new_message + spaces
return
/proc/dd_limittext(message, length)
var/size = length(message)
if (size <= length)
return message
else
return copytext(message, 1, length + 1)
return
+449
View File
@@ -0,0 +1,449 @@
// NOTE WELL!
// Only include this file when debugging locally
// Do not include in release versions
#define VARSICON 1
#define SDEBUG 1
/turf/verb/Flow()
set category = "Debug"
//set hidden = 1
for(var/turf/T in range(5))
var/obj/mark/O = locate(/obj/mark/, T)
if(!O)
O = new /obj/mark(T)
else
O.overlays = null
var/obj/move/OM = locate(/obj/move/, T)
if(OM)
if(! OM.updatecell)
O.icon_state = "x2"
else
O.icon_state = "blank"
for(var/atom/U in OM.FindTurfs() )
var/dirn = get_dir(OM, U)
if(dirn == 1)
O.overlays += image('mark.dmi', OM.airdir==1?"up":"fup")
else if(dirn == 2)
O.overlays += image('mark.dmi', OM.airdir==2?"dn":"fdn")
else if(dirn == 4)
O.overlays += image('mark.dmi', OM.airdir==4?"rt":"frt")
else if(dirn == 8)
O.overlays += image('mark.dmi', OM.airdir==8?"lf":"flf")
else
if(!(T.updatecell))
O.icon_state = "x2"
else
O.icon_state = "blank"
if(T.airN)
O.overlays += image('mark.dmi', T.airdir==1?"up":"fup")
if(T.airS)
O.overlays += image('mark.dmi', T.airdir==2?"dn":"fdn")
if(T.airW)
O.overlays += image('mark.dmi', T.airdir==8?"lf":"flf")
if(T.airE)
O.overlays += image('mark.dmi', T.airdir==4?"rt":"frt")
if(T.condN)
O.overlays += image('mark.dmi', T.condN == 1?"yup":"rup")
if(T.condS)
O.overlays += image('mark.dmi', T.condS == 1?"ydn":"rdn")
if(T.condE)
O.overlays += image('mark.dmi', T.condE == 1?"yrt":"rrt")
if(T.condW)
O.overlays += image('mark.dmi', T.condW == 1?"ylf":"rlf")
/turf/verb/Clear()
set category = "Debug"
//set hidden = 1
for(var/obj/mark/O in world)
del(O)
/proc/numbericon(var/tn as text,var/s = 0)
var/image/I = image('mark.dmi', "blank")
if(lentext(tn)>8)
tn = "*"
var/len = lentext(tn)
for(var/d = 1 to lentext(tn))
var/char = copytext(tn, len-d+1, len-d+2)
if(char == " ")
continue
var/image/ID = image('mark.dmi', char)
ID.pixel_x = -(d-1)*4
ID.pixel_y = s
//if(d>1) I.Shift(WEST, (d-1)*8)
I.overlays += ID
return I
/turf/verb/Stats()
set category = "Debug"
for(var/turf/T in range(5))
var/obj/mark/O = locate(/obj/mark/, T)
if(!O)
O = new /obj/mark(T)
else
O.overlays = null
var/temp = round(T.temp-T0C, 0.1)
O.overlays += numbericon("[temp]C")
var/pres = round(T.tot_gas() / CELLSTANDARD * 100, 0.1)
O.overlays += numbericon("[pres]", -8)
O.mark = "[temp]/[pres]"
/turf/verb/Pipes()
set category = "Debug"
for(var/turf/T in range(6))
//world << "Turf [T] at ([T.x],[T.y])"
for(var/obj/machinery/M in T)
//world <<" Mach [M] with pdir=[M.p_dir]"
if(M && M.p_dir)
//world << "Accepted"
var/obj/mark/O = locate(/obj/mark/, T)
if(!O)
O = new /obj/mark(T)
else
O.overlays = null
if(istype(M, /obj/machinery/pipes))
var/obj/machinery/pipes/P = M
O.overlays += numbericon("[P.plnum] ", -20)
M = P.pl
var/obj/substance/gas/G = M.get_gas()
if(G)
var/cap = round( 100*(G.tot_gas()/ M.capmult / 6e6), 0.1)
var/temp = round(G.temperature - T0C, 0.1)
O.overlays += numbericon("[temp]C", 0)
O.overlays += numbericon("[cap]", -8)
break
/turf/verb/Cables()
set category = "Debug"
for(var/turf/T in range(6))
//world << "Turf [T] at ([T.x],[T.y])"
var/obj/mark/O = locate(/obj/mark/, T)
if(!O)
O = new /obj/mark(T)
else
O.overlays = null
var/marked = 0
for(var/obj/M in T)
//world <<" Mach [M] with pdir=[M.p_dir]"
if(M && istype(M, /obj/cable/))
var/obj/cable/C = M
//world << "Accepted"
O.overlays += numbericon("[C.netnum] " , marked)
marked -= 8
else if(M && istype(M, /obj/machinery/power/))
var/obj/machinery/power/P = M
O.overlays += numbericon("*[P.netnum] " , marked)
marked -= 8
if(!marked)
del(O)
/turf/verb/Solar()
set category = "Debug"
for(var/turf/T in range(6))
//world << "Turf [T] at ([T.x],[T.y])"
var/obj/mark/O = locate(/obj/mark/, T)
if(!O)
O = new /obj/mark(T)
else
O.overlays = null
var/obj/machinery/power/solar/S
S = locate(/obj/machinery/power/solar, T)
if(S)
O.overlays += numbericon("[S.obscured] " , 0)
O.overlays += numbericon("[round(S.sunfrac*100,0.1)] " , -12)
else
del(O)
/mob/verb/Showports()
set category = "Debug"
var/turf/T
var/obj/machinery/pipes/P
var/list/ndirs
for(var/obj/machinery/pipeline/PL in plines)
var/num = plines.Find(PL)
P = PL.nodes[1] // 1st node in list
ndirs = P.get_node_dirs()
T = get_step(P, ndirs[1])
var/obj/mark/O = new(T)
O.overlays += numbericon("[num] * 1 ", -4)
O.overlays += numbericon("[ndirs[1]] - [ndirs[2]]",-16)
P = PL.nodes[PL.nodes.len] // last node in list
ndirs = P.get_node_dirs()
T = get_step(P, ndirs[2])
O = new(T)
O.overlays += numbericon("[num] * 2 ", -4)
O.overlays += numbericon("[ndirs[1]] - [ndirs[2]]", -16)
/atom/verb/delete()
set category = "Debug"
set src in view()
del(src)
/area/verb/dark()
set category = "Debug"
if(src.icon_state == "dark")
icon_state = null
else
icon_state = "dark"
/area/verb/power()
set category = "Debug"
power_equip = !power_equip
power_environ = !power_environ
world << "Power ([src]) = [power_equip]"
power_change()
// *****RM
/mob/verb/Jump(var/area/A in world)
set category = "Debug"
set desc = "Area to jump to"
set src = usr
var/list/L = list()
for(var/turf/T in A)
if(!T.density)
var/clear = 1
for(var/obj/O in T)
if(O.density)
clear = 0
break
if(clear)
L+=T
src.loc = pick(L)
// *****
/mob/verb/ShowPlasma()
set category = "Debug"
Plasma()
/mob/verb/Blobcount()
set category = "Debug"
world << "Blob count: [blobs.len]"
/mob/verb/Blobkill()
set category = "Debug"
blobs = list()
world << "Blob killed."
/mob/verb/Blobmode()
set category = "Debug"
world << "Event=[ticker.event]"
world << "Time =[(ticker.event_time - world.realtime)/10]s"
/mob/verb/Blobnext()
set category = "Debug"
ticker.event_time = world.realtime
/mob/verb/callshuttle()
set category = "Debug"
ticker.timeleft = 300
ticker.timing = 1
/mob/verb/apcs()
set category = "Debug"
for(var/obj/machinery/power/apc/APC in world)
world << APC.report()
/mob/verb/Globals()
set category = "Debug"
debugobj = new()
debugobj.debuglist = list( powernets, plines, vote, config, admins, ticker, SS13_airtunnel, sun )
world << "<A href='?src=\ref[debugobj];Vars=1'>Debug</A>"
/*for(var/obj/O in plines)
world << "<A href='?src=\ref[O];Vars=1'>[O.name]</A>"
*/
/mob/verb/Debug()
set category = "Debug"
Debug = !Debug
world << "Debugging [Debug ? "On" : "Off"]"
/mob/verb/Mach()
set category = "Debug"
var/n = 0
for(var/obj/machinery/M in world)
n++
if(! (M in machines) )
world << "[M] [M.type]: not in list"
world << "in world: [n]; in list:[machines.len]"
/mob/verb/air()
set category = "Debug"
Air()
/proc/Air()
var/area/A = locate(/area/airintake)
var/atot = 0
for(var/turf/T in A)
atot += T.tot_gas()
var/ptot = 0
for(var/obj/machinery/pipeline/PL in plines)
if(PL.suffix == "d")
ptot += PL.ngas.tot_gas()
var/vtot = 0
for(var/obj/machinery/atmoalter/V in machines)
if(V.suffix == "d")
vtot += V.gas.tot_gas()
var/ctot = 0
for(var/obj/machinery/connector/C in machines)
if(C.suffix == "d")
ctot += C.ngas.tot_gas()
var/tot = atot + ptot + vtot + ctot
world.log << "A=[num2text(atot,10)] P=[num2text(ptot,10)] V=[num2text(vtot,10)] C=[num2text(ctot,10)] : Total=[num2text(tot,10)]"
/mob/verb/Revive()
set category = "Debug"
fireloss = 0
toxloss = 0
bruteloss = 0
oxyloss = 0
paralysis = 0
stunned = 0
weakened = 0
health = 100
if(stat > 1) stat=0
disabilities = initial(disabilities)
sdisabilities = initial(sdisabilities)
for(var/obj/item/weapon/organ/external/e in src)
e.brute_dam = 0.0
e.burn_dam = 0.0
e.bandaged = 0.0
e.wound_size = 0.0
e.max_damage = initial(e.max_damage)
e.update_icon()
if(src.type == /mob/human)
var/mob/human/H = src
H.UpdateDamageIcon()
/mob/verb/Smoke()
set category = "Debug"
var/obj/effects/smoke/O = new /obj/effects/smoke( src.loc )
O.dir = pick(NORTH, SOUTH, EAST, WEST)
spawn( 0 )
O.Life()
+194
View File
@@ -0,0 +1,194 @@
/proc/add_zero(t, u)
while(length(t) < u)
t = text("0[]", t)
return t
/proc/add_lspace(t, u)
while(length(t) < u)
t = " [t]"
return t
/proc/add_tspace(t, u)
while(length(t) < u)
t = "[t] "
return t
/obj/bomb/New()
..() //*****RM
switch(btype)
if(0) // radio
var/obj/item/weapon/assembly/r_i_ptank/R = new /obj/item/weapon/assembly/r_i_ptank( src.loc )
var/obj/item/weapon/tank/plasmatank/p3 = new /obj/item/weapon/tank/plasmatank( R )
var/obj/item/weapon/radio/signaler/p1 = new /obj/item/weapon/radio/signaler( R )
var/obj/item/weapon/igniter/p2 = new /obj/item/weapon/igniter( R )
R.part1 = p1
R.part2 = p2
R.part3 = p3
p1.master = R
p2.master = R
p3.master = R
R.status = explosive
p1.b_stat = 0
p2.status = 1
p3.gas.temperature = btemp + T0C
//SN src = null
if(1) // prox
var/obj/item/weapon/assembly/m_i_ptank/R = new /obj/item/weapon/assembly/m_i_ptank( src.loc )
var/obj/item/weapon/tank/plasmatank/p3 = new /obj/item/weapon/tank/plasmatank( R )
var/obj/item/weapon/prox_sensor/p1 = new /obj/item/weapon/prox_sensor( R )
var/obj/item/weapon/igniter/p2 = new /obj/item/weapon/igniter( R )
R.part1 = p1
R.part2 = p2
R.part3 = p3
p1.master = R
p2.master = R
p3.master = R
R.status = explosive
p3.gas.temperature = btemp +T0C
p2.status = 1
if(src.active)
R.part1.state = 1
R.part1.icon_state = text("motion[]", 1)
R.c_state(1, src)
if(2) // time
var/obj/item/weapon/assembly/t_i_ptank/R = new /obj/item/weapon/assembly/t_i_ptank( src.loc )
var/obj/item/weapon/tank/plasmatank/p3 = new /obj/item/weapon/tank/plasmatank( R )
var/obj/item/weapon/timer/p1 = new /obj/item/weapon/timer( R )
var/obj/item/weapon/igniter/p2 = new /obj/item/weapon/igniter( R )
R.part1 = p1
R.part2 = p2
R.part3 = p3
p1.master = R
p2.master = R
p3.master = R
R.status = explosive
p3.gas.temperature = btemp +T0C
p2.status = 1
del(src)
return
/obj/proc/throwing(t_dir, rs)
if (src.throwspeed <= 1)
src.throwing = 0
src.throwspeed--
if (rs == 0)
rs = 1
if (src.throwing)
if (rs == 1)
step(src, t_dir)
sleep(1)
spawn( 0 )
throwing(t_dir, rs)
return
else
if (rs > 1)
var/t = null
while(t < rs)
step(src, t_dir)
t++
sleep(10)
spawn( 0 )
src.throwing(t_dir, rs)
return
else
step(src, t_dir)
sleep(10 / rs)
spawn( 0 )
throwing(t_dir, rs)
return
else
//*****RM
//src.density = 0
if(istype(src, /obj/item))
src.density = 0
//*****
return
//*****RM
/obj/Bump(atom/O)
if (src.throwing)
//world<<"[src] bumped into [O] and stopped"
src.throwing = 0
..()
//*****
/atom/proc/burn(fi_amount)
return
/atom/movable/Move()
var/atom/A = src.loc
. = ..()
src.move_speed = world.time - src.l_move_time
src.l_move_time = world.time
src.m_flag = 1
if ((A != src.loc && A && A.z == src.z))
src.last_move = get_dir(A, src.loc)
return
/proc/cleanstring(var/t)
var/index = findtext(t, "\n")
while(index)
t = copytext(t, 1, index) + "#" + copytext(t, index+1)
index = findtext(t, "\n")
index = findtext(t, "\t")
while(index)
t = copytext(t, 1, index) + "#" + copytext(t, index+1)
index = findtext(t, "\t")
return t
/datum/config/New()
for(var/M in modes)
pickprob[M] = 1
/datum/config/proc/pickmode()
var/total = 0
var/list/accum = list()
for(var/M in modes)
total += pickprob[M]
accum[M] = total
//world << "[M] [pickprob[M]] [accum[M]]"
var/r = total-(rand()*total)
//world << "Chosen value is [r]"
for(var/M in modes)
if(pickprob[M]>0 && accum[M]>=r)
//world << "Returning mode [M]"
return M
world << "Failed to pick gamemode in config/pickmode()"
return null
/proc/upperfirst(var/t as text)
return uppertext(copytext(t,1,2))+copytext(t,2)
+834
View File
@@ -0,0 +1,834 @@
/obj/move/airtunnel/process()
if (!( src.deployed ))
return null
else
..()
return
/obj/move/airtunnel/connector/create()
src.current = src
src.next = new /obj/move/airtunnel( null )
src.next.master = src.master
src.next.previous = src
spawn( 0 )
src.next.create(36, src.y)
return
return
/obj/move/airtunnel/connector/wall/create()
src.current = src
src.next = new /obj/move/airtunnel/wall( null )
src.next.master = src.master
src.next.previous = src
spawn( 0 )
src.next.create(36, src.y)
return
return
/obj/move/airtunnel/connector/wall/process()
return
/obj/move/airtunnel/wall/create(num, y_coord)
if (((num < 7 || (num > 14 && num < 21)) && y_coord == 72))
src.next = new /obj/move/airtunnel( null )
else
src.next = new /obj/move/airtunnel/wall( null )
src.next.master = src.master
src.next.previous = src
if (num > 1)
spawn( 0 )
src.next.create(num - 1, y_coord)
return
return
/obj/move/airtunnel/wall/move_right()
flick("wall-m", src)
return ..()
return
/obj/move/airtunnel/wall/move_left()
flick("wall-m", src)
return ..()
return
/obj/move/airtunnel/wall/process()
return
/obj/move/airtunnel/proc/move_left()
src.relocate(get_step(src, WEST))
if ((src.next && src.next.deployed))
return src.next.move_left()
else
return src.next
return
/obj/move/airtunnel/proc/move_right()
src.relocate(get_step(src, EAST))
if ((src.previous && src.previous.deployed))
src.previous.move_right()
return src.previous
return
/obj/move/airtunnel/proc/create(num, y_coord)
if (y_coord == 72)
if ((num < 7 || (num > 14 && num < 21)))
src.next = new /obj/move/airtunnel( null )
else
src.next = new /obj/move/airtunnel/wall( null )
else
src.next = new /obj/move/airtunnel( null )
src.next.master = src.master
src.next.previous = src
if (num > 1)
spawn( 0 )
src.next.create(num - 1, y_coord)
return
return
/obj/machinery/at_indicator/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(58)
src.icon_state = "reader_broken"
stat |= BROKEN
if(3.0)
if (prob(25))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(109)
src.icon_state = "reader_broken"
stat |= BROKEN
else
return
/obj/machinery/at_indicator/blob_act()
if (prob(50))
for(var/x in src.verbs)
src.verbs -= x
src.icon_state = "reader_broken"
stat |= BROKEN
/obj/machinery/at_indicator/proc/update_icon()
if(stat & (BROKEN|NOPOWER) )
icon_state = "reader_broken"
var/status = 0
if (SS13_airtunnel.operating == 1)
status = "r"
else
if (SS13_airtunnel.operating == 2)
status = "e"
else
var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors)
if (C.current == C)
status = 0
else
if (!( C.current.next ))
status = 2
else
status = 1
src.icon_state = text("reader[][]", (SS13_airtunnel.siphon_status == 2 ? "1" : "0"), status)
return
/obj/machinery/at_indicator/process()
use_power(5, ENVIRON)
src.update_icon()
return
/obj/machinery/computer/airtunnel/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(58)
src.icon_state = "broken"
if(3.0)
if (prob(25))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(109)
src.icon_state = "broken"
else
return
/obj/machinery/computer/airtunnel/attack_paw(user as mob)
return src.attack_hand(user)
return
/obj/machinery/computer/airtunnel/attack_hand(var/mob/user as mob)
if(stat & (NOPOWER|BROKEN) )
return
var/dat = "<HTML><BODY><TT><B>Air Tunnel Controls</B><BR>"
user.machine = src
if (SS13_airtunnel.operating == 1)
dat += "<B>Status:</B> RETRACTING<BR>"
else
if (SS13_airtunnel.operating == 2)
dat += "<B>Status:</B> EXPANDING<BR>"
else
var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors)
if (C.current == C)
dat += "<B>Status:</B> Fully Retracted<BR>"
else
if (!( C.current.next ))
dat += "<B>Status:</B> Fully Extended<BR>"
else
dat += "<B>Status:</B> Stopped Midway<BR>"
dat += text("<A href='?src=\ref[];retract=1'>Retract</A> <A href='?src=\ref[];stop=1'>Stop</A> <A href='?src=\ref[];extend=1'>Extend</A><BR>", src, src, src)
dat += text("<BR><B>Air Level:</B> []<BR>", (SS13_airtunnel.air_stat ? "Acceptable" : "DANGEROUS"))
dat += "<B>Air System Status:</B> "
switch(SS13_airtunnel.siphon_status)
if(0.0)
dat += "Stopped "
if(1.0)
dat += "Siphoning (Siphons only) "
if(2.0)
dat += "Regulating (BOTH) "
if(3.0)
dat += "RELEASING MAX (Siphons only) "
else
dat += text("<A href='?src=\ref[];refresh=1'>(Refresh)</A><BR>", src)
dat += text("<A href='?src=\ref[];release=1'>RELEASE (Siphons only)</A> <A href='?src=\ref[];siphon=1'>Siphon (Siphons only)</A> <A href='?src=\ref[];stop_siph=1'>Stop</A> <A href='?src=\ref[];auto=1'>Regulate</A><BR>", src, src, src, src)
dat += text("<BR><BR><A href='?src=\ref[];mach_close=computer'>Close</A></TT></BODY></HTML>", user)
user << browse(dat, "window=computer;size=400x500")
return
/obj/machinery/computer/airtunnel/proc/update_icon()
if(stat & BROKEN)
icon_state = "broken"
return
if(stat & NOPOWER)
icon_state = "c_unpowered"
return
var/status = 0
if (SS13_airtunnel.operating == 1)
status = "r"
else
if (SS13_airtunnel.operating == 2)
status = "e"
else
var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors)
if (C.current == C)
status = 0
else
if (!( C.current.next ))
status = 2
else
status = 1
src.icon_state = text("console[][]", (SS13_airtunnel.siphon_status >= 2 ? "1" : "0"), status)
return
/obj/machinery/computer/airtunnel/process()
src.update_icon()
if(stat & (NOPOWER|BROKEN) )
return
use_power(250)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
//Foreach goto(27)
return
/obj/machinery/computer/airtunnel/Topic(href, href_list)
..()
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
usr << "\red You don't have the dexterity to do this!"
return
if ((usr.stat || usr.restrained()))
return
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
usr.machine = src
if (href_list["retract"])
SS13_airtunnel.retract()
else
if (href_list["stop"])
SS13_airtunnel.operating = 0
else
if (href_list["extend"])
SS13_airtunnel.extend()
else
if (href_list["release"])
SS13_airtunnel.siphon_status = 3
SS13_airtunnel.siphons()
else
if (href_list["siphon"])
SS13_airtunnel.siphon_status = 1
SS13_airtunnel.siphons()
else
if (href_list["stop_siph"])
SS13_airtunnel.siphon_status = 0
SS13_airtunnel.siphons()
else
if (href_list["auto"])
SS13_airtunnel.siphon_status = 2
SS13_airtunnel.siphons()
else
if (href_list["refresh"])
SS13_airtunnel.siphons()
src.add_fingerprint(usr)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
//Foreach goto(346)
return
/obj/machinery/camera/attackby(W as obj, user as mob)
if (istype(W, /obj/item/weapon/wirecutters))
src.status = !( src.status )
if (!( src.status ))
for(var/mob/O in viewers(user, null))
O.show_message(text("\red [] has deactivated []!", user, src), 1)
//Foreach goto(49)
src.icon_state = "camera1"
else
for(var/mob/O in viewers(user, null))
O.show_message(text("\red [] has reactivated []!", user, src), 1)
//Foreach goto(106)
src.icon_state = "camera"
return
//*****RM
/obj/machinery/camera/ex_act(severity)
if(src.invuln)
return
else
..(severity)
return
/obj/machinery/camera/blob_act()
return
obj/machinery/door_control/attack_paw(mob/user as mob)
return src.attack_hand(user)
obj/machinery/door_control/attackby(nothing, mob/user as mob)
return src.attack_hand(user)
obj/machinery/door_control/attack_hand(mob/user as mob)
if(stat & NOPOWER)
return
use_power(5)
icon_state = "doorctrl1"
for(var/obj/machinery/door/poddoor/M in machines)
if (M.id == src.id)
if (M.density)
spawn( 0 )
M.openpod()
return
else
spawn( 0 )
M.closepod()
return
spawn(15)
if(!(stat & NOPOWER))
icon_state = "doorctrl0"
//*****
/obj/machinery/door_control/power_change()
..()
if(stat & NOPOWER)
icon_state = "doorctrl-p"
else
icon_state = "doorctrl0"
/obj/machinery/sec_lock/attack_paw(user as mob)
return src.attack_hand(user)
/obj/machinery/sec_lock/attack_hand(var/mob/user as mob)
if(stat & NOPOWER)
return
use_power(10)
if (src.loc == user.loc)
var/dat = text("<B>Security Pad:</B><BR>\nKeycard: []<BR>\n<A href='?src=\ref[];door1=1'>Toggle Outer Door</A><BR>\n<A href='?src=\ref[];door2=1'>Toggle Inner Door</A><BR>\n<BR>\n<A href='?src=\ref[];em_cl=1'>Emergency Close</A><BR>\n<A href='?src=\ref[];em_op=1'>Emergency Open</A><BR>", (src.scan ? text("<A href='?src=\ref[];card=1'>[]</A>", src, src.scan.name) : text("<A href='?src=\ref[];card=1'>-----</A>", src)), src, src, src, src)
user << browse(dat, "window=sec_lock")
return
/obj/machinery/sec_lock/attackby(nothing, user as mob)
return src.attack_hand(user)
/obj/machinery/sec_lock/New()
..()
spawn( 2 )
if (src.a_type == 1)
src.d2 = locate(/obj/machinery/door, locate(src.x - 2, src.y - 1, src.z))
src.d1 = locate(/obj/machinery/door, get_step(src, SOUTHWEST))
else
if (src.a_type == 2)
src.d2 = locate(/obj/machinery/door, locate(src.x - 2, src.y + 1, src.z))
src.d1 = locate(/obj/machinery/door, get_step(src, NORTHWEST))
else
src.d1 = locate(/obj/machinery/door, get_step(src, SOUTH))
src.d2 = locate(/obj/machinery/door, get_step(src, SOUTHEAST))
return
return
/obj/machinery/sec_lock/Topic(href, href_list)
..()
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
usr << "\red You don't have the dexterity to do this!"
return
if ((usr.stat || usr.restrained()))
return
if ((!( src.d1 ) || !( src.d2 )))
usr << "\red Error: Cannot interface with door security!"
return
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
usr.machine = src
if (href_list["card"])
if (src.scan)
src.scan.loc = src.loc
src.scan = null
else
var/obj/item/weapon/card/id/I = usr.equipped()
if (istype(I, /obj/item/weapon/card/id))
usr.drop_item()
I.loc = src
src.scan = I
if (href_list["door1"])
if (src.scan)
if (scan.check_access(access, allowed))
if (src.d1.density)
spawn( 0 )
src.d1.open()
return
else
spawn( 0 )
src.d1.close()
return
if (href_list["door2"])
if (src.scan)
if (scan.check_access(access, allowed))
if (src.d2.density)
spawn( 0 )
src.d2.open()
return
else
spawn( 0 )
src.d2.close()
return
if (href_list["em_cl"])
if (src.scan)
if (scan.check_access(access, allowed))
if (!( src.d1.density ))
src.d1.close()
return
sleep(1)
spawn( 0 )
if (!( src.d2.density ))
src.d2.close()
return
if (href_list["em_op"])
if (src.scan)
if (scan.check_access(access, allowed))
spawn( 0 )
if (src.d1.density)
src.d1.open()
return
sleep(1)
spawn( 0 )
if (src.d2.density)
src.d2.open()
return
src.add_fingerprint(usr)
for(var/mob/M in src.loc)
if ((M.client && M.machine == src))
spawn( 0 )
src.attack_hand(M)
return
//Foreach goto(737)
return
/obj/machinery/autolathe/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob)
if (istype(O, /obj/item/weapon/sheet/metal))
if (src.m_amount < 150000.0)
src.m_amount += O:height * O:width * O:length * 1000000.0
O:amount--
if (O:amount < 1)
//O = null
del(O)
else
if (istype(O, /obj/item/weapon/sheet/glass))
if (src.g_amount < 75000.0)
src.g_amount += O:height * O:width * O:length * 1000000.0
O:amount--
if (O:amount < 1)
//O = null
del(O)
else
if (istype(O, /obj/item/weapon/screwdriver))
if (!( src.operating ))
src.opened = !( src.opened )
src.icon_state = text("autolathe[]", (src.opened ? "f" : null))
else
user << "\red The machine is in use. You can not maintain it now."
else
spawn( 0 )
src.attack_hand(user)
return
return
/obj/machinery/autolathe/attack_paw(user as mob)
return src.attack_hand(user)
return
/obj/machinery/autolathe/attack_hand(user as mob)
var/dat
if (src.temp)
dat = text("<TT>[]</TT><BR><BR><A href='?src=\ref[];temp=1'>Clear Screen</A>", src.temp, src)
else
dat = text("<B>Metal Amount:</B> [] cm<sup>3</sup> (MAX: 150,000)<BR>\n<FONT color = blue><B>Glass Amount:</B></FONT> [] cm<sup>3</sup> (MAX: 75,000)<HR>", src.m_amount, src.g_amount)
var/list/L = list( )
/* L["screwdriver"] = "Make Screwdriver {40 cc}"
L["wirecutters"] = "Make Wirecutters {80 cc}"
L["wrench"] = "Make Wrench {150 cc}"
L["crowbar"] = "Make Crowbar {150 cc}"
L["screw"] = "Make Screw (1) {3 cc}"
L["5screws"] = "Make Screws (5) {14 cc}"
L["rod_t"] = "Make Rod (1x20) {20 cc}"
L["rod_l"] = "Make Rod (5x250) {1250 cc}"
L["grille_1"] = "Make Grille (250x250x1) {27345 cc}"
L["sheet_1"] = "Make Sheet (20x10x.01) {2 cc}"
L["sheet_2"] = "Make Sheet (30x10x.01) {3 cc}"
L["sheet_3"] = "Make Sheet (30x20x.01) {6 cc}"
L["sheet_4"] = "Make Sheet (30x30x.01) {9 cc}"
L["sheet_5"] = "Make Sheet (62.5x62.5x4) {15625 cc}" */
for(var/t in L)
dat += "<A href='?src=\ref[src];make=[t]'>[L["[t]"]]<BR>"
//Foreach goto(230)
user << browse("<HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><TT>[dat]</TT>", "window=autolathe")
return
/obj/machinery/autolathe/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()))
return
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
usr.machine = src
src.add_fingerprint(usr)
if (href_list["temp"])
src.temp = null
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
//Foreach goto(108)
return
/obj/machinery/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
//SN src = null
del(src)
return
if(3.0)
if (prob(25))
//SN src = null
del(src)
return
else
return
/obj/machinery/blob_act()
if(prob(25))
del(src)
/obj/machinery/injector/attackby(var/obj/item/weapon/tank/W as obj, var/mob/user as mob)
if(stat & NOPOWER)
return
use_power(25)
var/obj/item/weapon/tank/ptank = W
if (!( istype(ptank, /obj/item/weapon/tank) ))
return
var/turf/T = get_step(src.loc, get_dir(user, src))
ptank.gas.turf_add(T, -1.0)
src.add_fingerprint(user)
return
/obj/machinery/alarm/process()
if(stat & NOPOWER)
icon_state = "alarm-p"
return
use_power(5, ENVIRON)
var/safe = 1
var/turf/T = src.loc
if (!( istype(T, /turf) ))
return
if (locate(/obj/move, T))
T = locate(/obj/move, T)
var/turf_total = T.co2 + T.oxygen + T.poison + T.sl_gas + T.n2
turf_total = max(turf_total, 1)
var/t1 = turf_total / CELLSTANDARD * 100
if (!( (90 < t1 && t1 < 110) ))
safe = 0
t1 = T.oxygen / turf_total * 100
if (!( (20 < t1 && t1 < 30) ))
safe = 0
src.icon_state = text("alarm:[]", !( safe ))
return
/obj/machinery/alarm/power_change()
if( powered(ENVIRON) )
stat &= ~NOPOWER
else
stat |= NOPOWER
/obj/machinery/alarm/examine()
set src in oview(1)
if (usr.stat || stat & NOPOWER)
return
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
usr << "\red You don't have the dexterity to do this!"
return
var/turf/T = src.loc
if (!( istype(T, /turf) ))
return
var/turf_total = T.co2 + T.oxygen + T.poison + T.sl_gas + T.n2
turf_total = max(turf_total, 1)
usr.show_message("\blue <B>Results:</B>", 1)
var/t = ""
var/t1 = turf_total / CELLSTANDARD * 100
if ((90 < t1 && t1 < 110))
usr.show_message(text("\blue Air Pressure: []%", t1), 1)
else
usr.show_message(text("\blue Air Pressure:\red []%", t1), 1)
t1 = T.n2 / turf_total * 100
t1 = round(t1, 0.0010)
if ((60 < t1 && t1 < 80))
t += text("<font color=blue>Nitrogen: []</font> ", t1)
else
t += text("<font color=red>Nitrogen: []</font> ", t1)
t1 = T.oxygen / turf_total * 100
t1 = round(t1, 0.0010)
if ((20 < t1 && t1 < 24))
t += text("<font color=blue>Oxygen: []</font> ", t1)
else
t += text("<font color=red>Oxygen: []</font> ", t1)
t1 = T.poison / turf_total * 100
t1 = round(t1, 0.0010)
if (t1 < 0.5)
t += text("<font color=blue>Plasma: []</font> ", t1)
else
t += text("<font color=red>Plasma: []</font> ", t1)
t1 = T.co2 / turf_total * 100
t1 = round(t1, 0.0010)
if (t1 < 1)
t += text("<font color=blue>CO2: []</font> ", t1)
else
t += text("<font color=red>CO2: []</font> ", t1)
t1 = T.sl_gas / turf_total * 100
t1 = round(t1, 0.0010)
if (t1 < 5)
t += text("<font color=blue>NO2: []</font>", t1)
else
t += text("<font color=red>NO2: []</font>", t1)
usr.show_message(t, 1)
usr.show_message(text("\blue \t Temperature: []&deg;C", T.temp - T0C), 1)
src.add_fingerprint(usr)
return
/obj/machinery/alarm/indicator/process()
if(stat & NOPOWER)
icon_state = "indicator-p"
return
var/safe = 1
var/turf/T = src.loc
if (!( istype(T, /turf) ))
return
if (locate(/obj/move, T))
T = locate(/obj/move, T)
var/turf_total = T.co2 + T.oxygen + T.poison + T.sl_gas + T.n2
turf_total = max(turf_total, 1)
var/t1 = turf_total / CELLSTANDARD * 100
if (!( (90 < t1 && t1 < 110) ))
safe = 0
t1 = T.oxygen / turf_total * 100
if (!( (20 < t1 && t1 < 30) ))
safe = 0
src.icon_state = text("indicator[]", safe)
SS13_airtunnel.air_stat = safe
return
/datum/air_tunnel/air_tunnel1/New()
..()
for(var/obj/move/airtunnel/A in locate(/area/airtunnel1))
A.master = src
A.create()
src.connectors += A
//Foreach goto(21)
return
/datum/air_tunnel/proc/siphons()
switch(src.siphon_status)
if(0.0)
for(var/obj/machinery/atmoalter/siphs/S in locate(/area/airtunnel1))
S.t_status = 3
//Foreach goto(42)
if(1.0)
for(var/obj/machinery/atmoalter/siphs/fullairsiphon/S in locate(/area/airtunnel1))
S.t_status = 2
S.t_per = 1000000.0
//Foreach goto(86)
for(var/obj/machinery/atmoalter/siphs/scrubbers/S in locate(/area/airtunnel1))
S.t_status = 3
//Foreach goto(136)
if(2.0)
for(var/obj/machinery/atmoalter/siphs/S in locate(/area/airtunnel1))
S.t_status = 4
//Foreach goto(180)
if(3.0)
for(var/obj/machinery/atmoalter/siphs/fullairsiphon/S in locate(/area/airtunnel1))
S.t_status = 1
S.t_per = 1000000.0
//Foreach goto(224)
for(var/obj/machinery/atmoalter/siphs/scrubbers/S in locate(/area/airtunnel1))
S.t_status = 3
//Foreach goto(274)
else
return
/datum/air_tunnel/proc/stop()
src.operating = 0
return
/datum/air_tunnel/proc/extend()
if (src.operating)
return
src.operating = 2
while(src.operating == 2)
var/ok = 1
for(var/obj/move/airtunnel/connector/A in src.connectors)
if (!( A.current.next ))
src.operating = 0
return
if (!( A.move_left() ))
ok = 0
//Foreach goto(56)
if (!( ok ))
src.operating = 0
else
for(var/obj/move/airtunnel/connector/A in src.connectors)
if (A.current)
A.current.next.loc = get_step(A.current.loc, EAST)
A.current = A.current.next
A.current.deployed = 1
else
src.operating = 0
//Foreach goto(150)
sleep(20)
return
/datum/air_tunnel/proc/retract()
if (src.operating)
return
src.operating = 1
while(src.operating == 1)
var/ok = 1
for(var/obj/move/airtunnel/connector/A in src.connectors)
if (A.current == A)
src.operating = 0
return
if (A.current)
A.current.loc = null
A.current.deployed = 0
A.current = A.current.previous
else
ok = 0
//Foreach goto(56)
if (!( ok ))
src.operating = 0
else
for(var/obj/move/airtunnel/connector/A in src.connectors)
if (!( A.current.move_right() ))
src.operating = 0
//Foreach goto(188)
sleep(20)
return
+331
View File
@@ -0,0 +1,331 @@
/area
var/fire = null
level = null
name = "area"
mouse_opacity = 0
var/lightswitch = 1
var/eject = null
var/requires_power = 1
var/power_equip = 1
var/power_light = 1
var/power_environ = 1
var/used_equip = 0
var/used_light = 0
var/used_environ = 0
var/numturfs = 0
var/linkarea = null
var/area/linked = null
var/no_air = null
/area/aircontrol
name = "aircontrol"
linkarea = "airintake"
/area/airintake
name = "air intake"
/area/airtunnel1
name = "airtunnel"
/area/control_room
name = "control room"
/area/controlaccess
name = "control access"
/area/crew_quarters
name = "crew quarters"
/area/decontamination
name = "decon"
/area/dummy
/area/engine
name = "engine"
/area/engine_access
name = "engine access"
/area/escapezone
name = "escape zone"
/area/hallways
name = "hallway"
/area/hallways/centralhall
name = "central hall"
/area/hallways/eastairlock
name = "east airlock"
/area/hallways/labaccess
name = "lab access"
/area/hallways/loungehall
name = "lounge hall"
/area/lounge
name = "lounge"
/area/medical
name = "medical bay"
/area/medicalstorage
name = "medical storage"
/area/oxygen_storage
name = "gas storage"
/area/security
name = "security"
linkarea = "brig"
/area/shuttle
requires_power = 0
name = "shuttle"
/area/shuttle_airlock
name = "shuttle airlock"
/area/shuttle_prison
name = "prison shuttle"
requires_power = 0
/area/sleep_area
name = "sleep area"
/area/solar_con
name = "solar power control"
/area/start
name = "start area"
/area/supply_station
name = "supply station"
/area/testlab1
name = "testlab1"
/area/testlab2
name = "testlab2"
/area/testlab3
name = "testlab3"
/area/testlab4
name = "testlab4"
/area/aux_engine
name = "aux. engine"
/area/toolstorage
name = "tool storage"
/area/tech_storage
name = "technical storage"
/area/toxinlab
name = "toxin lab"
/area/vehicles
requires_power = 0
/area/vehicles/shuttle1
/area/vehicles/shuttle2
/area/vehicles/shuttle3
// new areas
/area/sleep_area_annexe
name = "sleep area annexe"
/area/south_access
name = "southern access corridor"
/area/transport_tube
name = "transport tube"
/area/shuttle_docking_arm
name = "shuttle docking arm"
/area/secure_storage
name = "secure stores"
/area/emergency_storage
name = "emergency stores"
/area/morgue
name = "morgue"
/area/repair_bay
name = "repair bay"
/area/engine/engine_gas_storage
name = "engine gas storage"
/area/engine/engine_storage
name = "engine storage"
/area/engine/engine_hallway
name = "engine hallway"
/area/engine/generator
name = "generator room"
/area/engine/combustion
name = "combustion chamber"
/area/engine/engine_control
name = "engine control"
/area/engine/engine_mon
name = "engine monitoring"
/area/station_teleport
name = "SS13 teleporter"
/area/chapel
name = "chapel"
/area/attack_ship
name = "attack ship"
/area/security_sub
name = "security annexe"
/area/aux_storage
name = "aux. storage"
/area/eva_storage
name = "EVA storage"
/area/weapon_sat
name = "weapon sat"
requires_power = 0
/area/med_sat
name = "med. sat"
requires_power = 0
/area/secret_base
name = "secret base"
no_air = 1
power_equip = 0
power_light = 0
power_environ = 0
/area/prison
name = "prison"
requires_power = 0
/area/control_station
name = "control station"
requires_power = 0
/area/brig
name = "brig"
/area/New()
..()
src.icon = 'alert.dmi'
src.layer = 10
if(!requires_power)
power_light = 1
power_equip = 1
power_environ = 1
spawn(5)
for(var/turf/T in src) // count the number of turfs (for lighting calc)
numturfs++ // spawned with a delay so turfs can finish loading
if(no_air)
T.oxygen = 0 // remove air if so specified for this area
T.n2 = 0
T.res_vars()
if(linkarea)
linked = locate(text2path("/area/[linkarea]")) // area linked to this for power calcs
spawn(15)
src.power_change() // all machines set to current power level, also updates lighting icon
/area/vehicles/New()
..()
sleep(1)
var/obj/shut_controller/S = new /obj/shut_controller( )
shuttles += S
for(var/obj/move/O in src)
S.parts += O
O.master = S
//Foreach goto(42)
return
/area/proc/firealert()
if (!( src.fire ))
src.fire = 1
src.updateicon()
src.mouse_opacity = 0
for(var/obj/machinery/door/firedoor/D in src)
if (!( D.density ))
spawn( 0 )
D.closefire()
return
//Foreach goto(74)
return
/area/proc/updateicon()
if( fire || eject )
if(power_environ)
if(fire && !eject)
icon_state = "blue"
else if(!fire && eject)
icon_state = "red"
else
icon_state = "blue-red"
else
if(lightswitch && power_light)
icon_state = null
else
icon_state = "dark"
else
if(lightswitch && power_light)
icon_state = null
else
icon_state = "dark"
/*
#define EQUIP 1
#define LIGHT 2
#define ENVIRON 3
*/
/area/proc/powered(var/chan) // return true if the area has power to given channel
if(!requires_power)
return 1
switch(chan)
if(EQUIP)
return power_equip
if(LIGHT)
return power_light
if(ENVIRON)
return power_environ
return 0
// called when power status changes
/area/proc/power_change()
for(var/obj/machinery/M in src) // for each machine in the area
M.power_change() // reverify power status (to update icons etc.)
spawn(rand(15,25))
src.updateicon()
if(linked)
linked.power_equip = power_equip
linked.power_light = power_light
linked.power_environ = power_environ
linked.power_change()
/area/proc/usage(var/chan)
var/used = 0
switch(chan)
if(LIGHT)
used += used_light
if(EQUIP)
used += used_equip
if(ENVIRON)
used += used_environ
if(TOTAL)
used += used_light + used_equip + used_environ
if(linked)
return linked.usage(chan) + used
else
return used
/area/proc/clear_usage()
if(linked)
linked.clear_usage()
used_equip = 0
used_light = 0
used_environ = 0
/area/proc/use_power(var/amount, var/chan)
switch(chan)
if(EQUIP)
used_equip += amount
if(LIGHT)
used_light += amount
if(ENVIRON)
used_environ += amount
#define LIGHTING_POWER 8 // power (W) per turf used for lighting
/area/proc/calc_lighting()
if(lightswitch && power_light)
used_light += numturfs * LIGHTING_POWER
+661
View File
@@ -0,0 +1,661 @@
/obj/machinery/proc/process()
return
/obj/machinery/proc/gas_flow()
return
/obj/machinery/proc/orient_pipe(source as obj)
return
/obj/machinery/proc/cut_pipes()
return
/obj/machinery/proc/disc_pipe(target as obj)
return
/obj/machinery/proc/buildnodes()
return
/obj/machinery/proc/getline()
if(p_dir)
return src
/obj/machinery/proc/setline()
return
/obj/machinery/proc/ispipe()
return 0
/obj/machinery/proc/next()
return null
/obj/machinery/proc/get_gas_val(from)
return null
/obj/machinery/proc/get_gas(from)
return null
/obj/machinery/meter/New()
..()
src.target = locate(/obj/machinery/pipes, src.loc)
average = 0
return
/obj/machinery/meter/process()
if(!target)
icon_state = "meterX"
return
if(stat & NOPOWER)
icon_state = "meter0"
return
use_power(5)
average = 0.5 * average + 0.5 * target.pl.flow
var/val = min(18, round( 18.99 * ((abs(average) / 2500000)**0.25)) )
icon_state = "meter[val]"
/*
/obj/machinery/meter/examine()
set src in oview(1)
var/t = "A gas flow meter. "
if (src.target)
t += text("Results:\nMass flow []%\nPressure [] kPa", round(100*average/src.target.gas.maximum, 0.1), round(pressure(), 0.1) )
else
t += "It is not functioning."
usr << t
*/
/obj/machinery/meter/Click()
if (get_dist(usr, src) <= 3)
if (src.target)
usr << text("\blue <B>Results:\nMass flow []%\nTemperature [] K</B>", round(100*abs(average)/6e6, 0.1), round(target.pl.gas.temperature,0.1))
else
usr << "\blue <B>Results: Connection Error!</B>"
else
usr << "\blue <B>You are too far away.</B>"
return
/*
/obj/machinery/meter/proc/pressure()
if(src.target && src.target.gas)
return (average * target.gas.temperature)/100000.0
else
return 0
*/
/obj/machinery/mass_driver/proc/drive(amount)
if(stat & NOPOWER)
return
use_power(500)
for(var/obj/O in src.loc)
if (O.flags & 64)
O.throwing = 1
O.throwspeed = 100
spawn( 0 )
O.throwing(src.dir, src.power)
return
//Foreach goto(17)
flick("mass_driver1", src)
return
/obj/machinery/atmoalter/siphs/New()
..()
src.gas = new /obj/substance/gas( src )
src.gas.maximum = src.maximum
return
/obj/machinery/atmoalter/siphs/proc/releaseall()
src.t_status = 1
src.t_per = max_valve
return
/obj/machinery/atmoalter/siphs/proc/reset(valve, auto)
if(c_status!=0)
return
if (valve < 0)
src.t_per = -valve
src.t_status = 1
else
if (valve > 0)
src.t_per = valve
src.t_status = 2
else
src.t_status = 3
if (auto)
src.t_status = 4
src.setstate()
return
/obj/machinery/atmoalter/siphs/proc/release(amount, flag)
var/T = src.loc
if (!( istype(T, /turf) ))
return
if (locate(/obj/move, T))
T = locate(/obj/move, T)
if (!( amount ))
return
if (!( flag ))
amount = min(amount, max_valve)
src.gas.turf_add(T, amount)
return
/obj/machinery/atmoalter/siphs/proc/siphon(amount, flag)
var/T = src.loc
if (!( istype(T, /turf) ))
return
if (locate(/obj/move, T))
T = locate(/obj/move, T)
if (!( amount ))
return
if (!( flag ))
amount = min(amount, 900000.0)
src.gas.turf_take(T, amount)
return
/obj/machinery/atmoalter/siphs/proc/setstate()
if(stat & NOPOWER)
icon_state = "siphon:0"
return
if (src.holding)
src.icon_state = "siphon:T"
else
if (src.t_status != 3)
src.icon_state = "siphon:1"
else
src.icon_state = "siphon:0"
return
/obj/machinery/atmoalter/siphs/fullairsiphon/New()
..()
if(!empty)
src.gas.oxygen = 2.73E7
src.gas.n2 = 1.027E8
return
/obj/machinery/atmoalter/siphs/fullairsiphon/port/reset(valve, auto)
if (valve < 0)
src.t_per = -valve
src.t_status = 1
else
if (valve > 0)
src.t_per = valve
src.t_status = 2
else
src.t_status = 3
if (auto)
src.t_status = 4
src.setstate()
return
/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent/attackby(W as obj, user as mob)
if (istype(W, /obj/item/weapon/screwdriver))
if (src.c_status)
src.anchored = 1
src.c_status = 0
else
if (locate(/obj/machinery/connector, src.loc))
src.anchored = 1
src.c_status = 3
else
if (istype(W, /obj/item/weapon/wrench))
src.alterable = !( src.alterable )
return
/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent/setstate()
if(stat & NOPOWER)
icon_state = "vent-p"
return
if (src.t_status == 4)
src.icon_state = "vent2"
else
if (src.t_status == 3)
src.icon_state = "vent0"
else
src.icon_state = "vent1"
return
/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent/reset(valve, auto)
if (auto)
src.t_status = 4
return
/obj/machinery/atmoalter/siphs/scrubbers/process()
if(stat & NOPOWER) return
if (src.t_status != 3)
var/turf/T = src.loc
if (istype(T, /turf))
if (locate(/obj/move, T))
T = locate(/obj/move, T)
if (T.firelevel < 900000.0)
src.gas.turf_add_all_oxy(T)
else
T = null
switch(src.t_status)
if(1.0)
if( !portable() ) use_power(50, ENVIRON)
if (src.holding)
var/t1 = src.gas.tot_gas()
var/t2 = t1
var/t = src.t_per
if (src.t_per > t2)
t = t2
src.holding.gas.transfer_from(src.gas, t)
else
if (T)
var/t1 = src.gas.tot_gas()
var/t2 = t1
var/t = src.t_per
if (src.t_per > t2)
t = t2
src.gas.turf_add(T, t)
if(2.0)
if( !portable() ) use_power(50, ENVIRON)
if (src.holding)
var/t1 = src.gas.tot_gas()
var/t2 = src.maximum - t1
var/t = src.t_per
if (src.t_per > t2)
t = t2
src.gas.transfer_from(src.holding.gas, t)
else
if (T)
var/t1 = src.gas.tot_gas()
var/t2 = src.maximum - t1
var/t = src.t_per
if (t > t2)
t = t2
src.gas.turf_take(T, t)
if(4.0)
if( !portable() ) use_power(50, ENVIRON)
if (T)
if (T.firelevel > 900000.0)
src.f_time = world.time + 400
else
if (world.time > src.f_time)
src.gas.extract_toxs(T)
if( !portable() ) use_power(150, ENVIRON)
var/contain = src.gas.tot_gas()
if (contain > 1.3E8)
src.gas.turf_add(T, 1.3E8 - contain)
/*if (src.c_status == 1)
var/obj/machinery/connector/C = locate(/obj/machinery/connector, src.loc)
if (C)
var/obj/substance/gas/G = new /obj/substance/gas( )
G.transfer_from(src.gas, src.c_per)
spawn( 0 )
C.receive_gas(G, src)
return
else
src.c_status = 0
*/
src.setstate()
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
//Foreach goto(654)
return
/obj/machinery/atmoalter/siphs/scrubbers/air_filter/setstate()
if(stat & NOPOWER)
icon_state = "vent-p"
return
if (src.t_status == 4)
src.icon_state = "vent2"
else
if (src.t_status == 3)
src.icon_state = "vent0"
else
src.icon_state = "vent1"
return
/obj/machinery/atmoalter/siphs/scrubbers/air_filter/attackby(W as obj, user as mob)
if (istype(W, /obj/item/weapon/screwdriver))
if (src.c_status)
src.anchored = 1
src.c_status = 0
else
if (locate(/obj/machinery/connector, src.loc))
src.anchored = 1
src.c_status = 3
else
if (istype(W, /obj/item/weapon/wrench))
src.alterable = !( src.alterable )
return
/obj/machinery/atmoalter/siphs/scrubbers/air_filter/reset(valve, auto)
if (auto)
src.t_status = 4
src.setstate()
return
/obj/machinery/atmoalter/siphs/scrubbers/port/setstate()
if(stat & NOPOWER)
icon_state = "scrubber:0"
return
if (src.holding)
src.icon_state = "scrubber:T"
else
if (src.t_status != 3)
src.icon_state = "scrubber:1"
else
src.icon_state = "scrubber:0"
return
/obj/machinery/atmoalter/siphs/scrubbers/port/reset(valve, auto)
if (valve < 0)
src.t_per = -valve
src.t_status = 1
else
if (valve > 0)
src.t_per = valve
src.t_status = 2
else
src.t_status = 3
if (auto)
src.t_status = 4
src.setstate()
return
//true if the siphon is portable (therfore no power needed)
/obj/machinery/proc/portable()
return istype(src, /obj/machinery/atmoalter/siphs/fullairsiphon/port) || istype(src, /obj/machinery/atmoalter/siphs/scrubbers/port)
/obj/machinery/atmoalter/siphs/power_change()
if( portable() )
return
if(!powered(ENVIRON))
spawn(rand(0,15))
stat |= NOPOWER
setstate()
else
stat &= ~NOPOWER
setstate()
/obj/machinery/atmoalter/siphs/process()
// var/dbg = (suffix=="d") && Debug
if(stat & NOPOWER) return
if (src.t_status != 3)
var/turf/T = src.loc
if (istype(T, /turf))
if (locate(/obj/move, T))
T = locate(/obj/move, T)
else
T = null
switch(src.t_status)
if(1.0)
if( !portable() ) use_power(50, ENVIRON)
if (src.holding)
var/t1 = src.gas.tot_gas()
var/t2 = t1
var/t = src.t_per
if (src.t_per > t2)
t = t2
src.holding.gas.transfer_from(src.gas, t)
else
if (T)
var/t1 = src.gas.tot_gas()
var/t2 = t1
var/t = src.t_per
if (src.t_per > t2)
t = t2
src.gas.turf_add(T, t)
if(2.0)
if( !portable() ) use_power(50, ENVIRON)
if (src.holding)
var/t1 = src.gas.tot_gas()
var/t2 = src.maximum - t1
var/t = src.t_per
if (src.t_per > t2)
t = t2
src.gas.transfer_from(src.holding.gas, t)
else
if (T)
var/t1 = src.gas.tot_gas()
var/t2 = src.maximum - t1
var/t = src.t_per
if (t > t2)
t = t2
//var/g = gas.tot_gas()
//if(dbg) world.log << "VP0 : [t] from turf: [gas.tot_gas()]"
//if(dbg) Air()
src.gas.turf_take(T, t)
//if(dbg) world.log << "VP1 : now [gas.tot_gas()]"
//if(dbg) world.log << "[gas.tot_gas()-g] ([t]) from turf to siph"
//if(dbg) Air()
if(4.0)
if( !portable() )
use_power(50, ENVIRON)
if (T)
if (T.firelevel > 900000.0)
src.f_time = world.time + 300
else
if (world.time > src.f_time)
var/difference = CELLSTANDARD - (T.oxygen + T.n2)
if (difference > 0)
var/t1 = src.gas.tot_gas()
if (difference > t1)
difference = t1
src.gas.turf_add(T, difference)
/*if (src.c_status == 1) // 1 = release
var/obj/machinery/connector/C = locate(/obj/machinery/connector, src.loc)
if (C && C.connected == src)
spawn( 0 )
C.receive_gas(gas, c_per)
return
else
src.c_status = 0
else if(src.c_status == 2) // 2 = accept
var/obj/machinery/connector/C = locate(/obj/machinery/connector, src.loc)
if (C && C.connected == src)
spawn( 0 )
C.send_gas(gas, c_per) // connector will send case to canister
return
*/
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
//Foreach goto(632)
src.setstate()
return
/obj/machinery/atmoalter/siphs/attack_paw(user as mob)
return src.attack_hand(user)
return
/obj/machinery/atmoalter/siphs/attack_hand(var/mob/user as mob)
if(stat & NOPOWER) return
user.machine = src
var/tt
switch(src.t_status)
if(1.0)
tt = text("Releasing <A href='?src=\ref[];t=2'>Siphon</A> <A href='?src=\ref[];t=3'>Stop</A>", src, src)
if(2.0)
tt = text("<A href='?src=\ref[];t=1'>Release</A> Siphoning <A href='?src=\ref[];t=3'>Stop</A>", src, src)
if(3.0)
tt = text("<A href='?src=\ref[];t=1'>Release</A> <A href='?src=\ref[];t=2'>Siphon</A> Stopped <A href='?src=\ref[];t=4'>Automatic</A>", src, src, src)
else
tt = "Automatic equalizers are on!"
var/ct = null
switch(src.c_status)
if(1.0)
ct = text("Releasing <A href='?src=\ref[];c=2'>Accept</A> <A href='?src=\ref[];c=3'>Stop</A>", src, src)
if(2.0)
ct = text("<A href='?src=\ref[];c=1'>Release</A> Accepting <A href='?src=\ref[];c=3'>Stop</A>", src, src)
if(3.0)
ct = text("<A href='?src=\ref[];c=1'>Release</A> <A href='?src=\ref[];c=2'>Accept</A> Stopped", src, src)
else
ct = "Disconnected"
var/at = null
if (src.t_status == 4)
at = text("Automatic On <A href='?src=\ref[];t=3'>Stop</A>", src)
var/dat = text("<TT><B>Canister Valves</B> []<BR>\n\t<FONT color = 'blue'><B>Contains/Capacity</B> [] / []</FONT><BR>\n\tUpper Valve Status: [] []<BR>\n\t\t<A href='?src=\ref[];tp=-[]'>M</A> <A href='?src=\ref[];tp=-10000'>-</A> <A href='?src=\ref[];tp=-1000'>-</A> <A href='?src=\ref[];tp=-100'>-</A> <A href='?src=\ref[];tp=-1'>-</A> [] <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=100'>+</A> <A href='?src=\ref[];tp=1000'>+</A> <A href='?src=\ref[];tp=10000'>+</A> <A href='?src=\ref[];tp=[]'>M</A><BR>\n\tPipe Valve Status: []<BR>\n\t\t<A href='?src=\ref[];cp=-[]'>M</A> <A href='?src=\ref[];cp=-10000'>-</A> <A href='?src=\ref[];cp=-1000'>-</A> <A href='?src=\ref[];cp=-100'>-</A> <A href='?src=\ref[];cp=-1'>-</A> [] <A href='?src=\ref[];cp=1'>+</A> <A href='?src=\ref[];cp=100'>+</A> <A href='?src=\ref[];cp=1000'>+</A> <A href='?src=\ref[];cp=10000'>+</A> <A href='?src=\ref[];cp=[]'>M</A><BR>\n<BR>\n\n<A href='?src=\ref[];mach_close=siphon'>Close</A><BR>\n\t</TT>", (!( src.alterable ) ? "<B>Valves are locked. Unlock with wrench!</B>" : "You can lock this interface with a wrench."), num2text(src.gas.tot_gas(), 10), num2text(src.maximum, 10), (src.t_status == 4 ? text("[]", at) : text("[]", tt)), (src.holding ? text("<BR>(<A href='?src=\ref[];tank=1'>Tank ([]</A>)", src, src.holding.gas.tot_gas()) : null), src, num2text(max_valve, 7), src, src, src, src, src.t_per, src, src, src, src, src, num2text(max_valve, 7), ct, src, num2text(max_valve, 7), src, src, src, src, src.c_per, src, src, src, src, src, num2text(max_valve, 7), user)
user << browse(dat, "window=siphon;size=600x300")
return
/obj/machinery/atmoalter/siphs/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
if (!( src.alterable ))
return
if ((get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
usr.machine = src
if (href_list["c"])
var/c = text2num(href_list["c"])
switch(c)
if(1.0)
src.c_status = 1
if(2.0)
src.c_status = 2
if(3.0)
src.c_status = 3
else
else
if (href_list["t"])
var/t = text2num(href_list["t"])
if (src.t_status == 0)
return
switch(t)
if(1.0)
src.t_status = 1
if(2.0)
src.t_status = 2
if(3.0)
src.t_status = 3
if(4.0)
src.t_status = 4
src.f_time = 1
else
else
if (href_list["tp"])
var/tp = text2num(href_list["tp"])
src.t_per += tp
src.t_per = min(max(round(src.t_per), 0), max_valve)
else
if (href_list["cp"])
var/cp = text2num(href_list["cp"])
src.c_per += cp
src.c_per = min(max(round(src.c_per), 0), max_valve)
else
if (href_list["tank"])
var/cp = text2num(href_list["tank"])
if (cp == 1)
src.holding.loc = src.loc
src.holding = null
if (src.t_status == 2)
src.t_status = 3
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
//Foreach goto(433)
src.add_fingerprint(usr)
else
usr << browse(null, "window=canister")
return
return
/obj/machinery/atmoalter/siphs/attackby(var/obj/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/tank))
if (src.holding)
return
var/obj/item/weapon/tank/T = W
user.drop_item()
T.loc = src
src.holding = T
else
if (istype(W, /obj/item/weapon/screwdriver))
var/obj/machinery/connector/con = locate(/obj/machinery/connector, src.loc)
if (src.c_status)
src.anchored = 0
src.c_status = 0
user.show_message("\blue You have disconnected the siphon.")
if(con)
con.connected = null
else
if (con && !con.connected)
src.anchored = 1
src.c_status = 3
user.show_message("\blue You have connected the siphon.")
con.connected = src
else
user.show_message("\blue There is nothing here to connect to the siphon.")
else
if (istype(W, /obj/item/weapon/wrench))
src.alterable = !( src.alterable )
if (src.alterable)
user << "\blue You unlock the interface!"
else
user << "\blue You lock the interface!"
return
+303
View File
@@ -0,0 +1,303 @@
/obj/blob/New(loc, var/h = 30)
blobs += src
src.health = h
src.dir = pick(1,2,4,8)
//world << "new blob #[blobs.len]"
src.update()
..(loc)
/obj/blob/Del()
blobs -= src
//world << "del blob #[blobs.len]"
..()
/proc/bloblife()
if(blobs.len>0)
for(var/i = 1 to 25)
var/obj/blob/B = pick(blobs)
var/turf/BL = B.loc
for(var/atom/A in B.loc)
A.blob_act()
B.Life()
BL.buildlinks()
/obj/blob/proc/Life()
var/turf/U = src.loc
if (locate(/obj/move, U))
U = locate(/obj/move, U)
if(U.density == 1)
del(src)
if(U.poison> 200000)
src.health -= round(U.poison/200000)
src.update()
var/p = health * (U.n2/11376000 + U.oxygen/1008000 + U.co2/200)
if(!istype(U, /turf/space))
p+=3
if(!prob(p))
return
for(var/dirn in cardinal)
var/turf/T = get_step(src, dirn)
//if(istype(U, /turf/space) && istype(T, /turf/space)) // don't propagate into space
// if( !(locate(/obj/move) in U) && !(locate(/obj/move) in T))
// continue
if(istype(T.loc, /area/sleep_area) && prob(90)) // slow down growth in sleep area
continue
var/obj/blob/B = new /obj/blob(U, src.health)
if(T.Enter(B,src) && !(locate(/obj/blob) in T))
B.loc = T // open cell, so expand
else
if(prob(50)) // closed cell, 50% chance to not expand
if(!locate(/obj/blob) in T)
for(var/atom/A in T) // otherwise explode contents of turf
A.blob_act()
T.blob_act()
T.buildlinks()
del(B)
/obj/blob/burn(fi_amount)
src.health-= round(fi_amount/500000)
src.update()
/obj/blob/ex_act(severity)
switch(severity)
if(1)
del(src)
if(2)
src.health -= rand(20,30)
src.update()
if(3)
src.health -= rand(15,25)
src.update()
/obj/blob/proc/update()
if(health<=0)
del(src)
return
if(health<10)
icon_state = "blobc0"
return
if(health<20)
icon_state = "blobb0"
return
icon_state = "bloba0"
/obj/blob/las_act(flag)
if (flag == "bullet")
health -= 10
update()
else
health -= 20
update()
/obj/blob/attackby(var/obj/item/weapon/W, var/mob/user)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>The blob has been attacked with [][] </B>", W, (user ? text(" by [].", user) : ".")), 1)
//Foreach goto(20)
var/damage = W.force / 4.0
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.welding)
damage = 15
src.health -= damage
src.update()
return
/obj/blob/examine()
set src in oview(1)
usr << "A mysterious alien blob-like organism."
/proc/blob_event()
if(!ticker.event_time) // initial event timing
ticker.event_time = world.realtime + rand(200, 900) // sometime between 20s to 1m30s after round start
if(world.realtime < ticker.event_time) // return if not yet reached the next event
return
switch(ticker.event)
if(0)
var/dat = "<FONT size = 3><B>Cent. Com. Update</B>: Biohazard Alert.</FONT><HR>"
dat += "Reports indicate the probable transfer of a biohazardous agent onto Spacestation 13 during the last crew deployment cycle.<BR>"
dat += "Preliminary analysis of the organism classifies it as a level 5 biohazard. Its origin is unknown.<BR>"
dat += "Cent. Com. has issued a directive 7-10 for SS13. The station is to be considered quarantined.<BR>"
dat += "Orders for all SS13 personnel follows:<BR>"
dat += " 1. Do not leave the quarantine area.<BR>"
dat += " 2. Locate any outbreaks of the organism on the station.<BR>"
dat += " 3. If found, use any neccesary means to contain the organism.<BR>"
dat += " 4. Avoid damage to the capital infrastructure of the station.<BR>"
dat += "<BR>Note in the event of a quarantine breach or uncontrolled spread of the biohazard, the directive 7-10 may be upgraded to a directive 7-12 without further notice.<BR>"
dat += "Message ends."
for(var/obj/machinery/computer/communications/C in machines)
if(! (C.stat & (BROKEN|NOPOWER) ) )
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( C.loc )
P.name = "paper- 'Cent. Com. Biohazard Alert.'"
P.info = dat
//Foreach goto(1830)
world << "<FONT size = 3><B>Cent. Com. Update</B>: Biohazard Alert.</FONT>"
world << "\red Summary downloaded and printed out at all communications consoles."
ticker.event = 1
ticker.event_time = world.realtime + 600*rand(5,10) // next event 5-10 minutes later
if(1)
world << "<FONT size = 3><B>Cent. Com. Update</B>: Biohazard Alert.</FONT>"
world << "\red Confirmed outbreak of level 5 biohazard aboard SS13."
world << "\red All personnel must contain the outbreak."
ticker.event = 2
ticker.event_time = world.realtime + 600 // now check every minute
if(2)
if(blobs.len > 500)
world << "<FONT size = 3><B>Cent. Com. Update</B>: Biohazard Alert.</FONT>"
world << "\red Uncontrolled spread of the biohazard onboard the station."
world << "\red Cent. Com, has issued a directive 7-12 for Spacestation 13."
world << "\red Estimated time until directive implementation: 60 seconds."
ticker.event = 3
ticker.event_time = world.realtime + 600
else
ticker.event_time = world.realtime + 600
if(3)
ticker.event = 4
var/turf/T = locate("landmark*blob-directive")
if(T)
while(!( istype(T, /turf) ))
T = T.loc
else
T = locate(45,45,1)
var/min = 50
var/med = 250
var/max = 500
var/sw = locate(1, 1, T.z)
var/ne = locate(world.maxx, world.maxy, T.z)
defer_powernet_rebuild = 1
for(var/turf/U in block(sw, ne))
var/zone = 4
if ((U.y <= T.y + max && U.y >= T.y - max && U.x <= T.x + max && U.x >= T.x - max))
zone = 3
if ((U.y <= T.y + med && U.y >= T.y - med && U.x <= T.x + med && U.x >= T.x - med))
zone = 2
if ((U.y <= T.y + min && U.y >= T.y - min && U.x <= T.x + min && U.x >= T.x - min))
zone = 1
for(var/atom/A in U)
A.ex_act(zone)
U.ex_act(zone)
U.buildlinks()
defer_powernet_rebuild = 0
makepowernets()
/datum/station_state/proc/count()
for(var/turf/T in world)
if(T.z != 1)
continue
if(istype(T,/turf/station/floor))
if(!(T:burnt))
src.floor+=2
else
src.floor++
else if(istype(T, /turf/station/engine/floor))
src.floor+=2
else if(istype(T, /turf/station/wall))
if(T:intact)
src.wall+=2
else
src.wall++
else if(istype(T, /turf/station/r_wall))
if(T:intact)
src.r_wall+=2
else
src.r_wall++
for(var/obj/O in world)
if(O.z != 1)
continue
if(istype(O, /obj/window))
src.window++
else if(istype(O, /obj/grille))
if(!O:destroyed)
src.grille++
else if(istype(O, /obj/machinery/door))
src.door++
else if(istype(O, /obj/machinery))
src.mach++
/datum/station_state/proc/score(var/datum/station_state/result)
var/r1a = min( result.floor / floor, 1.0)
var/r1b = min(result.r_wall/ r_wall, 1.0)
var/r1c = min(result.wall / wall, 1.0)
var/r2a = min(result.window / window, 1.0)
var/r2b = min(result.door / door, 1.0)
var/r2c = min(result.grille / grille, 1.0)
var/r3 = min(result.mach / mach, 1.0)
//world.log << "Blob scores:[r1b] [r1c] / [r2a] [r2b] [r2c] / [r3] [r1a]"
return (4*(r1b+r1c) + 2*(r2a+r2b+r2c) + r3+r1a)/16.0
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+793
View File
@@ -0,0 +1,793 @@
#define REGULATE_RATE 5
/obj/item/weapon/organ/proc/process()
return
/obj/item/weapon/organ/proc/receive_chem(chemical as obj)
return
/obj/item/weapon/organ/external/proc/take_damage(brute, burn)
if ((brute <= 0 && burn <= 0))
return 0
if ((src.brute_dam + src.burn_dam + brute + burn) < src.max_damage)
src.brute_dam += brute
src.burn_dam += burn
else
var/can_inflict = src.max_damage - (src.brute_dam + src.burn_dam)
if (can_inflict)
if ((brute > 0 && burn > 0))
var/ratio = brute / (brute + burn)
src.brute_dam += ratio * can_inflict
src.burn_dam += (1 - ratio) * can_inflict
else
if (brute > 0)
src.brute_dam += brute
else
src.burn_dam += burn
else
return 0
return src.update_icon()
return
/obj/item/weapon/organ/external/proc/heal_damage(brute, burn)
src.brute_dam = max(0, src.brute_dam - brute)
src.burn_dam = max(0, src.brute_dam - burn)
return update_icon()
return
// new damage icon system
// returns just the brute/burn damage code
/obj/item/weapon/organ/external/proc/d_i_text()
var/tburn = 0
var/tbrute = 0
if(burn_dam ==0)
tburn =0
else if (src.burn_dam < (src.max_damage * 0.25 / 2))
tburn = 1
else if (src.burn_dam < (src.max_damage * 0.75 / 2))
tburn = 2
else
tburn = 3
if (src.brute_dam == 0)
tbrute = 0
else if (src.brute_dam < (src.max_damage * 0.25 / 2))
tbrute = 1
else if (src.brute_dam < (src.max_damage * 0.75 / 2))
tbrute = 2
else
tbrute = 3
return "[tbrute][tburn]"
// new damage icon system
// adjusted to set d_i_state to brute/burn code only (without r_name0 as before)
/obj/item/weapon/organ/external/proc/update_icon()
var/n_is = "[d_i_text()]"
if (n_is != src.d_i_state)
src.d_i_state = n_is
return 1
else
return 0
return
/obj/substance/proc/leak(turf)
return
/obj/substance/chemical/proc/volume()
var/amount = 0
for(var/item in src.chemicals)
var/datum/chemical/C = src.chemicals[item]
if (istype(C, /datum/chemical))
amount += C.return_property("volume")
//Foreach goto(24)
return amount
return
/obj/substance/chemical/proc/split(amount)
var/obj/substance/chemical/S = new /obj/substance/chemical( null )
var/tot_volume = src.volume()
if (amount > tot_volume)
amount = tot_volume
for(var/item in src.chemicals)
var/C = src.chemicals[item]
if (istype(C, /datum/chemical))
S.chemicals[item] = C
src.chemicals[item] = null
//Foreach goto(60)
return S
else
if (tot_volume <= 0)
return S
else
for(var/item in src.chemicals)
var/datum/chemical/C = src.chemicals[item]
if (istype(C, /datum/chemical))
var/datum/chemical/N = new C.type( null )
C.copy_data(N)
var/amt = C.return_property("volume") * amount / tot_volume
C.moles -= amt * C.density / C.molarmass
if (C.moles == 0)
//C = null
del(C)
N.moles += amt * N.density / N.molarmass
S.chemicals[text("[]", N.name)] = N
//Foreach goto(161)
return S
return
/obj/substance/chemical/proc/transfer_from(var/obj/substance/chemical/S as obj, amount)
var/volume = src.volume()
var/s_volume = S.volume()
if (amount > s_volume)
amount = s_volume
if (src.maximum)
if (amount > (src.maximum - volume))
amount = src.maximum - volume
if (amount >= s_volume)
for(var/item in S.chemicals)
var/datum/chemical/C = S.chemicals[item]
if (istype(C, /datum/chemical))
var/datum/chemical/N = null
N = src.chemicals[item]
if (!( N ))
N = new C.type( null )
C.copy_data(N)
N.moles += C.moles
//C = null
del(C)
//Foreach goto(106)
else
var/obj/substance/chemical/U = S.split(amount)
for(var/item in U.chemicals)
var/datum/chemical/C = U.chemicals[item]
if (istype(C, /datum/chemical))
var/datum/chemical/N = src.chemicals[item]
if (!( N ))
N = new C.type( null )
C.copy_data(N)
src.chemicals[item] = N
N.moles += C.moles
//C = null
del(C)
//Foreach goto(251)
//U = null
del(U)
var/datum/chemical/C = null
for(var/t in src.chemicals)
C = src.chemicals[text("[]", t)]
if (istype(C, /datum/chemical))
C.react(src)
//Foreach goto(403)
return amount
return
/obj/substance/chemical/proc/transfer_mob(var/mob/M as mob, amount)
if (!( ismob(M) ))
return
var/obj/substance/chemical/S = src.split(amount)
for(var/item in S.chemicals)
var/datum/chemical/C = S.chemicals[item]
if (istype(C, /datum/chemical))
C.injected(M)
//Foreach goto(44)
//S = null
del(S)
return
/obj/substance/chemical/proc/dropper_mob(M as mob, amount)
if (!( ismob(M) ))
return
var/obj/substance/chemical/S = src.split(amount)
for(var/item in S.chemicals)
var/datum/chemical/C = S.chemicals[item]
if (istype(C, /datum/chemical))
C.injected(M, "eye")
//Foreach goto(44)
//S = null
del(S)
return
/obj/substance/chemical/Del()
for(var/item in src.chemicals)
//src.chemicals[item] = null
del(src.chemicals[item])
//Foreach goto(17)
..()
return
/* --------------------------
heat = amount * temperature(abs)
heat is conserved between exchanges
---------------------------- */
//fractional multipliers of heat
#define TURF_ADD_FRAC 0.95 //cooling due to release of gas into tile
#define TURF_TAKE_FRAC 1.06 //heating due to pressurization into pipework
// Not used?
/obj/substance/gas/leak(T as turf)
turf_add(T, src.co2 + src.oxygen + src.plasma + src.n2)
return
/obj/substance/gas/proc/tot_gas()
return src.co2 + src.oxygen + src.plasma + src.sl_gas + src.n2
return
/obj/substance/gas/proc/transfer_from(var/obj/substance/gas/target as obj, amount)
if ((!( istype(target, /obj/substance/gas) ) || !( amount )))
return
var/t1 = target.co2 + target.oxygen + target.plasma + target.sl_gas + target.n2
if (!( t1 ))
return
if (amount > t1)
amount = t1
var/t2 = src.co2 + src.oxygen + src.plasma + src.sl_gas + src.n2
if (amount < 0)
amount = t1
if ((src.maximum > 0 && (src.maximum - t2) < amount))
amount = src.maximum - t2
var/t_oxy = amount * target.oxygen / t1
var/t_pla = amount * target.plasma / t1
var/t_co2 = amount * target.co2 / t1
var/t_sl_gas = amount * target.sl_gas / t1
var/t_n2 = amount * target.n2 / t1
var/t3 = t1 + t2
var/t4 = t2 * src.temperature
var/t5 = t1 * target.temperature
if (t3 > 0)
src.temperature = (t4 + t5) / t3
src.co2 += t_co2
src.oxygen += t_oxy
src.plasma += t_pla
src.sl_gas += t_sl_gas
src.n2 += t_n2
target.oxygen -= t_oxy
target.co2 -= t_co2
target.plasma -= t_pla
target.sl_gas -= t_sl_gas
target.n2 -= t_n2
return
/obj/substance/gas/proc/clear()
src.oxygen = 0
src.plasma = 0
src.co2 = 0
src.sl_gas = 0
src.n2 = 0
return
/obj/substance/gas/proc/has_gas()
return (src.co2 + src.oxygen + src.plasma + src.sl_gas + src.n2) > 0
return
/obj/substance/gas/proc/turf_add(var/turf/target as turf, amount)
if (((!( istype(target, /turf) ) && !( istype(target, /obj/move) )) || !( amount )))
return
if (locate(/obj/move, target))
target = locate(/obj/move, target)
var/t2 = src.co2 + src.oxygen + src.plasma + src.sl_gas + src.n2
if (amount < 0)
amount = src.plasma + src.oxygen + src.co2 + src.sl_gas + src.n2
if (!( t2 ))
return
var/t_oxy = amount * src.oxygen / t2
var/t_pla = amount * src.plasma / t2
var/t_co2 = amount * src.co2 / t2
var/t_sl_gas = amount * src.sl_gas / t2
var/t_n2 = amount * src.n2 / t2
src.co2 -= t_co2
src.oxygen -= t_oxy
src.plasma -= t_pla
src.sl_gas -= t_sl_gas
src.n2 -= t_n2
var/ttotal = target.tot_gas()
target.oxygen += t_oxy
target.co2 += t_co2
target.poison += t_pla
target.sl_gas += t_sl_gas
target.n2 += t_n2
target.temp = ( target.temp * ttotal + (amount * temperature)*TURF_ADD_FRAC ) / (ttotal + amount)
//target.heat += amount * src.temperature
target.res_vars()
return
/obj/substance/gas/proc/turf_add_all_oxy(var/turf/target as turf)
var/t_gas = tot_gas()
var/t_turf = target.tot_gas()
if(t_gas>0)
var/heat_change = oxygen * temperature
//target.heat += heat_change
if( (t_turf + oxygen) >0 )
target.temp = ( target.temp * t_turf + heat_change ) / ( t_turf + oxygen )
target.oxygen += oxygen
var/nonoxy = tot_gas() - oxygen
if(nonoxy>0)
temperature = ( temperature * tot_gas() - heat_change )/(nonoxy)
else
temperature = T20C
oxygen = 0
target.res_vars()
return
/obj/substance/gas/proc/turf_take(var/turf/target as turf, amount)
if (((!( istype(target, /turf) ) && !( istype(target, /obj/move) )) || !( amount )))
return
if (locate(/obj/move, target))
target = locate(/obj/move, target)
var/t1 = target.co2 + target.oxygen + target.poison + target.sl_gas + target.n2
if (!( t1 ))
return
var/t2 = src.co2 + src.oxygen + src.plasma + src.sl_gas + src.n2
if (amount > 0)
if ((src.maximum > 0 && (src.maximum - t2) < amount))
amount = src.maximum - t2
else
amount = src.plasma + src.oxygen + src.co2 + src.sl_gas + src.n2
if (amount > t1)
amount = t1
var/turf_total = target.poison + target.oxygen + target.co2 + target.sl_gas + target.n2
// var/heat_gain = (turf_total ? amount / turf_total * target.heat : 0)
// var/temp_gain = (turf_total ? target.heat / turf_total : 0)
var/heat_gain = (turf_total ? amount * target.temp : 0)
var/t_oxy = amount * target.oxygen / t1
var/t_pla = amount * target.poison / t1
var/t_co2 = amount * target.co2 / t1
var/t_sl_gas = amount * target.sl_gas / t1
var/t_n2 = amount * target.n2 / t1
/*
var/t3 = t1 + t2
var/t4 = t2 * src.temperature
var/t5 = t1 * temp_gain
if (t3 > 0)
src.temperature = (t4 + t5) / t3
else
src.temperature = 0
*/
if(t2+amount>0)
temperature = (temperature*t2 + heat_gain * TURF_TAKE_FRAC)/(t2+amount)
src.co2 += t_co2
src.oxygen += t_oxy
src.plasma += t_pla
src.sl_gas += t_sl_gas
src.n2 += t_n2
target.oxygen -= t_oxy
target.co2 -= t_co2
target.poison -= t_pla
target.sl_gas -= t_sl_gas
target.n2 -= t_n2
//target.heat -= heat_gain // no temp change; we just take a proportional amount of all gases
target.res_vars()
return
/* original version
/obj/substance/gas/proc/extract_toxs(var/turf/target as turf)
if ((!( istype(target, /turf) ) && !( istype(target, /obj/move) )))
return
if (locate(/obj/move, target))
target = locate(/obj/move, target)
var/co2_diff = target.co2 - 0
var/oxy_diff = target.oxygen - O2STANDARD
var/no2_diff = target.sl_gas - 0
var/n2_diff = target.n2 - N2STANDARD
var/plas_diff = target.poison - 0
if (co2_diff < 0)
co2_diff = 0
if (oxy_diff < 0)
oxy_diff = 0
if (no2_diff < 0)
no2_diff = 0
if (n2_diff < 0)
n2_diff = 0
if (plas_diff < 0)
plas_diff = 0
var/turf_total = target.poison + target.oxygen + target.co2 + target.sl_gas + target.n2
var/air_total = co2_diff + oxy_diff + no2_diff + n2_diff + plas_diff
var/heat_gain = (turf_total ? air_total / turf_total * target.heat : null)
var/temp_gain = (turf_total ? target.heat / turf_total + TD0 : 0)
src.co2 += co2_diff
src.oxygen += oxy_diff
src.sl_gas += no2_diff
src.n2 += n2_diff
src.plasma += plas_diff
target.co2 -= co2_diff
target.oxygen -= oxy_diff
target.sl_gas -= no2_diff
target.n2 -= n2_diff
target.poison -= plas_diff
var/t3 = turf_total + air_total
var/t4 = turf_total * src.temperature
var/t5 = air_total * temp_gain
if (t3 > 0)
src.temperature = (t4 + t5) / t3
else
src.temperature = 0
target.heat -= heat_gain
target.res_vars()
return
*/
// modified version
/obj/substance/gas/proc/extract_toxs(var/turf/target as turf)
if ((!( istype(target, /turf) ) && !( istype(target, /obj/move) )))
return
if (locate(/obj/move, target))
target = locate(/obj/move, target)
var/co2_diff = max(0, target.co2 - 0)
var/oxy_diff = max(0,target.oxygen - O2STANDARD)
var/no2_diff = max(0, target.sl_gas - 0)
var/n2_diff = max(0,target.n2 - N2STANDARD)
var/plas_diff = max(0,target.poison - 0)
var/turf_total = target.poison + target.oxygen + target.co2 + target.sl_gas + target.n2
var/air_total = co2_diff + oxy_diff + no2_diff + n2_diff + plas_diff
var/heat_gain = (turf_total ? air_total * target.temp : null)
//var/temp_gain = (turf_total ? target.heat / turf_total + TD0 : 0)
src.co2 += co2_diff
src.oxygen += oxy_diff
src.sl_gas += no2_diff
src.n2 += n2_diff
src.plasma += plas_diff
target.co2 -= co2_diff
target.oxygen -= oxy_diff
target.sl_gas -= no2_diff
target.n2 -= n2_diff
target.poison -= plas_diff
var/gasheat1 = temperature * tot_gas()
var/gastot2 = tot_gas() + air_total
if(gastot2 > 0)
temperature = (gasheat1 + heat_gain)/( gastot2 )
else
temperature = T20C
var/turftot2 = turf_total - air_total
if(turftot2>0)
target.temp = ( target.temp*turf_total - heat_gain)/(turftot2)
//target.heat -= heat_gain
//make stored temperature closer to nominal (20C)
src.temperature += (T20C - src.temperature) / REGULATE_RATE
target.res_vars()
return
//
/obj/substance/gas/proc/merge_into(var/obj/substance/gas/target as obj)
if (!( istype(target, /obj/substance/gas) ))
return
var/s_tot = src.tot_gas()
var/t_tot = target.tot_gas()
var/amount = s_tot + t_tot
if (amount > 0 && t_tot > 0)
src.temperature = (s_tot*src.temperature + t_tot*target.temperature) / amount
src.co2 += target.co2
src.oxygen += target.oxygen
src.plasma += target.plasma
src.sl_gas += target.sl_gas
src.n2 += target.n2
target.oxygen = 0
target.plasma = 0
target.co2 = 0
target.sl_gas = 0
target.n2 = 0
return
// sets src to a given fraction of the gas (without affecting the gas)
/obj/substance/gas/proc/set_frac(var/obj/substance/gas/gas, amount)
var/tot = gas.tot_gas()
if(tot>0) // if gas is 0, do nothing
var/frac = amount / tot
src.oxygen = frac * gas.oxygen
src.co2 = frac * gas.co2
src.plasma = frac * gas.plasma
src.sl_gas = frac * gas.sl_gas
src.n2 = frac * gas.n2
src.temperature = gas.temperature
// same as merge_into except the target is not zeroed
// calc temperature from added gas
// delta should always be positive
/obj/substance/gas/proc/add_delta(var/obj/substance/gas/target)
var/s_tot = src.tot_gas()
var/t_tot = target.tot_gas()
if(t_tot < 0)
world.log << "Called add_delta with negative delta: [src.loc] : [src.tostring()] + [target.tostring()]"
var/amount = s_tot + t_tot
if (amount>0) // only set temp if adding gas, not subtracting
src.temperature = (s_tot*src.temperature + t_tot*target.temperature) / amount
src.co2 += target.co2
src.oxygen += target.oxygen
src.plasma += target.plasma
src.sl_gas += target.sl_gas
src.n2 += target.n2
// subtract a (+ve) delta. Do not affect temperature since just a proportional change
/obj/substance/gas/proc/sub_delta(var/obj/substance/gas/target)
src.co2 -= target.co2
src.oxygen -= target.oxygen
src.plasma -= target.plasma
src.sl_gas -= target.sl_gas
src.n2 -= target.n2
// replaces gas values of src with n - updates during gas_flow step
/obj/substance/gas/proc/replace_by(var/obj/substance/gas/n)
oxygen = n.oxygen
plasma = n.plasma
sl_gas = n.sl_gas
co2 = n.co2
n2 = n.n2
temperature = n.temperature
//do nothing to values of n
// relative "specific heat capacity" of gas contents
/obj/substance/gas/proc/shc()
return 2*co2 + 1.5*n2 + oxygen + 0.5*sl_gas + 1.2*plasma
/datum/chemical/pathogen/proc/process(source as obj)
return
/datum/chemical/proc/react(S as obj)
return
/datum/chemical/proc/react_organ(O as obj)
return
/datum/chemical/proc/injected(M as mob, zone)
if (zone == null)
zone = "body"
return
/datum/chemical/proc/copy_data(var/datum/chemical/C)
C.molarmass = src.molarmass
C.density = src.density
C.chem_formula = src.chem_formula
return
/datum/chemical/proc/return_property(property)
switch(property)
if("moles")
return src.moles
if("mass")
return src.moles * src.molarmass
if("density")
return src.density
if("volume")
return src.moles * src.molarmass / src.density
else
return
/datum/chemical/pl_coag/react(obj/substance/chemical/S as obj)
var/datum/chemical/l_plas/C = S.chemicals["plasma-l"]
if (istype(C, /datum/chemical/l_plas))
if (C.moles < src.moles)
src.moles -= C.moles
var/datum/chemical/waste/W = S.chemicals["waste-l"]
if (istype(W, /datum/chemical/waste))
W.moles += C.moles
else
W = new /datum/chemical/waste( )
S.chemicals["waste-l"] = W
W.moles += C.moles
//C = null
del(C)
else
C.moles -= src.moles
var/datum/chemical/waste/W = S.chemicals["waste-l"]
if (istype(W, /datum/chemical/waste))
W.moles += src.moles
else
W = new /datum/chemical/waste( )
S.chemicals["waste-l"] = W
W.moles += src.moles
src.moles = 0
if (src.moles <= 0)
//SN src = null
del(src)
return
return
/datum/chemical/pl_coag/injected(var/mob/M as mob, zone)
var/volume = src.return_property("volume")
switch(zone)
if("eye")
M.eye_stat -= volume * 2
M.eye_stat = max(0, M.eye_stat)
else
if (M.health >= 0)
if ((volume * 4) >= M.toxloss)
M.toxloss = 0
else
M.toxloss -= volume * 4
M.antitoxs += volume * 180
M.health = 100 - M.oxyloss - M.toxloss - M.fireloss - M.bruteloss
return
/datum/chemical/l_plas/injected(var/mob/M as mob, zone)
var/volume = src.return_property("volume")
switch(zone)
if("eye")
M.eye_stat += volume * 5
M.eye_blurry += volume * 3
if (M.eye_stat >= 20)
M << "\red Your eyes start to burn badly!"
M.disabilities |= 1
if (prob(M.eye_stat - 20 + 1))
M << "\red You go blind!"
M.sdisabilities |= 1
else
M.plasma += volume * 6
for(var/obj/item/weapon/implant/tracking/T in M)
M.plasma += 1
//T = null
del(T)
//Foreach goto(133)
return
/datum/chemical/s_tox/injected(var/mob/M as mob, zone)
var/volume = src.return_property("volume")
switch(zone)
if("eye")
M.eye_blind += volume * 10
M.eye_blurry += volume * 15
else
M.paralysis += volume * 12
M.stat = 1
return
/datum/chemical/epil/injected(var/mob/M as mob, zone)
var/volume = src.return_property("volume")
switch(zone)
if("eye")
M.eye_blind += volume * 5
M.eye_stat += volume * 2
M.eye_blurry += volume * 20
if (M.eye_stat >= 20)
M << "\red Your eyes start to burn badly!"
M.disabilities |= 1
if (prob(M.eye_stat - 20 + 1))
M << "\red You go blind!"
M.sdisabilities |= 1
else
M.r_epil += volume * 60
return
/datum/chemical/ch_cou/injected(var/mob/M as mob, zone)
var/volume = src.return_property("volume")
switch(zone)
if("eye")
M.eye_blind += volume * 2
M.eye_stat += volume * 3
M.eye_blurry += volume * 20
M << "\red Your eyes start to burn badly!"
M.disabilities |= 1
if (prob(M.eye_stat - 20 + 1))
M << "\red You go blind!"
M.sdisabilities |= 1
else
M.r_ch_cou += volume * 60
return
/datum/chemical/rejuv/injected(var/mob/M as mob, zone)
var/volume = src.return_property("volume")
switch(zone)
if("eye")
M.eye_stat -= volume * 5
M.eye_blurry += volume * 5
M.eye_stat = max(0, M.eye_stat)
else
M.rejuv += volume * 3
if (M.paralysis)
M.paralysis = 3
if (M.weakened)
M.weakened = 3
if (M.stunned)
M.stunned = 3
return
+193
View File
@@ -0,0 +1,193 @@
/proc/colour2html(colour)
var/T
for(T in html_colours)
if (ckey(T) == ckey(colour))
else
//Foreach continue //goto(12)
if (!( T ))
world.log << text("Warning! Could not find matching colour entry for '[]'.", colour)
return "#FFFFFF"
return "#" + uppertext(html_colours[text("[]", colour)])
return
/proc/HTMLAssociate(colour, html)
if (html_colours.Find(colour))
world.log << text("Changing [] from [] to []!", colour, html_colours[colour], html)
html_colours[colour] = html
return
/proc/LoadHTMLAssociations()
var/F = new /savefile( "s_html.sav" )
F["html_colours"] >> html_colours
if (!( html_colours ))
html_colours = list( )
if (!( html_colours.len ))
HTMLAssociate("aliceblue", "f0f8ff")
HTMLAssociate("antiquewhite", "faebd7")
HTMLAssociate("aqua", "00ffff")
HTMLAssociate("aquamarine", "7fffd4")
HTMLAssociate("azure", "f0ffff")
HTMLAssociate("beige", "f5f5dc")
HTMLAssociate("bisque", "ffe4c4")
HTMLAssociate("black", "000000")
HTMLAssociate("blanchedalmond", "ffebcd")
HTMLAssociate("blue", "0000ff")
HTMLAssociate("blueviolet", "8a2be2")
HTMLAssociate("brown", "a52a2a")
HTMLAssociate("burlywood", "deb887")
HTMLAssociate("cadetblue", "5f9ea0")
HTMLAssociate("chartreuse", "7fff00")
HTMLAssociate("chocolate", "d2691e")
HTMLAssociate("coral", "ff7f50")
HTMLAssociate("cornflowerblue", "6495ed")
HTMLAssociate("cornsilk", "fff8dc")
HTMLAssociate("crimson", "dc143c")
HTMLAssociate("cyan", "00ffff")
HTMLAssociate("darkblue", "00008b")
HTMLAssociate("darkcyan", "008b8b")
HTMLAssociate("darkgoldenrod", "b8b60b")
HTMLAssociate("darkgrey", "a9a9a9")
HTMLAssociate("darkgray", "a9a9a9")
HTMLAssociate("darkgreen", "006400")
HTMLAssociate("darkkhaki", "bdb76b")
HTMLAssociate("darkmagenta", "8b008b")
HTMLAssociate("darkolivegreen", "556b2f")
HTMLAssociate("darkorange", "ff8c00")
HTMLAssociate("darkorchid", "9932cc")
HTMLAssociate("darkred", "8b0000")
HTMLAssociate("darksalmon", "e9967a")
HTMLAssociate("darkseagreen", "8fbc8f")
HTMLAssociate("darkslateblue", "483d8b")
HTMLAssociate("darkslategrey", "2f4f4f")
HTMLAssociate("darkslategray", "2f4f4f")
HTMLAssociate("darkturquoise", "00ced1")
HTMLAssociate("darkviolet", "9400d3")
HTMLAssociate("deeppink", "ff1493")
HTMLAssociate("deepskyblue", "00bfff")
HTMLAssociate("dimgrey", "696969")
HTMLAssociate("dimgray", "696969")
HTMLAssociate("dodgerblue", "1e90ff")
HTMLAssociate("firebrick", "b22222")
HTMLAssociate("floralwhite", "fffaf0")
HTMLAssociate("forestgreen", "228b22")
HTMLAssociate("fuchsia", "ff00ff")
HTMLAssociate("gainsboro", "dcdcdc")
HTMLAssociate("ghostwhite", "f8f8ff")
HTMLAssociate("gold", "ffd700")
HTMLAssociate("goldenrod", "daa520")
HTMLAssociate("grey", "808080")
HTMLAssociate("gray", "808080")
HTMLAssociate("green", "008000")
HTMLAssociate("greenyellow", "adff2f")
HTMLAssociate("honeydew", "f0fff0")
HTMLAssociate("hotpink", "ff69b4")
HTMLAssociate("indianred", "cd5c5c")
HTMLAssociate("indigo", "4b0082")
HTMLAssociate("ivory", "fffff0")
HTMLAssociate("khaki", "f0e68c")
HTMLAssociate("lavender", "e6e6fa")
HTMLAssociate("lavenderblush", "fff0f5")
HTMLAssociate("lawngreen", "7cfc00")
HTMLAssociate("lemonchiffon", "fffacd")
HTMLAssociate("lightblue", "add8e6")
HTMLAssociate("lightcoral", "f08080")
HTMLAssociate("lightcyan", "e0ffff")
HTMLAssociate("lightgoldenrod", "fafad2")
HTMLAssociate("lightgreen", "90ee90")
HTMLAssociate("lightgrey", "d3d3d3")
HTMLAssociate("lightgray", "d3d3d3")
HTMLAssociate("lightpink", "ffb6c1")
HTMLAssociate("lightsalmon", "ffa07a")
HTMLAssociate("lightseagreen", "20b2aa")
HTMLAssociate("lightskyblue", "87cefa")
HTMLAssociate("lightslategrey", "778899")
HTMLAssociate("lightslategray", "778899")
HTMLAssociate("lightsteelblue", "b0c4de")
HTMLAssociate("lightyellow", "ffffe0")
HTMLAssociate("lime", "00ff00")
HTMLAssociate("limegreen", "32cd32")
HTMLAssociate("linen", "faf0e6")
HTMLAssociate("magenta", "ff00ff")
HTMLAssociate("maroon", "800000")
HTMLAssociate("mediumaquamarine", "66cdaa")
HTMLAssociate("mediumblue", "0000cd")
HTMLAssociate("mediumorchid", "ba55d3")
HTMLAssociate("mediumpurple", "9370db")
HTMLAssociate("mediumseagreen", "3cb371")
HTMLAssociate("mediumslateblue", "7b68ee")
HTMLAssociate("mediumspringgreen", "00fa9a")
HTMLAssociate("mediumturquoise", "48d1cc")
HTMLAssociate("mediumvioletred", "c71585")
HTMLAssociate("midnightblue", "191970")
HTMLAssociate("mintcream", "f5fffa")
HTMLAssociate("mistyrose", "ffe4e1")
HTMLAssociate("moccasin", "ffe4b5")
HTMLAssociate("navajowhite", "ffdead")
HTMLAssociate("navy", "000080")
HTMLAssociate("oldlace", "fdf5e6")
HTMLAssociate("olive", "808000")
HTMLAssociate("olivedrab", "6b8e23")
HTMLAssociate("orange", "ffa500")
HTMLAssociate("orangered", "ff4500")
HTMLAssociate("orchid", "da70d6")
HTMLAssociate("palegoldenrod", "eee8aa")
HTMLAssociate("palegreen", "98fb98")
HTMLAssociate("paleturquoise", "afeeee")
HTMLAssociate("palevioletred", "db7093")
HTMLAssociate("papayawhip", "ffefd5")
HTMLAssociate("peachpuff", "ffdab9")
HTMLAssociate("peru", "cd853f")
HTMLAssociate("pink", "ffc0cd")
HTMLAssociate("plum", "dda0dd")
HTMLAssociate("powderblue", "b0e0e6")
HTMLAssociate("purple", "800080")
HTMLAssociate("red", "ff0000")
HTMLAssociate("rosybrown", "bc8f8f")
HTMLAssociate("royalblue", "4169e1")
HTMLAssociate("saddlebrown", "8b4513")
HTMLAssociate("salmon", "fa8072")
HTMLAssociate("sandybrown", "f4a460")
HTMLAssociate("seagreen", "2e8b57")
HTMLAssociate("seashell", "fff5ee")
HTMLAssociate("sienna", "a0522d")
HTMLAssociate("silver", "c0c0c0")
HTMLAssociate("skyblue", "87ceed")
HTMLAssociate("slateblue", "6a5acd")
HTMLAssociate("slategrey", "708090")
HTMLAssociate("slategray", "708090")
HTMLAssociate("snow", "fffafa")
HTMLAssociate("springgreen", "00ff7f")
HTMLAssociate("steelblue", "4682b4")
HTMLAssociate("tan", "d2b48c")
HTMLAssociate("teal", "008080")
HTMLAssociate("thistle", "d8bfd8")
HTMLAssociate("tomato", "ff6347")
HTMLAssociate("turquoise", "40e0d0")
HTMLAssociate("violet", "ee82ee")
HTMLAssociate("wheat", "f5deb3")
HTMLAssociate("white", "ffffff")
HTMLAssociate("whitesmoke", "f5f5f5")
HTMLAssociate("yellow", "ffff00")
HTMLAssociate("yellowgreen", "a9cd32")
return
/proc/SaveHTMLAssociations()
var/F = new /savefile( "s_html.sav" )
F["html_colours"] << html_colours
return
/world/New()
..()
LoadHTMLAssociations()
return
/world/Del()
SaveHTMLAssociations()
..()
return
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+91
View File
@@ -0,0 +1,91 @@
// shows a browser pop-up window listing the variables in a datum
/proc/Vars(datum/D in view())
set category = "Debug"
var/dat = "<HEAD><TITLE>Vars for "
if(istype(D, /atom)) // if the datum is an atom
var/atom/A = D // do special handling
dat += "[A.name] : [A.type] \ref[A]</TITLE></HEAD><BODY>"
#ifdef VARSICON
if(A.icon) // if the atom has an icon, display it
dat += variable(usr, "icon", new/icon(A.icon, A.icon_state, A.dir))
#endif
else // not an atom
dat += "[D] : [D.type] \ref[D]</TITLE><HEAD><BODY>"
for(var/V in D.vars) // for each variable in the datum
dat += variable(usr, V, D.vars[V]) //get the text for that variable
dat += "</BODY>"
usr << browse(dat, "window=\ref[D]") // display the browser pop-up
// return a HTML formatted string displaying a variable
/proc/variable(user, vname, val)
var/t
if(vname == "*") // true if this variable is part of a list
t = "<FONT COLOR=#404040 SIZE=-1>* [val]" // so format smaller grey text, and just show the value
else // otherwise show the name and value without formatting
if(istext(val))
t = "<FONT>[vname] = \"[val]\"" // place quotes around text values
else
t = "<FONT>[vname] = [val]"
if(istype(val,/icon)) // if this variable is an icon, display it
#ifdef VARSICON
var/rnd = rand(1,10000) // use random number in filename to avoid conflicts
user << browse_rsc(val, "tmp\ref[val][rnd].png") // precache the icon image file
t+="<IMG SRC=\"tmp\ref[val][rnd].png\">" // and add the icon to the HTML
#endif
else if(istype(val, /datum)) // if this is a datum object
var/datum/dval = val // add a link to the object to the HTML
t+= " ([dval.type]) <A href='?src=\ref[val];Vars=1'><FONT SIZE=-2>\ref[val]</FONT></A>"
if("[val]" == "/list") // if this is a list object
t += " (length [length(val)])</FONT><BR>"
if( (vname!="vars") && (vname!="verbs") && length(val)<500) // and it's not vars or verbs, or too long
for(var/lv in val) // loop through all items in the list
t += variable(user, "*", lv) // and display them
else
t += "</FONT><BR>"
return t // return the formatted text
// topic handler for linked objects
// invoked when user clicks on an object link in the datum vars pop-up
// note all other Topic procs should call ..() first so this can be called
/datum/Topic(href, href_list)
if(href_list["Vars"]) // if this link came from the vars window
Vars(src) // invoke a new window for this object
/mob/proc/Delete(atom/A in view())
set category = "Debug"
switch( alert("Are you sure you wish to delete \the [A.name] at ([A.x],[A.y],[A.z]) ?", "Admin Delete Object","Yes","No") )
if("Yes")
if(config.logadmin) world.log << "ADMIN: [usr.key] deleted [A.name] at ([A.x],[A.y],[A.z])"
del(A)
File diff suppressed because it is too large Load Diff
+691
View File
@@ -0,0 +1,691 @@
/obj/machinery/computer/atmosphere/proc/returnarea()
return
/obj/machinery/computer/atmosphere/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(58)
src.icon_state = "broken"
stat |= BROKEN
if(3.0)
if (prob(25))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(109)
src.icon_state = "broken"
stat |= BROKEN
else
return
/obj/machinery/computer/atmosphere/siphonswitch/New()
..()
spawn(5)
src.area = src.loc.loc
if(otherarea)
src.area = locate(text2path("/area/[otherarea]"))
/obj/machinery/computer/atmosphere/siphonswitch/returnarea()
return area.contents
/obj/machinery/computer/atmosphere/siphonswitch/verb/siphon_all()
set src in oview(1)
if(stat & NOPOWER) return
if (usr.stat)
return
usr << "Starting all siphon systems."
for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
S.reset(1, 0)
//Foreach goto(39)
src.add_fingerprint(usr)
return
/obj/machinery/computer/atmosphere/siphonswitch/verb/stop_all()
set src in oview(1)
if(stat & NOPOWER) return
if (usr.stat)
return
usr << "Stopping all siphon systems."
for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
S.reset(0, 0)
//Foreach goto(39)
src.add_fingerprint(usr)
return
/obj/machinery/computer/atmosphere/siphonswitch/verb/auto_on()
set src in oview(1)
if(stat & NOPOWER) return
if (usr.stat)
return
usr << "Starting automatic air control systems."
for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
S.reset(0, 1)
//Foreach goto(39)
src.add_fingerprint(usr)
return
/obj/machinery/computer/atmosphere/siphonswitch/verb/release_scrubbers()
set src in oview(1)
if(stat & NOPOWER) return
if (usr.stat)
return
usr << "Releasing all scrubber toxins."
for(var/obj/machinery/atmoalter/siphs/scrubbers/S in src.returnarea())
S.reset(-1.0, 0)
//Foreach goto(39)
src.add_fingerprint(usr)
return
/obj/machinery/computer/atmosphere/siphonswitch/verb/release_all()
if(stat & NOPOWER) return
if (usr.stat)
return
usr << "Releasing all stored air."
for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
S.reset(-1.0, 0)
//Foreach goto(37)
src.add_fingerprint(usr)
return
/obj/machinery/computer/atmosphere/siphonswitch/mastersiphonswitch/returnarea()
return world
return
/obj/machinery/atmoalter/heater/proc/setstate()
if(stat & NOPOWER)
icon_state = "heater-p"
return
if (src.holding)
src.icon_state = "heater1-h"
else
src.icon_state = "heater1"
return
/obj/machinery/atmoalter/heater/process()
if(stat & NOPOWER) return
use_power(5)
var/turf/T = src.loc
if (istype(T, /turf))
if (locate(/obj/move, T))
T = locate(/obj/move, T)
else
T = null
if (src.h_status)
var/t1 = src.gas.tot_gas()
if ((t1 > 0 && src.gas.temperature < (src.h_tar+T0C)))
var/increase = src.heatrate / t1
var/n_temp = src.gas.temperature + increase
src.gas.temperature = min(n_temp, (src.h_tar+T0C))
use_power( src.h_tar*8)
switch(src.t_status)
if(1.0)
if (src.holding)
var/t1 = src.gas.tot_gas()
var/t2 = t1
var/t = src.t_per
if (src.t_per > t2)
t = t2
src.holding.gas.transfer_from(src.gas, t)
else
src.t_status = 3
if(2.0)
if (src.holding)
var/t1 = src.gas.tot_gas()
var/t2 = src.maximum - t1
var/t = src.t_per
if (src.t_per > t2)
t = t2
src.gas.transfer_from(src.holding.gas, t)
else
src.t_status = 3
else
/*
if(src.c_status == 1) // 1 = release
var/obj/machinery/connector/C = locate(/obj/machinery/connector, src.loc)
if (C && C.connected == src)
spawn( 0 )
C.receive_gas(gas, c_per )
return
else
src.c_status = 0
else if(src.c_status == 2) // 2 = accept
var/obj/machinery/connector/C = locate(/obj/machinery/connector, src.loc)
if (C && C.connected == src)
spawn( 0 )
C.send_gas(gas, c_per) // connector will send gas to canister
return
*/
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
//Foreach goto(432)
src.setstate()
return
/obj/machinery/atmoalter/heater/New()
..()
src.gas = new /obj/substance/gas( src )
src.gas.maximum = src.maximum
return
/obj/machinery/atmoalter/heater/attack_paw(mob/user as mob)
return src.attack_hand(user)
return
/obj/machinery/atmoalter/heater/attack_hand(var/mob/user as mob)
if(stat & NOPOWER) return
user.machine = src
var/tt
switch(src.t_status)
if(1.0)
tt = text("Releasing <A href='?src=\ref[];t=2'>Siphon</A> <A href='?src=\ref[];t=3'>Stop</A>", src, src)
if(2.0)
tt = text("<A href='?src=\ref[];t=1'>Release</A> Siphoning<A href='?src=\ref[];t=3'>Stop</A>", src, src)
if(3.0)
tt = text("<A href='?src=\ref[];t=1'>Release</A> <A href='?src=\ref[];t=2'>Siphon</A> Stopped", src, src)
else
var/ht = null
if (src.h_status)
ht = text("Heating <A href='?src=\ref[];h=2'>Stop</A>", src)
else
ht = text("<A href='?src=\ref[];h=1'>Heat</A> Stopped", src)
var/ct = null
switch(src.c_status)
if(1.0)
ct = text("Releasing <A href='?src=\ref[];c=2'>Accept</A> <A href='?src=\ref[];ct=3'>Stop</A>", src, src)
if(2.0)
ct = text("<A href='?src=\ref[];c=1'>Release</A> Accepting <A href='?src=\ref[];c=3'>Stop</A>", src, src)
if(3.0)
ct = text("<A href='?src=\ref[];c=1'>Release</A> <A href='?src=\ref[];c=2'>Accept</A> Stopped", src, src)
else
ct = "Disconnected"
var/dat = text("<TT><B>Canister Valves</B><BR>\n<FONT color = 'blue'><B>Contains/Capacity</B> [] / []</FONT><BR>\nUpper Valve Status: [][]<BR>\n\t<A href='?src=\ref[];tp=-[]'>M</A> <A href='?src=\ref[];tp=-10000'>-</A> <A href='?src=\ref[];tp=-1000'>-</A> <A href='?src=\ref[];tp=-100'>-</A> <A href='?src=\ref[];tp=-1'>-</A> [] <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=100'>+</A> <A href='?src=\ref[];tp=1000'>+</A> <A href='?src=\ref[];tp=10000'>+</A> <A href='?src=\ref[];tp=[]'>M</A><BR>\nHeater Status: [] - []<BR>\n\tTrg Tmp: <A href='?src=\ref[];ht=-50'>-</A> <A href='?src=\ref[];ht=-5'>-</A> <A href='?src=\ref[];ht=-1'>-</A> [] <A href='?src=\ref[];ht=1'>+</A> <A href='?src=\ref[];ht=5'>+</A> <A href='?src=\ref[];ht=50'>+</A><BR>\n<BR>\nPipe Valve Status: []<BR>\n\t<A href='?src=\ref[];cp=-[]'>M</A> <A href='?src=\ref[];cp=-10000'>-</A> <A href='?src=\ref[];cp=-1000'>-</A> <A href='?src=\ref[];cp=-100'>-</A> <A href='?src=\ref[];cp=-1'>-</A> [] <A href='?src=\ref[];cp=1'>+</A> <A href='?src=\ref[];cp=100'>+</A> <A href='?src=\ref[];cp=1000'>+</A> <A href='?src=\ref[];cp=10000'>+</A> <A href='?src=\ref[];cp=[]'>M</A><BR>\n<BR>\n<A href='?src=\ref[];mach_close=canister'>Close</A><BR>\n</TT>", src.gas.tot_gas(), src.maximum, tt, (src.holding ? text("<BR><A href='?src=\ref[];tank=1'>Tank ([]</A>)", src, src.holding.gas.tot_gas()) : null), src, num2text(1000000.0, 7), src, src, src, src, src.t_per, src, src, src, src, src, num2text(1000000.0, 7), ht, (src.gas.tot_gas() ? (src.gas.temperature-T0C) : 20), src, src, src, src.h_tar, src, src, src, ct, src, num2text(1000000.0, 7), src, src, src, src, src.c_per, src, src, src, src, src, num2text(1000000.0, 7), user)
user << browse(dat, "window=canister;size=600x300")
return
/obj/machinery/atmoalter/heater/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
if ((get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
usr.machine = src
if (href_list["c"])
var/c = text2num(href_list["c"])
switch(c)
if(1.0)
src.c_status = 1
if(2.0)
src.c_status = 2
if(3.0)
src.c_status = 3
else
else
if (href_list["t"])
var/t = text2num(href_list["t"])
if (src.t_status == 0)
return
switch(t)
if(1.0)
src.t_status = 1
if(2.0)
src.t_status = 2
if(3.0)
src.t_status = 3
else
else
if (href_list["h"])
var/h = text2num(href_list["h"])
if (h == 1)
src.h_status = 1
else
src.h_status = null
else
if (href_list["tp"])
var/tp = text2num(href_list["tp"])
src.t_per += tp
src.t_per = min(max(round(src.t_per), 0), 1000000.0)
else
if (href_list["cp"])
var/cp = text2num(href_list["cp"])
src.c_per += cp
src.c_per = min(max(round(src.c_per), 0), 1000000.0)
else
if (href_list["ht"])
var/cp = text2num(href_list["ht"])
src.h_tar += cp
src.h_tar = min(max(round(src.h_tar), 0), 500)
else
if (href_list["tank"])
var/cp = text2num(href_list["tank"])
if ((cp == 1 && src.holding))
src.holding.loc = src.loc
src.holding = null
if (src.t_status == 2)
src.t_status = 3
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
//Foreach goto(515)
src.add_fingerprint(usr)
else
usr << browse(null, "window=canister")
return
return
/obj/machinery/atmoalter/heater/attackby(var/obj/W as obj, var/mob/user as mob)
if (istype(W, /obj/item/weapon/tank))
if (src.holding)
return
var/obj/item/weapon/tank/T = W
user.drop_item()
T.loc = src
src.holding = T
else
if (istype(W, /obj/item/weapon/wrench))
var/obj/machinery/connector/con = locate(/obj/machinery/connector, src.loc)
if (src.c_status)
src.anchored = 0
src.c_status = 0
user.show_message("\blue You have disconnected the heater.", 1)
if(con)
con.connected = null
else
if (con && !con.connected)
src.anchored = 1
src.c_status = 3
user.show_message("\blue You have connected the heater.", 1)
con.connected = src
else
user.show_message("\blue There is no connector here to attach the heater to.", 1)
return
/obj/machinery/atmoalter/canister/proc/update_icon()
var/air_in = src.gas.tot_gas()
src.overlays = 0
if (src.destroyed)
src.icon_state = text("[]-1", src.color)
else
icon_state = "[color]"
if(holding)
overlays += image('canister.dmi', "can-oT")
if (air_in < 10)
overlays += image('canister.dmi', "can-o0")
else if (air_in < (src.gas.maximum * 0.2))
overlays += image('canister.dmi', "can-o1")
else if (air_in < (src.maximum * 0.6))
overlays += image('canister.dmi', "can-o2")
else
overlays += image('canister.dmi', "can-o3")
return
/obj/machinery/atmoalter/canister/proc/healthcheck()
if (src.health <= 10)
var/T = src.loc
if (!( istype(T, /turf) ))
return
src.gas.turf_add(T, -1.0)
src.destroyed = 1
src.density = 0
update_icon()
if (src.holding)
src.holding.loc = src.loc
src.holding = null
if (src.t_status == 2)
src.t_status = 3
return
/obj/machinery/atmoalter/canister/process()
if (src.destroyed)
return
var/T = src.loc
if (istype(T, /turf))
if (locate(/obj/move, T))
T = locate(/obj/move, T)
else
T = null
switch(src.t_status)
if(1.0)
if (src.holding)
var/t1 = src.gas.tot_gas()
var/t2 = t1
var/t = src.t_per
if (src.t_per > t2)
t = t2
src.holding.gas.transfer_from(src.gas, t)
else
if (T)
var/t1 = src.gas.tot_gas()
var/t2 = t1
var/t = src.t_per
if (src.t_per > t2)
t = t2
src.gas.turf_add(T, t)
src.update_icon()
if(2.0)
if (src.holding)
var/t1 = src.gas.tot_gas()
var/t2 = src.maximum - t1
var/t = src.t_per
if (src.t_per > t2)
t = t2
src.gas.transfer_from(src.holding.gas, t)
else
src.t_status = 3
src.update_icon()
else
// new method does all transfers in connector ptick
/* if(src.c_status == 1) // 1 = release
var/obj/machinery/connector/C = locate(/obj/machinery/connector, src.loc)
if (C && C.connected == src)
spawn( 0 )
C.receive_gas(gas, c_per )
return
src.update_icon()
else
src.c_status = 0
else if(src.c_status == 2) // 2 = accept
var/obj/machinery/connector/C = locate(/obj/machinery/connector, src.loc)
if (C && C.connected == src)
spawn( 0 )
C.send_gas(gas, c_per) // connector will send gas to canister
return
src.update_icon()
*/
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
//Foreach goto(450)
src.update_icon()
return
/obj/machinery/atmoalter/canister/New()
..()
src.gas = new /obj/substance/gas( src )
src.gas.maximum = src.maximum
return
/obj/machinery/atmoalter/canister/get_gas()
return gas
/obj/machinery/atmoalter/canister/burn(fi_amount)
src.health -= 1
healthcheck()
return
/obj/machinery/atmoalter/canister/blob_act()
src.health -= 1
healthcheck()
return
/obj/machinery/atmoalter/canister/meteorhit(var/obj/O as obj)
src.health = 0
healthcheck()
return
/obj/machinery/atmoalter/canister/attack_paw(var/mob/user as mob)
return src.attack_hand(user)
return
/obj/machinery/atmoalter/canister/attack_hand(var/mob/user as mob)
if (src.destroyed)
return
user.machine = src
var/tt
switch(src.t_status)
if(1.0)
tt = text("Releasing <A href='?src=\ref[];t=2'>Siphon (only tank)</A> <A href='?src=\ref[];t=3'>Stop</A>", src, src)
if(2.0)
tt = text("<A href='?src=\ref[];t=1'>Release</A> Siphoning (only tank) <A href='?src=\ref[];t=3'>Stop</A>", src, src)
if(3.0)
tt = text("<A href='?src=\ref[];t=1'>Release</A> <A href='?src=\ref[];t=2'>Siphon (only tank)</A> Stopped", src, src)
else
var/ct = null
switch(src.c_status)
if(1.0)
ct = text("Releasing <A href='?src=\ref[];c=2'>Accept</A> <A href='?src=\ref[];c=3'>Stop</A>", src, src)
if(2.0)
ct = text("<A href='?src=\ref[];c=1'>Release</A> Accepting <A href='?src=\ref[];c=3'>Stop</A>", src, src)
if(3.0)
ct = text("<A href='?src=\ref[];c=1'>Release</A> <A href='?src=\ref[];c=2'>Accept</A> Stopped", src, src)
else
ct = "Disconnected"
var/dat = {"<TT><B>Canister Valves</B><BR>
<FONT color = 'blue'><B>Contains/Capacity</B> [num2text(src.gas.tot_gas(), 20)] / [num2text(src.maximum, 20)]</FONT><BR>
Upper Valve Status: [tt]<BR>
\t[(src.holding ? "<A href='?src=\ref[src];tank=1'>Tank ([src.holding.gas.tot_gas()]</A>)" : null)]<BR>
\t<A href='?src=\ref[src];tp=-[num2text(1000000.0, 7)]'>M</A> <A href='?src=\ref[src];tp=-10000'>-</A> <A href='?src=\ref[src];tp=-1000'>-</A> <A href='?src=\ref[src];tp=-100'>-</A> <A href='?src=\ref[src];tp=-1'>-</A> [src.t_per] <A href='?src=\ref[src];tp=1'>+</A> <A href='?src=\ref[src];tp=100'>+</A> <A href='?src=\ref[src];tp=1000'>+</A> <A href='?src=\ref[src];tp=10000'>+</A> <A href='?src=\ref[src];tp=[num2text(1000000.0, 7)]'>M</A><BR>
Pipe Valve Status: [ct]<BR>
\t<A href='?src=\ref[src];cp=-[num2text(1000000.0, 7)]'>M</A> <A href='?src=\ref[src];cp=-10000'>-</A> <A href='?src=\ref[src];cp=-1000'>-</A> <A href='?src=\ref[src];cp=-100'>-</A> <A href='?src=\ref[src];cp=-1'>-</A> [src.c_per] <A href='?src=\ref[src];cp=1'>+</A> <A href='?src=\ref[src];cp=100'>+</A> <A href='?src=\ref[src];cp=1000'>+</A> <A href='?src=\ref[src];cp=10000'>+</A> <A href='?src=\ref[src];cp=[num2text(1000000.0, 7)]'>M</A><BR>
<BR>
<A href='?src=\ref[user];mach_close=canister'>Close</A><BR>
</TT>"}
/*
var/dat = text({"<TT><B>Canister Valves</B><BR>
<FONT color = 'blue'><B>Contains/Capacity</B> [] / []</FONT><BR>
Upper Valve Status: []<BR>
\t[]<BR>
\t<A href='?src=\ref[];tp=-[]'>M</A> <A href='?src=\ref[];tp=-10000'>-</A> <A href='?src=\ref[];tp=-1000'>-</A> <A href='?src=\ref[];tp=-100'>-</A> <A href='?src=\ref[];tp=-1'>-</A> [] <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=100'>+</A> <A href='?src=\ref[];tp=1000'>+</A> <A href='?src=\ref[];tp=10000'>+</A> <A href='?src=\ref[];tp=[]'>M</A><BR>
Pipe Valve Status: []<BR>
\t<A href='?src=\ref[];cp=-[]'>M</A> <A href='?src=\ref[];cp=-10000'>-</A> <A href='?src=\ref[];cp=-1000'>-</A> <A href='?src=\ref[];cp=-100'>-</A> <A href='?src=\ref[];cp=-1'>-</A> [] <A href='?src=\ref[];cp=1'>+</A> <A href='?src=\ref[];cp=100'>+</A> <A href='?src=\ref[];cp=1000'>+</A> <A href='?src=\ref[];cp=10000'>+</A> <A href='?src=\ref[];cp=[]'>M</A><BR>
<BR>
<A href='?src=\ref[];mach_close=canister'>Close</A><BR>
</TT>"}, num2text(src.gas.tot_gas(), 20), num2text(src.maximum, 20), tt, (src.holding ? text("<A href='?src=\ref[];tank=1'>Tank ([]</A>)", src, src.holding.gas.tot_gas()) : null), src, num2text(1000000.0, 7), src, src, src, src, src.t_per, src, src, src, src, src, num2text(1000000.0, 7), ct, src, num2text(1000000.0, 7), src, src, src, src, src.c_per, src, src, src, src, src, num2text(1000000.0, 7), user)
*/
user << browse(dat, "window=canister;size=600x300")
return
/obj/machinery/atmoalter/canister/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
if ((get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
usr.machine = src
if (href_list["c"])
var/c = text2num(href_list["c"])
switch(c)
if(1.0)
src.c_status = 1
if(2.0)
c_status = 2
if(3.0)
src.c_status = 3
else
if (href_list["t"])
var/t = text2num(href_list["t"])
if (src.t_status == 0)
return
switch(t)
if(1.0)
src.t_status = 1
if(2.0)
if (src.holding)
src.t_status = 2
else
src.t_status = 3
if(3.0)
src.t_status = 3
else
if (href_list["tp"])
var/tp = text2num(href_list["tp"])
src.t_per += tp
src.t_per = min(max(round(src.t_per), 0), 1000000.0)
else
if (href_list["cp"])
var/cp = text2num(href_list["cp"])
src.c_per += cp
src.c_per = min(max(round(src.c_per), 0), 1000000.0)
else
if (href_list["tank"])
var/cp = text2num(href_list["tank"])
if ((cp == 1 && src.holding))
src.holding.loc = src.loc
src.holding = null
if (src.t_status == 2)
src.t_status = 3
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
//Foreach goto(423)
src.add_fingerprint(usr)
update_icon()
else
usr << browse(null, "window=canister")
return
return
/obj/machinery/atmoalter/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if ((istype(W, /obj/item/weapon/tank) && !( src.destroyed )))
if (src.holding)
return
var/obj/item/weapon/tank/T = W
user.drop_item()
T.loc = src
src.holding = T
update_icon()
else
if ((istype(W, /obj/item/weapon/wrench)))
var/obj/machinery/connector/con = locate(/obj/machinery/connector, src.loc)
if (src.c_status)
src.anchored = 0
src.c_status = 0
user.show_message("\blue You have disconnected the canister.", 1)
if(con)
con.connected = null
else
if(con && !con.connected && !destroyed)
src.anchored = 1
src.c_status = 3
user.show_message("\blue You have connected the canister.", 1)
con.connected = src
else
user.show_message("\blue There is nothing here with which to connect the canister.", 1)
else
switch(W.damtype)
if("fire")
src.health -= W.force
if("brute")
src.health -= W.force * 0.5
else
src.healthcheck()
..()
return
/obj/machinery/atmoalter/canister/las_act(flag)
if (flag == "bullet")
src.health = 0
spawn( 0 )
healthcheck()
return
if (flag)
var/turf/T = src.loc
if (!( istype(T, /turf) ))
return
else
T.firelevel = T.poison
else
src.health = 0
spawn( 0 )
healthcheck()
return
return
/obj/machinery/atmoalter/canister/poisoncanister/New()
..()
src.update_icon()
src.gas.plasma = 9.0E7*filled
return
/obj/machinery/atmoalter/canister/oxygencanister/New()
..()
src.gas.oxygen = 1.0E8*filled
return
/obj/machinery/atmoalter/canister/anesthcanister/New()
..()
src.gas.sl_gas = 1.0E8*filled
return
/obj/machinery/atmoalter/canister/n2canister/New()
..()
src.gas.n2 = 1.0E8*filled
return
/obj/machinery/atmoalter/canister/co2canister/New()
..()
src.gas.co2 = 1.0E8*filled
return
/obj/machinery/atmoalter/canister/aircanister/New()
..()
src.gas.oxygen = 2.1e7*filled
src.gas.n2 = 7.9e7*filled
return
+984
View File
@@ -0,0 +1,984 @@
/proc/scram(n)
var/t = ""
var/p = null
p = 1
while(p <= n)
t = text("[][]", t, rand(1, 9))
p++
return t
return
/obj/machinery/computer/dna/attack_paw(mob/user as mob)
return src.attack_hand(user)
return
/obj/machinery/computer/dna/attack_hand(mob/user as mob)
if(stat & (NOPOWER|BROKEN) )
return
user.machine = src
if (istype(user, /mob/human))
var/dat = text("<I>Please Insert the cards into the slots</I><BR>\n\t\t\t\tFunction Disk: <A href='?src=\ref[];scan=1'>[]</A><BR>\n\t\t\t\tTarget Disk: <A href='?src=\ref[];modify=1'>[]</A><BR>\n\t\t\t\tAux. Data Disk: <A href='?src=\ref[];modify2=1'>[]</A><BR>\n\t\t\t\t\t(Not always used!)<BR>\n\t\t\t\t[]", src, (src.scan ? text("[]", src.scan.name) : "----------"), src, (src.modify ? text("[]", src.modify.name) : "----------"), src, (src.modify2 ? text("[]", src.modify2.name) : "----------"), (src.scan ? text("<A href='?src=\ref[];execute=1'>Execute Function</A>", src) : "No function disk inserted!"))
if (src.temp)
dat = text("[]<BR><BR><A href='?src=\ref[];clear=1'>Clear Message</A>", src.temp, src)
user << browse(dat, "window=dna_comp")
else
var/dat = text("<I>[]</I><BR>\n\t\t\t\t[] <A href='?src=\ref[];scan=1'>[]</A><BR>\n\t\t\t\t[] <A href='?src=\ref[];modify=1'>[]</A><BR>\n\t\t\t\t[] <A href='?src=\ref[];modify2=1'>[]</A><BR>\n\t\t\t\t\t(Not always used!)<BR>\n\t\t\t\t[]", stars("Please Insert the cards into the slots"), stars("Function Disk:"), src, (src.scan ? text("[]", src.scan.name) : "----------"), stars("Target Disk:"), src, (src.modify ? text("[]", src.modify.name) : "----------"), stars("Aux. Data Disk:"), src, (src.modify2 ? text("[]", src.modify2.name) : "----------"), (src.scan ? text("<A href='?src=\ref[];execute=1'>[]</A>", src, stars("Execute Function")) : stars("No function disk inserted!")))
if (src.temp)
dat = text("[]<BR><BR><A href='?src=\ref[];clear=1'>[]", stars(src.temp), src, stars("Clear Message</A>"))
user << browse(dat, "window=dna_comp")
return
/obj/machinery/computer/dna/Topic(href, href_list)
..()
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
usr << "\red You don't have the dexterity to do this!"
return
if ((usr.stat || usr.restrained()))
return
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
usr.machine = src
if (href_list["modify"])
if (src.modify)
src.modify.loc = src.loc
src.modify = null
src.mode = null
else
var/obj/item/I = usr.equipped()
if (istype(I, /obj/item/weapon/card/data))
usr.drop_item()
I.loc = src
src.modify = I
src.mode = null
if (href_list["modify2"])
if (src.modify2)
src.modify2.loc = src.loc
src.modify2 = null
src.mode = null
else
var/obj/item/I = usr.equipped()
if (istype(I, /obj/item/weapon/card/data))
usr.drop_item()
I.loc = src
src.modify2 = I
src.mode = null
if (href_list["scan"])
if (src.scan)
src.scan.loc = src.loc
src.scan = null
src.mode = null
else
var/obj/item/I = usr.equipped()
if (istype(I, /obj/item/weapon/card/data))
usr.drop_item()
I.loc = src
src.scan = I
src.mode = null
if (href_list["clear"])
src.temp = null
if (href_list["execute"])
if ((src.scan && src.scan.function))
switch(src.scan.function)
if("data_mutate")
if (src.modify)
if (!( findtext(src.scan.data, "-", 1, null) ))
if ((src.modify.data && src.scan.data && length(src.modify.data) >= length(src.scan.data)))
src.modify.data = text("[][]", src.scan.data, (length(src.modify.data) > length(src.scan.data) ? copytext(src.modify.data, length(src.scan.data) + 1, length(src.modify.data) + 1) : null))
else
src.temp = "Disk Failure: Cannot examine data! (Null or wrong format)"
else
var/d = findtext(src.modify.data, "-", 1, null)
var/t = copytext(src.modify.data, d + 1, length(src.modify.data) + 1)
d = text2num(copytext(1, d, null))
if ((d && t && src.modify.data && src.scan.data && length(src.modify.data) >= (length(t) + d - 1) ))
src.modify.data = text("[][][]", copytext(src.modify.data, 1, d), t, (length(src.modify.data) > length(t) + d ? copytext(src.modify.data, length(t) + d, length(src.modify.data) + 1) : null))
else
src.temp = "Disk Failure: Cannot examine data! (Null or wrong format)"
else
src.temp = "Disk Failure: Cannot read target disk!"
if("dna_seq")
src.temp = "<TT>DNA Systems Help:\nHuman DNA sequences: (Compressed in *.dna format version 10.76)\n\tSpecies Identification Marker: (28 chromosomes)\n\t\t5BDFE293BA5500F9FFFD500AAFFE\n\tStructural Enzymes:\n\t\tCDE375C9A6C25A7DBDA50EC05AC6CEB63\n\t\tNote: The first id set is used for DNA clean up operations.\n\tUsed Enzymes:\n\t\t493DB249EB6D13236100A37000800AB71\n\tSpecies/Genus Classification: <I>Homo Sapien</I>\n\nMonkey DNA sequences: (Compressed in *.dna format version 10.76)\n\tSpecies Identification Marker: (16 chromosomes)\n\t\t2B6696D2B127E5A4\n\tStructural Enzymes:\n\t\tCDEAF5B90AADBC6BA8033DB0A7FD613FA\n\t\tNote: The first id set is used for DNA clean up operations.\n\tUsed Enzymes:\n\t\tC8FFFE7EC09D80AEDEDB9A5A0B4085B61\n\tSpecies/Genus Classification: Generic Monkey\n</TT>>"
if("dna_help")
src.temp = "<TT>DNA Systems Help:\nThe DNA systems consists 3 systems.\nI. DNA Scanner/Implanter - This system is slightly advanced to use. It accepts\n\t1 disk. Before you wish to run a function/program you must implant the\n\tdisk data into the temporary memory. Note that once this is done the disk can\n\tbe removed to place a data disk in.\nII. DNA computer - This is a simple yet fast computer that basically operates on data.\nIII. Restructurer - This device reorganizes the anatomical structure of the subject\n\taccording to the DNA sequences. Please note that it is illegal to perform a\n\ttransfer from one species to or from the <I>Homo sapiens</I> species but\n\thuman to human is acceptable under UNSD guidlines.\n\tNote: This machine is programmed to operate on specific preprogrammed species with\n\tspecialized anatomical blueprints hard coded into its databanks. It cannot operate\n\ton other species. (Current: Human, Monkey)\n\nData Disks:\n\tThese run on 2 (or 3) types: DNA scanner program disks and data modification\nfunctions (and disk modification functions)\n\nDisk-Copy\n\tThis erases the target disk and completely copies the data from the aux. disk.\nDisk-Erase\n\tThis erases everything on the target disk.\nData-Clear\n\tThis erases (clears) only the data.\n\nData-Trunicate\n\tThis removes data from the target disk (parameters gathered from data slot on target\n\tdisk). This fuction has 4 modes (a,b,c,default) defined by this way. (mode id)(#)\n\ta - This cuts # data from the end. (ex a1 on ABCD = ABC)\n\tb - This cuts # data from the beginning. (ex b1 on ABCD = BCD)\n\tc - This limits the data from the end. (ex c1 on ABCD = A)\n\tdefault - This limits the data from the end. (ex 1 on ABCD = D)\nData-Add\n\tThis adds thedata on the aux. disk to the data on the target disk.\nData-Sramble\n\tThis scrambles the data on the target disk. The length is equal to\n\tthe length of the original data.\nData-Input\n\tThis lets you input data into the data slot of any data disk.\n\tNote: This doesn't work only on storage.\nData-Mutate\n\tThis basically inserts text. You follow this format:\n\tpos-text (or just text for automatic pos 1)\n\tie 2-IVE on FOUR yields FIVE\n</TT>"
if("data_add")
if (src.modify)
if (src.modify2)
if ((src.modify.data && src.modify2.data))
src.modify.data += src.modify2
src.temp = text("Done!<BR>New Data:<BR>[]", src.modify.data)
else
src.temp = "Cannot read data! (may be null)"
else
src.temp = "Disk Failure: Cannot read aux. data disk!"
else
src.temp = "Disk Failure: Cannot read target disk!"
if("data_scramble")
if (src.modify)
if (length(text("[]", src.modify.data)) >= 1)
src.modify.data = scram(length(text("[]", src.modify.data)))
src.temp = text("Data scrambled: []", src.modify.data)
else
src.temp = "No data to scramble"
else
src.temp = "Disk Failure: Cannot read target disk!"
if("data_input")
if (src.modify)
var/dat = input(usr, ">", text("[]", src.name), null) as text
var/s = src.scan
var/m = src.modify
if ((usr.stat || usr.restrained() || src.modify != m || src.scan != s))
return
if ((get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
src.modify.data = dat
else
src.temp = "Disk Failure: Cannot read target disk!"
if("disk_copy")
if (src.modify)
if (src.modify2)
src.modify.function = src.modify2.function
src.modify.data = src.modify2.data
src.modify.special = src.modify2.special
src.temp = "All disk data/programs copied."
else
src.temp = "Disk Failure: Cannot read aux. data disk!"
else
src.temp = "Disk Failure: Cannot read target disk!"
if("disk_dis")
if (src.modify)
src.temp = text("Function: [][]<BR>Data: []", src.modify.function, (src.modify.special ? text("-[]", src.modify.special) : null), src.modify.data)
else
src.temp = "Disk Failure: Cannot read target disk!"
if("disk_erase")
if (src.modify)
src.modify.data = null
src.modify.function = "storage"
src.modify.special = null
src.temp = "All Disk contents deleted."
else
src.temp = "Disk Failure: Cannot read target disk!"
if("data_clear")
if (src.modify)
src.modify.data = null
src.temp = "Disk data cleared."
else
src.temp = "Disk Failure: Cannot read target disk!"
if("data_trun")
if (src.modify)
if ((src.modify.data && src.scan.data))
var/l1 = length(src.modify.data)
var/l2 = max(round(text2num(src.scan.data)), 1)
switch(copytext(src.modify.data, 1, 2))
if("a")
if (l1 > l2)
src.modify.data = copytext(src.modify.data, 1, (l1 - l2) + 1)
else
src.modify.data = ""
src.temp = text("Done!<BR>New Data:<BR>[]", src.modify.data)
if("b")
if (l1 > l2)
src.modify.data = copytext(src.modify.data, l2, l1 + 1)
else
src.modify.data = ""
src.temp = text("Done!<BR>New Data:<BR>[]", src.modify.data)
if("c")
if (l1 >= l2)
src.modify.data = copytext(src.modify.data, l1 - l2, l1 + 1)
src.temp = text("Done!<BR>New Data:<BR>[]", src.modify.data)
else
if (l1 >= l2)
src.modify.data = copytext(src.modify.data, 1, l2 + 1)
src.temp = text("Done!<BR>New Data:<BR>[]", src.modify.data)
else
src.temp = "Cannot read data! (may be null and note that function data slot is used instead of aux disk!!)"
else
src.temp = "Disk Failure: Cannot read target disk!"
else
else
src.temp = "System Failure: Cannot read disk function!"
src.add_fingerprint(usr)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
//Foreach goto(1764)
return
/obj/machinery/computer/dna/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
//SN src = null
del(src)
return
else
return
/obj/machinery/dna_scanner/allow_drop()
return 0
return
/obj/machinery/dna_scanner/relaymove(mob/user as mob)
if (user.stat)
return
src.go_out()
return
/obj/machinery/dna_scanner/verb/eject()
set src in oview(1)
if (usr.stat != 0)
return
src.go_out()
add_fingerprint(usr)
return
/obj/machinery/dna_scanner/verb/move_inside()
set src in oview(1)
if (usr.stat != 0)
return
if (src.occupant)
usr << "\blue <B>The scanner is already occupied!</B>"
return
if (usr.abiotic())
usr << "\blue <B>Subject cannot have abiotic items on.</B>"
return
usr.pulling = null
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.loc = src
src.occupant = usr
src.icon_state = "scanner_1"
for(var/obj/O in src)
//O = null
del(O)
//Foreach goto(124)
src.add_fingerprint(usr)
return
/obj/machinery/dna_scanner/attackby(obj/item/weapon/grab/G as obj, user as mob)
if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) )))
return
if (src.occupant)
user << "\blue <B>The scanner is already occupied!</B>"
return
if (G.affecting.abiotic())
user << "\blue <B>Subject cannot have abiotic items on.</B>"
return
var/mob/M = G.affecting
if (M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
src.occupant = M
src.icon_state = "scanner_1"
for(var/obj/O in src)
O.loc = src.loc
//Foreach goto(154)
src.add_fingerprint(user)
//G = null
del(G)
return
/obj/machinery/dna_scanner/proc/go_out()
if ((!( src.occupant ) || src.locked))
return
for(var/obj/O in src)
O.loc = src.loc
//Foreach goto(30)
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
src.occupant = null
src.icon_state = "scanner_0"
return
/obj/machinery/dna_scanner/ex_act(severity)
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
//Foreach goto(35)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
//Foreach goto(108)
//SN src = null
del(src)
return
if(3.0)
if (prob(25))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
//Foreach goto(181)
//SN src = null
del(src)
return
else
return
/obj/machinery/dna_scanner/blob_act()
if(prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
del(src)
/obj/machinery/scan_console/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
//SN src = null
del(src)
return
else
return
/obj/machinery/scan_console/blob_act()
if(prob(50))
del(src)
/obj/machinery/scan_console/power_change()
if(stat & BROKEN)
icon_state = "broken"
else
if( powered() )
icon_state = initial(icon_state)
stat &= ~NOPOWER
else
spawn(rand(0, 15))
src.icon_state = "c_unpowered"
stat |= NOPOWER
/obj/machinery/scan_console/New()
..()
spawn( 5 )
src.connected = locate(/obj/machinery/dna_scanner, get_step(src, WEST))
return
return
/obj/machinery/scan_console/process()
if(stat & NOPOWER)
return
use_power(250)
var/mob/M
if (!( src.status ))
return
if (!( src.func ))
src.temp = "No function loaded into memory core!"
src.status = null
if ((src.connected && src.connected.occupant))
M = src.connected.occupant
if (src.status == "load")
src.prog_p1 = null
src.prog_p2 = null
src.prog_p3 = null
src.prog_p4 = null
switch(src.func)
if("dna_trun")
if (src.data)
src.prog_p1 = copytext(src.data, 1, 2)
src.prog_p2 = text2num(src.data)
src.prog_p3 = src.special
src.status = "dna_trun"
src.temp = "Executing trunication function on occupant."
else
src.temp = "No data implanted in core memory."
src.status = null
if("dna_scan")
if (src.special)
if (src.scan)
if (istype(M, /mob))
switch(src.special)
if("UI")
src.temp = text("Scan Complete:<BR>Data downloaded to disk!<BR>Unique Identifier: []", M.primary.uni_identity)
src.scan.data = M.primary.uni_identity
if("SE")
src.temp = text("Scan Complete:<BR>Data downloaded to disk!<BR>Structural Enzymes: []", M.primary.struc_enzyme)
src.scan.data = M.primary.struc_enzyme
if("UE")
src.temp = text("Scan Complete:<BR>Data downloaded to disk!<BR>Used Enzynmes: []", M.primary.use_enzyme)
src.scan.data = M.primary.use_enzyme
if("SI")
src.temp = text("Scan Complete:<BR>Data downloaded to disk!<BR>Species Identifier: []", M.primary.spec_identity)
src.scan.data = M.primary.spec_identity
else
else
src.temp = "No occupant to scan!"
else
src.temp = "Error: No disk to upload data to."
else
src.temp = "Error: Function program errors."
src.status = null
if("dna_replace")
if ((src.data && src.special))
src.prog_p1 = src.special
src.prog_p2 = src.data
src.status = "dna_replace"
src.temp = "Executing repalcement function on occupant."
else
src.temp = "Error: No DNA data loaded into core or function program errors."
src.status = null
if("dna_add")
if ((src.data && src.special))
src.prog_p1 = src.special
src.prog_p2 = src.data
src.status = "dna_add"
src.temp = "Executing addition function on occupant."
else
src.temp = "Error: No DNA data loaded into core or function program errors."
src.status = null
else
src.temp = "Cannot execute program!"
src.status = null
else
if (src.status == "dna_trun")
if (istype(M, /mob))
var/t = null
switch(src.prog_p3)
if("UI")
t = M.primary.uni_identity
if("SE")
t = M.primary.struc_enzyme
if("UE")
t = M.primary.use_enzyme
if("SI")
t = M.primary.spec_identity
else
if (!( src.prog_p4 ))
switch(src.prog_p1)
if("a")
src.prog_p4 = length(t)
if("b")
src.prog_p4 = 1
else
else
if (src.prog_p1 == "a")
src.prog_p4--
else
if (src.prog_p1 == "b")
src.prog_p4--
switch(src.prog_p1)
if("a")
if (src.prog_p4 <= 0)
src.temp = "Trunication complete"
src.status = null
else
t = copytext(t, 1, length(t))
src.temp = text("Trunicating []'s DNA sequence...<BR>[]<BR>Status: [] units left.<BR><BR><A href='?src=\ref[];abort=1'>Emergency Abort</A>", M.name, t, src.prog_p4, src)
if("b")
if (src.prog_p4 <= 0)
src.temp = "Trunication complete"
src.status = null
else
t = copytext(t, 2, length(t) + 1)
src.temp = text("Trunicating []'s DNA sequence...<BR>[]<BR>Status: [] units left.<BR><BR><A href='?src=\ref[];abort=1'>Emergency Abort</A>", M.name, t, src.prog_p4, src)
if("c")
if (length(t) <= src.prog_p2)
src.temp = "Limitation complete"
src.status = null
else
t = copytext(t, 1, length(t))
src.temp = text("Limiting []'s DNA sequence...<BR>[]<BR>Status: [] units converting to [] units.<BR><BR><A href='?src=\ref[];abort=1'>Emergency Abort</A>", M.name, t, length(t), src.prog_p2, src)
else
if (length(t) <= src.prog_p2)
src.temp = "Limitation complete"
src.status = null
else
t = copytext(t, 2, length(t) + 1)
src.temp = text("Limiting []'s DNA sequence...<BR>[]<BR>Status: [] units converting to [] units.<BR><BR><A href='?src=\ref[];abort=1'>Emergency Abort</A>", M.name, t, length(t), src.prog_p2, src)
switch(src.prog_p3)
if("UI")
M.primary.uni_identity = t
if("SE")
M.primary.struc_enzyme = t
if("UE")
M.primary.use_enzyme = t
if("SI")
M.primary.spec_identity = t
else
else
src.temp = "Process terminated due to lack of occupant in DNA chamber."
src.status = null
else
if (src.status == "dna_replace")
if (istype(M, /mob))
var/t = null
switch(src.prog_p1)
if("UI")
t = M.primary.uni_identity
if("SE")
t = M.primary.struc_enzyme
if("UE")
t = M.primary.use_enzyme
if("SI")
t = M.primary.spec_identity
else
if (!( src.prog_p4 ))
src.prog_p4 = 1
else
src.prog_p4++
if ((src.prog_p4 > length(t) || src.prog_p4 > length(src.prog_p2)))
src.temp = "Replacement complete"
src.status = null
else
t = text("[][][]", copytext(t, 1, src.prog_p4), copytext(src.prog_p2, src.prog_p4, src.prog_p4 + 1), (src.prog_p4 < length(t) ? copytext(t, src.prog_p4 + 1, length(t) + 1) : null))
src.temp = text("Replacing []'s DNA sequence...<BR>[]<BR>Target: []<BR>Status: At position []<BR><BR><A href='?src=\ref[];abort=1'>Emergency Abort</A>", M.name, t, src.prog_p2, src.prog_p4, src)
switch(src.prog_p1)
if("UI")
M.primary.uni_identity = t
if("SE")
M.primary.struc_enzyme = t
if("UE")
M.primary.use_enzyme = t
if("SI")
M.primary.spec_identity = t
else
else
src.temp = "Process terminated due to lack of occupant in DNA chamber."
src.status = null
else
if (src.status == "dna_add")
if (istype(M, /mob))
var/t = null
switch(src.prog_p1)
if("UI")
t = M.primary.uni_identity
if("SE")
t = M.primary.struc_enzyme
if("UE")
t = M.primary.use_enzyme
if("SI")
t = M.primary.spec_identity
else
if (!( src.prog_p4 ))
src.prog_p4 = 1
else
src.prog_p4++
if (src.prog_p4 > length(src.prog_p2))
src.temp = "Addition complete"
src.status = null
else
t = text("[][]", t, copytext(src.prog_p2, src.prog_p4, src.prog_p4 + 1))
src.temp = text("Adding to []'s DNA sequence...<BR>[]<BR>Adding: []<BR>Position: []<BR><BR><A href='?src=\ref[];abort=1'>Emergency Abort</A>", M.name, t, src.prog_p2, src.prog_p4, src)
switch(src.prog_p1)
if("UI")
M.primary.uni_identity = t
if("SE")
M.primary.struc_enzyme = t
if("UE")
M.primary.use_enzyme = t
if("SI")
M.primary.spec_identity = t
else
else
src.temp = "Process terminated due to lack of occupant in DNA chamber."
src.status = null
else
src.status = null
src.temp = "Unknown system error."
for(var/mob/O in viewers(1, src))
if ((O.client && O.machine == src))
src.attack_hand(O)
//Foreach goto(1755)
return
/obj/machinery/scan_console/attack_paw(user as mob)
return src.attack_hand(user)
return
/obj/machinery/scan_console/attack_hand(user as mob)
if(stat & (NOPOWER|BROKEN) )
return
var/dat
if (src.temp)
dat = text("[]<BR><BR><A href='?src=\ref[];clear=1'>Clear Message</A>", src.temp, src)
else
if (src.connected)
var/mob/occupant = src.connected.occupant
dat = "<font color='blue'><B>Occupant Statistics:</B></FONT><BR>"
if (occupant)
var/t1
switch(occupant.stat)
if(0.0)
t1 = "Conscious"
if(1.0)
t1 = "Unconscious"
else
t1 = "*dead*"
dat += text("[]\tHealth %: [] ([])</FONT><BR><BR>", (occupant.health > 50 ? "<font color='blue'>" : "<font color='red'>"), occupant.health, t1)
else
dat += "The scanner is empty.<BR>"
if (!( src.connected.locked ))
dat += text("<A href='?src=\ref[];locked=1'>Lock (Unlocked)</A><BR>", src)
else
dat += text("<A href='?src=\ref[];locked=1'>Unlock (Locked)</A><BR>", src)
dat += text("Disk: <A href='?src=\ref[];scan=1'>[]</A><BR>\n[]<BR>\n[]<BR>", src,
(src.scan ? text("[]", src.scan.name) : "----------"),
(src.scan ? text("<A href='?src=\ref[];u_dat=1'>Upload Data</A>", src) : "No disk to upload"),
((src.data || src.func || src.special) ? text("<A href='?src=\ref[];c_dat=1'>Clear Data</A><BR><A href='?src=\ref[];e_dat=1'>Execute Data</A><BR>Function Type: [][]<BR>Data: []", src, src, src.func, (src.special ? text("-[]", src.special) : null), src.data) : "No data uploaded"))
dat += text("<BR><BR><A href='?src=\ref[];mach_close=scanner'>Close</A>", user)
user << browse(dat, "window=scanner;size=400x500")
return
/obj/machinery/scan_console/Topic(href, href_list)
..()
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
usr << "\red You don't have the dexterity to do this!"
return
if ((usr.stat || usr.restrained()))
return
if ((usr.contents.Find(src) || get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
usr.machine = src
if (href_list["locked"])
if ((src.connected && src.connected.occupant))
src.connected.locked = !( src.connected.locked )
if (href_list["scan"])
if (src.scan)
src.scan.loc = src.loc
src.scan = null
else
var/obj/item/I = usr.equipped()
if (istype(I, /obj/item/weapon/card/data))
usr.drop_item()
I.loc = src
src.scan = I
if (href_list["u_dat"])
if ((src.scan && !( src.status )))
if ((src.scan.function && src.scan.function != "storage"))
src.func = src.scan.function
src.special = src.scan.special
if (src.scan.data)
src.data = src.scan.data
else
src.temp = "No disk found or core data access lock out!"
if (href_list["c_dat"])
if (!( src.status ))
src.func = null
src.data = null
src.special = null
else
src.temp = "No disk found or core data access lock out!"
if (href_list["clear"])
src.temp = null
if (href_list["abort"])
src.status = null
if (href_list["e_dat"])
if (!( src.status ))
src.status = "load"
src.temp = "Loading..."
src.add_fingerprint(usr)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
//Foreach goto(484)
return
/obj/machinery/restruct/allow_drop()
return 0
return
/obj/machinery/restruct/verb/eject()
set src in oview(1)
if (usr.stat != 0)
return
src.go_out()
add_fingerprint(usr)
return
/obj/machinery/restruct/verb/operate()
set src in oview(1)
src.add_fingerprint(usr)
if ((src.occupant && src.occupant.primary))
switch(src.occupant.primary.spec_identity)
if("5BDFE293BA5500F9FFFD500AAFFE")
if (!( istype(src.occupant, /mob/human) ))
for(var/obj/O in src.occupant)
//O = null
del(O)
//Foreach goto(78)
var/mob/human/O = new /mob/human( src )
var/mob/M = src.occupant
O.start = 1
O.primary = M.primary
M.primary = null
var/t1 = hex2num(copytext(O.primary.uni_identity, 25, 28))
if (t1 < 125)
O.gender = "male"
else
O.gender = "female"
M << "Genetic Transversal Complete!"
if (M.client)
M << "Transferring..."
M.client.mob = O
O << "Neural Sequencing Complete!"
O.loc = src
src.occupant = O
//M = null
del(M)
src.occupant = O
src.occupant << "Done!"
if("2B6696D2B127E5A4")
if (!( istype(src.occupant, /mob/monkey) ))
for(var/obj/O in src.occupant)
//O = null
del(O)
//Foreach goto(337)
var/mob/monkey/O = new /mob/monkey( src )
var/mob/M = src.occupant
O.start = 1
O.primary = M.primary
M.primary = null
M << "Genetic Transversal Complete!"
if (M.client)
M << "Transferring..."
M.client.mob = O
O << "Neural Sequencing Complete!"
O.loc = src
O << "Genetic Transversal Complete!"
src.occupant = O
//M = null
del(M)
O.name = text("monkey ([])", copytext(md5(src.occupant.primary.uni_identity), 2, 6))
src.occupant << "Done!"
else
if (istype(src.occupant, /mob/human))
var/mob/human/H = src.occupant
if (reg_dna[text("[]", H.primary.uni_identity)])
H.rname = reg_dna[text("[]", H.primary.uni_identity)]
else
if (findname("Unknown"))
var/counter = 1
while(findname(text("Unknown #[]", counter)))
counter++
H.rname = text("Unknown #[]", counter)
else
H.rname = "Unknown"
reg_dna[text("[]", H.primary.uni_identity)] = H.rname
H << text("\red <B>Your name is now [].</B>", H.rname)
var/speak = (length(H.primary.struc_enzyme) >= 25 ? hex2num(copytext(H.primary.struc_enzyme, 22, 25)) : 9999)
var/ears = (length(H.primary.struc_enzyme) >= 10 ? hex2num(copytext(H.primary.struc_enzyme, 7, 10)) : 9999)
var/vision = (length(H.primary.struc_enzyme) >= 16 ? hex2num(copytext(H.primary.struc_enzyme, 13, 16)) : 1)
var/mental1 = (length(H.primary.struc_enzyme) >= 31 ? hex2num(copytext(H.primary.struc_enzyme, 28, 31)) : 1)
var/mental2 = (length(H.primary.struc_enzyme) >= 28 ? hex2num(copytext(H.primary.struc_enzyme, 25, 28)) : 1)
var/speak2 = (length(H.primary.struc_enzyme) >= 22 ? hex2num(copytext(H.primary.struc_enzyme, 19, 22)) : 1)
H.sdisabilities = 0
H.disabilities = 0
if (speak < 3776)
H.disabilities = H.disabilities | 4
else
if (speak > 3776)
H.sdisabilities = H.sdisabilities | 2
if (speak2 < 2640)
H.disabilities = H.disabilities | 16
if (ears > 3226)
H.sdisabilities = H.sdisabilities | 4
if (vision < 1447)
H.sdisabilities = H.sdisabilities | 1
else
if (vision > 1447)
H.disabilities = H.disabilities | 1
if (mental1 < 1742)
H.disabilities = H.disabilities | 2
if (mental2 < 1452)
H.disabilities = H.disabilities | 8
var/t1 = null
if (length(H.primary.uni_identity) >= 20)
t1 = copytext(H.primary.uni_identity, 19, 21)
if (hex2num(t1) > 127)
H.gender = "female"
else
H.gender = "male"
else
H.gender = "neuter"
if (length(H.primary.uni_identity) >= 18)
t1 = copytext(H.primary.uni_identity, 17, 19)
H.ns_tone = hex2num(t1)
H.ns_tone = -H.ns_tone + 35
else
H.ns_tone = 1
H.ns_tone = -H.ns_tone + 35
if (length(H.primary.uni_identity) >= 16)
t1 = copytext(H.primary.uni_identity, 15, 17)
H.b_eyes = hex2num(t1)
else
H.b_eyes = 255
if (length(H.primary.uni_identity) >= 14)
t1 = copytext(H.primary.uni_identity, 13, 15)
H.g_eyes = hex2num(t1)
else
H.g_eyes = 255
if (length(H.primary.uni_identity) >= 12)
t1 = copytext(H.primary.uni_identity, 11, 13)
H.r_eyes = hex2num(t1)
else
H.r_eyes = 255
if (length(H.primary.uni_identity) >= 10)
t1 = copytext(H.primary.uni_identity, 9, 11)
H.nb_hair = hex2num(t1)
else
H.nb_hair = 255
if (length(H.primary.uni_identity) >= 8)
t1 = copytext(H.primary.uni_identity, 7, 9)
H.ng_hair = hex2num(t1)
else
H.ng_hair = 255
if (length(H.primary.uni_identity) >= 6)
t1 = copytext(H.primary.uni_identity, 5, 7)
H.nr_hair = hex2num(t1)
else
H.nr_hair = 255
H.r_hair = H.nr_hair
H.g_hair = H.ng_hair
H.b_hair = H.nb_hair
H.s_tone = H.ns_tone
H.update_face()
H.update_body()
return
/obj/machinery/restruct/verb/move_inside()
set src in oview(1)
if (usr.stat != 0)
return
if (src.occupant)
usr << "\blue <B>The scanner is already occupied!</B>"
return
if (usr.abiotic())
usr << "\blue <B>Subject cannot have abiotic items on.</B>"
return
usr.pulling = null
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.loc = src
src.occupant = usr
src.icon_state = "restruct_1"
for(var/obj/O in src)
//O = null
del(O)
//Foreach goto(124)
src.add_fingerprint(usr)
return
/obj/machinery/restruct/relaymove(mob/user as mob)
if (user.stat)
return
src.go_out()
return
/obj/machinery/restruct/attackby(obj/item/weapon/grab/G as obj, user as mob)
if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) )))
return
if (src.occupant)
user << "\blue <B>The machine is already occupied!</B>"
return
if (G.affecting.abiotic())
user << "\blue <B>Subject cannot have abiotic items on.</B>"
return
var/mob/M = G.affecting
if (M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
src.occupant = M
src.icon_state = "restruct_1"
for(var/obj/O in src)
O.loc = src.loc
//Foreach goto(154)
src.add_fingerprint(user)
//G = null
del(G)
return
/obj/machinery/restruct/proc/go_out()
if ((!( src.occupant ) || src.locked))
return
for(var/obj/O in src)
O.loc = src.loc
//Foreach goto(30)
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
src.occupant = null
src.icon_state = "restruct_0"
return
/obj/machinery/restruct/ex_act(severity)
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
//Foreach goto(35)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
//Foreach goto(108)
//SN src = null
del(src)
return
if(3.0)
if (prob(25))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
//Foreach goto(181)
//SN src = null
del(src)
return
else
return
/obj/machinery/restruct/blob_act()
if(prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
del(src)
+363
View File
@@ -0,0 +1,363 @@
#define ENGINE_EJECT_Z 6
/obj/machinery/computer/engine/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(58)
src.icon_state = "broken"
if(3.0)
if (prob(25))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(109)
src.icon_state = "broken"
else
return
/obj/machinery/computer/engine/New()
if (!( engine_eject_control ))
engine_eject_control = new /datum/engine_eject( )
..()
spawn(5)
for(var/obj/machinery/gas_sensor/G in machines)
if(G.id == src.id)
gs = G
break
return
/obj/machinery/computer/engine/attackby(var/obj/O, mob/user)
return src.attack_hand(user)
/obj/machinery/computer/engine/attack_paw(var/mob/user as mob)
return src.attack_hand(user)
return
/obj/machinery/computer/engine/attack_hand(var/mob/user as mob)
if(stat & (NOPOWER|BROKEN) )
return
user.machine = src
var/dat
if (src.temp)
dat = "<TT>[src.temp]</TT><BR><BR><A href='?src=\ref[src];temp=1'>Clear Screen</A>"
else
if (engine_eject_control.status == 0)
dat = "<B>Engine Gas Monitor</B><HR>"
if(gs)
dat += "[gs.sense_string()]"
else
dat += "No sensor found."
dat += "<BR><B>Engine Ejection Module</B><HR>\nStatus: Docked<BR>\n<BR>\nCountdown: [engine_eject_control.timeleft]/60 <A href='?src=\ref[src];reset=1'>\[Reset\]</A><BR>\n<BR>\n<A href='?src=\ref[src];eject=1'>Eject Engine</A><BR>\n<BR>\n<A href='?src=\ref[user];mach_close=computer'>Close</A>"
else
if (engine_eject_control.status == 1)
dat = text("<B>Engine Ejection Module</B><HR>\nStatus: Ejecting<BR>\n<BR>\nCountdown: []/60 \[Reset\]<BR>\n<BR>\n<A href='?src=\ref[];stop=1'>Stop Ejection</A><BR>\n<BR>\n<A href='?src=\ref[];mach_close=computer'>Close</A>", engine_eject_control.timeleft, src, user)
else
dat = text("<B>Engine Ejection Module</B><HR>\nStatus: Ejected<BR>\n<BR>\nCountdown: N/60 \[Reset\]<BR>\n<BR>\nEngine Ejected!<BR>\n<BR>\n<A href='?src=\ref[];mach_close=computer'>Close</A>", user)
user << browse(dat, "window=computer;size=400x500")
return
/obj/machinery/computer/engine/process()
if(stat & (NOPOWER|BROKEN) )
return
use_power(250)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
//Foreach goto(18)
return
/obj/machinery/computer/engine/Topic(href, href_list)
..()
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
usr << "\red You don't have the dexterity to do this!"
return
if ((usr.stat || usr.restrained()))
return
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
usr.machine = src
if (href_list["eject"])
if (engine_eject_control.status == 0)
src.temp = "Eject Engine?<BR><BR><B><A href='?src=\ref[src];eject2=1'>\[Swipe ID to initiate eject sequence\]</A></B><BR><A href='?src=\ref[src];temp=1'>Cancel</A>"
else if (href_list["eject2"])
var/obj/item/weapon/card/id/I = usr.equipped()
if (istype(I))
if(I.check_access(access,allowed))
if (engine_eject_control.status == 0)
engine_eject_control.ejectstart()
src.temp = null
else
usr << "\red Access Denied."
else if (href_list["stop"])
if (engine_eject_control.status > 0)
src.temp = text("Stop Ejection?<BR><BR><A href='?src=\ref[];stop2=1'>Yes</A><BR><A href='?src=\ref[];temp=1'>No</A>", src, src)
else if (href_list["stop2"])
if (engine_eject_control.status > 0)
engine_eject_control.stopcount()
src.temp = null
else if (href_list["reset"])
if (engine_eject_control.status == 0)
engine_eject_control.resetcount()
else if (href_list["temp"])
src.temp = null
src.add_fingerprint(usr)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
//Foreach goto(351)
return
/turf/station/engine/attack_paw(var/mob/user as mob)
return src.attack_hand(user)
/turf/station/engine/attack_hand(var/mob/user as mob)
if ((!( user.canmove ) || user.restrained() || !( user.pulling )))
return
if (user.pulling.anchored)
return
if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1))
return
if (ismob(user.pulling))
var/mob/M = user.pulling
var/mob/t = M.pulling
M.pulling = null
step(user.pulling, get_dir(user.pulling.loc, src))
M.pulling = t
else
step(user.pulling, get_dir(user.pulling.loc, src))
return
/turf/station/engine/floor/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
S.buildlinks()
del(src)
return
if(2.0)
if (prob(50))
//SN src = null
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
S.buildlinks()
del(src)
return
else
return
/turf/station/engine/floor/blob_act()
return
/datum/engine_eject/proc/ejectstart()
if (!( src.status ))
if (src.timeleft <= 0)
src.timeleft = 60
world << "\red <B>Alert: Ejection Sequence for Engine Module has been engaged.</B>"
world << text("\red <B>Ejection Time in T-[] seconds!</B>", src.timeleft)
src.resetting = 0
var/list/EA = engine_areas()
for(var/area/A in EA)
A.eject = 1
A.updateicon()
src.status = 1
for(var/obj/machinery/computer/engine/E in machines)
E.icon_state = "engaging"
//Foreach goto(113)
spawn( 0 )
src.countdown()
return
return
/datum/engine_eject/proc/resetcount()
if (!( src.status ))
src.resetting = 1
sleep(50)
if (src.resetting)
src.timeleft = 60
world << "\red <B>Alert: Ejection Sequence Countdown for Engine Module has been reset.</B>"
return
/datum/engine_eject/proc/countdone()
src.status = -1.0
var/list/E = engine_areas()
var/list/engineturfs = list()
for(var/area/EA in E)
EA.eject = 0
EA.updateicon()
for(var/turf/ET in EA)
engineturfs += ET
defer_powernet_rebuild = 1
for(var/turf/T in engineturfs)
var/turf/S = new T.type( locate(T.x, T.y, ENGINE_EJECT_Z) )
var/area/A = T.loc
for(var/atom/movable/AM as mob|obj in T)
AM.loc = S
S.oxygen = T.oxygen
S.oldoxy = T.oldoxy
S.tmpoxy = T.tmpoxy
S.poison = T.poison
S.oldpoison = T.oldpoison
S.tmppoison = T.tmppoison
S.co2 = T.co2
S.oldco2 = T.oldco2
S.tmpco2 = T.tmpco2
S.sl_gas = T.sl_gas
S.osl_gas = T.osl_gas
S.tsl_gas = T.tsl_gas
S.n2 = T.n2
S.on2 = T.on2
S.tn2 = T.tn2
S.temp = T.temp
S.ttemp = T.ttemp
S.otemp = T.otemp
//Foreach goto(100)
S.buildlinks()
A.contents += S
var/turf/P = new T.type( locate(T.x, T.y, T.z) )
var/area/D = locate(/area/dummy)
D.contents += P
//T = null
del(T)
P.buildlinks()
//Foreach goto(60)
defer_powernet_rebuild = 0
makepowernets()
world << "\red <B>Engine Ejected!</B>"
for(var/obj/machinery/computer/engine/CE in machines)
CE.icon_state = "engaged"
//Foreach goto(392)
return
/datum/engine_eject/proc/stopcount()
if (src.status > 0)
src.status = 0
world << "\red <B>Alert: Ejection Sequence for Engine Module has been disengaged!</B>"
var/list/E = engine_areas()
for(var/area/A in E)
A.eject = 0
A.updateicon()
for(var/obj/machinery/computer/engine/CE in machines)
CE.icon_state = null
//Foreach goto(84)
return
/datum/engine_eject/proc/countdown()
if (src.timeleft <= 0)
spawn( 0 )
countdone()
return
return
if (src.status > 0)
src.timeleft--
if ((src.timeleft <= 15 || src.timeleft == 30))
world << text("\red <B>[] seconds until engine ejection.</B>", src.timeleft)
spawn( 10 )
src.countdown()
return
return
//returns a list of areas that are under /area/engine
/datum/engine_eject/proc/engine_areas()
var/list/L = list()
for(var/area/A in world)
if(istype(A, /area/engine))
L += A
return L
/obj/machinery/gas_sensor/proc/sense_string()
var/t = ""
var/turf/T = src.loc
var/turf_total = T.tot_gas()
var/t1 = add_tspace("[round(turf_total / CELLSTANDARD * 100, 0.1)]%",6)
t += "<PRE>Pressure: [t1] Temperature: [round(T.temp - T0C,0.1)]&deg;C<BR>"
if(turf_total == 0)
t+="O2: 0 N2: 0 CO2: 0><BR>Plasma: 0 N20: 0"
else
t1 = add_tspace(round(T.oxygen/turf_total * 100, 0.1),5)
t += "O2: [t1] "
t1 = add_tspace(round(T.n2/turf_total * 100, 0.1),5)
t += "N2: [t1] "
t1 = add_tspace(round(T.co2/turf_total * 100, 0.01),5)
t += "CO2: [t1]<BR>"
t1 = add_tspace(round(T.poison/turf_total * 100, 0.001),5)
t += "Plasma: [t1] "
t1 = add_tspace(round(T.sl_gas/turf_total * 100, 0.001),5)
t += "N2O: [t1]"
t += "</PRE>"
return t
+352
View File
@@ -0,0 +1,352 @@
/* To-do list
Bugs:
hearing inside closets/pods
check head protection when hit by tank etc.
//gas propagation on obj/move cells? plasma doesn't leak.
//turf-proc to reveal hidden (invis) pipes/wire/etc. when turf.intact variable is changed.
//(Check also build/remove for walls etc.)
bug with two single-length pipes overlaying - pipeline ends up with no members
//cable under wall/rwall when deconstructed - run levelupdate
//making rglass with toolbox in r-hand - spawn on ground instead?
//also single rod in hand, make it just use 1 of rod with 1 of glass
//gas in heater loop - can accept infinite amount into canister
//valves need power to switch, even manually
//heater connection
alarm continuing when power out?
//can't connect new cable to directconnect power machines
//cable - lay in dirn of mob facing when click on same turf
New:
//add/check all cameras & tags
//prison warden gets grey jumpsuit
//power/engine - make useful? Needs local power DU, check for all machines. Power reserve. Engine generator.
make regular glass melt in fire
Blood splatters, can sample DNA & analyze
also blood stains on clothing - attacker & defender
whole body anaylzer in medbay - shows damage areas in popup?
//special closet for captain - spare ID, special uniform?
try station map maximizing use of image rather than icon
useful world/Topic commands
//examine object flags
flow rate maximum for pipes - slowest of two connected notes
system for breaking / making pipes, handle deletion, pipeline spliting/rejoining etc.
?give nominal values to all gas.maximum since turf_take depends on them
//integrate vote system with admin system - allow admin to start vote even if disabled, etc.
//update canister icons to use overlays for status
//impliment other canister colours, e.g. air (O2+N2), new one for N2O
//add pipe/cable revealing detector a-la infra-sensor
//add fingerprints to wire/cable actions
add power-off mode for computers & other equipment (with reboot time)
make grilles conductive for shocks (again)
for prison warden/sec - baton allows precise targeting
//recharger for batteries
//secret - spawn wave of meteors
//limit rate of spawn (timer)
portable generator - hook to wire system
modular repair/construction system
maintainance key
diagnostic tool
modules - module construction
hats/caps
//labcoat
suit?
//voting while dead, voting defaults
//admin PM - able to reply - move to mob topic?
build/unbuild engine floor with rf sheet
finish compressor/turbine - think about control system, throttle, etc.
crowbar opens airlocks when no power
*/
var
world_message = "Welcome to SS13!"
savefile_ver = "3"
SS13_version = "40.93.2H9.5"
changes = {"<FONT color='blue'><B>Changes from base version 40.93.2</B></FONT><BR>
<HR>
<p><B>Version 40.93.2H9.5</B>
<ul>
<li>Fixed a few bugs with reinforced windows.
<li>Adding turbine generator to aux. engine.
<li>Added Hikato's Sandbox mode.
<li>Fixed bug with repairing walls and cable visibility.
</ul>
<p><B>Version 40.93.2H9.4</B>
<ul>
<li>Initial version of new generator (not yet completly working). Redesigned and remapped engine and generator.
<li>T-scanners now have a chance to reveal cloakers when in range.
<li>Fire extinguishers and throwing object can be used to manoeuvre in space to a limited extent.
<li>SMESes now more user-friendly, will charge automatically if power available.
<li>Can now config so votes from dead players aren't counted.
<li>Can now config so player votes default to no vote.
<li>Players can now reply to Admin PMs.
</ul>
<p><B>Version 40.93.2H9.3</B>
<ul>
<li>Added main power storage devices (SMES). Reconfigured map power system to use them.
<li>Added backup solar power generators and added them to the map.
<li>Added custom job name assignments through the ID computer.
<li>Engine cannot be ejected now without sufficient ID access.
<li>Cable can now be directly connected from a turf to a power device (SMES, generator, etc.)
<li>Admins & above can now observe when not dead. (Now fixed).
<li>Solar panel controllers can now be set to rotate the panels at a given rate.
<li>Fixed a problem with client inactivity discounting votes much too soon.
</ul>
<p><B>Version 40.93.2H9.2</B>
<ul>
<li>Added some new admin options,
<li>Added 1st test version of engine power generator.
<li>Rewrote canister/pipework connection routines to fix a gas conservation bug.
<li>Valves don't require power to switch anymore.
<li>T-scanners can now be clipped on belts.
<li>Added a cell recharger.
<li>Some small map changes.
<li>Fixed crashes with admin Vars command.
<li>Fixed cable-cutting bug that sometimes did not update the power network.
<li>Fixed bugs when making reinforced glass.
<li>Destroyed canisters can now be disconnected from a pipe.
</ul>
<p><B>Version 40.93.2H9.1</B>
<ul>
<li>Cable item added. Cable cutting now works. Cable laying started.
<li>Fixed stacking bug with tiles, sheets etc.
<li>Newly laid cable now merges with existing powernets.
<li>Added power supply from a dummy generator object for testing. Power switching logic still buggy.
<li>Cables now affected by explosions & fire. Automatically rebuild power network when deleted.
<li>Improved power switching logic.
<li>Addeed high-capacity power cells to some key area APCs.
<li>Most machines now cannot be operated when unpowered.
<li>Made the station cable layout much more redundant. It's no long possible to disable the whole grid with a single cut.
<li>Added a monitoring computer to the engine.
<li>Canisters are now attached to a connector with a wrench (more logical than a screwdriver).
<li>It's now hazardous to cut or modify powered cable without proper protection.
<li>Grilles can now be electrified, and have a chance of shocking someone if attacked.
</ul>
<p><B>Version 40.93.2H9</B>
<ul>
<li>APC added, with test functionality. Started adding power requirements to machinery objects. (Wire system, power generators & cell charging not yet implemented.)
<li>Fixed bug with lightswitches that wouldn't turn back on.
<li>Power usage added for most machines. APCs currently running only on battery power, no way to recharge. Underfloor wire system placed but non-operational.
<li>Some background events added to Blob mode.
<li>Fixed some air propagation bugs and optimized some procedures.
<li>Power networks created, but not functional as yet.
<li>Added a scanner for underfloor wires and pipes.
<li>Modified underfloor hiding system to be more general.
</ul>
<p><B>Version 40.93.2H8</B>
<ul>
<li>Fixed bug with cryo freezer and flask changing.
<li>Fixed numerous runtime errors.
<li>Re-added nuclear mode to vote and config file.
<li>Char setup now autoloaded if your savefile exist
<li>Added reset button to char setup.
<li>Fixed move-to-top while dead.
<li>Fixed bug with voting before round begins.
<li>Fixed bug with engine ejection areas.
<li>Started work on power system. Lightswitches added to map. Area icon system updated.
<li>Fixed spawning on top of dense objects.
<li>Later enterers now get ID card access levels corresponding to their job.
</ul>
<p><B>Version 40.93.2H7.1D</B>
<ul>
<li>Total overhaul of pipework system. Circulators, manifolds, junctions, pipelines added.
<li>Heat exchange pipe added. Pipes now affect and are affected by turf temperature.
<li>Made connected canisters automatically anchored at startup.
<li>Removed redundant heat variable from turfs.
<li>Tweaked pipe-turf heat exchange to avoid thermal runaway.
<li>Added valves and vents to pipework system. Fixed gas loss problem with connectors.
<li>Added Captain specific closet and jumpsuite.
</ul>
<p><B>Version 40.93.2H7.0D</B>
<ul>
<li>Total overhaul of gas temperature system. Fixed temp. loss problem with scrubbers/vents
</ul>
<p><B>Version 40.93.2H6.4D</B>
<ul>
<li>Added player voting system for server reboot and game mode
<li>Added config options for voting system
<li>Made mode choice persistent across server reboots
<li>Removed vote delay after server reboot
<li>Tweaked pipework operation slightly
<li>Fixed bug with ID computer
<li>Added reinforced windows, reinf. glass sheets, etc.
<li>Fixed a win condition bug with location of stolen item in traitor mode
</ul>
<p><B>Version 40.93.2H6.3D</B>
<ul>
<li>Fixed firelarms so they can be sabotaged successfully
<li>"Random" mode added (like secret but actual mode is announced)
<li>Fixed more bugs with DNA-scanner
<li>Fixed cryocell bug with gas transfer
<li>Moved all testing verbs to admin-only
<li>Re-wrote damage icon system to fix standing mob image and skin tone change bugs
<li>Added external config file for logging options
<li>Enabled config of secret/random mode pick probabilities
</ul>
<p><B>Version 40.93.2H6.2D</B>
<ul>
<li>Fixed bug with floor tile stacking/use.
<li>Say/OOC now strips control characters.
<li>Fixed call error in rwall disassembly.
<li>Fixed pulling after item anchoring.
<li>Adjusted pipe/connector logic to enable pipework.
<li>Fixed background bug with certain procs.
<li>Fixed Engineer security levels in job info text.
</ul>
<p><B>Version 40.93.2H6.1D</B>
<ul><li>Airflow system changed to use cached FindTurfs (2x faster).
<li>Cell, Flow and Clear test verbs added to check airflow changes.
<li>Added Vars verb for object state checking.
<li>Current XYZ added to statpanel (for testing).
<li>Fixed score report in blob mode.
<li>Start_now added to admin commands.
<li>Partially fixed bug with standing mob image after death.
<li>Default movement speed is now run.
</ul>
<p><B>Version 40.93.2H6</B>
<ul>
<li>Timer interface auto-closes on drop.
<li>Fixed welding doors with non-active welder.
<li>Fixed self-deletion bug with bombs.
<li>Added new Blob gameplay mode.
<li>Fixed shuttle & eject positioning logic for non-default maps.
<li>Mass drivers with same ID now all fire together.
<li>Server logging of logon, logoff & OOC added.
</ul>
<p><B>Version 40.93.2H5</B>
<ul>
<li>Added move-to-top verb to sort item stacks.
<li>Gasmask, firealarm, and eject alarm overlays changed to alpha-blend textures.
<li>Doors allow empty-handed click to open (if wearing correct ID).
<li>Dedicated remote door controller added for poddoors.
<li>Poddoor icon changed.
<li>Alarm icon changed. Now reports air stats on examine.
<li>Timer/Igniter & Timer/Igniter/Plasmatank assemblies added.
<li>Bombs act as firebombs if plasma tank hole isn't bored.
<li>Fixed airflow bug with interior doors.
<li>Security computers now have minimap of station.
<li>Arm verb added to proximity detectors/assemblies.
<li>Proximity detectors fire if they bump.
<li>Timer and Motion assemblies state icons added.
<li>Meteors can now explode (sometimes).
</ul>
"}
datum/air_tunnel/air_tunnel1/SS13_airtunnel = null
datum/control/cellular/cellcontrol = null
datum/control/gameticker/ticker = null
obj/datacore/data_core = null
obj/overlay/plmaster = null
obj/overlay/slmaster = null
going = 1.0
master_mode = "random"//"extended"
persistent_file = "mode.txt"
obj/ctf_assist/ctf = null
nuke_code = null
poll_controller = null
datum/engine_eject/engine_eject_control = null
host = null
obj/hud/main_hud = null
obj/hud/hud2/main_hud2 = null
ooc_allowed = 1.0
dna_ident = 1.0
abandon_allowed = 1.0
enter_allowed = 1.0
shuttle_frozen = 0.0
prison_entered = null
list/html_colours = new/list(0)
list/occupations = list( "Engineer", "Engineer", "Security Officer", "Security Officer", "Forensic Technician", "Medical Researcher", "Research Technician", "Toxin Researcher", "Atmospheric Technician", "Medical Doctor", "Station Technician", "Head of Personnel", "Head of Research", "Prison Security", "Prison Security", "Prison Doctor", "Prison Warden" )
list/assistant_occupations = list( "Technical Assistant", "Medical Assistant", "Research Assistant", "Staff Assistant" )
list/bombers = list( )
list/admins = list( )
list/shuttles = list( )
list/reg_dna = list( )
list/banned = list( )
//
shuttle_z = 10 //default
list/monkeystart = list()
list/blobstart = list()
list/blobs = list()
list/cardinal = list( NORTH, SOUTH, EAST, WEST )
datum/station_state/start_state = null
datum/config/config = null
datum/vote/vote = null
datum/sun/sun = null
list/plines = list()
list/gasflowlist = list()
list/machines = list()
list/powernets = null
defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
Debug = 0 // global debug switch
datum/debug/debugobj
datum/moduletypes/mods = new()
wavesecret = 0
world
mob = /mob/human
turf = /turf/space
area = /area
view = "15x15"
hub = "Exadv1.spacestation13"
hub_password = "kMZy3U5jJHSiBQjr"
//hub = "Hobnob.SS13D"
//hub = "Stephen001.CustomSpaceStation13"
name = "Space Station 13"
//visibility = 0
//loop_checks = 0
+140
View File
@@ -0,0 +1,140 @@
var
hsboxspawn = 0
list
hrefs = list(
"hsbsuit" = "Suit Up (Space Travel Gear)",
"hsbmetal" = "Spawn 50 Metal",
"hsbglass" = "Spawn 50 Glass",
"hsbairlock" = "Spawn Airlock",
"hsbregulator" = "Spawn Air Regulator",
"hsbfilter" = "Spawn Air Filter",
"hsbcanister" = "Spawn Canister",
"hsbfueltank" = "Spawn Welding Fuel Tank",
"hsbwater tank" = "Spawn Water Tank",
"hsbtoolbox" = "Spawn Toolbox",
"hsbmedkit" = "Spawn Medical Kit")
mob
var
datum/hSB/sandbox = null
proc
CanBuild()
if(master_mode == "sandbox")
sandbox = new/datum/hSB
sandbox.owner = src.ckey
if(src.client.holder)
sandbox.admin = 1
verbs += new/mob/proc/sandbox_panel
sandbox_panel()
if(sandbox)
sandbox.update()
datum/hSB
var
owner = null
admin = 0
proc
update()
var/hsbpanel = "<center><b>h_Sandbox Panel</b></center><hr>"
if(admin)
hsbpanel += "<b>Administration Tools:</b><br>"
hsbpanel += "- <a href=\"?\ref[src];hsb=hsbtobj\">Toggle Object Spawning</a><br><br>"
hsbpanel += "<b>Regular Tools:</b><br>"
for(var/T in hrefs)
hsbpanel += "- <a href=\"?\ref[src];hsb=[T]\">[hrefs[T]]</a><br>"
if(hsboxspawn)
hsbpanel += "- <a href=\"?\ref[src];hsb=hsbobj\">Spawn Object</a><br><br>"
usr << browse(hsbpanel, "window=hsbpanel")
Topic(href, href_list)
if(!(src.owner == usr.ckey)) return
if(href_list["hsb"])
switch(href_list["hsb"])
if("hsbtobj")
if(!admin) return
if(hsboxspawn)
world << "<b>Sandbox: [usr.key] has disabled object spawning!</b>"
hsboxspawn = 0
return
if(!hsboxspawn)
world << "<b>Sandbox: [usr.key] has enabled object spawning!</b>"
hsboxspawn = 1
return
if("hsbsuit")
var/mob/human/P = usr
if(P.wear_suit)
P.wear_suit.loc = P.loc
P.wear_suit.layer = initial(P.wear_suit.layer)
P.wear_suit = null
P.wear_suit = new/obj/item/weapon/clothing/suit/sp_suit(P)
P.wear_suit.layer = 20
if(P.head)
P.head.loc = P.loc
P.head.layer = initial(P.head.layer)
P.head = null
P.head = new/obj/item/weapon/clothing/head/s_helmet(P)
P.head.layer = 20
if(P.wear_mask)
P.wear_mask.loc = P.loc
P.wear_mask.layer = initial(P.wear_mask.layer)
P.wear_mask = null
P.wear_mask = new/obj/item/weapon/clothing/mask/gasmask(P)
P.wear_mask.layer = 20
if(P.back)
P.back.loc = P.loc
P.back.layer = initial(P.back.layer)
P.back = null
P.back = new/obj/item/weapon/tank/jetpack(P)
P.back.layer = 20
P.internal = P.back
if("hsbmetal")
var/obj/item/weapon/sheet/hsb = new/obj/item/weapon/sheet/metal
hsb.amount = 50
hsb.loc = usr.loc
if("hsbglass")
var/obj/item/weapon/sheet/hsb = new/obj/item/weapon/sheet/metal
hsb.amount = 50
hsb.loc = usr.loc
if("hsbairlock")
var/obj/machinery/door/hsb = new/obj/machinery/door/airlock
var/r_access = input(usr, "What general access will this airlock require?", "Sandbox:") as num
var/r_lab = input(usr, "What laboratory access will this airlock require?", "Sandbox:") as num
var/r_engine = input(usr, "What engine access will this airlock require?", "Sandbox:") as num
var/r_air = input(usr, "What air access will this airlock require?", "Sandbox:") as num
hsb.access = "[r_access][r_lab][r_engine][r_air]"
hsb.loc = usr.loc
hsb.loc.buildlinks()
usr << "<b>Sandbox: Created an airlock requiring at least [r_access]>[r_lab]-[r_engine]-[r_air] access."
if("hsbregulator")
var/obj/machinery/atmoalter/siphs/fullairsiphon/hsb = new/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent
hsb.loc = usr.loc
if("hsbfilter")
var/obj/machinery/atmoalter/siphs/scrubbers/hsb = new/obj/machinery/atmoalter/siphs/scrubbers/air_filter
hsb.loc = usr.loc
if("hsbcanister")
var/list/hsbcanisters = typesof(/obj/machinery/atmoalter/canister/) - /obj/machinery/atmoalter/canister/
var/hsbcanister = input(usr, "Choose a canister to spawn.", "Sandbox:") in hsbcanisters + "Cancel"
if(!(hsbcanister == "Cancel"))
new hsbcanister(usr.loc)
if("hsbfueltank")
var/obj/hsb = new/obj/weldfueltank
hsb.loc = usr.loc
if("hsbwatertank")
var/obj/hsb = new/obj/watertank
hsb.loc = usr.loc
if("hsbtoolbox")
var/obj/item/weapon/storage/hsb = new/obj/item/weapon/storage/toolbox
for(var/obj/item/weapon/radio/T in hsb)
del(T)
new/obj/item/weapon/crowbar (hsb)
hsb.loc = usr.loc
if("hsbmedkit")
var/obj/item/weapon/storage/firstaid/hsb = new/obj/item/weapon/storage/firstaid/regular
hsb.loc = usr.loc
if("hsbobj")
if(!hsboxspawn) return
var/list/hsbitems = typesof(/obj/)
var/hsbitem = input(usr, "Choose an object to spawn.", "Sandbox:") in hsbitems + "Cancel"
if(!(hsbitem == "Cancel"))
new hsbitem(usr.loc)
+78
View File
@@ -0,0 +1,78 @@
/proc/hex2num(hex)
if (!( istext(hex) ))
CRASH("hex2num not given a hexadecimal string argument (user error)")
return
var/num = 0
var/power = 0
var/i = null
i = length(hex)
while(i > 0)
var/char = copytext(hex, i, i + 1)
switch(char)
if("0")
power++
goto Label_290
if("9", "8", "7", "6", "5", "4", "3", "2", "1")
num += text2num(char) * 16 ** power
if("a", "A")
num += 16 ** power * 10
if("b", "B")
num += 16 ** power * 11
if("c", "C")
num += 16 ** power * 12
if("d", "D")
num += 16 ** power * 13
if("e", "E")
num += 16 ** power * 14
if("f", "F")
num += 16 ** power * 15
else
CRASH("hex2num given non-hexadecimal string (user error)")
return
power++
Label_290:
i--
return num
return
/proc/num2hex(num, placeholder)
if (placeholder == null)
placeholder = 2
if (!( isnum(num) ))
CRASH("num2hex not given a numeric argument (user error)")
return
if (!( num ))
return "0"
var/hex = ""
var/i = 0
while(16 ** i < num)
i++
var/power = null
power = i - 1
while(power >= 0)
var/val = round(num / 16 ** power)
num -= val * 16 ** power
switch(val)
if(9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0)
hex += text("[]", val)
if(10.0)
hex += "A"
if(11.0)
hex += "B"
if(12.0)
hex += "C"
if(13.0)
hex += "D"
if(14.0)
hex += "E"
if(15.0)
hex += "F"
else
power--
while(length(hex) < placeholder)
hex = text("0[]", hex)
return hex
return
+352
View File
@@ -0,0 +1,352 @@
/obj/machinery/computer/hologram_comp/New()
..()
spawn( 10 )
src.projector = locate(/obj/machinery/hologram_proj, get_step(src.loc, NORTH))
return
return
/obj/machinery/computer/hologram_comp/DblClick()
if (get_dist(src, usr) > 1)
return 0
src.show_console(usr)
return
/obj/machinery/computer/hologram_comp/proc/render()
var/icon/I = new /icon( 'human.dmi', "male" )
if (src.lumens >= 0)
I.Blend(rgb(src.lumens, src.lumens, src.lumens), 0)
else
I.Blend(rgb(- src.lumens, -src.lumens, -src.lumens), 1)
I.Blend(new /icon( 'human.dmi', "mouth" ), 3)
var/icon/U = new /icon( 'human.dmi', "diaper" )
U.Blend(U, 3)
U = new /icon( 'mob.dmi', "hair_a" )
U.Blend(rgb(src.h_r, src.h_g, src.h_b), 0)
I.Blend(U, 3)
src.projector.projection.icon = I
return
/obj/machinery/computer/hologram_comp/proc/show_console(var/mob/user as mob)
var/dat
user.machine = src
if (src.temp)
dat = text("[]<BR><BR><A href='?src=\ref[];temp=1'>Clear</A>", src.temp, src)
else
dat = text("<B>Hologram Status:</B><HR>\nPower: <A href='?src=\ref[];power=1'>[]</A><HR>\n<B>Hologram Control:</B><BR>\nColor Luminosity: []/220 <A href='?src=\ref[];reset=1'>\[Reset\]</A><BR>\nLighten: <A href='?src=\ref[];light=1'>1</A> <A href='?src=\ref[];light=10'>10</A><BR>\nDarken: <A href='?src=\ref[];light=-1'>1</A> <A href='?src=\ref[];light=-10'>10</A><BR>\n<BR>\nHair Color: ([],[],[]) <A href='?src=\ref[];h_reset=1'>\[Reset\]</A><BR>\nRed (0-255): <A href='?src=\ref[];h_r=-300'>\[0\]</A> <A href='?src=\ref[];h_r=-10'>-10</A> <A href='?src=\ref[];h_r=-1'>-1</A> [] <A href='?src=\ref[];h_r=1'>1</A> <A href='?src=\ref[];h_r=10'>10</A> <A href='?src=\ref[];h_r=300'>\[255\]</A><BR>\nGreen (0-255): <A href='?src=\ref[];h_g=-300'>\[0\]</A> <A href='?src=\ref[];h_g=-10'>-10</A> <A href='?src=\ref[];h_g=-1'>-1</A> [] <A href='?src=\ref[];h_g=1'>1</A> <A href='?src=\ref[];h_g=10'>10</A> <A href='?src=\ref[];h_g=300'>\[255\]</A><BR>\nBlue (0-255): <A href='?src=\ref[];h_b=-300'>\[0\]</A> <A href='?src=\ref[];h_b=-10'>-10</A> <A href='?src=\ref[];h_b=-1'>-1</A> [] <A href='?src=\ref[];h_b=1'>1</A> <A href='?src=\ref[];h_b=10'>10</A> <A href='?src=\ref[];h_b=300'>\[255\]</A><BR>", src, (src.projector.projection ? "On" : "Off"), -src.lumens + 35, src, src, src, src, src, src.h_r, src.h_g, src.h_b, src, src, src, src, src.h_r, src, src, src, src, src, src, src.h_g, src, src, src, src, src, src, src.h_b, src, src, src)
user << browse(dat, "window=hologram_console")
return
/obj/machinery/computer/hologram_comp/Topic(href, href_list)
..()
if (get_dist(src, usr) <= 1)
flick("holo_console1", src)
if (href_list["power"])
if (src.projector.projection)
src.projector.icon_state = "hologram0"
//src.projector.projection = null
del(src.projector.projection)
else
src.projector.projection = new /obj/projection( src.projector.loc )
src.projector.projection.icon = 'human.dmi'
src.projector.projection.icon_state = "male"
src.projector.icon_state = "hologram1"
src.render()
else
if (href_list["h_r"])
if (src.projector.projection)
src.h_r += text2num(href_list["h_r"])
src.h_r = min(max(src.h_r, 0), 255)
render()
else
if (href_list["h_g"])
if (src.projector.projection)
src.h_g += text2num(href_list["h_g"])
src.h_g = min(max(src.h_g, 0), 255)
render()
else
if (href_list["h_b"])
if (src.projector.projection)
src.h_b += text2num(href_list["h_b"])
src.h_b = min(max(src.h_b, 0), 255)
render()
else
if (href_list["light"])
if (src.projector.projection)
src.lumens += text2num(href_list["light"])
src.lumens = min(max(src.lumens, -185.0), 35)
render()
else
if (href_list["reset"])
if (src.projector.projection)
src.lumens = 0
render()
else
if (href_list["temp"])
src.temp = null
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.show_console(M)
//Foreach goto(446)
return
/obj/begin/verb/ready()
set src in usr.loc
if ((!( istype(usr, /mob/human) ) || usr.start))
usr << "You have already started!"
return
var/mob/human/M = usr
src.get_dna_ready(M)
if ((!( M.w_uniform ) && !( ticker )))
if (M.gender == "female")
M.w_uniform = new /obj/item/weapon/clothing/under/pink( M )
else
M.w_uniform = new /obj/item/weapon/clothing/under/blue( M )
M.w_uniform.layer = 20
M.shoes = new /obj/item/weapon/clothing/shoes/brown( M )
M.shoes.layer = 20
else
M << "You will have to find clothes from the station."
if ((ticker && !( M.l_hand )))
var/obj/item/weapon/card/id/I = new /obj/item/weapon/card/id( M )
var/list/L = list( "Technical Assistant", "Research Assistant", "Staff Assistant", "Medical Assistant" )
var/choose
if (L.Find(M.occupation1))
choose = M.occupation1
else
choose = pick(L)
switch(choose)
if("Research Assistant")
I.assignment = "Research Assistant"
I.registered = M.rname
I.access_level = 1
I.lab_access = 1
I.engine_access = 0
I.air_access = 0
if("Technical Assistant")
I.assignment = "Technical Assistant"
I.registered = M.rname
I.access_level = 1
I.lab_access = 0
I.engine_access = 0
I.air_access = 1
if("Medical Assistant")
I.assignment = "Medical Assistant"
I.registered = M.rname
I.access_level = 1
I.lab_access = 1
I.engine_access = 0
I.air_access = 0
if("Staff Assistant")
I.assignment = "Staff Assistant"
I.registered = M.rname
I.access_level = 2
I.lab_access = 0
I.engine_access = 0
I.air_access = 0
else
I.name = text("[]'s ID Card ([]>[]-[]-[])", I.registered, I.access_level, I.lab_access, I.engine_access, I.air_access)
I.layer = 20
M.l_hand = I
M.start = 1
M.update_face()
M.update_body()
return
/obj/begin/verb/enter()
set src in usr.loc
if(config.loggame) world.log << "GAME: [usr.key] entered as [usr.name]"
if (!( enter_allowed ))
usr << "\blue There is an administrative lock on entering the game!"
return
if ((!( usr.start ) || !( istype(usr, /mob/human) )))
usr << "\blue <B>You aren't ready! Use the ready verb on this pad to set up your character!</B>"
return
if (ctf)
var/obj/rogue = locate("landmark*CTF-rogue")
usr.loc = rogue.loc
usr << "<B>It's CTF mode. You are a late joiner so you are a Rogue!</B>"
usr << "\blue Now teleporting."
if (ticker)
var/mob/H = usr
if (istype(H, /mob/human))
reg_dna[text("[]", H.primary.uni_identity)] = H.rname
return
var/mob/human/M = usr
var/list/start_loc = list( )
if ((M.key in list( "Thief jack", "Link43130", "Hutchy2k1", "Easty", "Exadv1" )))
start_loc["Supply Station"] = locate(77, 40, 7)
var/area/A = locate(/area/sleep_area)
var/list/L = list( )
for(var/turf/T in A)
if(T.isempty())
L += T
//Foreach goto(239)
start_loc["SS13"] = pick(L)
if (locate(text("spstart[]", M.ckey)))
for(var/obj/sp_start/S in world)
if (S.tag == text("spstart[]", M.ckey))
start_loc[text("[]", S.desc)] = S
//Foreach goto(295)
var/option = input(M, "Where should you start?", "Start Selector", null) in start_loc
if ((!( usr.start ) || !( istype(usr, /mob/human) ) || usr.loc != src.loc))
return
if (ticker)
reg_dna[text("[]", M.primary.uni_identity)] = M.rname
var/obj/sp_start/S = start_loc[option]
if (istype(S, /obj/sp_start))
M << "\blue Now teleporting to special location."
if (S.special == 2)
for(var/obj/O in M)
//O = null
del(O)
//Foreach goto(492)
M.loc = S.loc
else
if (S.special == 3)
for(var/obj/O in M)
//O = null
del(O)
//Foreach goto(560)
var/obj/O = new /mob/monkey( S.loc )
M.client.mob = O
O.loc = S.loc
//M = null
del(M)
else
M.loc = S.loc //was O.loc
else
if (isturf(S))
M << "\blue Now teleporting."
M.loc = S
return
/obj/begin/proc/get_dna_ready(var/mob/user as mob)
var/mob/human/M = user
if (!( M.primary ))
M.r_hair = M.nr_hair
M.b_hair = M.nb_hair
M.g_hair = M.ng_hair
M.s_tone = M.ns_tone
var/t1 = rand(1000, 1500)
dna_ident += t1
if (dna_ident > 65536.0)
dna_ident = rand(1, 1500)
M.primary = new /obj/dna( null )
M.primary.uni_identity = text("[]", add_zero(num2hex(dna_ident), 4))
var/t2 = add_zero(num2hex(M.nr_hair), 2)
M.primary.uni_identity = text("[][]", M.primary.uni_identity, t2)
t2 = add_zero(num2hex(M.ng_hair), 2)
M.primary.uni_identity = text("[][]", M.primary.uni_identity, t2)
t2 = add_zero(num2hex(M.nb_hair), 2)
M.primary.uni_identity = text("[][]", M.primary.uni_identity, t2)
t2 = add_zero(num2hex(M.r_eyes), 2)
M.primary.uni_identity = text("[][]", M.primary.uni_identity, t2)
t2 = add_zero(num2hex(M.g_eyes), 2)
M.primary.uni_identity = text("[][]", M.primary.uni_identity, t2)
t2 = add_zero(num2hex(M.b_eyes), 2)
M.primary.uni_identity = text("[][]", M.primary.uni_identity, t2)
t2 = add_zero(num2hex( -M.ns_tone + 35), 2)
M.primary.uni_identity = text("[][]", M.primary.uni_identity, t2)
t2 = (M.gender == "male" ? text("[]", num2hex(rand(1, 124))) : text("[]", num2hex(rand(127, 250))))
if (length(t2) < 2)
M.primary.uni_identity = text("[]0[]", M.primary.uni_identity, t2)
else
M.primary.uni_identity = text("[][]", M.primary.uni_identity, t2)
M.primary.spec_identity = "5BDFE293BA5500F9FFFD500AAFFE"
M.primary.struc_enzyme = "CDE375C9A6C25A7DBDA50EC05AC6CEB63"
if (rand(1, 3125) == 13)
M.need_gl = 1
M.be_epil = 1
M.be_cough = 1
M.be_tur = 1
M.be_stut = 1
var/b_vis
if (M.need_gl)
b_vis = add_zero(text("[]", num2hex(rand(10, 1400))), 3)
M.disabilities = M.disabilities | 1
M << "\blue You need glasses!"
else
b_vis = "5A7"
var/epil
if (M.be_epil)
epil = add_zero(text("[]", num2hex(rand(10, 1400))), 3)
M.disabilities = M.disabilities | 2
M << "\blue You are epileptic!"
else
epil = "6CE"
var/cough
if (M.be_cough)
cough = add_zero(text("[]", num2hex(rand(10, 1400))), 3)
M.disabilities = M.disabilities | 4
M << "\blue You have a chronic coughing syndrome!"
else
cough = "EC0"
var/Tourette
if (M.be_tur)
epil = add_zero(text("[]", num2hex(rand(10, 1400))), 3)
M.disabilities = M.disabilities | 8
M << "\blue You have Tourette syndrome!"
else
Tourette = "5AC"
var/stutter
if (M.be_stut)
stutter = add_zero(text("[]", num2hex(rand(10, 1400))), 3)
M.disabilities = M.disabilities | 16
M << "\blue You have a stuttering problem!"
else
stutter = "A50"
M.primary.struc_enzyme = text("CDE375C9A6C2[]DBD[][][][]B63", b_vis, stutter, cough, Tourette, epil)
M.primary.use_enzyme = "493DB249EB6D13236100A37000800AB71"
M.primary.n_chromo = 28
return
/turf/station/command/floor/updatecell()
src.oxygen = O2STANDARD
src.firelevel = 0
src.co2 = 0
src.poison = 0
src.sl_gas = 0
src.n2 = N2STANDARD
return
/turf/station/command/conduction()
return
/turf/station/command/floor/attack_paw(user as mob)
return src.attack_hand(user)
return
/turf/station/command/floor/attack_hand(var/mob/user as mob)
if ((!( user.canmove ) || user.restrained() || !( user.pulling )))
return
if (user.pulling.anchored)
return
if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1))
return
if (ismob(user.pulling))
var/mob/M = user.pulling
var/mob/t = M.pulling
M.pulling = null
step(user.pulling, get_dir(user.pulling.loc, src))
M.pulling = t
else
step(user.pulling, get_dir(user.pulling.loc, src))
return
+27
View File
@@ -0,0 +1,27 @@
/proc/invertHTML(HTMLstring)
if (!( istext(HTMLstring) ))
CRASH("Given non-text argument!")
return
else
if (length(HTMLstring) != 7)
CRASH("Given non-HTML argument!")
return
var/textr = copytext(HTMLstring, 2, 4)
var/textg = copytext(HTMLstring, 4, 6)
var/textb = copytext(HTMLstring, 6, 8)
var/r = hex2num(textr)
var/g = hex2num(textg)
var/b = hex2num(textb)
textr = num2hex(255 - r)
textg = num2hex(255 - g)
textb = num2hex(255 - b)
if (length(textr) < 2)
textr = text("0[]", textr)
if (length(textg) < 2)
textr = text("0[]", textg)
if (length(textb) < 2)
textr = text("0[]", textb)
return text("#[][][]", textr, textg, textb)
return
File diff suppressed because it is too large Load Diff
+7122
View File
File diff suppressed because it is too large Load Diff
+106
View File
@@ -0,0 +1,106 @@
// module datum.
// this is per-object instance, and shows the condition of the modules in the object
// actual modules needed is referenced through modulestypes and the object type
/datum/module
var/status // bits set if working, 0 if broken
var/installed // bits set if installed, 0 if missing
// moduletypes datum
// this is per-object type, and shows the modules needed for a type of object
/datum/moduletypes
var/list/modcount = list() // assoc list of the count of modules for a type
var/list/modules = list( // global associative list
"/obj/machinery/power/apc" = "card_reader,power_control,id_auth,cell_power,cell_charge")
/datum/module/New(var/obj/O)
var/type = O.type // the type of the creating object
var/mneed = mods.inmodlist(type) // find if this type has modules defined
if(!mneed) // not found in module list?
del(src) // delete self, thus ending proc
var/needed = mods.getbitmask(type) // get a bitmask for the number of modules in this object
status = needed
installed = needed
/datum/moduletypes/proc/addmod(var/type, var/modtextlist)
modules += type // index by type text
modules[type] = modtextlist
/datum/moduletypes/proc/inmodlist(var/type)
return ("[type]" in modules)
/datum/moduletypes/proc/getbitmask(var/type)
var/count = modcount["[type]"]
if(count)
return 2**count-1
var/modtext = modules["[type]"]
var/num = 1
var/pos = 1
while(1)
pos = findText(modtext, ",", pos, 0)
if(!pos)
break
else
pos++
num++
modcount += "[type]"
modcount["[type]"] = num
return 2**num-1
/obj/item/weapon/module
icon = 'module.dmi'
icon_state = "std_module"
w_class = 2.0
s_istate = "electronic"
flags = FPRINT|DRIVABLE|TABLEPASS
var/mtype = 1 // 1=electronic 2=hardware
/obj/item/weapon/module/card_reader
name = "card reader module"
icon_state = "card_mod"
desc = "An electronic module for reading data and ID cards."
/obj/item/weapon/module/power_control
name = "power control module"
icon_state = "power_mod"
desc = "Heavy-duty switching circuits for power control."
/obj/item/weapon/module/id_auth
name = "ID authentication module"
icon_state = "id_mod"
desc = "A module allowing secure authorization of ID cards."
var/access = null
var/allowed = null
/obj/item/weapon/module/cell_power
name = "power cell regulator module"
icon_state = "power_mod"
desc = "A converter and regulator allowing the use of power cells."
/obj/item/weapon/module/cell_power
name = "power cell charger module"
icon_state = "power_mod"
desc = "Charging circuits for power cells."
+59
View File
@@ -0,0 +1,59 @@
/obj/item/weapon/t_scanner/attack_self(mob/user)
on = !on
icon_state = "t-scanner[on]"
if(on)
src.process()
/obj/item/weapon/t_scanner/proc/process()
while(on)
for(var/turf/T in range(1, src.loc) )
if(!T.intact)
continue
for(var/obj/O in T.contents)
if(O.level != 1)
continue
if(O.invisibility == 101)
O.invisibility = 0
spawn(10)
if(O)
var/turf/U = O.loc
if(U.intact)
O.invisibility = 101
var/mob/human/M = locate() in T
if(M && M.invisibility == 2)
M.invisibility = 0
spawn(2)
if(M)
M.invisibility = 2
sleep(10)
/obj/item/weapon/flashlight/attack_self(mob/user)
on = !on
icon_state = "flight[on]"
if(on)
img = image('turfs2.dmi', "light", 11)
user:body_standing += img
else
if(img)
user:body_standing -= img
del(img)
///obj/item/weapon/flashlight/dropped()
// on = 0
+92
View File
@@ -0,0 +1,92 @@
/obj/New()
..()
// mod = new(src) // creates a module datum for this obj of type
/obj/machinery/cell_charger/attackby(obj/item/weapon/W, mob/user)
if(stat & BROKEN) return
if(istype(W, /obj/item/weapon/cell))
if(charging)
user << "There is already a cell in the charger."
return
else
user.drop_item()
W.loc = src
charging = W
user << "You insert the cell into the charger."
chargelevel = -1
updateicon()
/obj/machinery/cell_charger/proc/updateicon()
icon_state = "ccharger[charging ? 1 : 0]"
if(charging && !(stat & (BROKEN|NOPOWER)) )
var/newlevel = round( charging.percent() * 4.0 / 99 )
//world << "nl: [newlevel]"
if(chargelevel != newlevel)
overlays = null
overlays += image('power.dmi', "ccharger-o[newlevel]")
chargelevel = newlevel
else
overlays = null
/obj/machinery/cell_charger/attack_hand(mob/user)
add_fingerprint(user)
if(stat & BROKEN) return
if(charging)
charging.loc = usr
charging.layer = 20
if (user.hand )
user.l_hand = charging
else
user.r_hand = charging
charging.add_fingerprint(user)
charging.updateicon()
src.charging = null
user << "You remove the cell from the charger."
chargelevel = -1
updateicon()
/obj/machinery/cell_charger/process()
//world << "ccpt [charging] [stat]"
if(!charging || (stat & (BROKEN|NOPOWER)) )
return
var/newch = charging.charge + 5
newch = min(newch, charging.maxcharge)
use_power((newch - charging.charge) / CELLRATE)
//world << "ccpt: [newch], used [(newch - charging.charge) / CELLRATE]"
charging.charge = newch
updateicon()
File diff suppressed because it is too large Load Diff
+355
View File
@@ -0,0 +1,355 @@
//#define AMAP
/obj/machinery/computer/security/verb/station_map()
set name = ".map"
set src in view(1)
usr.machine = src
if(config.loggame) world.log << "GAME: [usr]([usr.key]) used station map L[maplevel] in [src.loc.loc]"
src.drawmap(usr)
/obj/machinery/computer/security/proc/drawmap(var/mob/user as mob)
var/icx = round(world.maxx/16) + 1
var/icy = round(world.maxy/16) + 1
var/xoff = round( (icx*16-world.maxx)-2)
var/yoff = round( (icy*16-world.maxy)-2)
var/icount = icx * icy
var/list/imap = list()
#ifdef AMAP
for(var/i = 0; i<icount; i++)
imap += icon('imap.dmi', "blank")
imap += icon('imap.dmi', "blank")
//world << "[icount] images in list"
for(var/wx = 1 ; wx <= world.maxx; wx++)
for(var/wy = 1; wy <= world.maxy; wy++)
var/turf/T = locate(wx, wy, maplevel)
var/colour
var/colour2
if(!T)
colour = rgb(0,0,0)
else
var/sense = 1
switch("[T.type]")
if("/turf/space")
colour = rgb(10,10,10)
sense = 0
if("/turf/station/floor")
colour = rgb(150,150,150)
var/turf/station/floor/TF = T
if(TF.burnt == 1)
sense = 0
colour = rgb(130,130,130)
if("/turf/station/engine/floor")
colour = rgb(128,128,128)
if("/turf/station/wall")
colour = rgb(96,96,96)
if("/turf/station/r_wall")
colour = rgb(128,96,96)
if("/turf/station/command/floor", "/turf/station/command/floor/other")
colour = rgb(240,240,240)
if("/turf/station/command/wall", "/turf/station/command/wall/other")
colour = rgb(140,140,140)
else
colour = rgb(0,40,0)
if(sense)
for(var/atom/AM in T.contents)
if(istype(AM, /obj/machinery/door) && !istype(AM, /obj/machinery/door/window))
if(AM.density)
colour = rgb(96,96,192)
colour2 = colour
else
colour = rgb(128,192,128)
if(istype(AM, /obj/machinery/alarm))
colour = rgb(0,255,0)
colour2 = colour
if(AM.icon_state=="alarm:1")
colour = rgb(255,255,0)
colour2 = rgb(255,128,0)
if(istype(AM, /mob))
if(AM:client)
colour = rgb(255,0,0)
else
colour = rgb(255,128,128)
colour2 = rgb(192,0,0)
var/area/A = T.loc
if(A.fire)
var/red = getr(colour)
var/green = getg(colour)
var/blue = getb(colour)
green = min(255, green+40)
blue = min(255, blue+40)
colour = rgb(red, green, blue)
if(!colour2 && !T.density)
var/turf_total = T.co2 + T.oxygen + T.poison + T.sl_gas + T.n2
var/t1 = turf_total / CELLSTANDARD * 150
if(t1<=100)
colour2 = rgb(t1*2.55,0,0)
else
t1 = min(100, t1-100)
colour2 = rgb(255, t1*2.55, t1*2.55)
if(!colour2)
colour2 = colour
var/ix = round((wx*2+xoff)/32)
var/iy = round((wy*2+yoff)/32)
var/rx = ((wx*2+xoff)%32) + 1
var/ry = ((wy*2+yoff)%32) + 1
//world << "trying [ix],[iy] : [ix+icx*iy]"
var/icon/I = imap[1+(ix + icx*iy)*2]
var/icon/I2 = imap[2+(ix + icx*iy)*2]
//world << "icon: \icon[I]"
I.DrawBox(colour, rx, ry, rx+1, ry+1)
I2.DrawBox(colour2, rx, ry, rx+1, ry+1)
user.clearmap()
user.mapobjs = list()
for(var/i=0; i<icount;i++)
var/obj/screen/H = new /obj/screen()
H.screen_loc = "[5 + i%icx],[6+ round(i/icx)]"
//world<<"\icon[I] at [H.screen_loc]"
H.name = (i==0)?"maprefresh":"map"
var/icon/HI = new/icon
var/icon/I = imap[i*2+1]
var/icon/J = imap[i*2+2]
HI.Insert(I, frame=1, delay = 5)
HI.Insert(J, frame=2, delay = 5)
del(I)
del(J)
H.icon = HI
H.layer = 25
usr.mapobjs += H
#else
for(var/i = 0; i<icount; i++)
imap += icon('imap.dmi', "blank")
for(var/wx = 1 ; wx <= world.maxx; wx++)
for(var/wy = 1; wy <= world.maxy; wy++)
var/turf/T = locate(wx, wy, maplevel)
var/colour
if(!T)
colour = rgb(0,0,0)
else
var/sense = 1
switch("[T.type]")
if("/turf/space")
colour = rgb(10,10,10)
sense = 0
if("/turf/station/floor", "/turf/station/engine/floor")
var/turf_total = T.co2 + T.oxygen + T.poison + T.sl_gas + T.n2
var/t1 = turf_total / CELLSTANDARD * 175
if(t1<=100)
colour = rgb(0,0,t1*2.55)
else
t1 = min(100, t1-100)
colour = rgb( t1*2.55, t1*2.55, 255)
if("/turf/station/wall")
colour = rgb(96,96,96)
if("/turf/station/r_wall")
colour = rgb(128,96,96)
if("/turf/station/command/floor", "/turf/station/command/floor/other")
colour = rgb(240,240,240)
if("/turf/station/command/wall", "/turf/station/command/wall/other")
colour = rgb(140,140,140)
else
colour = rgb(0,40,0)
if(sense)
for(var/atom/AM in T.contents)
if(istype(AM, /obj/machinery/door) && !istype(AM, /obj/machinery/door/window))
if(AM.density)
colour = rgb(0,96,192)
else
colour = rgb(96,192,128)
if(istype(AM, /obj/machinery/alarm))
colour = rgb(0,255,0)
if(AM.icon_state=="alarm:1")
colour = rgb(255,255,0)
if(istype(AM, /mob))
if(AM:client)
colour = rgb(255,0,0)
else
colour = rgb(255,128,128)
//if(istype(AM, /obj/blob))
// colour = rgb(255,0,255)
var/area/A = T.loc
if(A.fire)
var/red = getr(colour)
var/green = getg(colour)
var/blue = getb(colour)
green = min(255, green+40)
blue = min(255, blue+40)
colour = rgb(red, green, blue)
var/ix = round((wx*2+xoff)/32)
var/iy = round((wy*2+yoff)/32)
var/rx = ((wx*2+xoff)%32) + 1
var/ry = ((wy*2+yoff)%32) + 1
//world << "trying [ix],[iy] : [ix+icx*iy]"
var/icon/I = imap[1+(ix + icx*iy)]
//world << "icon: \icon[I]"
I.DrawBox(colour, rx, ry, rx+1, ry+1)
user.clearmap()
user.mapobjs = list()
for(var/i=0; i<icount;i++)
var/obj/screen/H = new /obj/screen()
H.screen_loc = "[5 + i%icx],[6+ round(i/icx)]"
//world<<"\icon[I] at [H.screen_loc]"
H.name = (i==0)?"maprefresh":"map"
var/icon/I = imap[i+1]
H.icon = I
del(I)
H.layer = 25
usr.mapobjs += H
#endif
user.client.screen += user.mapobjs
src.close(user)
/* if(seccomp == src)
drawmap(user)
else
user.clearmap()*/
return
/obj/machinery/computer/security/proc/close(mob/user)
spawn(20)
var/using = null
if(user.mapobjs)
for(var/obj/machinery/computer/security/seccomp in oview(1,user))
if(seccomp == src)
using = 1
break
if(using)
close(user)
else
user.clearmap()
return
proc/getr(col)
return hex2num( copytext(col, 2,4))
proc/getg(col)
return hex2num( copytext(col, 4,6))
proc/getb(col)
return hex2num( copytext(col, 6))
/mob/proc/clearmap()
src.client.screen -= src.mapobjs
for(var/obj/screen/O in mapobjs)
del(O)
mapobjs = null
src.machine = null
File diff suppressed because it is too large Load Diff
+346
View File
@@ -0,0 +1,346 @@
/obj/machinery/computer/prison_shuttle/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(58)
src.icon_state = "broken"
if(3.0)
if (prob(25))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(109)
src.icon_state = "broken"
else
return
/obj/machinery/computer/prison_shuttle/verb/take_off()
set src in oview(1)
if ((usr.stat || usr.restrained()))
return
src.add_fingerprint(usr)
if (prison_entered)
var/A = locate(/area/shuttle)
for(var/turf/T in A)
if (T.z == 1)
for(var/atom/movable/AM as mob|obj in T)
AM.z = 8
//Foreach goto(96)
var/turf/U = locate(T.x, T.y, 8)
U.oxygen = T.oxygen
U.oldoxy = T.oldoxy
U.tmpoxy = T.tmpoxy
U.poison = T.poison
U.oldpoison = T.oldpoison
U.tmppoison = T.tmppoison
U.co2 = T.co2
U.oldco2 = T.oldco2
U.tmpco2 = T.tmpco2
//T = null
del(T)
//Foreach goto(62)
prison_entered = null
else
if (!( prison_entered ))
if (ticker.shuttle_location != 1)
var/A = locate(/area/shuttle_prison)
for(var/turf/T in A)
if (T.z == 8)
for(var/atom/movable/AM as mob|obj in T)
AM.z = 1
//Foreach goto(346)
var/turf/U = locate(T.x, T.y, 1)
U.oxygen = T.oxygen
U.oldoxy = T.oldoxy
U.tmpoxy = T.tmpoxy
U.poison = T.poison
U.oldpoison = T.oldpoison
U.tmppoison = T.tmppoison
U.co2 = T.co2
U.oldco2 = T.oldco2
U.tmpco2 = T.tmpco2
//T = null
del(T)
//Foreach goto(312)
prison_entered = 1
else
usr << "\blue There is an obstructing shuttle!"
return
return
/obj/machinery/computer/prison_shuttle/verb/restabalize()
set src in oview(1)
viewers(null, null) << "\red <B>Restabalizing prison shuttle atmosphere!</B>"
var/A = locate(/area/shuttle_prison)
for(var/obj/move/T in A)
T.firelevel = 0
T.oxygen = O2STANDARD
T.oldoxy = O2STANDARD
T.tmpoxy = O2STANDARD
T.poison = 0
T.oldpoison = 0
T.tmppoison = 0
T.co2 = 0
T.oldco2 = 0
T.tmpco2 = 0
T.sl_gas = 0
T.osl_gas = 0
T.tsl_gas = 0
T.n2 = N2STANDARD
T.on2 = N2STANDARD
T.tn2 = N2STANDARD
T.temp = T20C
T.otemp = T20C
T.ttemp = T20C
//Foreach goto(40)
viewers(null, null) << "\red <B>Prison shuttle Restabalized!</B>"
src.add_fingerprint(usr)
return
/obj/machinery/computer/shuttle/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(58)
src.icon_state = "broken"
if(3.0)
if (prob(25))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(109)
src.icon_state = "broken"
else
return
/obj/machinery/computer/shuttle/verb/restabalize()
set src in oview(1)
world << "\red <B>Restabalizing shuttle atmosphere!</B>"
var/A = locate(/area/shuttle)
for(var/obj/move/T in A)
T.firelevel = 0
T.oxygen = O2STANDARD
T.oldoxy = O2STANDARD
T.tmpoxy = O2STANDARD
T.poison = 0
T.oldpoison = 0
T.tmppoison = 0
T.co2 = 0
T.oldco2 = 0
T.tmpco2 = 0
T.sl_gas = 0
T.osl_gas = 0
T.tsl_gas = 0
T.n2 = N2STANDARD
T.on2 = N2STANDARD
T.tn2 = N2STANDARD
T.temp = T20C
T.otemp = T20C
T.ttemp = T20C
//Foreach goto(35)
world << "\red <B>Shuttle Restabalized!</B>"
src.add_fingerprint(usr)
return
/obj/machinery/computer/shuttle/verb/hijack()
set src in oview(1)
if ((!( ticker ) || ticker.shuttle_location != shuttle_z))
return
if (usr != ticker.killer)
return
world << "\blue <B>Alert: The shuttle is has been hijacked prematurely by the traitor!</B>"
ticker.timing = 0
ticker.check_win()
src.add_fingerprint(usr)
return
/obj/machinery/computer/shuttle/attackby(var/obj/item/weapon/card/id/W as obj, var/mob/user as mob)
if ((!( istype(W, /obj/item/weapon/card/id) ) || !( ticker ) || ticker.shuttle_location == shuttle_z || !( user )))
return
if (!W.check_access(access, allowed))
user << text("The access level ([]) of [] card is not high enough. ", W.access_level, W.registered)
return
var/choice = alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", "Authorize", "Repeal", "Abort")
switch(choice)
if("Authorize")
src.authorized -= W.registered
src.authorized += W.registered
if (src.auth_need - src.authorized.len > 0)
world << text("\blue <B>Alert: [] authorizations needed until shuttle is launched early</B>", src.auth_need - src.authorized.len)
else
world << "\blue <B>Alert: Shuttle launch time shortened to 10 seconds!</B>"
ticker.timeleft = 100
//src.authorized = null
del(src.authorized)
src.authorized = list( )
if("Repeal")
src.authorized -= W.registered
world << text("\blue <B>Alert: [] authorizations needed until shuttle is launched early</B>", src.auth_need - src.authorized.len)
if("Abort")
world << "\blue <B>All authorizations to shorting time for shuttle launch have been revoked!</B>"
src.authorized.len = 0
src.authorized = list( )
else
return
/obj/shut_controller/proc/rotate(direct)
var/SE_X = 1
var/SE_Y = 1
var/SW_X = 1
var/SW_Y = 1
var/NE_X = 1
var/NE_Y = 1
var/NW_X = 1
var/NW_Y = 1
for(var/obj/move/M in src.parts)
if (M.x < SW_X)
SW_X = M.x
if (M.x > SE_X)
SE_X = M.x
if (M.y < SW_Y)
SW_Y = M.y
if (M.y > NW_Y)
NW_Y = M.y
if (M.y > NE_Y)
NE_Y = M.y
if (M.y < SE_Y)
SE_Y = M.y
if (M.x > NE_X)
NE_X = M.x
if (M.x < NW_X)
NW_X = M.y
//Foreach goto(75)
var/length = abs(NE_X - NW_X)
var/width = abs(NE_Y - SE_Y)
var/obj/random = pick(src.parts)
var/s_direct = null
switch(s_direct)
if(1.0)
switch(direct)
if(90.0)
var/tx = SE_X
var/ty = SE_Y
var/t_z = random.z
for(var/obj/move/M in src.parts)
M.ty = -M.x - tx
M.tx = -M.y - ty
var/T = locate(M.x, M.y, 11)
M.relocate(T)
M.ty = -M.ty
M.tx += length
//Foreach goto(374)
for(var/obj/move/M in src.parts)
M.tx += tx
M.ty += ty
var/T = locate(M.tx, M.ty, t_z)
M.relocate(T, 90)
//Foreach goto(468)
if(-90.0)
var/tx = SE_X
var/ty = SE_Y
var/t_z = random.z
for(var/obj/move/M in src.parts)
M.ty = M.x - tx
M.tx = M.y - ty
var/T = locate(M.x, M.y, 11)
M.relocate(T)
M.ty = -M.ty
M.ty += width
//Foreach goto(571)
for(var/obj/move/M in src.parts)
M.tx += tx
M.ty += ty
var/T = locate(M.tx, M.ty, t_z)
M.relocate(T, -90.0)
//Foreach goto(663)
else
else
return
/obj/shuttle/door/verb/open()
set src in oview(1)
src.add_fingerprint(usr)
if (src.operating)
return
src.operating = 1
flick("doorc0", src)
src.icon_state = "door0"
sleep(15)
src.density = 0
src.opacity = 0
src.verbs -= /obj/shuttle/door/verb/open
src.verbs += /obj/shuttle/door/proc/close
src.operating = 0
src.loc.buildlinks()
return
/obj/shuttle/door/proc/close()
set src in oview(1)
src.add_fingerprint(usr)
if (src.operating)
return
src.operating = 1
flick("doorc1", src)
src.icon_state = "door1"
src.density = 1
if (src.visible)
src.opacity = 1
sleep(15)
src.verbs += /obj/shuttle/door/verb/open
src.verbs -= /obj/shuttle/door/proc/close
src.operating = 0
src.loc.buildlinks()
return
/turf/station/shuttle/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
S.buildlinks()
del(src)
return
if(2.0)
if (prob(50))
//SN src = null
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
S.buildlinks()
del(src)
return
else
return
/turf/station/shuttle/blob_act()
if(prob(20))
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
S.buildlinks()
del(src)
+568
View File
@@ -0,0 +1,568 @@
/proc/SetupOccupationsList()
var/list/new_occupations = list( )
for(var/occupation in occupations)
if (!( new_occupations.Find(occupation) ))
new_occupations[occupation] = 1
else
new_occupations[occupation] += 1
//Foreach goto(23)
occupations = new_occupations
return
/proc/DivideOccupations()
var/list/occupations1 = list( )
var/list/occupations2 = list( )
var/list/occupations3 = list( )
var/list/final_occupations = list( )
var/list/unassigned_mobs = list( )
var/list/occupation_choices = occupations.Copy()
occupation_choices = shuffle(occupation_choices)
for(var/occupation in occupations + assistant_occupations)
occupations1[occupation] = list( )
occupations2[occupation] = list( )
occupations3[occupation] = list( )
final_occupations[occupation] = list( )
//Foreach goto(78)
occupations1["Captain"] = list( )
occupations2["Captain"] = list( )
occupations3["Captain"] = list( )
final_occupations["Captain"] = list( )
for(var/mob/human/M in world)
if ((!( M.client ) || !( M.start ) || M.already_placed))
else
unassigned_mobs += M
if (M.occupation1 != "No Preference")
occupations1[M.occupation1] += M
if (M.occupation2 != "No Preference")
occupations2[M.occupation2] += M
if (M.occupation3 != "No Preference")
occupations3[M.occupation3] += M
//Foreach goto(187)
for(var/occupation in occupations)
occupations1[occupation] = shuffle(occupations1[occupation])
occupations2[occupation] = shuffle(occupations2[occupation])
occupations3[occupation] = shuffle(occupations3[occupation])
//Foreach goto(339)
occupations1["Captain"] = shuffle(occupations1["Captain"])
occupations2["Captain"] = shuffle(occupations2["Captain"])
occupations3["Captain"] = shuffle(occupations3["Captain"])
var/list/captain_choice = occupations1["Captain"]
if (captain_choice.len)
final_occupations["Captain"] = captain_choice[1]
occupation_choices -= "Captain"
unassigned_mobs -= final_occupations["Captain"]
if (!( final_occupations["Captain"] ))
captain_choice = occupations2["Captain"]
if (captain_choice.len)
final_occupations["Captain"] = captain_choice[1]
occupation_choices -= "Captain"
unassigned_mobs -= final_occupations["Captain"]
if (!( final_occupations["Captain"] ))
captain_choice = occupations3["Captain"]
if (captain_choice.len)
final_occupations["Captain"] = captain_choice[1]
occupation_choices -= "Captain"
unassigned_mobs -= final_occupations["Captain"]
if (!( final_occupations["Captain"] ))
var/list/contenders = list( )
for(var/mob/human/M in world)
if (M.client)
contenders += M
//Foreach goto(691)
var/mob/human/M = pick(contenders)
final_occupations["Captain"] = M
occupation_choices -= "Captain"
unassigned_mobs -= final_occupations["Captain"]
occupations1[text("[]", M.occupation1)] -= M
occupations2[text("[]", M.occupation2)] -= M
occupations3[text("[]", M.occupation3)] -= M
for(var/mob/human/M in unassigned_mobs)
if (assistant_occupations.Find(M.occupation1))
M.Assign_Rank(M.occupation1)
unassigned_mobs -= M
//Foreach goto(844)
for(var/occupation in occupation_choices)
var/list/L = occupations1[occupation]
if (L.len)
var/eligible = occupations[occupation]
var/multiple = eligible > 1
while(eligible--)
var/M = null
var/i = null
i = 1
while((i <= L.len && !( M )))
if (unassigned_mobs.Find(L[i]))
M = L[i]
i++
if (M)
if (multiple)
final_occupations[occupation] += M
else
final_occupations[occupation] = M
unassigned_mobs -= M
if (eligible < 1)
occupation_choices -= occupation
if ((!( occupation_choices.len ) || !( unassigned_mobs.len )))
else
//Foreach continue //goto(913)
for(var/mob/human/M in unassigned_mobs)
if (assistant_occupations.Find(M.occupation2))
M.Assign_Rank(M.occupation2)
unassigned_mobs -= M
//Foreach goto(1158)
for(var/occupation in occupation_choices)
var/list/L = occupations2[occupation]
if (L.len)
var/eligible = occupations[occupation]
var/multiple = eligible > 1
if (multiple)
var/list/X = final_occupations[occupation]
eligible -= X.len
while(eligible--)
var/M = null
var/i = null
i = 1
while((i <= L.len && !( M )))
if (unassigned_mobs.Find(L[i]))
M = L[i]
i++
if (M)
if (multiple)
final_occupations[occupation] += M
else
final_occupations[occupation] = M
unassigned_mobs -= M
if (eligible < 1)
occupation_choices -= occupation
if ((!( occupation_choices.len ) || !( unassigned_mobs.len )))
else
//Foreach continue //goto(1227)
for(var/mob/human/M in unassigned_mobs)
if (assistant_occupations.Find(M.occupation3))
M.Assign_Rank(M.occupation3)
unassigned_mobs -= M
//Foreach goto(1502)
for(var/occupation in occupation_choices)
var/list/L = occupations3[occupation]
if (L.len)
var/eligible = occupations[occupation]
var/multiple = eligible > 1
if (multiple)
var/list/X = final_occupations[occupation]
eligible -= X.len
while(eligible--)
var/M = null
var/i = null
i = 1
while((i <= L.len && !( M )))
if (unassigned_mobs.Find(L[i]))
M = L[i]
i++
if (M)
if (multiple)
final_occupations[occupation] += M
else
final_occupations[occupation] = M
unassigned_mobs -= M
if (eligible < 1)
occupation_choices -= occupation
//Foreach goto(1571)
if (unassigned_mobs.len)
unassigned_mobs = shuffle(unassigned_mobs)
for(var/mob/human/M in unassigned_mobs)
if (occupation_choices.len)
var/occupation = pick(occupation_choices)
final_occupations[occupation] = M
occupation_choices -= occupation
unassigned_mobs -= M
break ////
//Foreach goto(1846)
for(var/occupation in final_occupations)
var/mob/human/M = final_occupations[occupation]
if (ismob(M))
M.Assign_Rank(occupation)
else
if (istype(M, /list))
for(var/mob/human/E in final_occupations[occupation])
E.Assign_Rank(occupation)
//Foreach goto(2003)
//Foreach goto(1931)
for(var/mob/human/M in unassigned_mobs)
M.Assign_Rank(pick("Research Assistant", "Technical Assistant", "Medical Assistant", "Staff Assistant"))
//Foreach goto(2051)
return
/proc/shuffle(var/list/shufflelist)
if (!( shufflelist ))
return
var/list/old_list = shufflelist.Copy()
var/list/new_list = list( )
while(old_list.len)
var/item = old_list[rand(1, old_list.len)]
new_list += item
old_list -= item
return new_list
return
/world/New()
..()
spawn( 0 )
SetupOccupationsList()
return
return
/mob/human/verb/char_setup()
if (src.start)
return
src.ShowChoices()
return
/mob/human/proc/ShowChoices()
var/list/destructive = assistant_occupations.Copy()
var/dat = "<html><body>"
dat += text("<b>Name:</b> <a href=\"byond://?src=\ref[];rname=input\"><b>[]</b></a><br>", src, src.rname)
dat += text("<b>Gender:</b> <a href=\"byond://?src=\ref[];gender=input\"><b>[]</b></a><br>", src, (src.gender == "male" ? "Male" : "Female"))
dat += text("<b>Age</b> - <a href='byond://?src=\ref[];age=input'>[]</a><hr>", src, src.age)
dat += "<hr><b>Occupation Choices</b>:<br>"
if (destructive.Find(src.occupation1))
dat += text("\t<a href=\"byond://?src=\ref[];occ=1\"><b>[]</b></a><br>", src, src.occupation1)
else
if (src.occupation1 != "No Preference")
dat += text("\tFirst Choice: <a href=\"byond://?src=\ref[];occ=1\"><b>[]</b></a><br>", src, src.occupation1)
if (destructive.Find(src.occupation2))
dat += text("\tSecond Choice: <a href=\"byond://?src=\ref[];occ=2\"><b>[]</b></a><BR>", src, src.occupation2)
else
if (src.occupation2 != "No Preference")
dat += text("\tSecond Choice: <a href=\"byond://?src=\ref[];occ=2\"><b>[]</b></a><BR>", src, src.occupation2)
if (destructive.Find(src.occupation3))
dat += text("\tLast Choice: <a href=\"byond://?src=\ref[];occ=3\"><b>[]</b></a><BR>", src, src.occupation3)
else
if (src.occupation3 != "No Preference")
dat += text("\tLast Choice: <a href=\"byond://?src=\ref[];occ=3\"><b>[]</b></a><BR>", src, src.occupation3)
else
dat += text("\tLast Choice: <a href=\"byond://?src=\ref[];occ=3\">No Preference</a><br>", src)
else
dat += text("\tSecond Choice: <a href=\"byond://?src=\ref[];occ=2\">No Preference</a><br>", src)
else
dat += text("\t<a href=\"byond://?src=\ref[];occ=1\">No Preference</a><br>", src)
dat += "<hr><b>Body Data</b><br>"
dat += text("<b>Blood Type:</b> <a href='byond://?src=\ref[];b_type=input'>[]</a><br>", src, src.b_type)
dat += text("<b>Skin Tone:</b> <a href='byond://?src=\ref[];ns_tone=input'>[]/220</a><br>", src, -src.ns_tone + 35)
dat += text("<b>Hair Color:</b> <font color=\"#[][][]\">test</font><br>", num2hex(src.nr_hair, 2), num2hex(src.ng_hair, 2), num2hex(src.nb_hair))
dat += text(" <b><font color=\"#[]0000\">Red</font></b> - <a href='byond://?src=\ref[];nr_hair=input'>[]</a>", num2hex(src.nr_hair, 2), src, src.nr_hair)
dat += text(" <b><font color=\"#00[]00\">Green</font></b> - <a href='byond://?src=\ref[];ng_hair=input'>[]</a>", num2hex(src.ng_hair, 2), src, src.ng_hair)
dat += text(" <b><font color=\"#0000[]\">Blue</font></b> - <a href='byond://?src=\ref[];nb_hair=input'>[]</a>", num2hex(src.nb_hair, 2), src, src.nb_hair)
dat += text("<br> <b>Style</b> - <a href='byond://?src=\ref[];h_style=input'>[]</a>", src, src.h_style)
dat += text("<br><b>Eye Color:</b> <font color=\"#[][][]\">test</font><br>", num2hex(src.r_eyes, 2), num2hex(src.g_eyes, 2), num2hex(src.b_eyes, 2))
dat += text(" <b><font color=\"#[]0000\">Red</font></b> - <a href='byond://?src=\ref[];r_eyes=input'>[]</a>", num2hex(src.r_eyes, 2), src, src.r_eyes)
dat += text(" <b><font color=\"#00[]00\">Green</font></b> - <a href='byond://?src=\ref[];g_eyes=input'>[]</a>", num2hex(src.g_eyes, 2), src, src.g_eyes)
dat += text(" <b><font color=\"#0000[]\">Blue</font></b> - <a href='byond://?src=\ref[];b_eyes=input'>[]</a>", num2hex(src.b_eyes, 2), src, src.b_eyes)
dat += "<hr><b>Disabilities</b><br>"
dat += text("Need Glasses: <a href=\"byond://?src=\ref[];n_gl=1\"><b>[]</b></a><br>", src, (src.need_gl ? "Yes" : "No"))
dat += text("Epileptic: <a href=\"byond://?src=\ref[];b_ep=1\"><b>[]</b></a><br>", src, (src.be_epil ? "Yes" : "No"))
dat += text("Tourette Syndrome: <a href=\"byond://?src=\ref[];b_tur=1\"><b>[]</b></a><br>", src, (src.be_tur ? "Yes" : "No"))
dat += text("Chronic Cough: <a href=\"byond://?src=\ref[];b_co=1\"><b>[]</b></a><br>", src, (src.be_cough ? "Yes" : "No"))
dat += text("Stutter: <a href=\"byond://?src=\ref[];b_stut=1\"><b>[]</b></a><br>", src, (src.be_stut ? "Yes" : "No"))
dat += "<hr>"
dat += text("<a href='byond://?src=\ref[];load=1'>Load Setup</a><br>", src)
dat += text("<a href='byond://?src=\ref[];save=1'>Save Setup</a><br>", src)
dat += text("<a href='byond://?src=\ref[];reset_all=1'>Reset Setup</a><br>", src)
dat += "</body></html>"
src << browse(dat, "window=mob_occupations;size=300x600")
return
/mob/human/proc/SetChoices(occ)
if (occ == null)
occ = 1
var/HTML = "<body>"
HTML += "<tt><center>"
switch(occ)
if(1.0)
HTML += "<b>Which occupation would you like most?</b><br><br>"
if(2.0)
HTML += "<b>Which occupation would you like if you couldn't have your first?</b><br><br>"
if(3.0)
HTML += "<b>Which occupation would you like if you couldn't have the others?</b><br><br>"
else
for(var/job in uniquelist(occupations + assistant_occupations) )
HTML += text("<a href=\"byond://?src=\ref[];occ=[];job=[]\">[]</a><br>", src, occ, job, job)
//Foreach goto(105)
HTML += text("<a href=\"byond://?src=\ref[];occ=[];job=Captain\">Captain</a><br>", src, occ)
HTML += "<br>"
HTML += text("<a href=\"byond://?src=\ref[];occ=[];job=No Preference\">\[No Preference\]</a><br>", src, occ)
HTML += text("<a href=\"byond://?src=\ref[];occ=[];cancel\">\[Cancel\]</a>", src, occ)
HTML += "</center></tt>"
usr << browse(HTML, "window=mob_occupation;size=320x500")
return
/proc/uniquelist(var/list/L)
var/list/K = list()
for(var/item in L)
if(!(item in K))
K += item
return K
/mob/human/proc/SetJob(occ, job)
if (occ == null)
occ = 1
if (job == null)
job = "Captain"
if ((!( occupations.Find(job) ) && !( assistant_occupations.Find(job) ) && job != "Captain"))
return
switch(occ)
if(1.0)
if (job == src.occupation1)
usr << browse(null, "window=mob_occupation")
return
else
if (job == "No Preference")
src.occupation1 = "No Preference"
else
if (job == src.occupation2)
job = src.occupation1
src.occupation1 = src.occupation2
src.occupation2 = job
else
if (job == src.occupation3)
job = src.occupation1
src.occupation1 = src.occupation3
src.occupation3 = job
else
src.occupation1 = job
if(2.0)
if (job == src.occupation2)
src << browse(null, "window=mob_occupation")
return
else
if (job == "No Preference")
if (src.occupation3 != "No Preference")
src.occupation2 = src.occupation3
src.occupation3 = "No Preference"
else
src.occupation2 = "No Preference"
else
if (job == src.occupation1)
if (src.occupation2 == "No Preference")
src << browse(null, "window=mob_occupation")
return
job = src.occupation2
src.occupation2 = src.occupation1
src.occupation1 = job
else
if (job == src.occupation3)
job = src.occupation2
src.occupation2 = src.occupation3
src.occupation3 = job
else
src.occupation2 = job
if(3.0)
if (job == src.occupation3)
usr << browse(null, "window=mob_occupation")
return
else
if (job == "No Preference")
src.occupation3 = "No Preference"
else
if (job == src.occupation1)
if (src.occupation3 == "No Preference")
src << browse(null, "window=mob_occupation")
return
job = src.occupation3
src.occupation3 = src.occupation1
src.occupation1 = job
else
if (job == src.occupation2)
if (src.occupation3 == "No Preference")
src << browse(null, "window=mob_occupation")
return
job = src.occupation3
src.occupation3 = src.occupation2
src.occupation2 = job
else
src.occupation3 = job
else
src.ShowChoices()
src << browse(null, "window=mob_occupation")
return
/mob/human/proc/Assign_Rank(rank)
if (rank == "Captain")
world << text("<b>[] is the captain!</b>", src)
if (!( src.w_radio ))
var/obj/item/weapon/radio/headset/H = new /obj/item/weapon/radio/headset( src )
src.w_radio = H
H.layer = 20
if (!( src.back ))
var/obj/item/weapon/storage/backpack/H = new /obj/item/weapon/storage/backpack( src )
src.back = H
H.layer = 20
if (!( src.glasses ))
if (src.disabilities & 1)
var/obj/item/weapon/clothing/glasses/regular/G = new /obj/item/weapon/clothing/glasses/regular( src )
src.glasses = G
G.layer = 20
if ((!( src.belt ) && src.w_uniform))
var/obj/item/weapon/radio/signaler/S = new /obj/item/weapon/radio/signaler( src )
src.belt = S
S.layer = 20
if ((!( src.r_store ) && src.w_uniform))
var/obj/item/weapon/pen/S = new /obj/item/weapon/pen( src )
src.r_store = S
S.layer = 20
if ((src.client && !( src.wear_id ) && src.w_uniform))
var/obj/item/weapon/card/id/C = new /obj/item/weapon/card/id( src )
src.wear_id = C
C.assignment = rank
C.layer = 20
C.registered = src.rname
switch(C.assignment)
if("Research Assistant")
C.access_level = 1
C.lab_access = 1
C.engine_access = 0
C.air_access = 0
if("Technical Assistant")
C.access_level = 1
C.lab_access = 0
C.engine_access = 1
C.air_access = 0
if("Staff Assistant")
C.access_level = 2
C.lab_access = 0
C.engine_access = 0
C.air_access = 0
if("Medical Assistant")
if (!( src.l_hand ))
var/obj/item/weapon/storage/firstaid/regular/W = new /obj/item/weapon/storage/firstaid/regular( src )
src.l_hand = W
W.layer = 20
src.UpdateClothing()
C.access_level = 1
C.lab_access = 1
C.engine_access = 0
C.air_access = 0
if("Engineer")
if (!( src.l_hand ))
var/obj/item/weapon/storage/toolbox/W = new /obj/item/weapon/storage/toolbox( src )
src.l_hand = W
W.layer = 20
src.UpdateClothing()
C.access_level = 2
C.lab_access = 1
C.engine_access = 3
C.air_access = 0
if("Research Technician")
C.access_level = 2
C.lab_access = 3
C.engine_access = 0
C.air_access = 0
if("Forensic Technician")
C.access_level = 3
C.lab_access = 2
C.engine_access = 0
C.air_access = 0
if("Medical Doctor")
if (!( src.l_hand ))
var/obj/item/weapon/storage/firstaid/regular/W = new /obj/item/weapon/storage/firstaid/regular( src )
src.l_hand = W
W.layer = 20
src.UpdateClothing()
C.access_level = 2
C.lab_access = 0
C.engine_access = 0
C.air_access = 0
if("Prison Doctor")
if (!( src.l_hand ))
var/obj/item/weapon/storage/firstaid/regular/W = new /obj/item/weapon/storage/firstaid/regular( src )
src.l_hand = W
W.layer = 20
src.UpdateClothing()
C.access_level = 3
C.lab_access = 0
C.engine_access = 0
C.air_access = 0
if("Captain")
C.access_level = 5
C.air_access = 5
C.engine_access = 5
C.lab_access = 5
if("Security Officer")
if (!( src.l_hand ))
var/obj/item/weapon/handcuffs/W = new /obj/item/weapon/handcuffs( src )
src.l_hand = W
W.layer = 20
src.UpdateClothing()
C.access_level = 3
C.lab_access = 0
C.engine_access = 0
C.air_access = 0
if("Prison Security")
if (!( src.l_hand ))
var/obj/item/weapon/handcuffs/W = new /obj/item/weapon/handcuffs( src )
src.l_hand = W
W.layer = 20
src.UpdateClothing()
C.access_level = 3
C.lab_access = 0
C.engine_access = 0
C.air_access = 0
if("Medical Researcher")
C.access_level = 2
C.lab_access = 5
C.engine_access = 0
C.air_access = 0
if("Toxin Researcher")
C.access_level = 2
C.lab_access = 5
C.engine_access = 0
C.air_access = 0
if("Head of Research")
C.access_level = 4
C.air_access = 2
C.engine_access = 2
C.lab_access = 5
if("Head of Personnel")
C.access_level = 4
C.air_access = 2
C.engine_access = 2
C.lab_access = 4
if("Prison Warden")
C.access_level = 4
C.air_access = 2
C.engine_access = 2
C.lab_access = 4
if("Station Technician")
if (!( src.l_hand ))
var/obj/item/weapon/storage/toolbox/W = new /obj/item/weapon/storage/toolbox( src )
src.l_hand = W
W.layer = 20
src.UpdateClothing()
C.access_level = 2
C.lab_access = 0
C.engine_access = 2
C.air_access = 3
if("Atmospheric Technician")
C.access_level = 3
C.lab_access = 0
C.engine_access = 0
C.air_access = 4
else
C.name = text("[]'s ID Card ([]>[]-[]-[])", C.registered, C.access_level, C.lab_access, C.engine_access, C.air_access)
src << text("<B>You are the [].</B>", C.assignment)
var/obj/S = locate(text("start*[]", C.assignment))
if ((istype(S, /obj/start) && istype(S.loc, /turf) && !( ctf )))
src << "\blue <B>You have been teleported to your new starting location!</B>"
src.loc = S.loc
return
+99
View File
@@ -0,0 +1,99 @@
/*
/datum/sun
var/angle
var/dx
var/dy
*/
/datum/sun/New()
rate = rand(75,125)/100 // 75% - 125% of standard rotation
if(prob(50))
rate = -rate
// calculate the sun's position given the time of day
/datum/sun/proc/calc_position()
counter++
if(counter<50) // count 50 pticks (50 seconds, roughly - about a 5deg change)
return
counter = 0
angle = ((rate*world.realtime/100)%360 + 360)%360 // gives about a 60 minute rotation time
// now 45 - 75 minutes, depending on rate
// now calculate and cache the (dx,dy) increments for line drawing
var/s = sin(angle)
var/c = cos(angle)
if(c == 0)
dx = 0
dy = s
else if( abs(s) < abs(c))
dx = s / abs(c)
dy = c / abs(c)
else
dx = s/abs(s)
dy = c / abs(s)
for(var/obj/machinery/power/solar/S in machines)
occlusion(S)
// for a solar panel, trace towards sun to see if we're in shadow
/datum/sun/proc/occlusion(var/obj/machinery/power/solar/S)
var/ax = S.x // start at the solar panel
var/ay = S.y
for(var/i = 1 to 20) // 20 steps is enough
ax += dx // do step
ay += dy
var/turf/T = locate( round(ax,0.5),round(ay,0.5),S.z)
if(T.x == 1 || T.x==world.maxx || T.y==1 || T.y==world.maxy) // not obscured if we reach the edge
break
if(T.density) // if we hit a solid turf, panel is obscured
S.obscured = 1
return
S.obscured = 0 // if hit the edge or steped 20 times, not obscured
S.updatefrac()
//returns the north-zero clockwise angle in degrees, given a direction
/proc/dir2angle(var/D)
switch(D)
if(1)
return 0
if(2)
return 180
if(4)
return 90
if(8)
return 270
if(5)
return 45
if(6)
return 135
if(9)
return 315
if(10)
return 225
else
return null
+335
View File
@@ -0,0 +1,335 @@
/datum/vote/New()
nextvotetime = world.timeofday // + 10*config.votedelay
/datum/vote/proc/canvote()
var/excess = world.timeofday - vote.nextvotetime
if(excess < -10000) // handle clock-wrapping problems - very long delay (>20 hrs) if wrapped
vote.nextvotetime = world.timeofday
return 1
return (excess >= 0)
/datum/vote/proc/nextwait()
return timetext( round( (nextvotetime - world.timeofday)/10) )
/datum/vote/proc/endwait()
return timetext( round( (votetime - world.timeofday)/10) )
/datum/vote/proc/timetext(var/interval)
var/minutes = round(interval / 60)
var/seconds = round(interval % 60)
var/tmin = "[minutes>0?num2text(minutes)+"min":null]"
var/tsec = "[seconds>0?num2text(seconds)+"sec":null]"
if(tmin && tsec) // hack to skip inter-space if either field is blank
return "[tmin] [tsec]"
else
if(!tmin && !tsec) // return '0sec' if 0 time left
return "0sec"
return "[tmin][tsec]"
/datum/vote/proc/getvotes()
var/list/L = list()
for(var/mob/M in world)
if(M.client && M.client.inactivity < 1200) // clients inactive for 2 minutes don't count
L[M.client.vote] += 1
return L
/datum/vote/proc/endvote()
if(!voting) // means that voting was aborted by an admin
return
world << "\red <B>***Voting has closed.</B>"
if(config.logvote) world.log << "VOTE: Voting closed, result was [winner]"
voting = 0
nextvotetime = world.timeofday + 10*config.votedelay
for(var/mob/M in world) // clear vote window from all clients
if(M.client)
M << browse(null, "window=vote")
M.client.showvote = 0
calcwin()
if(mode)
var/wintext = upperfirst(winner)
if(winner=="default")
world << "Result is \red No change."
return
// otherwise change mode
world << "Result is change to \red [wintext]"
// write resulting mode to savefile
var/F = file(persistent_file)
fdel(F)
F << winner
if(ticker)
world <<"\red <B>World will reboot in 10 seconds</B>"
sleep(100)
if(config.loggame) world.log << "GAME: Rebooting due to mode vote "
world.Reboot()
else
master_mode = winner
else
if(winner=="default")
world << "Result is \red No restart."
return
world << "Result is \red Restart round."
world <<"\red <B>World will reboot in 5 seconds</B>"
sleep(50)
if(config.loggame) world.log << "GAME: Rebooting due to restart vote"
world.Reboot()
return
/datum/vote/proc/calcwin()
var/list/votes = getvotes()
if(vote.mode)
var/best = -1
for(var/v in votes)
if(v=="none")
continue
if(best < votes[v])
best = votes[v]
var/list/winners = list()
for(var/v in votes)
if(votes[v] == best)
winners += v
var/ret = ""
for(var/w in winners)
if(lentext(ret) > 0)
ret += "/"
if(w=="default")
winners = list("default")
ret = "No change"
break
else
ret += upperfirst(w)
if(winners.len != 1)
ret = "Tie: " + ret
if(winners.len == 0)
vote.winner = "default"
ret = "No change"
else
vote.winner = pick(winners)
return ret
else
if(votes["default"] < votes["restart"])
vote.winner = "restart"
return "Restart"
else
vote.winner = "default"
return "No restart"
/mob/verb/vote()
usr.client.showvote = 1
var/text = "<HTML><HEAD><TITLE>Voting</TITLE></HEAD><BODY scroll=no>"
var/footer = "<HR><A href='?src=\ref[vote];voter=\ref[src];vclose=1'>Close</A></BODY></HTML>"
if(config.votenodead && usr.stat == 2)
text += "Voting while dead has been disallowed."
text += footer
usr << browse(text, "window=vote")
usr.client.showvote = 0
usr.client.vote = "none"
return
if(vote.voting)
// vote in progress, do the current
text += "Vote to [vote.mode?"change mode":"restart round"] in progress.<BR>"
text += "[vote.endwait()] until voting is closed.<BR>"
var/list/votes = vote.getvotes()
if(vote.mode) // true if changing mode
text += "Current game mode is: <B>[master_mode]</B>.<BR>Select the mode to change to:<UL>"
for(var/md in vote.vmodes)
var/disp = upperfirst(md)
if(md=="default")
disp = "No change"
//world << "[md]|[disp]|[src.client.vote]|[votes[md]]"
if(src.client.vote == md)
text += "<LI><B>[disp]</B>"
else
text += "<LI><A href='?src=\ref[vote];voter=\ref[src];vote=[md]'>[disp]</A>"
text += "[votes[md]>0?" - [votes[md]] vote\s":null]<BR>"
text += "</UL>"
text +="<p>Current winner: <B>[vote.calcwin()]</B><BR>"
text += footer
usr << browse(text, "window=vote")
else // voting to restart
text += "Restart the world?<BR><UL>"
var/list/VL = list("default","restart")
for(var/md in VL)
var/disp = (md=="default"? "No":"Yes")
if(src.client.vote == md)
text += "<LI><B>[disp]</B>"
else
text += "<LI><A href='?src=\ref[vote];voter=\ref[src];vote=[md]'>[disp]</A>"
text += "[votes[md]>0?" - [votes[md]] vote\s":null]<BR>"
text += "</UL>"
text +="<p>Current winner: <B>[vote.calcwin()]</B><BR>"
text += footer
usr << browse(text, "window=vote")
else //no vote in progress
if(!config.allowvoterestart && !config.allowvotemode)
text += "<P>Player voting is disabled.</BODY></HTML>"
usr << browse(text, "window=vote")
usr.client.showvote = 0
return
if(!vote.canvote()) // not time to vote yet
if(config.allowvoterestart) text+="Voting to restart is enabled.<BR>"
if(config.allowvotemode) text+="Voting to change mode is enabled.<BR>"
text+="<BR><P>Next vote can begin in [vote.nextwait()]."
text+=footer
usr << browse(text, "window=vote")
else // voting can begin
if(config.allowvoterestart)
text += "<A href='?src=\ref[vote];voter=\ref[src];vmode=1'>Begin restart vote.</A><BR>"
if(config.allowvotemode)
text += "<A href='?src=\ref[vote];voter=\ref[src];vmode=2'>Begin change mode vote.</A><BR>"
text += footer
usr << browse(text, "window=vote")
spawn(20)
if(usr.client && usr.client.showvote)
usr.vote()
else
usr << browse(null, "window=vote")
return
/datum/vote/Topic(href, href_list)
..()
var/mob/M = locate(href_list["voter"]) // mob of player that clicked link
if(href_list["vclose"])
if(M)
M << browse(null, "window=vote")
M.client.showvote = 0
return
if(href_list["vmode"])
if(vote.voting)
return
if(!vote.canvote() ) // double check even though this shouldn't happen
return
vote.mode = text2num(href_list["vmode"])-1 // hack to yield 0=restart, 1=changemode
vote.voting = 1 // now voting
vote.votetime = world.timeofday + config.voteperiod*10 // when the vote will end
spawn(config.voteperiod*10)
vote.endvote()
world << "\red<B>*** A vote to [vote.mode?"change game mode":"restart"] has been initiated by [M.key].</B>"
world << "\red You have [vote.timetext(config.voteperiod)] to vote."
if(config.logvote) world.log << "VOTE: Voting to [vote.mode?"change mode":"restart round"] started by [M.name]/[M.key]"
for(var/mob/CM in world)
if(CM.client)
if(config.votenodefault || (config.votenodead && CM.stat == 2))
CM.client.vote = "none"
else
CM.client.vote = "default"
if(M) M.vote()
return
return
if(href_list["vote"] && vote.voting)
if(M)
M.client.vote = href_list["vote"]
//world << "Setting client [M.key]'s vote to: [href_list["vote"]]."
M.vote()
return
+384
View File
@@ -0,0 +1,384 @@
/obj/machinery/computer/teleporter/New()
src.id = text("[]", rand(1000, 9999))
..()
return
/obj/machinery/computer/teleporter/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(58)
src.icon_state = "broken"
if(3.0)
if (prob(25))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(109)
src.icon_state = "broken"
else
return
/obj/machinery/computer/teleporter/verb/lock_in(freq as num)
set src in oview(1)
set desc = "Frequency to check"
if(stat & (NOPOWER|BROKEN) )
return
var/list/L = list( )
for(var/obj/item/weapon/radio/R in world)
if (R.freq != freq)
continue //goto(26)
var/turf/T = src.find_loc(R)
if (!( T ))
continue //goto(26)
var/t1 = text("-[],[],[]", T.x, T.y, T.z)
t1 = text("[][]", R.text, t1)
L[t1] = R
//Foreach goto(26)
var/t1 = input("Please select a location to lock in.", "Locking Computer", null, null) in L
var/R = L[t1]
if ((prob(30) || istype(R, /obj/item/weapon/radio/beacon) && prob(50)))
src.locked = src.find_loc(R)
else
if (L.len)
R = L[text("[]", pick(L))]
src.locked = src.find_loc(R)
else
src.locked = null
for(var/mob/O in hearers(src, null))
O.show_message("\blue Locked In", 2)
//Foreach goto(270)
src.add_fingerprint(usr)
return
/obj/machinery/computer/teleporter/verb/set_id(t as text)
set src in oview(1)
set desc = "ID Tag:"
if(stat & (NOPOWER|BROKEN) )
return
if (t)
src.id = t
return
/obj/machinery/computer/teleporter/proc/find_loc(obj/R as obj)
if (!( R ))
return null
var/turf/T = R.loc
while(!( istype(T, /turf) ))
T = T.loc
if(!T)
return null
if (istype(T, /area))
return null
return T
return
/obj/machinery/computer/data/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(58)
src.icon_state = "broken"
if(3.0)
if (prob(25))
for(var/x in src.verbs)
src.verbs -= x
//Foreach goto(109)
src.icon_state = "broken"
else
return
/obj/machinery/computer/data/weapon/log/New()
..()
src.topics["Super-heater"] = "This turns a can of semi-liquid plasma into a super-heated ball of plasma."
src.topics["Amplifier"] = "This increases the intensity of a laser."
src.topics["Class 11 Laser"] = "This creates a very slow laser that is capable of penetrating most objects."
src.topics["Plasma Energizer"] = "This combines super-heated plasma with a laser beam."
src.topics["Generator"] = "This controls the entire power grid."
src.topics["Mirror"] = "this can reflect LOW power lasers. HIGH power goes through it!"
src.topics["Targetting Prism"] = "This focuses a laser coming from any direction forward."
return
/obj/machinery/computer/data/weapon/log/display()
set src in oview(1)
usr << "<B>Research Log:</B>"
..()
return
/obj/machinery/computer/data/weapon/info/New()
..()
src.topics["LOG(001)"] = "System: Deployment successful"
src.topics["LOG(002)"] = "System: Safe orbit at inclination .003 established"
src.topics["LOG(003)"] = "CenCom: Attempting test fire...ALERT(001)"
src.topics["ALERT(001)"] = "System: Cannot attempt test fire"
src.topics["LOG(004)"] = "System: Airlock accessed..."
src.topics["LOG(005)"] = "System: System successfully reset...Generator engaged"
src.topics["LOG(006)"] = "Physical: Super-heater (W005) added to power grid"
src.topics["LOG(007)"] = "Physical: Amplifier (W007) added to power grid"
src.topics["LOG(008)"] = "Physical: Plasma Energizer (W006) added to power grid"
src.topics["LOG(009)"] = "Physical: Laser (W004) added to power grid"
src.topics["LOG(010)"] = "Physical: Laser test firing"
src.topics["LOG(011)"] = "Physical: Plasma added to Super-heater"
src.topics["LOG(012)"] = "Physical: Orient N12.525,E22.124"
src.topics["LOG(013)"] = "System: Location N12.525,E22.124"
src.topics["LOG(014)"] = "Physical: Test fire...successful"
src.topics["LOG(015)"] = "Physical: Airlock accessed..."
src.topics["LOG(016)"] = "******: Disable locater systems"
src.topics["LOG(017)"] = "System: Locater Beacon-Disengaged,CenCom link-Cut...ALERT(002)"
src.topics["ALERT(002)"] = "System: Cannot seem to establish contact with Central Command"
src.topics["LOG(018)"] = "******: Shutting down all systems...ALERT(003)"
src.topics["ALERT(003)"] = "System: Power grid failure-Activating back-up power...ALERT(004)"
src.topics["ALERT(004)"] = "System: Engine failure...All systems deactivated."
return
/obj/machinery/computer/data/weapon/info/display()
set src in oview(1)
usr << "<B>Research Information:</B>"
..()
return
/obj/machinery/computer/data/verb/display()
set src in oview(1)
for(var/x in src.topics)
usr << text("[], \...", x)
//Foreach goto(19)
usr << ""
src.add_fingerprint(usr)
return
/obj/machinery/computer/data/verb/read(topic as text)
set src in oview(1)
if (src.topics[text("[]", topic)])
usr << text("<B>[]</B>\n\t []", topic, src.topics[text("[]", topic)])
else
usr << text("Unable to find- []", topic)
src.add_fingerprint(usr)
return
/obj/machinery/teleport/hub/Bumped(M as mob|obj)
spawn( 0 )
if (src.icon_state == "tele1")
teleport(M)
use_power(5000)
return
return
/obj/machinery/teleport/hub/proc/teleport(atom/movable/M as mob|obj)
var/atom/l = src.loc
var/obj/machinery/computer/teleporter/com = locate(/obj/machinery/computer/teleporter, locate(l.x - 2, l.y, l.z))
if (!( com ))
return
var/atom/target = com.locked
if (!( com.locked ))
for(var/mob/O in hearers(src, null))
O.show_message("\red Failure: Cannot authenticate locked on coordinates. Please reinstantiat coordinate matrix.", 1, "\red Error!", 2)
//Foreach goto(80)
return
var/obj/effects/sparks/O = new /obj/effects/sparks( target )
O.dir = pick(1, 2, 4, 8)
spawn( 0 )
O.Life()
return
if (istype(M, /atom/movable))
if (rand(1, 1000) == 7)
M << "\red You see a fainting blue light."
M.loc = null
else
var/tx = target.x + rand(-2.0, 2)
var/ty = target.y + rand(-2.0, 2)
tx = max(min(tx, world.maxx), 1)
ty = max(min(ty, world.maxy), 1)
M.loc = locate(tx, ty, target.z)
else
for(var/mob/B in hearers(src, null))
B.show_message("\blue Test fire completed.", 2)
//Foreach goto(316)
return
/obj/machinery/teleport/station/verb/engage()
set src in oview(1)
if(stat & NOPOWER) return
var/atom/l = src.loc
var/atom/com = locate(/obj/machinery/teleport/hub, locate(l.x + 1, l.y, l.z))
if (com)
com.icon_state = "tele1"
use_power(5000)
for(var/mob/O in hearers(src, null))
O.show_message("\blue Teleporter engaged!", 2)
//Foreach goto(70)
src.add_fingerprint(usr)
return
/obj/machinery/teleport/station/verb/disengage()
set src in oview(1)
if(stat & NOPOWER) return
var/atom/l = src.loc
var/atom/com = locate(/obj/machinery/teleport/hub, locate(l.x + 1, l.y, l.z))
if (com)
com.icon_state = "tele0"
for(var/mob/O in hearers(src, null))
O.show_message("\blue Teleporter disengaged!", 2)
//Foreach goto(70)
src.add_fingerprint(usr)
return
/obj/machinery/teleport/station/verb/testfire()
set src in oview(1)
if(stat & NOPOWER) return
var/atom/l = src.loc
var/obj/machinery/teleport/hub/com = locate(/obj/machinery/teleport/hub, locate(l.x + 1, l.y, l.z))
if (com && !active)
active = 1
for(var/mob/O in hearers(src, null))
O.show_message("\blue Test firing!", 2)
//Foreach goto(60)
com.teleport()
use_power(5000)
spawn(30)
active=0
src.add_fingerprint(usr)
return
/obj/machinery/teleport/station/power_change()
..()
if(stat & NOPOWER)
icon_state = "controller-p"
var/obj/machinery/teleport/hub/com = locate(/obj/machinery/teleport/hub, locate(x + 1, y, z))
if(com)
com.icon_state = "tele0"
else
icon_state = "controller"
/obj/effects/smoke/proc/Life()
if (src.amount > 1)
var/obj/effects/smoke/W = new src.type( src.loc )
W.amount = src.amount - 1
W.dir = src.dir
spawn( 0 )
W.Life()
return
src.amount--
if (src.amount <= 0)
sleep(50)
//SN src = null
del(src)
return
var/turf/T = get_step(src, turn(src.dir, pick(90, 0, 0, -90.0)))
if ((T && T.density))
src.dir = turn(src.dir, pick(-90.0, 90))
else
step_to(src, T, null)
T = src.loc
if (istype(T, /turf))
T.firelevel = T.poison
spawn( 3 )
src.Life()
return
return
/obj/effects/sparks/proc/Life()
if (src.amount > 1)
var/obj/effects/sparks/W = new src.type( src.loc )
W.amount = src.amount - 1
W.dir = src.dir
spawn( 0 )
W.Life()
return
src.amount--
if (src.amount <= 0)
sleep(50)
//SN src = null
del(src)
return
var/turf/T = get_step(src, turn(src.dir, pick(90, 0, 0, -90.0)))
if ((T && T.density))
src.dir = turn(src.dir, pick(-90.0, 90))
else
step_to(src, T, null)
T = src.loc
if (istype(T, /turf))
T.firelevel = T.poison
spawn( 3 )
src.Life()
return
return
/obj/effects/sparks/New()
..()
var/turf/T = src.loc
if (istype(T, /turf))
T.firelevel = T.poison
return
/obj/effects/sparks/Del()
var/turf/T = src.loc
if (istype(T, /turf))
T.firelevel = T.poison
..()
return
/obj/effects/sparks/Move()
..()
var/turf/T = src.loc
if (istype(T, /turf))
T.firelevel = T.poison
return
/obj/laser/Bump()
src.range--
return
/obj/laser/Move()
src.range--
return
/atom/proc/laserhit(L as obj)
return 1
return
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 804 B

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

+121
View File
@@ -0,0 +1,121 @@
<HTML><BODY><CENTER><FONT size = 3><B>Space Station 13</B></FONT><BR>
By: Exadv1</CENTER><BR>
<HR>
<B>Overview</B><BR>
Space Station 13 was written on BYOND. Like a majority of BYOND games it is two dimensional with a top-down view. It uses tile-based movement. Space Station 13 (or SS13 for short) starts you on a space station orbitting a very peculiar gaseous planet in a binary star system. Threoughout a round many disasters will probably occur from meteor attacks to internal disasters such as a traitor. The game is constantly being developed so eventually more disasters will occur such as pathogens, re-entry, and raiders.<BR>
<HR>
<B>Objectives</B><BR>
The primary objective in most modes of Space Station 13 is survival. You must stay alive long enough to escape. Now when you first start the game you shouldn't immediately try to escape! You should try and prevent disaster for as long as you can. Eventually you will be able to perform various experiments on-board SS13 between disasters (medical experiments, atmospheric experiments, and plasma experiments). Also depending on the mode there may be more objectives.<BR>
<HR>
<B>Modes</B><BR>
<B>Traitor</B> - In traitor mode there is a traitor aboard the space station. The objective of the traitor is to be the last person aboard the shuttle when it departs destroying anything or anyone in your way. The objective of everyone else to survive and attempt to pinpoint who the traitor is and stop them.<BR>
<BR>
<B>Meteor</B> - In meteor mode the objective is to escape and see how long you can ride out the meteor storm. This is very challenging and you are given no precious time to prepare for disaster.<BR>
<B>Monkey</B> - In monkey a mode a extremely mutagenous retrovirus has infected the ship. The goal as a human is to escape on the shuttle to warn the rest of the world. The monkies must infect the rest of the crew and stop them. Future modes will allow the humans to examine exactly what the virus is and apply that knowledge.<BR>
<BR>
<B>Secret</B> - This mode chooses randomly between all the modes (or just nothing). This is the default mode and generally produces the best gameplay.<BR>
<BR>
<I>Proposed Modes</I><BR>
Space Raiders- A group of combatants are trying to raid the station and gather a list of items to escape to their station with.<BR>
Alien- A parasitic organism has infected a crew member. The crew must stay uninfected while the infected people must try and infect the others.<BR>
Orbital Failure- The engine/reactor system is failng and you must regain a safe orbit or plummet into the gaseous planet.<BR>
...<BR>
<HR>
<B>Getting around</B><BR>
The interface for Space Station 13 is largely click driven. When I refer to attacking I am referring to double clicking.<BR>
<B>Getting Started (A Quick jump-start guide to get into the game)</B><BR>
You must select your preferences then go over the begin object and get ready. (use ready verb)<BR>
If you want to you can go to SS13 by using enter.<BR>
If you don't and the game hasn't started yet you'll still be automatically teleported.<BR>
<I>Movement</I><BR>
Movement on SS13 is only in the 4 cardinal directions. The diagonal directions throw/drop items, switch hand/modes. If you move into a dense object you first try to push it. Not all items can be pushed. You can also right click on an object and select 'pull' and then every movement you make will ttempt to drag that object behind you. If you wish to stop pulling you must go onto your on-screen display and find the object with a person in a box. Click on it and you will stop pulling. If you ever desire to make sure of which direction you are facing use .center and then try to move what direction you want to face.<BR>
<I>'Equipping'</I><BR>
You 'equip' items in SS13 by picking them up. In order to pick an item up all you must do is attack it with a free hand. Now you hae two hands. Which hand is being used is indicated by the blue button in the lower-left area of your HUD. You can change hands by clicking the hand button or pressing the .northeast macro. You can then also then transfer that item to another part of your body. In order to do this you just attack the green box (or blue storage box) on your hud that you would like to move it to. In order to 'unequip' a equipped item that is not in your hand. Get a free hand and attack the item. Then in order to drop an item in your hand (and make it a free hand again) click the drop button (or throw to throw the item wherever you are facing).<BR>
<I>Talking</I><BR>
Talking on SS13 is still via the say verb so the normal say speech bubble on the command line will still work. Please note however that you can whisper. More on this in the items selection under radio, intercoms, and headsets. There are a lot of emotes that are accessed by preceding your text with a '*'. To view a list of available emotes for your character use the type '*help' into the say menu.<BR>
<I>Taking Items/Giving Items</I><BR>
You can take items from people by dragging their mob onto your mob. A screen will pop up. From this screen you can select an object to remove from them. If you select a 'Nothing' slot then you will attempt to equip that slot with the object you are holding.
<I>Death</I><BR>
If you are dead then you can use the watch verb to look through the eyes of another mob. Depending on circumstances you can use abandon mob to restart (leaving that box blank gives you a random name). A dead person hears everything that is said but might not hear all attack message dialog.<BR>
<HR>
<FONT size = 4><B>The Items</B></FONT><BR>
If it has a [stackable-x]. This means that if you attack another item of its type with it then you will gather more items on its stack until you hit x items. you can usually see how much is on the stack by right clicking and selecting examine.<BR>
<BR>
<B>Analyzer</B> - Attacking this item with itself (having it equipped then using .southeast, mode, or double clicking it) shows the oxygen, carbon dioxide, and plasma content of the tile you are standing on.<BR>
<BR>
<B>Bottle</B> - This item stores chemicals (60 cubic centimeters). You must use a syringe to draw chemicals from it. You can however pour bottles into bottles by attacking a bottle with another bottle.<BR>
<BR>
<B>Brute Pack</B> [stackable-5] - This item can be used to treat damage done by brute force weapons or piercing weapons. A mix of biodegradable experimental nanites cures most damage almost instantly amone contact.<BR>
<BR>
<B>Card (identification)</B> - Every crew member besides are issued this card. At game start they are given this card and a position (random) aboard Space Station 13. Late joiners get the hyper boring job of Researcher's Assisstant and must have their card filled by the captain at an identification computer. You can wear this card so that every door you walk through will open and close. (on security doors (has the black tab) you automatically try to use your card). You can also equip it and attack a door and it will stay open or stay closed. Also if you are wearing a card that is not yours then your name will be whoever the card is registered to. This however can be considered a crime and grounds for being arrested and punished.<BR>
<BR>
<B>Clothing</B> - This has its own section at the bottom. This includes masks and suits.<BR>
<BR>
<B>Fire Extinguisher</B> - This when you have equipped you can then attack anything besides a person (which can knock them unconscious) will release an anti-fire chemical which eventually helps greatly in stopping a fire. Yuo can refill this by attacking a water-tank and it will refill its 20 units. Right click on it and select examine to see how many units are left.<BR><BR>
<B>Flasks</B> - These contain a large mixture of chemicals (liquid) that are used for cryogenic healing. More on this later.<BR>
<BR>
<B>Handcuffs</B> - These are used for general detainment. It takes 3 uninterrupted (no movement AT ALL) seconds in order to place them on a person. These prevent the person from dong anything with their hands and allow you to remove things from them without resistance (they normally would need to be unconscious). you can rmeove handcuffs by either removing them via the right click option or by double clicking them with a free hand.<BR>
<BR>
<B>Health analyzer</B> - This when you attack a target will give you the overall health and type of damage the target has occurred. note that this only gives physical health and not (role-played) mental health.<BR>
<BR>
<B>Ointment</B> [stackable-5] - This like bruise packs allow you to heal your and other people's damage due to fire (or a welder that is on).<BR>
<BR>
<B>Paper</B> - Double clicking on this will give you its text which can sometimes be very helpful. Various things not in this document are detailed on the papers such as job positions, chemical information, and an old map.<BR>
<BR>
<B>Parts</B> - Table and rack parts. I'm not going to explaion these seperate so just attack themselves and you will construct a rack or get the box for a table. Using a wrench on these I believe converts them to its original metal.<BR>
<BR>
<B>Radios/Headset/Intercom</B> - These are the general method for communication aboard SS13. In order to best use a radio you must either attack itself (this means for headsets you must take them OFF your head first) or if its an intercom attack it with a free hand. This will bring up its control box where you can select a frequency to transmit/receive on (It's very simple - You receive and transmit messages only if you are on that frequency). You can also select whether to hear messages (speaker). Having this off still let's you broadcast but you won't hear yourself broadcast or any responses from others. You can also select having it automatically boradcast. This is most important for intercoms. This means that whenever it hears something via say or a whisper it will send it broadcast it. If you have it off you can still use it prefixing your say with [h] (for head), [l] (for left hand), or [r] (for right hand). This also will whisper what you are saying to those in the tiles adjacent to you.<BR>
<BR>
<B>Rods</B> [stackable-6] - These are like the parts and when you attack them with themselves they will either construct a grille (need 2) or repair a grille (only 1). Unlike the parts these can be used as an OK weapon.<BR>
<BR>
<B>Screwdriver</B> - This item is able to help fasten and unfasten items. It can fasten canisters to connecters, tables to floors, and grilles to floors. It can also unfasten them as well. You can attack with this weapon but there is no chance of knocknig them unconscious. (besides making them bleed to death)<BR>
<BR>
<B>Shards</B> - This glass item can be converted into glass by using a welding tool. Until then it is an unstackable weapon. They can cause a little piercing damage.<BR>
<BR>
<B>Sheets</B> [stackable-5] - These are like rods except that the glass sheets build windows and the metal sheets build MANY things. All you must do is attack self.<BR>
<BR>
<B>Storage Containers (first aid kits and toolboxes)</B> - These allow you to store items into them to allow easier transportation of a lot of items. You cannot store storage containers in storage containers no matter what the sizes are. Also certsin things can't go in ccertain containers because of their size. Most containers hold 7 items. You can open a container in 2 ways. Drag it onto yourself or equip it in one hand then attack it with a free hand. You can then remove items by attackng them with a free hand. Then when you've removed the item close the container by double clicking on the big red close X. You place items in the container by attacking it. They automatically go in unless they don't fit.<BR>
<BR>
<B>Syringe</B> - This object is capable of injecting chemicals into a targets bloodstream. It can also be used for precise mixing of bottles wherejust pouring is too inaccurate. It injects and draws in increments of 5 cubic centimeters. Attack it with itself to change the mode from inject to draw and vice versa. See the chemical information paper for information on the chemicals.<BR>
<BR>
<B>Tanks</B> - These plain and simple hold gases. The 2 types of tanks come prestocked with either oxygen or plasma. you can attach these to a siphon or canister for refillng by attacking it. This is one of the few items that CAN be worn on your back. Also if you have a gas mask on you can attack the tank with itself in order to switch your internals on. This puts you on an external atmosphere and lets you traverse highly toxic or low oxygen environments without fear of being injured. They also make a great item for attacking. It is a good idea to turn on internals then put them on your back so they are out of your way though. See the canisters sections for more information on refilling.<BR>
<BR>
<B>Tile</B> [stackable-10]- These are like the rods except that they build or repair floor tiles. (only one tile regardless)<BR>
<BR>
<B>Welding Tool (or Welder)</B> - This has two modes swapped by attacking itself. When its off its like a wrench except it won't deconstruct. When its on it will cause piercing fire damage. It also can slice canisters open releasing their contents. It also can be used to weld open the plating on a wall, cut grilles, form chards into sheets, and many other things. Be warned that using this in a high plasma environment may ignite the highly flammable plasma! Most actions with this use up fuel which can be refilled by attacking a welding fuel tank and cghecked by using the examine verb.<BR>
<BR>
<B>Wirecutters</B> - These can be used to cut wires on electronic devices. They can also easily cut grilles open<BR>
<BR>
<B>Wrench</B> - This item performs a variety of functions that largely deal with deconstruction. Attacking a chair, stool, table, rack, or wall girders will deconstruct them into eith metal sheets, table parts, or rack parts. It's also not too bad as an item to club an assailant over the head. (You can knock them unconscious) Since they disassemble tables and racks in order to place them on the table drag them over to the table.<BR>
<HR>
<B>Clothing</B><BR>
<B>Masks</B>- There are currently two types of masks. Masks can be put on by either attackng yourself with it, attacking your mask hud button, or if the other person is submissive (unconscious/handcuffed) attacking the other person to place it on them.<BR>
<B>Gas mask</B>- This filters out most plasma from the environment and allows for running on internals<BR>
<B>Muzzle</B> - This is a negative item and prevents all speech including gasping generally leaving only nod. you can take this off yourself provided your hands aren't handcuffed.<BR>
<BR>
<B>Suits</B> These work like masks except you must use the external clothing HUD.<BR>
<B>Fire suit</B> - This prevents damage from the flames of fire. (Not welding tool attacks though as well as the oxygen deprivation from fire) also note there is a limit which once surpassed the suit can't disperse the heat causing you o take damage.<BR>
<HR>
<B>Canisters/Siphons/Scrubbers</B><BR>
If you attack these with a free hand you'll bring up the control box. The only part that really deserves observance is the first set of buttons. The lower valve is not in yet. The release button releases x amount of units into the connected tank or if no tank to the environment. The amount of units is determined by the valve. You can alter this amount from 0 to 1000 by using the + + + and - - - buttons which go alter by adding or subtracting 1, 5, or 50 units. The next button - siphon - either siphons gas from the environment or an attached tank. Canisters are unable to siphon from the environment! The next button stop stops all siphoning or releasing. Siphons/scrubbers also contain an option canisters do not - automatic. This makes the sensors on board the unit to try and equalize the atmospheric environment of the tile it is on every second. The vents start with this as its option. Please note that the presence of a tank makes no difference as this part is on a seperate air track and it will still release into the environment. Once your done click the close button to stop the box from popping up.<BR>
<B>Scrubbers/air filters</B> - These are like the normak siphons except that before its air cycle it releases all the oxygen it has stored. The automatic mode also instead of equalizingthe oxygen level removes carbon dioxide and plasma.<BR>
<HR>
<B>Chairs</B><BR>
Chairs have a special feature - buckling. You can buckle someone (including yourself)into a chair by dragging them onto the chair object. The person must already be on the same tile as the chair however. You can unbuckle them/yourself from a chair by attacking the chair with a free hand. (Note: Handcuffed people can't unbuckle from chairs.)<BR>
<HR>
<B>Miscellaneous Object Descriptions</B><BR>
<BR>
<B>Alarm</B> - This object is able to detect whether the area arod it has an appropriate co2 and o2 content to stay alive. Basically green is good and red is bad.<BR>
<BR>
<B>Cryogenic Healing Units</B> - There is a tutorial for this on the main SS13 website so I won't detail it here. Please note you can't revive already dead people.<BR>
<BR>
<B>Firealarm</B> - This is able to lock down an area instantly. When a fire gets near it it will trigger the lockdown to prevent contamination. You must use the reset button on this in order to clear the alarm and unlock the firedoors. You can also initiate a timer lock if you want time to escape.<BR>
<BR>
<B>Grilles</B> - These do a great job of blocking a lot of thngs. They stop most meteors in their tracks and are hard to destroy with normal weapons. (although it IS possible.)<BR>
<BR>
<HR>
<B>Miscellaneous Notes (a.k.a. archived world messages)<BR>
<BR>
Job selection is in thanks to Spuzzum! A captain is still randomly assigned if no one picks captain as their choice. Also please note that if you pick something as your primary and someone else picks it as their secondary (or tertiary) then they will always lose. This is essence is fairer. Also you can pick your beginning gender and name. I hope you enjoy it! Also I've extended time till start from one minute to one and a half minutes.<BR>
<BR>
</BODY></HTML>
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More