Merge pull request #2 from ZomgPonies/master

updating my fork
This commit is contained in:
Bram961
2014-06-25 00:04:29 +02:00
181 changed files with 36473 additions and 26090 deletions
+10 -2
View File
@@ -84,6 +84,7 @@
#include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm"
#include "code\controllers\_DynamicAreaLighting_TG.dm"
#include "code\controllers\configuration.dm"
#include "code\controllers\emergency_shuttle_controller.dm"
#include "code\controllers\failsafe.dm"
#include "code\controllers\garbage.dm"
#include "code\controllers\hooks-defs.dm"
@@ -1446,6 +1447,8 @@
#include "code\modules\shuttles\departmental.dm"
#include "code\modules\shuttles\shuttle.dm"
#include "code\modules\shuttles\shuttle_console.dm"
#include "code\modules\shuttles\shuttle_emergency.dm"
#include "code\modules\shuttles\shuttle_ferry.dm"
#include "code\modules\shuttles\shuttle_specops.dm"
#include "code\modules\shuttles\shuttle_supply.dm"
#include "code\modules\shuttles\shuttles_multi.dm"
@@ -1464,6 +1467,7 @@
#include "code\modules\surgery\ribcage.dm"
#include "code\modules\surgery\robolimbs.dm"
#include "code\modules\surgery\surgery.dm"
#include "code\modules\vehicles\ambulance.dm"
#include "code\modules\vehicles\cargo_train.dm"
#include "code\modules\vehicles\train.dm"
#include "code\modules\vehicles\vehicle.dm"
@@ -1529,14 +1533,13 @@
#include "code\WorkInProgress\computer3\computer3_notes.dm"
#include "code\WorkInProgress\computer3\file.dm"
#include "code\WorkInProgress\computer3\laptop.dm"
#include "code\WorkInProgress\computer3\lapvend.dm"
#include "code\WorkInProgress\computer3\networking.dm"
#include "code\WorkInProgress\computer3\NTOS.dm"
#include "code\WorkInProgress\computer3\program.dm"
#include "code\WorkInProgress\computer3\program_disks.dm"
#include "code\WorkInProgress\computer3\server.dm"
#include "code\WorkInProgress\computer3\storage.dm"
#include "code\WorkInProgress\computer3\test_machines.dm"
#include "code\WorkInProgress\computer3\computers\aifixer.dm"
#include "code\WorkInProgress\computer3\computers\arcade.dm"
#include "code\WorkInProgress\computer3\computers\atmos_alert.dm"
#include "code\WorkInProgress\computer3\computers\camera.dm"
@@ -1545,9 +1548,14 @@
#include "code\WorkInProgress\computer3\computers\crew.dm"
#include "code\WorkInProgress\computer3\computers\customs.dm"
#include "code\WorkInProgress\computer3\computers\HolodeckControl.dm"
#include "code\WorkInProgress\computer3\computers\law.dm"
#include "code\WorkInProgress\computer3\computers\medical.dm"
#include "code\WorkInProgress\computer3\computers\Operating.dm"
#include "code\WorkInProgress\computer3\computers\power.dm"
#include "code\WorkInProgress\computer3\computers\prisoner.dm"
#include "code\WorkInProgress\computer3\computers\robot.dm"
#include "code\WorkInProgress\computer3\computers\security.dm"
#include "code\WorkInProgress\computer3\computers\welcome.dm"
#include "code\WorkInProgress\kilakk\fax.dm"
#include "code\WorkInProgress\Mini\atmos_control.dm"
#include "code\WorkInProgress\pomf\spacepods\construction.dm"
+22 -14
View File
@@ -2,7 +2,7 @@
The Big Bad NT Operating System
*/
/datum/file/program/NTOS
/datum/file/program/ntos
name = "Nanotrasen Operating System"
extension = "prog"
active_state = "ntos"
@@ -13,28 +13,28 @@
Generate a basic list of files in the selected scope
*/
/datum/file/program/NTOS/proc/list_files()
/datum/file/program/ntos/proc/list_files()
if(!computer || !current) return null
return current.files
/datum/file/program/NTOS/proc/filegrid(var/list/filelist)
/datum/file/program/ntos/proc/filegrid(var/list/filelist)
var/dat = "<table border='0' align='left'>"
var/i = 0
for(var/datum/file/F in filelist)
i++
if(i==1)
dat += "<tr>"
if(i>= 7)
if(i>= 6)
i = 0
dat += "</tr>"
continue
dat += {"
<td>
<a href='?src=\ref[src];[fileop]=\ref[F]'>
<center><a href='?src=\ref[src];[fileop]=\ref[F]'>
<img src=\ref[F.image]><br>
<span>[F.name]</span>
</a>
</a></center>
</td>"}
dat += "</tr></table>"
@@ -44,7 +44,7 @@
// I am separating this from filegrid so that I don't have to
// make metadata peripheral files
//
/datum/file/program/NTOS/proc/desktop(var/peripheralop = "viewperipheral")
/datum/file/program/ntos/proc/desktop(var/peripheralop = "viewperipheral")
var/dat = "<table border='0' align='left'>"
var/i = 0
var/list/peripherals = list(computer.hdd,computer.floppy,computer.cardslot)
@@ -53,7 +53,7 @@
i++
if(i==1)
dat += "<tr>"
if(i>= 8)
if(i>= 6)
i = 0
dat += "</tr>"
continue
@@ -69,20 +69,20 @@
return dat
/datum/file/program/NTOS/proc/window(var/title,var/buttonbar,var/content)
/datum/file/program/ntos/proc/window(var/title,var/buttonbar,var/content)
return {"
<div class='filewin'>
<div class='titlebar'>[title] <a href='?src=\ref[src];winclose'><img src=\ref['icons/NTOS/tb_close.png']></a></div>
<div class='titlebar'>[title] <a href='?src=\ref[src];winclose'><img src=\ref['icons/ntos/tb_close.png']></a></div>
<div class='buttonbar'>[buttonbar]</div>
<div class='contentpane'>[content]</div>
</div>"}
/datum/file/program/NTOS/proc/buttonbar(var/type = 0)
/datum/file/program/ntos/proc/buttonbar(var/type = 0)
switch(type)
if(0) // FILE OPERATIONS
return {""}
/datum/file/program/NTOS/interact()
/datum/file/program/ntos/interact()
if(!interactable())
return
var/dat = {"
@@ -162,7 +162,7 @@
</style>
</head>
<body><div style='width:640px;height:480px; border:2px solid black;padding:8px;background-image:url(\ref['icons/NTOS/ntos.png'])'>"}
<body><div style='width:640px;height:480px; border:2px solid black;padding:8px;background-position:center;background-image:url(\ref['nano/images/uiBackground.png'])'>"}
var/list/files = list_files()
if(current)
@@ -175,7 +175,7 @@
usr << browse(dat, "window=\ref[computer];size=670x510")
onclose(usr, "\ref[computer]")
/datum/file/program/NTOS/Topic(href, list/href_list)
/datum/file/program/ntos/Topic(href, list/href_list)
if(!interactable() || ..(href,href_list))
return
@@ -186,6 +186,14 @@
interact()
return
// else ???
if(istype(C,/obj/item/part/computer/cardslot))
if(computer.cardslot.reader != null)
computer.cardslot.remove()
if(istype(C,/obj/item/part/computer/cardslot/dual))
if(computer.cardslot.writer != null)
computer.cardslot.remove(computer.cardslot.writer)
if(computer.cardslot.reader != null)
computer.cardslot.remove(computer.cardslot.reader)
interact()
return
@@ -17,7 +17,7 @@
var/list/records = null
var/frame_desc = null
var/datum/file/program/OS = new/datum/file/program/NTOS
var/datum/file/program/OS = new/datum/file/program/ntos
/obj/machinery/computer3/proc/disassemble(mob/user as mob) // todo
return
+9 -1
View File
@@ -67,8 +67,9 @@
if(computer.program)
computer.program.update_icon()
computer.update_icon()
return
computer.occupant = occupant
..()
return
/*
ID computer cardslot - reading and writing slots
@@ -110,6 +111,8 @@
var/mob/living/carbon/human/user = usr
if(istype(user) && !user.get_active_hand())
user.put_in_hands(reader)
else
reader.loc = computer.loc
reader = null
// Authorizes the user based on the computer's requirements
@@ -166,12 +169,15 @@
card.loc = src
if(reader)
writer = card
computer.updateUsrDialog()
return 1
if(istype(card,/obj/item/weapon/card/id) && !(access_change_ids in card:access) && !writer) // not authorized
writer = card
computer.updateUsrDialog()
return 1
if(!reader)
reader = card
computer.updateUsrDialog()
return 1
return 0
@@ -186,5 +192,7 @@
var/mob/living/carbon/human/user = usr
if(ishuman(user) && !user.get_active_hand())
user.put_in_hands(card)
else
card.loc = computer.loc
+7 -4
View File
@@ -45,6 +45,7 @@
// Misc & special purpose
var/obj/item/part/computer/ai_holder/cradle = null
var/obj/item/part/computer/toybox/toybox = null
var/mob/living/silicon/ai/occupant = null
// Legacy variables
@@ -125,6 +126,11 @@
program.execute(os)
update_icon()
proc/update_spawn_files()
for(var/typekey in spawn_files)
hdd.addfile(new typekey,1)
proc/spawn_parts()
for(var/typekey in spawn_parts)
@@ -191,9 +197,6 @@
for(var/x in verbs)
verbs -= x
set_broken()
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(5, 0, src)
smoke.start()
return
@@ -315,7 +318,7 @@
|IMPORTANT| If you add a peripheral, put it in this list
+++++++++++ --------------------------------------------
*/
var/list/peripherals = list(hdd,floppy,radio,camnet,net,cardslot,cradle,toybox)
var/list/peripherals = list(hdd,floppy,radio,net,cardslot,cradle) //camnet, toybox removed
var/list/p_list = list()
for(var/obj/item/part/computer/C in peripherals)
@@ -27,7 +27,7 @@
* Communications terminal printing - move it to a printer of some sort? Make a printer peripheral--but then which ones print the comms?
* Remove the partially transparent border on program screens, as it clashes with some frames
* Chop the corners on program screens now that screen sizes are standard
* NTOS:
* ntos:
* Needs a text editor/viewer
* Needs file copy and file move - I think I know how I'm gonna do it
* Needs a peripheral view (eject disks and cards, network actions, ???)
@@ -7,7 +7,7 @@
/datum/file/program/aifixer
name = "AI system integrity restorer"
desc = "Repairs and revives artificial intelligence cores."
image = 'icons/NTOS/airestore.png'
image = 'icons/ntos/airestore.png'
active_state = "ai-fixer-empty"
req_access = list(access_captain, access_robotics, access_heads)
@@ -65,7 +65,7 @@
prog.key = src
prog.camera_list = null
return
if(istype(source,/datum/file/program/NTOS))
if(istype(source,/datum/file/program/ntos))
for(var/obj/item/part/computer/storage/S in list(computer.hdd,computer.floppy))
for(var/datum/file/F in S.files)
if(istype(F,/datum/file/program/security))
@@ -175,7 +175,7 @@
/datum/file/program/security
name = "camera monitor"
desc = "Connets to the Nanotrasen Camera Network"
image = 'icons/NTOS/camera.png'
image = 'icons/ntos/camera.png'
active_state = "camera-static"
var/datum/file/camnet_key/key = null
+82 -22
View File
@@ -13,7 +13,7 @@
/datum/file/program/card_comp
name = "identification card console"
desc = "Used to modify magnetic strip ID cards."
image = 'icons/NTOS/cardcomp.png'
image = 'icons/ntos/cardcomp.png'
active_state = "id"
var/obj/item/weapon/card/id/reader = null
@@ -31,28 +31,85 @@
// the list of jobs won't change after all...
proc/scriptblock()
var/global/dat = null
if(!dat)
var/jobs_all = ""
for(var/job in list_jobs())
jobs_all += topic_link(src,"assign=[job]",replacetext(job," ","&nbsp;")) + " "//make sure there isn't a line break in the middle of a job
var/counter = 0
var jobs_all = ""
jobs_all += "<table><tr><td></td><td><b>Command</b></td>"
jobs_all += "</tr><tr height='20'><td><b>Special</b></font></td>"//Captain in special because he is head of heads ~Intercross21
jobs_all += "<td weight='100'><a href='?src=\ref[src];;assign=Captain'>Captain</a></td>"
jobs_all += "<td weight='100'><a href='?src=\ref[src];;assign=Custom'>Custom</a></td>"
counter = 0
jobs_all += "</tr><tr><td><font color='#A50000'><b>Security</b></font></td>"//Red
for(var/job in security_positions)
counter++
if(counter >= 6)
jobs_all += "</tr><tr height='20'><td></td><td></td>"
counter = 0
jobs_all += "<td height='20' weight='100'><a href='?src=\ref[src];assign=[job]'>[replacetext(job, " ", "&nbsp")]</a></td>"
counter = 0
jobs_all += "</tr><tr><td><font color='#FFA500'><b>Engineering</b></font></td>"//Orange
for(var/job in engineering_positions)
counter++
if(counter >= 6)
jobs_all += "</tr><tr height='20'><td></td><td></td>"
counter = 0
jobs_all += "<td height='20' weight='100'><a href='?src=\ref[src];assign=[job]'>[replacetext(job, " ", "&nbsp")]</a></td>"
counter = 0
jobs_all += "</tr><tr height='20'><td><font color='#008000'><b>Medical</b></font></td>"//Green
for(var/job in medical_positions)
counter++
if(counter >= 6)
jobs_all += "</tr><tr height='20'><td></td><td></td>"
counter = 0
jobs_all += "<td weight='100'><a href='?src=\ref[src];assign=[job]'>[replacetext(job, " ", "&nbsp")]</a></td>"
counter = 0
jobs_all += "</tr><tr height='20'><td><font color='#800080'><b>Science</b></font></td>"//Purple
for(var/job in science_positions)
counter++
if(counter >= 6)
jobs_all += "</tr><tr height='20'><td></td><td></td>"
counter = 0
jobs_all += "<td weight='100'><a href='?src=\ref[src];assign=[job]'>[replacetext(job, " ", "&nbsp")]</a></td>"
counter = 0
jobs_all += "</tr><tr height='20'><td><font color='#808080'><b>Civilian</b></font></td>"//Grey
for(var/job in civilian_positions)
counter++
if(counter >= 6)
jobs_all += "</tr><tr height='20'><td></td><td></td>"
counter = 0
jobs_all += "<td weight='100'><a href='?src=\ref[src];assign=[job]'>[replacetext(job, " ", "&nbsp")]</a></td>"
dat = {"<script type="text/javascript">
function markRed(){
var nameField = document.getElementById('namefield');
nameField.style.backgroundColor = "#FFDDDD";
}
function markGreen(){
var nameField = document.getElementById('namefield');
nameField.style.backgroundColor = "#DDFFDD";
}
function showAll(){
var allJobsSlot = document.getElementById('alljobsslot');
allJobsSlot.innerHTML = "<a href='#' onclick='hideAll()'>hide</a><br>[jobs_all]";
}
function hideAll(){
var allJobsSlot = document.getElementById('alljobsslot');
allJobsSlot.innerHTML = "<a href='#' onclick='showAll()'>change</a>";
}
</script>"}
function markRed(){
var nameField = document.getElementById('namefield');
nameField.style.backgroundColor = "#FFDDDD";
}
function markGreen(){
var nameField = document.getElementById('namefield');
nameField.style.backgroundColor = "#DDFFDD";
}
function markAccountGreen(){
var nameField = document.getElementById('accountfield');
nameField.style.backgroundColor = "#DDFFDD";
}
function markAccountRed(){
var nameField = document.getElementById('accountfield');
nameField.style.backgroundColor = "#FFDDDD";
}
function showAll(){
var allJobsSlot = document.getElementById('alljobsslot');
allJobsSlot.innerHTML = "<a href='#' onclick='hideAll()'>hide</a><br>"+ "[jobs_all]";
}
function hideAll(){
var allJobsSlot = document.getElementById('alljobsslot');
allJobsSlot.innerHTML = "<a href='#' onclick='showAll()'>[(writer.assignment) ? writer.assignment : "Unassgied"]</a>";
}
</script>"}
return dat
// creates the list of access rights on the card
@@ -173,6 +230,9 @@
if(1)
dat = show_manifest()
popup.width = 940
popup.height = 520
popup.set_content(dat)
popup.open()
return
@@ -124,7 +124,7 @@
return
if(authenticated)
call_shuttle_proc(usr)
if(emergency_shuttle.online)
if(emergency_shuttle.online())
post_status("shuttle")
state = STATE_DEFAULT
if("cancelshuttle" in href_list)
@@ -269,8 +269,8 @@
proc/main_menu()
var/dat = ""
if (computer.radio.subspace)
if(emergency_shuttle.online && emergency_shuttle.location==0)
var/timeleft = emergency_shuttle.timeleft()
if(emergency_shuttle.online() && emergency_shuttle.location())
var/timeleft = emergency_shuttle.estimate_arrival_time()
dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]<BR>"
refresh = 1
else
@@ -286,8 +286,8 @@
dat += "<BR>\[ <A HREF='?src=\ref[src];RestoreBackup'>Restore Backup Routing Data</A> \]"
dat += "<BR>\[ <A HREF='?src=\ref[src];changeseclevel'>Change alert level</A> \]"
if(emergency_shuttle.location==0)
if (emergency_shuttle.online)
if(emergency_shuttle.location())
if (emergency_shuttle.online())
dat += "<BR>\[ <A HREF='?src=\ref[src];cancelshuttle'>Cancel Shuttle Call</A> \]"
else
dat += "<BR>\[ <A HREF='?src=\ref[src];callshuttle'>Call Emergency Shuttle</A> \]"
@@ -14,12 +14,12 @@
return
scan()
var/t = ""
var/t = "<TT><B>Crew Monitoring</B><HR>"
t += "<BR><A href='?src=\ref[src];update=1'>Refresh</A> "
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
t += "<table width='100%'><tr><td width='40%'><h3>Name</h3></td><td width='30%'><h3>Vitals</h3></td><td width='30%'><h3>Position</h3></td></tr>"
t += "<table><tr><td width='40%'>Name</td><td width='20%'>Vitals</td><td width='40%'>Position</td></tr>"
var/list/logs = list()
for(var/obj/item/clothing/under/C in tracked)
for(var/obj/item/clothing/under/C in src.tracked)
var/log = ""
var/turf/pos = get_turf(C)
if((C) && (C.has_sensor) && (pos) && (pos.z == computer.z) && C.sensor_mode)
@@ -32,7 +32,7 @@
var/dam3 = round(H.getFireLoss(),1)
var/dam4 = round(H.getBruteLoss(),1)
var/life_status = "[H.stat > 1 ? "<span class='bad'>Deceased</span>" : "<span class='good'>Living</span>"]"
var/life_status = "[H.stat > 1 ? "<font color=red>Deceased</font>" : "Living"]"
var/damage_report = "(<font color='blue'>[dam1]</font>/<font color='green'>[dam2]</font>/<font color='orange'>[dam3]</font>/<font color='red'>[dam4]</font>)"
if(H.wear_id)
@@ -42,17 +42,18 @@
switch(C.sensor_mode)
if(1)
log += "<td width='30%'>[life_status]</td><td width='30%'>Not Available</td></tr>"
log += "<td width='15%'>[life_status]</td><td width='40%'>Not Available</td></tr>"
if(2)
log += "<td width='30%'>[life_status] [damage_report]</td><td width='30%'>Not Available</td></tr>"
log += "<td width='20%'>[life_status] [damage_report]</td><td width='40%'>Not Available</td></tr>"
if(3)
var/area/player_area = get_area(H)
log += "<td width='30%'>[life_status] [damage_report]</td><td width='30%'>[format_text(player_area.name)] ([pos.x], [pos.y])</td></tr>"
log += "<td width='20%'>[life_status] [damage_report]</td><td width='40%'>[player_area.name] ([pos.x], [pos.y])</td></tr>"
logs += log
logs = sortList(logs)
for(var/log in logs)
t += log
t += "</table>"
t += "</FONT></PRE></TT>"
popup.set_content(t)
popup.open()
@@ -62,4 +63,16 @@
for(var/obj/item/clothing/under/C in world)
if((C.has_sensor) && (istype(C.loc, /mob/living/carbon/human)))
tracked |= C
return 1
return 1
Topic(href, list/href_list)
if(!interactable() || !computer.cardslot || ..(href,href_list))
return
if( href_list["close"] )
usr << browse(null, "window=crewcomp")
usr.unset_machine()
return
if(href_list["update"])
interact()
//src.updateUsrDialog()
return
+10 -11
View File
@@ -1,9 +1,9 @@
/obj/machinery/computer/aiupload
/obj/machinery/computer3/aiupload
name = "AI Upload"
desc = "Used to upload laws to the AI."
icon_state = "command"
icon_state = "frame-rnd"
circuit = "/obj/item/part/board/circuit/aiupload"
var/mob/living/silicon/ai/current = null
var/opened = 0
@@ -24,15 +24,14 @@
return
attackby(obj/item/O as obj, mob/user as mob)
attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob)
if (user.z > 6)
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
if(istype(O, /obj/item/part/board/aiModule))
var/obj/item/part/board/aiModule/M = O
M.install(src)
if(istype(module, /obj/item/weapon/aiModule))
module.install(src)
else
..()
return ..()
attack_hand(var/mob/user as mob)
@@ -53,16 +52,16 @@
/obj/machinery/computer/borgupload
/obj/machinery/computer3/borgupload
name = "Cyborg Upload"
desc = "Used to upload laws to Cyborgs."
icon_state = "command"
icon_state = "frame-rnd"
circuit = "/obj/item/part/board/circuit/borgupload"
var/mob/living/silicon/robot/current = null
attackby(obj/item/part/board/aiModule/module as obj, mob/user as mob)
if(istype(module, /obj/item/part/board/aiModule))
attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob)
if(istype(module, /obj/item/weapon/aiModule))
module.install(src)
else
return ..()
+208 -180
View File
@@ -7,17 +7,22 @@
impossible things before breakfast.
*/
/obj/machinery/computer/med_data
/obj/machinery/computer3/med_data
default_prog = /datum/file/program/med_data
spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/cardslot,/obj/item/part/computer/networking/radio)
/obj/machinery/computer3/laptop/medical
spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/cardslot,/obj/item/part/computer/networking/radio)
spawn_files = list(/datum/file/program/arcade,/datum/file/program/crew,/datum/file/program/med_data)
/datum/file/program/med_data
name = "Medical Records"
desc = "This can be used to check medical records."
active_state = "medcomp"
req_one_access = list(access_medical, access_forensics_lockers)
var/obj/item/card/id/scan = null
var/obj/item/weapon/card/id/scan = null
var/authenticated = null
var/rank = null
var/screen = null
@@ -27,24 +32,35 @@
var/temp = null
var/printing = null
/obj/machinery/computer/med_data/attack_ai(user as mob)
return src.attack_hand(user)
/obj/machinery/computer/med_data/attack_paw(user as mob)
return src.attack_hand(user)
proc/authenticate()
if(access_medical in scan.access)
return 1
if(istype(usr,/mob/living/silicon/ai))
return 1
return 0
/obj/machinery/computer/med_data/attack_hand(mob/user as mob)
if(..())
return
var/dat
if (src.temp)
dat = text("<TT>[src.temp]</TT><BR><BR><A href='?src=\ref[src];temp=1'>Clear Screen</A>")
else
dat = text("Confirm Identity: <A href='?src=\ref[];scan=1'>[]</A><HR>", src, (src.scan ? text("[]", src.scan.name) : "----------"))
if (src.authenticated)
switch(src.screen)
if(1.0)
dat += {"
interact()
if(!computer.cardslot)
computer.Crash(MISSING_PERIPHERAL)
return
usr.set_machine(src)
scan = computer.cardslot.reader
if(!interactable())
return
if (computer.z > 6)
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
var/dat
if (temp)
dat = text("<TT>[src.temp]</TT><BR><BR><A href='?src=\ref[src];temp=1'>Clear Screen</A>")
else
dat = text("Confirm Identity: <A href='?src=\ref[];scan=1'>[]</A><HR>", src, (src.scan ? text("[]", src.scan.name) : "----------"))
if (src.authenticated)
switch(src.screen)
if(1.0)
dat += {"
<A href='?src=\ref[src];search=1'>Search Records</A>
<BR><A href='?src=\ref[src];screen=2'>List Records</A>
<BR>
@@ -54,114 +70,146 @@
<BR><A href='?src=\ref[src];screen=3'>Record Maintenance</A>
<BR><A href='?src=\ref[src];logout=1'>{Log Out}</A><BR>
"}
if(2.0)
dat += "<B>Record List</B>:<HR>"
if(!isnull(data_core.general))
for(var/datum/data/record/R in sortRecord(data_core.general))
dat += text("<A href='?src=\ref[];d_rec=\ref[]'>[]: []<BR>", src, R, R.fields["id"], R.fields["name"])
//Foreach goto(132)
dat += text("<HR><A href='?src=\ref[];screen=1'>Back</A>", src)
if(3.0)
dat += text("<B>Records Maintenance</B><HR>\n<A href='?src=\ref[];back=1'>Backup To Disk</A><BR>\n<A href='?src=\ref[];u_load=1'>Upload From disk</A><BR>\n<A href='?src=\ref[];del_all=1'>Delete All Records</A><BR>\n<BR>\n<A href='?src=\ref[];screen=1'>Back</A>", src, src, src, src)
if(4.0)
dat += "<CENTER><B>Medical Record</B></CENTER><BR>"
if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
dat += text("Name: [] ID: []<BR>\nSex: <A href='?src=\ref[];field=sex'>[]</A><BR>\nAge: <A href='?src=\ref[];field=age'>[]</A><BR>\nFingerprint: <A href='?src=\ref[];field=fingerprint'>[]</A><BR>\nPhysical Status: <A href='?src=\ref[];field=p_stat'>[]</A><BR>\nMental Status: <A href='?src=\ref[];field=m_stat'>[]</A><BR>", src.active1.fields["name"], src.active1.fields["id"], src, src.active1.fields["sex"], src, src.active1.fields["age"], src, src.active1.fields["fingerprint"], src, src.active1.fields["p_stat"], src, src.active1.fields["m_stat"])
else
dat += "<B>General Record Lost!</B><BR>"
if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)))
dat += text("<BR>\n<CENTER><B>Medical Data</B></CENTER><BR>\nBlood Type: <A href='?src=\ref[];field=b_type'>[]</A><BR>\nDNA: <A href='?src=\ref[];field=b_dna'>[]</A><BR>\n<BR>\nMinor Disabilities: <A href='?src=\ref[];field=mi_dis'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=mi_dis_d'>[]</A><BR>\n<BR>\nMajor Disabilities: <A href='?src=\ref[];field=ma_dis'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=ma_dis_d'>[]</A><BR>\n<BR>\nAllergies: <A href='?src=\ref[];field=alg'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=alg_d'>[]</A><BR>\n<BR>\nCurrent Diseases: <A href='?src=\ref[];field=cdi'>[]</A> (per disease info placed in log/comment section)<BR>\nDetails: <A href='?src=\ref[];field=cdi_d'>[]</A><BR>\n<BR>\nImportant Notes:<BR>\n\t<A href='?src=\ref[];field=notes'>[]</A><BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", src, src.active2.fields["b_type"], src, src.active2.fields["b_dna"], src, src.active2.fields["mi_dis"], src, src.active2.fields["mi_dis_d"], src, src.active2.fields["ma_dis"], src, src.active2.fields["ma_dis_d"], src, src.active2.fields["alg"], src, src.active2.fields["alg_d"], src, src.active2.fields["cdi"], src, src.active2.fields["cdi_d"], src, src.active2.fields["notes"])
var/counter = 1
while(src.active2.fields[text("com_[]", counter)])
dat += text("[]<BR><A href='?src=\ref[];del_c=[]'>Delete Entry</A><BR><BR>", src.active2.fields[text("com_[]", counter)], src, counter)
counter++
dat += text("<A href='?src=\ref[];add_c=1'>Add Entry</A><BR><BR>", src)
dat += text("<A href='?src=\ref[];del_r=1'>Delete Record (Medical Only)</A><BR><BR>", src)
else
dat += "<B>Medical Record Lost!</B><BR>"
dat += text("<A href='?src=\ref[src];new=1'>New Record</A><BR><BR>")
dat += text("\n<A href='?src=\ref[];print_p=1'>Print Record</A><BR>\n<A href='?src=\ref[];screen=2'>Back</A><BR>", src, src)
if(5.0)
dat += "<CENTER><B>Virus Database</B></CENTER>"
for(var/Dt in typesof(/datum/disease/))
var/datum/disease/Dis = new Dt(0)
if(istype(Dis, /datum/disease/advance))
continue // TODO (tm): Add advance diseases to the virus database which no one uses.
if(!Dis.desc)
continue
dat += "<br><a href='?src=\ref[src];vir=[Dt]'>[Dis.name]</a>"
dat += "<br><a href='?src=\ref[src];screen=1'>Back</a>"
if(6.0)
dat += "<center><b>Medical Robot Monitor</b></center>"
dat += "<a href='?src=\ref[src];screen=1'>Back</a>"
dat += "<br><b>Medical Robots:</b>"
var/bdat = null
for(var/obj/machinery/bot/medbot/M in world)
if(M.z != src.z) continue //only find medibots on the same z-level as the computer
var/turf/bl = get_turf(M)
if(bl) //if it can't find a turf for the medibot, then it probably shouldn't be showing up
bdat += "[M.name] - <b>\[[bl.x],[bl.y]\]</b> - [M.on ? "Online" : "Offline"]<br>"
if((!isnull(M.reagent_glass)) && M.use_beaker)
bdat += "Reservoir: \[[M.reagent_glass.reagents.total_volume]/[M.reagent_glass.reagents.maximum_volume]\]<br>"
else
bdat += "Using Internal Synthesizer.<br>"
if(2.0)
dat += "<B>Record List</B>:<HR>"
if(!isnull(data_core.general))
for(var/datum/data/record/R in sortRecord(data_core.general))
dat += text("<A href='?src=\ref[];d_rec=\ref[]'>[]: []<BR>", src, R, R.fields["id"], R.fields["name"])
//Foreach goto(132)
dat += text("<HR><A href='?src=\ref[];screen=1'>Back</A>", src)
if(3.0)
dat += text("<B>Records Maintenance</B><HR>\n<A href='?src=\ref[];back=1'>Backup To Disk</A><BR>\n<A href='?src=\ref[];u_load=1'>Upload From disk</A><BR>\n<A href='?src=\ref[];del_all=1'>Delete All Records</A><BR>\n<BR>\n<A href='?src=\ref[];screen=1'>Back</A>", src, src, src, src)
if(4.0)
var/icon/front = new(active1.fields["photo"], dir = SOUTH)
var/icon/side = new(active1.fields["photo"], dir = WEST)
usr << browse_rsc(front, "front.png")
usr << browse_rsc(side, "side.png")
dat += "<CENTER><B>Medical Record</B></CENTER><BR>"
if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
dat += "<table><tr><td>Name: [active1.fields["name"]] \
ID: [active1.fields["id"]]<BR>\n \
Sex: <A href='?src=\ref[src];field=sex'>[active1.fields["sex"]]</A><BR>\n \
Age: <A href='?src=\ref[src];field=age'>[active1.fields["age"]]</A><BR>\n \
Fingerprint: <A href='?src=\ref[src];field=fingerprint'>[active1.fields["fingerprint"]]</A><BR>\n \
Physical Status: <A href='?src=\ref[src];field=p_stat'>[active1.fields["p_stat"]]</A><BR>\n \
Mental Status: <A href='?src=\ref[src];field=m_stat'>[active1.fields["m_stat"]]</A><BR></td><td align = center valign = top> \
Photo:<br><img src=front.png height=64 width=64 border=5><img src=side.png height=64 width=64 border=5></td></tr></table>"
else
dat += "<B>General Record Lost!</B><BR>"
if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)))
dat += text("<BR>\n<CENTER><B>Medical Data</B></CENTER><BR>\nBlood Type: <A href='?src=\ref[];field=b_type'>[]</A><BR>\nDNA: <A href='?src=\ref[];field=b_dna'>[]</A><BR>\n<BR>\nMinor Disabilities: <A href='?src=\ref[];field=mi_dis'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=mi_dis_d'>[]</A><BR>\n<BR>\nMajor Disabilities: <A href='?src=\ref[];field=ma_dis'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=ma_dis_d'>[]</A><BR>\n<BR>\nAllergies: <A href='?src=\ref[];field=alg'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=alg_d'>[]</A><BR>\n<BR>\nCurrent Diseases: <A href='?src=\ref[];field=cdi'>[]</A> (per disease info placed in log/comment section)<BR>\nDetails: <A href='?src=\ref[];field=cdi_d'>[]</A><BR>\n<BR>\nImportant Notes:<BR>\n\t<A href='?src=\ref[];field=notes'>[]</A><BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", src, src.active2.fields["b_type"], src, src.active2.fields["b_dna"], src, src.active2.fields["mi_dis"], src, src.active2.fields["mi_dis_d"], src, src.active2.fields["ma_dis"], src, src.active2.fields["ma_dis_d"], src, src.active2.fields["alg"], src, src.active2.fields["alg_d"], src, src.active2.fields["cdi"], src, src.active2.fields["cdi_d"], src, decode(src.active2.fields["notes"]))
var/counter = 1
while(src.active2.fields[text("com_[]", counter)])
dat += text("[]<BR><A href='?src=\ref[];del_c=[]'>Delete Entry</A><BR><BR>", src.active2.fields[text("com_[]", counter)], src, counter)
counter++
dat += text("<A href='?src=\ref[];add_c=1'>Add Entry</A><BR><BR>", src)
dat += text("<A href='?src=\ref[];del_r=1'>Delete Record (Medical Only)</A><BR><BR>", src)
else
dat += "<B>Medical Record Lost!</B><BR>"
dat += text("<A href='?src=\ref[src];new=1'>New Record</A><BR><BR>")
dat += text("\n<A href='?src=\ref[];print_p=1'>Print Record</A><BR>\n<A href='?src=\ref[];screen=2'>Back</A><BR>", src, src)
if(5.0)
dat += "<CENTER><B>Virus Database</B></CENTER>"
/* Advanced diseases is weak! Feeble! Glory to virus2!
for(var/Dt in typesof(/datum/disease/))
var/datum/disease/Dis = new Dt(0)
if(istype(Dis, /datum/disease/advance))
continue // TODO (tm): Add advance diseases to the virus database which no one uses.
if(!Dis.desc)
continue
dat += "<br><a href='?src=\ref[src];vir=[Dt]'>[Dis.name]</a>"
*/
for (var/ID in virusDB)
var/datum/data/record/v = virusDB[ID]
dat += "<br><a href='?src=\ref[src];vir=\ref[v]'>[v.fields["name"]]</a>"
dat += "<br><a href='?src=\ref[src];screen=1'>Back</a>"
if(6.0)
dat += "<center><b>Medical Robot Monitor</b></center>"
dat += "<a href='?src=\ref[src];screen=1'>Back</a>"
dat += "<br><b>Medical Robots:</b>"
var/bdat = null
for(var/obj/machinery/bot/medbot/M in world)
if(M.z != computer.z) continue //only find medibots on the same z-level as the computer
var/turf/bl = get_turf(M)
if(bl) //if it can't find a turf for the medibot, then it probably shouldn't be showing up
bdat += "[M.name] - <b>\[[bl.x],[bl.y]\]</b> - [M.on ? "Online" : "Offline"]<br>"
if((!isnull(M.reagent_glass)) && M.use_beaker)
bdat += "Reservoir: \[[M.reagent_glass.reagents.total_volume]/[M.reagent_glass.reagents.maximum_volume]\]<br>"
else
bdat += "Using Internal Synthesizer.<br>"
if(!bdat)
dat += "<br><center>None detected</center>"
else
dat += "<br>[bdat]"
if(!bdat)
dat += "<br><center>None detected</center>"
else
dat += "<br>[bdat]"
else
else
dat += text("<A href='?src=\ref[];login=1'>{Log In}</A>", src)
//user << browse(text("<HEAD><TITLE>Medical Records</TITLE></HEAD><TT>[]</TT>", dat), "window=med_rec")
//onclose(user, "med_rec")
var/datum/browser/popup = new(user, "med_rec", "Medical Records")
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
return
/obj/machinery/computer/med_data/Topic(href, href_list)
if(..())
else
dat += text("<A href='?src=\ref[];login=1'>{Log In}</A>", src)
popup.width = 600
popup.height = 400
popup.set_content(dat)
popup.set_title_image(usr.browse_rsc_icon(computer.icon, computer.icon_state))
popup.open()
return
if (!( data_core.general.Find(src.active1) ))
src.active1 = null
if (!( data_core.medical.Find(src.active2) ))
src.active2 = null
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
Topic(href, href_list)
if(!interactable() || !computer.cardslot || ..(href,href_list))
return
if (!( data_core.general.Find(src.active1) ))
src.active1 = null
if (!( data_core.medical.Find(src.active2) ))
src.active2 = null
if (href_list["temp"])
src.temp = null
if (href_list["scan"])
if (src.scan)
src.scan.loc = src.loc
src.scan = null
if (scan)
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
computer.cardslot.remove(scan)
else
scan.loc = get_turf(src)
scan = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/card/id))
usr.drop_item()
I.loc = src
src.scan = I
if (istype(I, /obj/item/weapon/card/id))
computer.cardslot.insert(I)
scan = I
else if (href_list["logout"])
src.authenticated = null
src.screen = null
src.active1 = null
src.active2 = null
else if (href_list["login"])
if (istype(usr, /mob/living/silicon))
if (istype(usr, /mob/living/silicon/ai))
src.active1 = null
src.active2 = null
src.authenticated = 1
src.authenticated = usr.name
src.rank = "AI"
src.screen = 1
else if (istype(src.scan, /obj/item/card/id))
else if (istype(usr, /mob/living/silicon/robot))
src.active1 = null
src.active2 = null
src.authenticated = usr.name
var/mob/living/silicon/robot/R = usr
src.rank = "[R.modtype] [R.braintype]"
src.screen = 1
else if (istype(src.scan, /obj/item/weapon/card/id))
src.active1 = null
src.active2 = null
if (src.check_access(src.scan))
src.authenticated = src.scan.registered_name
src.rank = src.scan.assignment
src.screen = 1
if (src.authenticated)
if(href_list["screen"])
@@ -173,20 +221,12 @@
src.active2 = null
if(href_list["vir"])
var/type = href_list["vir"]
var/datum/disease/Dis = new type(0)
var/AfS = ""
for(var/Str in Dis.affected_species)
AfS += " [Str];"
src.temp = {"<b>Name:</b> [Dis.name]
<BR><b>Number of stages:</b> [Dis.max_stages]
<BR><b>Spread:</b> [Dis.spread] Transmission
<BR><b>Possible Cure:</b> [(Dis.cure||"none")]
<BR><b>Affected Species:</b>[AfS]
<BR>
<BR><b>Notes:</b> [Dis.desc]
<BR>
<BR><b>Severity:</b> [Dis.severity]"}
var/datum/data/record/v = locate(href_list["vir"])
src.temp = "<center>GNAv2 based virus lifeform V-[v.fields["id"]]</center>"
src.temp += "<br><b>Name:</b> <A href='?src=\ref[src];field=vir_name;edit_vir=\ref[v]'>[v.fields["name"]]</A>"
src.temp += "<br><b>Antigen:</b> [v.fields["antigen"]]"
src.temp += "<br><b>Spread:</b> [v.fields["spread type"]] "
src.temp += "<br><b>Details:</b><br> <A href='?src=\ref[src];field=vir_desc;edit_vir=\ref[v]'>[v.fields["description"]]</A>"
if (href_list["del_all"])
src.temp = text("Are you sure you wish to delete all records?<br>\n\t<A href='?src=\ref[];temp=1;del_all2=1'>Yes</A><br>\n\t<A href='?src=\ref[];temp=1'>No</A><br>", src, src)
@@ -205,7 +245,7 @@
if("fingerprint")
if (istype(src.active1, /datum/data/record))
var/t1 = copytext(sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
src.active1.fields["fingerprint"] = t1
if("sex")
@@ -217,66 +257,66 @@
if("age")
if (istype(src.active1, /datum/data/record))
var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as num
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
src.active1.fields["age"] = t1
if("mi_dis")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis"] = t1
if("mi_dis_d")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis_d"] = t1
if("ma_dis")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis"] = t1
if("ma_dis_d")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis_d"] = t1
if("alg")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg"] = t1
if("alg_d")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg_d"] = t1
if("cdi")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi"] = t1
if("cdi_d")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi_d"] = t1
if("notes")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please summarize notes:", "Med. records", src.active2.fields["notes"], null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
var/t1 = copytext(html_encode(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["notes"] = t1
if("p_stat")
if (istype(src.active1, /datum/data/record))
src.temp = text("<B>Physical Condition:</B><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=deceased'>*Deceased*</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=unconscious'>*Unconscious*</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=active'>Active</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=unfit'>Physically Unfit</A><BR>", src, src, src, src)
src.temp = text("<B>Physical Condition:</B><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=deceased'>*Deceased*</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=ssd'>*SSD*</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=active'>Active</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=unfit'>Physically Unfit</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=disabled'>Disabled</A><BR>", src, src, src, src, src)
if("m_stat")
if (istype(src.active1, /datum/data/record))
src.temp = text("<B>Mental Condition:</B><BR>\n\t<A href='?src=\ref[];temp=1;m_stat=insane'>*Insane*</A><BR>\n\t<A href='?src=\ref[];temp=1;m_stat=unstable'>*Unstable*</A><BR>\n\t<A href='?src=\ref[];temp=1;m_stat=watch'>*Watch*</A><BR>\n\t<A href='?src=\ref[];temp=1;m_stat=stable'>Stable</A><BR>", src, src, src, src)
@@ -286,9 +326,23 @@
if("b_dna")
if (istype(src.active1, /datum/data/record))
var/t1 = copytext(sanitize(input("Please input DNA hash:", "Med. records", src.active1.fields["dna"], null) as text),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
src.active1.fields["dna"] = t1
if("vir_name")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
var/t1 = copytext(sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["name"] = t1
if("vir_desc")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
var/t1 = copytext(sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["description"] = t1
else
if (href_list["p_stat"])
@@ -296,12 +350,14 @@
switch(href_list["p_stat"])
if("deceased")
src.active1.fields["p_stat"] = "*Deceased*"
if("unconscious")
src.active1.fields["p_stat"] = "*Unconscious*"
if("ssd")
src.active1.fields["p_stat"] = "*SSD*"
if("active")
src.active1.fields["p_stat"] = "Active"
if("unfit")
src.active1.fields["p_stat"] = "Physically Unfit"
if("disabled")
src.active1.fields["p_stat"] = "Disabled"
if (href_list["m_stat"])
if (src.active1)
@@ -387,12 +443,12 @@
return
var/a2 = src.active2
var/t1 = copytext(sanitize(input("Add Comment:", "Med. records", null, null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
var/counter = 1
while(src.active2.fields[text("com_[]", counter)])
counter++
src.active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2053<BR>[]", src.authenticated, src.rank, time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1)
src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
if (href_list["del_c"])
if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])]))
@@ -400,7 +456,7 @@
if (href_list["search"])
var/t1 = input("Search String: (Name, DNA, or ID)", "Med. records", null, null) as text
if ((!( t1 ) || usr.stat || !( src.authenticated ) || usr.restrained() || ((!in_range(src, usr)) && (!istype(usr, /mob/living/silicon)))))
if ((!( t1 ) || usr.stat || !( src.authenticated ) || usr.restrained() || ((!interactable()) && (!istype(usr, /mob/living/silicon)))))
return
src.active1 = null
src.active2 = null
@@ -423,59 +479,31 @@
if (href_list["print_p"])
if (!( src.printing ))
src.printing = 1
sleep(50)
var/obj/item/office/paper/P = new /obj/item/office/paper( src.loc )
P.info = "<CENTER><B>Medical Record</B></CENTER><BR>"
var/datum/data/record/record1 = null
var/datum/data/record/record2 = null
if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
P.info += text("Name: [] ID: []<BR>\nSex: []<BR>\nAge: []<BR>\nFingerprint: []<BR>\nPhysical Status: []<BR>\nMental Status: []<BR>", src.active1.fields["name"], src.active1.fields["id"], src.active1.fields["sex"], src.active1.fields["age"], src.active1.fields["fingerprint"], src.active1.fields["p_stat"], src.active1.fields["m_stat"])
record1 = active1
if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)))
record2 = active2
sleep(50)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( computer.loc )
P.info = "<CENTER><B>Medical Record</B></CENTER><BR>"
if (record1)
P.info += text("Name: [] ID: []<BR>\nSex: []<BR>\nAge: []<BR>\nFingerprint: []<BR>\nPhysical Status: []<BR>\nMental Status: []<BR>", record1.fields["name"], record1.fields["id"], record1.fields["sex"], record1.fields["age"], record1.fields["fingerprint"], record1.fields["p_stat"], record1.fields["m_stat"])
P.name = text("Medical Record ([])", record1.fields["name"])
else
P.info += "<B>General Record Lost!</B><BR>"
if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)))
P.info += text("<BR>\n<CENTER><B>Medical Data</B></CENTER><BR>\nBlood Type: []<BR>\nDNA: []<BR>\n<BR>\nMinor Disabilities: []<BR>\nDetails: []<BR>\n<BR>\nMajor Disabilities: []<BR>\nDetails: []<BR>\n<BR>\nAllergies: []<BR>\nDetails: []<BR>\n<BR>\nCurrent Diseases: [] (per disease info placed in log/comment section)<BR>\nDetails: []<BR>\n<BR>\nImportant Notes:<BR>\n\t[]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", src.active2.fields["b_type"], src.active2.fields["b_dna"], src.active2.fields["mi_dis"], src.active2.fields["mi_dis_d"], src.active2.fields["ma_dis"], src.active2.fields["ma_dis_d"], src.active2.fields["alg"], src.active2.fields["alg_d"], src.active2.fields["cdi"], src.active2.fields["cdi_d"], src.active2.fields["notes"])
P.name = "Medical Record"
if (record2)
P.info += text("<BR>\n<CENTER><B>Medical Data</B></CENTER><BR>\nBlood Type: []<BR>\nDNA: []<BR>\n<BR>\nMinor Disabilities: []<BR>\nDetails: []<BR>\n<BR>\nMajor Disabilities: []<BR>\nDetails: []<BR>\n<BR>\nAllergies: []<BR>\nDetails: []<BR>\n<BR>\nCurrent Diseases: [] (per disease info placed in log/comment section)<BR>\nDetails: []<BR>\n<BR>\nImportant Notes:<BR>\n\t[]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", record2.fields["b_type"], record2.fields["b_dna"], record2.fields["mi_dis"], record2.fields["mi_dis_d"], record2.fields["ma_dis"], record2.fields["ma_dis_d"], record2.fields["alg"], record2.fields["alg_d"], record2.fields["cdi"], record2.fields["cdi_d"], decode(record2.fields["notes"]))
var/counter = 1
while(src.active2.fields[text("com_[]", counter)])
P.info += text("[]<BR>", src.active2.fields[text("com_[]", counter)])
while(record2.fields[text("com_[]", counter)])
P.info += text("[]<BR>", record2.fields[text("com_[]", counter)])
counter++
else
P.info += "<B>Medical Record Lost!</B><BR>"
P.info += "</TT>"
P.name = "paper- 'Medical Record'"
src.printing = null
src.add_fingerprint(usr)
src.updateUsrDialog()
return
/obj/machinery/computer/med_data/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
interact()
return
for(var/datum/data/record/R in data_core.medical)
if(prob(10/severity))
switch(rand(1,6))
if(1)
R.fields["name"] = "[pick(pick(first_names_male), pick(first_names_female))] [pick(last_names)]"
if(2)
R.fields["sex"] = pick("Male", "Female")
if(3)
R.fields["age"] = rand(5, 85)
if(4)
R.fields["b_type"] = pick("A-", "B-", "AB-", "O-", "A+", "B+", "AB+", "O+")
if(5)
R.fields["p_stat"] = pick("*Unconcious*", "Active", "Physically Unfit")
if(6)
R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable")
continue
else if(prob(1))
del(R)
continue
..(severity)
/obj/machinery/computer/med_data/laptop
name = "Medical Laptop"
desc = "Cheap Nanotrasen Laptop."
icon_state = "medlaptop"
@@ -2,6 +2,9 @@
default_prog = /datum/file/program/message_mon
spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/networking/prox)
//BROKEN AS HELL, DON'T USE UNTIL FIXED
/datum/file/program/message_mon
name = "Message Monitor Console"
desc = "Used to Monitor the crew's messages, that are sent via PDA. Can also be used to view Request Console messages."
@@ -35,6 +38,13 @@
var/custommessage = "This is a test, please ignore."
procinitialize()
if(!linkedServer)
if(message_servers && message_servers.len > 0)
linkedServer = message_servers[1]
return
update_icon()
if(emag || hacking)
overlay.icon_state = hack_icon
@@ -45,12 +55,12 @@
interact()
if(!interactable())
return
//If the computer is being hacked or is emagged, display the reboot message.
if(hacking || emag)
message = rebootmsg
var/dat = "<center><font color='blue'[message]</font>/</center>"
var/dat = "<head><title>Message Monitor Console</title></head><body>"
dat += "<center><h2>Message Monitor Console</h2></center><hr>"
dat += "<center><h4><font color='blue'[message]</h5></center>"
if(auth)
dat += "<h4><dd><A href='?src=\ref[src];auth=1'>&#09;<font color='green'>\[Authenticated\]</font></a>&#09;/"
@@ -61,12 +71,9 @@
if(hacking || emag)
screen = 2
else
if(!auth)
screen = 0
if( !linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)) )
message = noserver
screen = 0
else if(!auth || !linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN))) message = noserver
screen = 0
switch(screen)
//Main menu
@@ -87,7 +94,7 @@
else
for(var/n = ++i; n <= optioncount; n++)
dat += "<dd><font color='blue'>&#09;[n]. ---------------</font><br></dd>"
if((istype(user, /mob/living/silicon/ai) || istype(user, /mob/living/silicon/robot)) && (user.mind.special_role && user.mind.original == user))
if((istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) && (usr.mind.special_role && usr.mind.original == usr))
//Malf/Traitor AIs can bruteforce into the system to gain the Key.
dat += "<dd><A href='?src=\ref[src];hack=1'><i><font color='Red'>*&@#. Bruteforce Key</font></i></font></a><br></dd>"
else
@@ -117,7 +124,7 @@
dat += "</table>"
//Hacking screen.
if(2)
if(istype(user, /mob/living/silicon/ai) || istype(user, /mob/living/silicon/robot))
if(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
dat += "Brute-forcing for server key.<br> It will take 20 seconds for every character that the password has."
dat += "In the meantime, this console can reveal your true intentions if you let someone access it. Make sure no humans enter the room during that time."
else
@@ -202,25 +209,27 @@
<td width='15%'>[rc.rec_dpt]</td><td width='300px'>[rc.message]</td><td width='15%'>[rc.stamp]</td><td width='15%'>[rc.id_auth]</td><td width='15%'>[rc.priority]</td></tr>"}
dat += "</table>"
message = defaultmsg
popup.width = 700
popup.height = 700
popup.set_content(dat)
popup.set_title_image(usr.browse_rsc_icon(computer.icon, computer.icon_state))
popup.open()
return
proc/BruteForce(mob/user as mob)
proc/BruteForce(mob/usr as mob)
if(isnull(linkedServer))
user << "<span class='warning'>Could not complete brute-force: Linked Server Disconnected!</span>"
usr << "<span class='warning'>Could not complete brute-force: Linked Server Disconnected!</span>"
else
var/currentKey = src.linkedServer.decryptkey
user << "<span class='warning'>Brute-force completed! The key is '[currentKey]'.</span>"
usr << "<span class='warning'>Brute-force completed! The key is '[currentKey]'.</span>"
src.hacking = 0
src.icon_state = normal_icon
src.active_state = normal_icon
src.screen = 0 // Return the screen back to normal
proc/UnmagConsole()
src.icon_state = normal_icon
src.active_state = normal_icon
src.emag = 0
proc/ResetMessage()
@@ -308,7 +317,7 @@
if((istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) && (usr.mind.special_role && usr.mind.original == usr))
src.hacking = 1
src.screen = 2
src.icon_state = hack_icon
src.active_state = hack_icon
//Time it takes to bruteforce is dependant on the password length.
spawn(100*length(src.linkedServer.decryptkey))
if(src && src.linkedServer && usr)
@@ -357,12 +366,16 @@
//Select Receiver
if("Recepient")
//Get out list of viable PDAs
var/list/obj/item/device/pda/sendPDAs = get_viewable_pdas()
var/list/obj/item/device/pda/sendPDAs = list()
for(var/obj/item/device/pda/P in PDAs)
if(!P.owner || P.toff || P.hidden) continue
sendPDAs += P
if(PDAs && PDAs.len > 0)
customrecepient = input(usr, "Select a PDA from the list.") as null|anything in sortAtom(sendPDAs)
else
customrecepient = null
//Enter custom job
if("RecJob")
customjob = input(usr, "Please enter the sender's job.") as text|null
@@ -387,7 +400,8 @@
return src.attack_hand(usr)
var/obj/item/device/pda/PDARec = null
for (var/obj/item/device/pda/P in get_viewable_pdas())
for (var/obj/item/device/pda/P in PDAs)
if (!P.owner || P.toff || P.hidden) continue
if(P.owner == customsender)
PDARec = P
//Sender isn't faking as someone who exists
@@ -433,4 +447,4 @@
if ("back" in href_list)
src.screen = 0
interact()
interact()
@@ -11,7 +11,8 @@
proc/format(var/obj/machinery/power/apc/A)
var/static/list/S = list(" Off","AOff"," On", " AOn")
var/static/list/chg = list("N","C","F")
return "[copytext(add_tspace("\The [A.area]", 30), 1, 30)] [S[A.equipment+1]] [S[A.lighting+1]] [S[A.environ+1]] [add_lspace(A.lastused_total, 6)] [A.cell ? "[add_lspace(round(A.cell.percent()), 3)]% [chg[A.charging+1]]" : " N/C"]<BR>"
return "[copytext(add_tspace("\The [A.area]", 30), 1, 30)] [S[A.equipment+1]] [S[A.lighting+1]] [S[A.environ+1]] \
[add_lspace(A.lastused_total, 6)] [A.cell ? "[add_lspace(round(A.cell.percent()), 3)]% [chg[A.charging+1]]" : " N/C"]<BR>"
interact()
if(!interactable())
@@ -23,7 +24,7 @@
var/t = ""
t += "<A href='?src=\ref[src]'>Refresh</A><br /><br />"
if(!L || !L.len)
t += "\red No connection"
t += "No connection"
else
var/datum/powernet/powernet = computer.net.connect_to(/datum/powernet,null)
if(powernet)
@@ -1,11 +1,14 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/obj/machinery/computer3/prisoner
default_prog = /datum/file/program/prisoner
spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/networking/radio)
icon_state = "frame-sec"
/obj/machinery/computer/prisoner
name = "Prisoner Management Comsole"
icon = 'icons/obj/computer.dmi'
icon_state = "explosive"
/datum/file/program/prisoner
name = "Prisoner Management Console"
active_state = "explosive"
req_access = list(access_armory)
circuit = "/obj/item/part/board/circuit/prisoner"
var/id = 0.0
var/temp = null
var/status = 0
@@ -14,98 +17,84 @@
var/screen = 0 // 0 - No Access Denied, 1 - Access allowed
attack_ai(var/mob/user as mob)
return src.attack_hand(user)
attack_paw(var/mob/user as mob)
return
attack_hand(var/mob/user as mob)
if(..())
interact()
if(!interactable())
return
user.set_machine(src)
var/dat = ""
var/dat
dat += "<B>Prisoner Implant Manager System</B><BR>"
if(screen == 0)
dat += "<HR><A href='?src=\ref[src];lock=1'>Unlock Console</A>"
else if(screen == 1)
dat += "<HR>Chemical Implants<BR>"
var/turf/Tr = null
for(var/obj/item/part/ammo/implant/chem/C in world)
for(var/obj/item/weapon/implant/chem/C in world)
Tr = get_turf(C)
if((Tr) && (Tr.z != src.z)) continue//Out of range
if((Tr) && (Tr.z != computer.z)) continue//Out of range
if(!C.implanted) continue
dat += "[C.imp_in.name] | Remaining Units: [C.reagents.total_volume] | Inject: "
dat += "<A href='?src=\ref[src];inject1=\ref[C]'>(<font class='bad'>(1)</font>)</A>"
dat += "<A href='?src=\ref[src];inject5=\ref[C]'>(<font class='bad'>(5)</font>)</A>"
dat += "<A href='?src=\ref[src];inject10=\ref[C]'>(<font class='bad'>(10)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];inject1=\ref[C]'>(<font color=red>(1)</font>)</A>"
dat += "<A href='?src=\ref[src];inject5=\ref[C]'>(<font color=red>(5)</font>)</A>"
dat += "<A href='?src=\ref[src];inject10=\ref[C]'>(<font color=red>(10)</font>)</A><BR>"
dat += "********************************<BR>"
dat += "<HR>Tracking Implants<BR>"
for(var/obj/item/part/ammo/implant/tracking/T in world)
for(var/obj/item/weapon/implant/tracking/T in world)
Tr = get_turf(T)
if((Tr) && (Tr.z != src.z)) continue//Out of range
if((Tr) && (Tr.z != computer.z)) continue//Out of range
if(!T.implanted) continue
var/loc_display = "Unknown"
var/mob/living/carbon/M = T.imp_in
if(M.z == 1 && !istype(M.loc, /turf/space))
var/turf/mob_loc = get_turf_loc(M)
var/turf/mob_loc = get_turf(M)
loc_display = mob_loc.loc
if(T.malfunction)
loc_display = pick(teleportlocs)
dat += "ID: [T.id] | Location: [loc_display]<BR>"
dat += "<A href='?src=\ref[src];warn=\ref[T]'>(<font class='bad'><i>Message Holder</i></font>)</A> |<BR>"
dat += "<A href='?src=\ref[src];warn=\ref[T]'>(<i>Send Message</i></font>)</A> |<BR>"
dat += "********************************<BR>"
dat += "<HR><A href='?src=\ref[src];lock=1'>Lock Console</A>"
//user << browse(dat, "window=computer;size=400x500")
//onclose(user, "computer")
var/datum/browser/popup = new(user, "computer", "Prisoner Implant Management System", 400, 500)
popup.width = 400
popup.height = 500
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.set_title_image(usr.browse_rsc_icon(computer.icon, computer.icon_state))
popup.open()
return
process()
if(!..())
src.updateDialog()
interact()
return
Topic(href, href_list)
if(..())
if(!interactable() || ..(href,href_list))
return
if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
if(href_list["inject1"])
var/obj/item/part/ammo/implant/I = locate(href_list["inject1"])
if(I) I.activate(1)
if(href_list["inject1"])
var/obj/item/weapon/implant/I = locate(href_list["inject1"])
if(I) I.activate(1)
else if(href_list["inject5"])
var/obj/item/part/ammo/implant/I = locate(href_list["inject5"])
if(I) I.activate(5)
else if(href_list["inject5"])
var/obj/item/weapon/implant/I = locate(href_list["inject5"])
if(I) I.activate(5)
else if(href_list["inject10"])
var/obj/item/part/ammo/implant/I = locate(href_list["inject10"])
if(I) I.activate(10)
else if(href_list["inject10"])
var/obj/item/weapon/implant/I = locate(href_list["inject10"])
if(I) I.activate(10)
else if(href_list["lock"])
if(src.allowed(usr))
screen = !screen
else
usr << "Unauthorized Access."
else if(href_list["lock"])
screen = !screen
else if(href_list["warn"])
var/warning = copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN)
if(!warning) return
var/obj/item/part/ammo/implant/I = locate(href_list["warn"])
if((I)&&(I.imp_in))
var/mob/living/carbon/R = I.imp_in
R << "You hear a voice in your head saying: '[warning]'"
log_say("[usr]/[usr.ckey] sent an implant message to [R]/[R.ckey]: '[warning]'")
else if(href_list["warn"])
var/warning = copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN)
if(!warning) return
var/obj/item/weapon/implant/I = locate(href_list["warn"])
if((I)&&(I.imp_in))
var/mob/living/carbon/R = I.imp_in
R << "\green You hear a voice in your head saying: '[warning]'"
src.add_fingerprint(usr)
src.updateUsrDialog()
interact()
return
@@ -10,7 +10,7 @@ var/prison_shuttle_can_send = 1
var/prison_shuttle_time = 0
var/prison_shuttle_timeleft = 0
/obj/machinery/computer/prison_shuttle
/obj/machinery/computer3/prison_shuttle
name = "Prison Shuttle Console"
icon = 'icons/obj/computer.dmi'
icon_state = "shuttle"
@@ -74,9 +74,9 @@
dat += " Independent from AI |"
if (istype(usr, /mob/living/silicon))
if(issilicon(usr) && is_special_character(usr) && !R.emagged)
dat += "<A href='?src=\ref[src];magbot=\ref[R]'>(<font color=blue><i>Hack</i></font>)</A> "
dat += "<A href='?src=\ref[src];stopbot=\ref[R]'>(<font color=green><i>[R.canmove ? "Lockdown" : "Release"]</i></font>)</A> "
dat += "<A href='?src=\ref[src];killbot=\ref[R]'>(<font color=red><i>Destroy</i></font>)</A>"
dat += "<A href='?src=\ref[src];magbot=\ref[R]'>(<i>Hack</i>)</A> "
dat += "<A href='?src=\ref[src];stopbot=\ref[R]'>(<i>[R.canmove ? "Lockdown" : "Release"]</i>)</A> "
dat += "<A href='?src=\ref[src];killbot=\ref[R]'>(<i>Destroy</i>)</A>"
dat += "<BR>"
dat += "<A href='?src=\ref[src];screen=0'>(Return to Main Menu)</A><BR>"
if(screen == 2)
@@ -1,12 +1,24 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/obj/machinery/computer3/secure_data
default_prog = /datum/file/program/secure_data
spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/cardslot,/obj/item/part/computer/networking/radio)
icon_state = "frame-sec"
/obj/machinery/computer3/laptop/secure_data
default_prog = /datum/file/program/secure_data
spawn_parts = list(/obj/item/part/computer/storage/hdd/big,/obj/item/part/computer/cardslot,/obj/item/part/computer/networking/radio)
icon_state = "laptop"
/datum/file/program/secure_data
name = "Security Records"
desc = "Used to view and edit personnel's security records"
active_state = "security"
image = 'icons/ntos/records.png'
/obj/machinery/computer/secure_data//TODO:SANITY
name = "Security Records"
desc = "Used to view and edit personnel's security records"
icon_state = "security"
req_one_access = list(access_security, access_forensics_lockers)
circuit = "/obj/item/part/board/circuit/secure_data"
var/obj/item/card/id/scan = null
var/obj/item/weapon/card/id/scan = null
var/authenticated = null
var/rank = null
var/screen = null
@@ -23,175 +35,185 @@
var/order = 1 // -1 = Descending - 1 = Ascending
/obj/machinery/computer/secure_data/attackby(obj/item/O as obj, user as mob)
if(istype(O, /obj/item/card/id) && !scan)
usr.drop_item()
O.loc = src
scan = O
user << "You insert [O]."
..()
/obj/machinery/computer/secure_data/attack_ai(mob/user as mob)
return attack_hand(user)
proc/authenticate()
if(access_security in scan.access || access_forensics_lockers in scan.access )
return 1
if(istype(usr,/mob/living/silicon/ai))
return 1
return 0
/obj/machinery/computer/secure_data/attack_paw(mob/user as mob)
return attack_hand(user)
interact()
if(!computer.cardslot)
computer.Crash(MISSING_PERIPHERAL)
return
usr.set_machine(src)
scan = computer.cardslot.reader
if(!interactable())
return
return
if (computer.z > 6)
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
var/dat
//Someone needs to break down the dat += into chunks instead of long ass lines.
/obj/machinery/computer/secure_data/attack_hand(mob/user as mob)
if(..())
return
if (src.z > 6)
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
var/dat
if (temp)
dat = text("<TT>[]</TT><BR><BR><A href='?src=\ref[];choice=Clear Screen'>Clear Screen</A>", temp, src)
else
dat = text("Confirm Identity: <A href='?src=\ref[];choice=Confirm Identity'>[]</A><HR>", src, (scan ? text("[]", scan.name) : "----------"))
if (authenticated)
switch(screen)
if(1.0)
dat += {"
<p style='text-align:center;'>"}
dat += text("<A href='?src=\ref[];choice=Search Records'>Search Records</A><BR>", src)
dat += text("<A href='?src=\ref[];choice=New Record (General)'>New Record</A><BR>", src)
dat += {"
</p>
<table style="text-align:center;" cellspacing="0" width="100%">
<tr>
<th>Records:</th>
</tr>
</table>
<table style="text-align:center;" border="1" cellspacing="0" width="100%">
<tr>
<th><A href='?src=\ref[src];choice=Sorting;sort=name'>Name</A></th>
<th><A href='?src=\ref[src];choice=Sorting;sort=id'>ID</A></th>
<th><A href='?src=\ref[src];choice=Sorting;sort=rank'>Rank</A></th>
<th><A href='?src=\ref[src];choice=Sorting;sort=fingerprint'>Fingerprints</A></th>
<th>Criminal Status</th>
</tr>"}
if(!isnull(data_core.general))
for(var/datum/data/record/R in sortRecord(data_core.general, sortBy, order))
var/crimstat = ""
for(var/datum/data/record/E in data_core.security)
if ((E.fields["name"] == R.fields["name"] && E.fields["id"] == R.fields["id"]))
crimstat = E.fields["criminal"]
var/background
switch(crimstat)
if("*Arrest*")
background = "'background-color:#DC143C;'"
if("Incarcerated")
background = "'background-color:#CD853F;'"
if("Parolled")
background = "'background-color:#CD853F;'"
if("Released")
background = "'background-color:#3BB9FF;'"
if("None")
background = "'background-color:#00FF7F;'"
if("")
background = "'background-color:#FFFFFF;'"
crimstat = "No Record."
dat += text("<tr style=[]><td><A href='?src=\ref[];choice=Browse Record;d_rec=\ref[]'>[]</a></td>", background, src, R, R.fields["name"])
dat += text("<td>[]</td>", R.fields["id"])
dat += text("<td>[]</td>", R.fields["rank"])
dat += text("<td>[]</td>", R.fields["fingerprint"])
dat += text("<td>[]</td></tr>", crimstat)
dat += "</table><hr width='75%' />"
dat += text("<A href='?src=\ref[];choice=Record Maintenance'>Record Maintenance</A><br><br>", src)
dat += text("<A href='?src=\ref[];choice=Log Out'>{Log Out}</A>",src)
if(2.0)
dat += "<B>Records Maintenance</B><HR>"
dat += "<BR><A href='?src=\ref[src];choice=Delete All Records'>Delete All Records</A><BR><BR><A href='?src=\ref[src];choice=Return'>Back</A>"
if(3.0)
dat += "<CENTER><B>Security Record</B></CENTER><BR>"
if ((istype(active1, /datum/data/record) && data_core.general.Find(active1)))
dat += text("Name: <A href='?src=\ref[];choice=Edit Field;field=name'>[]</A> ID: <A href='?src=\ref[];choice=Edit Field;field=id'>[]</A><BR>\nSex: <A href='?src=\ref[];choice=Edit Field;field=sex'>[]</A><BR>\nAge: <A href='?src=\ref[];choice=Edit Field;field=age'>[]</A><BR>\nRank: <A href='?src=\ref[];choice=Edit Field;field=rank'>[]</A><BR>\nFingerprint: <A href='?src=\ref[];choice=Edit Field;field=fingerprint'>[]</A><BR>\nPhysical Status: []<BR>\nMental Status: []<BR>", src, active1.fields["name"], src, active1.fields["id"], src, active1.fields["sex"], src, active1.fields["age"], src, active1.fields["rank"], src, active1.fields["fingerprint"], active1.fields["p_stat"], active1.fields["m_stat"])
else
dat += "<B>General Record Lost!</B><BR>"
if ((istype(active2, /datum/data/record) && data_core.security.Find(active2)))
dat += text("<BR>\n<CENTER><B>Security Data</B></CENTER><BR>\nCriminal Status: <A href='?src=\ref[];choice=Edit Field;field=criminal'>[]</A><BR>\n<BR>\nMinor Crimes: <A href='?src=\ref[];choice=Edit Field;field=mi_crim'>[]</A><BR>\nDetails: <A href='?src=\ref[];choice=Edit Field;field=mi_crim_d'>[]</A><BR>\n<BR>\nMajor Crimes: <A href='?src=\ref[];choice=Edit Field;field=ma_crim'>[]</A><BR>\nDetails: <A href='?src=\ref[];choice=Edit Field;field=ma_crim_d'>[]</A><BR>\n<BR>\nImportant Notes:<BR>\n\t<A href='?src=\ref[];choice=Edit Field;field=notes'>[]</A><BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", src, active2.fields["criminal"], src, active2.fields["mi_crim"], src, active2.fields["mi_crim_d"], src, active2.fields["ma_crim"], src, active2.fields["ma_crim_d"], src, active2.fields["notes"])
var/counter = 1
while(active2.fields[text("com_[]", counter)])
dat += text("[]<BR><A href='?src=\ref[];choice=Delete Entry;del_c=[]'>Delete Entry</A><BR><BR>", active2.fields[text("com_[]", counter)], src, counter)
counter++
dat += text("<A href='?src=\ref[];choice=Add Entry'>Add Entry</A><BR><BR>", src)
dat += text("<A href='?src=\ref[];choice=Delete Record (Security)'>Delete Record (Security Only)</A><BR><BR>", src)
else
dat += "<B>Security Record Lost!</B><BR>"
dat += text("<A href='?src=\ref[];choice=New Record (Security)'>New Security Record</A><BR><BR>", src)
dat += text("\n<A href='?src=\ref[];choice=Delete Record (ALL)'>Delete Record (ALL)</A><BR><BR>\n<A href='?src=\ref[];choice=Print Record'>Print Record</A><BR>\n<A href='?src=\ref[];choice=Return'>Back</A><BR>", src, src, src)
if(4.0)
if(!Perp.len)
dat += text("ERROR. String could not be located.<br><br><A href='?src=\ref[];choice=Return'>Back</A>", src)
else
dat += {"
<table style="text-align:center;" cellspacing="0" width="100%">
<tr> "}
dat += text("<th>Search Results for '[]':</th>", tempname)
dat += {"
</tr>
</table>
<table style="text-align:center;" border="1" cellspacing="0" width="100%">
<tr>
<th>Name</th>
<th>ID</th>
<th>Rank</th>
<th>Fingerprints</th>
<th>Criminal Status</th>
</tr> "}
for(var/i=1, i<=Perp.len, i += 2)
var/crimstat = ""
var/datum/data/record/R = Perp[i]
if(istype(Perp[i+1],/datum/data/record/))
var/datum/data/record/E = Perp[i+1]
crimstat = E.fields["criminal"]
var/background
switch(crimstat)
if("*Arrest*")
background = "'background-color:#DC143C;'"
if("Incarcerated")
background = "'background-color:#CD853F;'"
if("Parolled")
background = "'background-color:#CD853F;'"
if("Released")
background = "'background-color:#3BB9FF;'"
if("None")
background = "'background-color:#00FF7F;'"
if("")
background = "'background-color:#FFFFFF;'"
crimstat = "No Record."
dat += text("<tr style=[]><td><A href='?src=\ref[];choice=Browse Record;d_rec=\ref[]'>[]</a></td>", background, src, R, R.fields["name"])
dat += text("<td>[]</td>", R.fields["id"])
dat += text("<td>[]</td>", R.fields["rank"])
dat += text("<td>[]</td>", R.fields["fingerprint"])
dat += text("<td>[]</td></tr>", crimstat)
dat += "</table><hr width='75%' />"
dat += text("<br><A href='?src=\ref[];choice=Return'>Return to index.</A>", src)
else
if (temp)
dat = text("<TT>[]</TT><BR><BR><A href='?src=\ref[];choice=Clear Screen'>Clear Screen</A>", temp, src)
else
dat += text("<A href='?src=\ref[];choice=Log In'>{Log In}</A>", src)
//user << browse(text("<HEAD><TITLE>Security Records</TITLE></HEAD><TT>[]</TT>", dat), "window=secure_rec;size=600x400")
//onclose(user, "secure_rec")
var/datum/browser/popup = new(user, "secure_rec", "Security Records", 600, 400)
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
return
dat = text("Confirm Identity: <A href='?src=\ref[];choice=Confirm Identity'>[]</A><HR>", src, (scan ? text("[]", scan.name) : "----------"))
if (authenticated)
switch(screen)
if(1.0)
dat += {"
<p style='text-align:center;'>"}
dat += text("<A href='?src=\ref[];choice=Search Records'>Search Records</A><BR>", src)
dat += text("<A href='?src=\ref[];choice=New Record (General)'>New Record</A><BR>", src)
dat += {"
</p>
<table style="text-align:center;" cellspacing="0" width="100%">
<tr>
<th>Records:</th>
</tr>
</table>
<table style="text-align:center;" border="1" cellspacing="0" width="100%">
<tr>
<th><A href='?src=\ref[src];choice=Sorting;sort=name'>Name</A></th>
<th><A href='?src=\ref[src];choice=Sorting;sort=id'>ID</A></th>
<th><A href='?src=\ref[src];choice=Sorting;sort=rank'>Rank</A></th>
<th><A href='?src=\ref[src];choice=Sorting;sort=fingerprint'>Fingerprints</A></th>
<th>Criminal Status</th>
</tr>"}
if(!isnull(data_core.general))
for(var/datum/data/record/R in sortRecord(data_core.general, sortBy, order))
var/crimstat = ""
for(var/datum/data/record/E in data_core.security)
if ((E.fields["name"] == R.fields["name"] && E.fields["id"] == R.fields["id"]))
crimstat = E.fields["criminal"]
var/background
switch(crimstat)
if("*Arrest*")
background = "'background-color:#DC143C;'"
if("Incarcerated")
background = "'background-color:#CD853F;'"
if("Parolled")
background = "'background-color:#CD853F;'"
if("Released")
background = "'background-color:#3BB9FF;'"
if("None")
background = "'background-color:#00FF7F;'"
if("")
background = "'background-color:#00FF00;'"
crimstat = "No Record."
dat += text("<tr style=[]><td><A href='?src=\ref[];choice=Browse Record;d_rec=\ref[]'>[]</a></td>", background, src, R, R.fields["name"])
dat += text("<td>[]</td>", R.fields["id"])
dat += text("<td>[]</td>", R.fields["rank"])
dat += text("<td>[]</td>", R.fields["fingerprint"])
dat += text("<td>[]</td></tr>", crimstat)
dat += "</table><hr width='75%' />"
dat += text("<A href='?src=\ref[];choice=Record Maintenance'>Record Maintenance</A><br><br>", src)
dat += text("<A href='?src=\ref[];choice=Log Out'>{Log Out}</A>",src)
if(2.0)
dat += "<B>Records Maintenance</B><HR>"
dat += "<BR><A href='?src=\ref[src];choice=Delete All Records'>Delete All Records</A><BR><BR><A href='?src=\ref[src];choice=Return'>Back</A>"
if(3.0)
dat += "<CENTER><B>Security Record</B></CENTER><BR>"
if ((istype(active1, /datum/data/record) && data_core.general.Find(active1)))
var/icon/front = new(active1.fields["photo"], dir = SOUTH)
var/icon/side = new(active1.fields["photo"], dir = WEST)
usr << browse_rsc(front, "front.png")
usr << browse_rsc(side, "side.png")
dat += text("<table><tr><td> \
Name: <A href='?src=\ref[src];choice=Edit Field;field=name'>[active1.fields["name"]]</A><BR> \
ID: <A href='?src=\ref[src];choice=Edit Field;field=id'>[active1.fields["id"]]</A><BR>\n \
Sex: <A href='?src=\ref[src];choice=Edit Field;field=sex'>[active1.fields["sex"]]</A><BR>\n \
Age: <A href='?src=\ref[src];choice=Edit Field;field=age'>[active1.fields["age"]]</A><BR>\n \
Rank: <A href='?src=\ref[src];choice=Edit Field;field=rank'>[active1.fields["rank"]]</A><BR>\n \
Fingerprint: <A href='?src=\ref[src];choice=Edit Field;field=fingerprint'>[active1.fields["fingerprint"]]</A><BR>\n \
Physical Status: [active1.fields["p_stat"]]<BR>\n \
Mental Status: [active1.fields["m_stat"]]<BR></td> \
<td align = center valign = top>Photo:<br><img src=front.png height=80 width=80 border=4> \
<img src=side.png height=80 width=80 border=4></td></tr></table>")
else
dat += "<B>General Record Lost!</B><BR>"
if ((istype(active2, /datum/data/record) && data_core.security.Find(active2)))
dat += text("<BR>\n<CENTER><B>Security Data</B></CENTER><BR>\nCriminal Status: <A href='?src=\ref[];choice=Edit Field;field=criminal'>[]</A><BR>\n<BR>\nMinor Crimes: <A href='?src=\ref[];choice=Edit Field;field=mi_crim'>[]</A><BR>\nDetails: <A href='?src=\ref[];choice=Edit Field;field=mi_crim_d'>[]</A><BR>\n<BR>\nMajor Crimes: <A href='?src=\ref[];choice=Edit Field;field=ma_crim'>[]</A><BR>\nDetails: <A href='?src=\ref[];choice=Edit Field;field=ma_crim_d'>[]</A><BR>\n<BR>\nImportant Notes:<BR>\n\t<A href='?src=\ref[];choice=Edit Field;field=notes'>[]</A><BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", src, active2.fields["criminal"], src, active2.fields["mi_crim"], src, active2.fields["mi_crim_d"], src, active2.fields["ma_crim"], src, active2.fields["ma_crim_d"], src, decode(active2.fields["notes"]))
var/counter = 1
while(active2.fields[text("com_[]", counter)])
dat += text("[]<BR><A href='?src=\ref[];choice=Delete Entry;del_c=[]'>Delete Entry</A><BR><BR>", active2.fields[text("com_[]", counter)], src, counter)
counter++
dat += text("<A href='?src=\ref[];choice=Add Entry'>Add Entry</A><BR><BR>", src)
dat += text("<A href='?src=\ref[];choice=Delete Record (Security)'>Delete Record (Security Only)</A><BR><BR>", src)
else
dat += "<B>Security Record Lost!</B><BR>"
dat += text("<A href='?src=\ref[];choice=New Record (Security)'>New Security Record</A><BR><BR>", src)
dat += text("\n<A href='?src=\ref[];choice=Delete Record (ALL)'>Delete Record (ALL)</A><BR><BR>\n<A href='?src=\ref[];choice=Print Record'>Print Record</A><BR>\n<A href='?src=\ref[];choice=Return'>Back</A><BR>", src, src, src)
if(4.0)
if(!Perp.len)
dat += text("ERROR. String could not be located.<br><br><A href='?src=\ref[];choice=Return'>Back</A>", src)
else
dat += {"
<table style="text-align:center;" cellspacing="0" width="100%">
<tr> "}
dat += text("<th>Search Results for '[]':</th>", tempname)
dat += {"
</tr>
</table>
<table style="text-align:center;" border="1" cellspacing="0" width="100%">
<tr>
<th>Name</th>
<th>ID</th>
<th>Rank</th>
<th>Fingerprints</th>
<th>Criminal Status</th>
</tr> "}
for(var/i=1, i<=Perp.len, i += 2)
var/crimstat = ""
var/datum/data/record/R = Perp[i]
if(istype(Perp[i+1],/datum/data/record/))
var/datum/data/record/E = Perp[i+1]
crimstat = E.fields["criminal"]
var/background
switch(crimstat)
if("*Arrest*")
background = "'background-color:#DC143C;'"
if("Incarcerated")
background = "'background-color:#CD853F;'"
if("Parolled")
background = "'background-color:#CD853F;'"
if("Released")
background = "'background-color:#3BB9FF;'"
if("None")
background = "'background-color:#00FF7F;'"
if("")
background = "'background-color:#FFFFFF;'"
crimstat = "No Record."
dat += text("<tr style=[]><td><A href='?src=\ref[];choice=Browse Record;d_rec=\ref[]'>[]</a></td>", background, src, R, R.fields["name"])
dat += text("<td>[]</td>", R.fields["id"])
dat += text("<td>[]</td>", R.fields["rank"])
dat += text("<td>[]</td>", R.fields["fingerprint"])
dat += text("<td>[]</td></tr>", crimstat)
dat += "</table><hr width='75%' />"
dat += text("<br><A href='?src=\ref[];choice=Return'>Return to index.</A>", src)
else
else
dat += text("<A href='?src=\ref[];choice=Log In'>{Log In}</A>", src)
popup.width = 600
popup.height = 400
popup.set_content(dat)
popup.set_title_image(usr.browse_rsc_icon(computer.icon, computer.icon_state))
popup.open()
return
/*Revised /N
I can't be bothered to look more of the actual code outside of switch but that probably needs revising too.
What a mess.*/
/obj/machinery/computer/secure_data/Topic(href, href_list)
if(..())
return
if (!( data_core.general.Find(active1) ))
active1 = null
if (!( data_core.security.Find(active2) ))
active2 = null
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
Topic(href, href_list)
if(!interactable() || !computer.cardslot || ..(href,href_list))
return
if (!( data_core.general.Find(active1) ))
active1 = null
if (!( data_core.security.Find(active2) ))
active2 = null
switch(href_list["choice"])
// SORTING!
if("Sorting")
@@ -217,15 +239,14 @@ What a mess.*/
if("Confirm Identity")
if (scan)
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
usr.put_in_hands(scan)
computer.cardslot.remove(scan)
else
scan.loc = get_turf(src)
scan = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/card/id))
usr.drop_item()
I.loc = src
if (istype(I, /obj/item/weapon/card/id))
computer.cardslot.insert(I)
scan = I
if("Log Out")
@@ -235,23 +256,31 @@ What a mess.*/
active2 = null
if("Log In")
if (istype(usr, /mob/living/silicon))
if (istype(usr, /mob/living/silicon/ai))
src.active1 = null
src.active2 = null
src.authenticated = usr.name
src.rank = "AI"
src.screen = 1
else if (istype(usr, /mob/living/silicon/robot))
src.active1 = null
src.active2 = null
src.authenticated = usr.name
var/mob/living/silicon/robot/R = usr
src.rank = "[R.modtype] [R.braintype]"
src.screen = 1
else if (istype(scan, /obj/item/weapon/card/id))
active1 = null
active2 = null
authenticated = 1
rank = "AI"
screen = 1
else if (istype(scan, /obj/item/card/id))
active1 = null
active2 = null
if(check_access(scan))
if(authenticate())
authenticated = scan.registered_name
rank = scan.assignment
screen = 1
//RECORD FUNCTIONS
if("Search Records")
var/t1 = input("Search String: (Partial Name or ID or Fingerprints or Rank)", "Secure. records", null, null) as text
if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || !in_range(src, usr)))
world << "input [t1]"
if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || !interactable()))
return
Perp = new/list()
t1 = lowertext(t1)
@@ -293,7 +322,7 @@ What a mess.*/
/* if ("Search Fingerprints")
var/t1 = input("Search String: (Fingerprint)", "Secure. records", null, null) as text
if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || (!in_range(src, usr)) && (!istype(usr, /mob/living/silicon))))
if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || (!interactable()) && (!istype(usr, /mob/living/silicon))))
return
active1 = null
active2 = null
@@ -312,24 +341,32 @@ What a mess.*/
if ("Print Record")
if (!( printing ))
printing = 1
sleep(50)
var/obj/item/office/paper/P = new /obj/item/office/paper( loc )
P.info = "<CENTER><B>Security Record</B></CENTER><BR>"
var/datum/data/record/record1 = null
var/datum/data/record/record2 = null
if ((istype(active1, /datum/data/record) && data_core.general.Find(active1)))
P.info += text("Name: [] ID: []<BR>\nSex: []<BR>\nAge: []<BR>\nFingerprint: []<BR>\nPhysical Status: []<BR>\nMental Status: []<BR>", active1.fields["name"], active1.fields["id"], active1.fields["sex"], active1.fields["age"], active1.fields["fingerprint"], active1.fields["p_stat"], active1.fields["m_stat"])
record1 = active1
if ((istype(active2, /datum/data/record) && data_core.security.Find(active2)))
record2 = active2
sleep(50)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( computer.loc )
P.info = "<CENTER><B>Security Record</B></CENTER><BR>"
if (record1)
P.info += text("Name: [] ID: []<BR>\nSex: []<BR>\nAge: []<BR>\nFingerprint: []<BR>\nPhysical Status: []<BR>\nMental Status: []<BR>", record1.fields["name"], record1.fields["id"], record1.fields["sex"], record1.fields["age"], record1.fields["fingerprint"], record1.fields["p_stat"], record1.fields["m_stat"])
P.name = text("Security Record ([])", record1.fields["name"])
else
P.info += "<B>General Record Lost!</B><BR>"
if ((istype(active2, /datum/data/record) && data_core.security.Find(active2)))
P.info += text("<BR>\n<CENTER><B>Security Data</B></CENTER><BR>\nCriminal Status: []<BR>\n<BR>\nMinor Crimes: []<BR>\nDetails: []<BR>\n<BR>\nMajor Crimes: []<BR>\nDetails: []<BR>\n<BR>\nImportant Notes:<BR>\n\t[]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", active2.fields["criminal"], active2.fields["mi_crim"], active2.fields["mi_crim_d"], active2.fields["ma_crim"], active2.fields["ma_crim_d"], active2.fields["notes"])
P.name = "Security Record"
if (record2)
P.info += text("<BR>\n<CENTER><B>Security Data</B></CENTER><BR>\nCriminal Status: []<BR>\n<BR>\nMinor Crimes: []<BR>\nDetails: []<BR>\n<BR>\nMajor Crimes: []<BR>\nDetails: []<BR>\n<BR>\nImportant Notes:<BR>\n\t[]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", record2.fields["criminal"], record2.fields["mi_crim"], record2.fields["mi_crim_d"], record2.fields["ma_crim"], record2.fields["ma_crim_d"], decode(record2.fields["notes"]))
var/counter = 1
while(active2.fields[text("com_[]", counter)])
P.info += text("[]<BR>", active2.fields[text("com_[]", counter)])
while(record2.fields[text("com_[]", counter)])
P.info += text("[]<BR>", record2.fields[text("com_[]", counter)])
counter++
else
P.info += "<B>Security Record Lost!</B><BR>"
P.info += "</TT>"
P.name = "paper - 'Security Record'"
printing = null
computer.updateUsrDialog()
//RECORD DELETE
if ("Delete All Records")
temp = ""
@@ -347,12 +384,12 @@ What a mess.*/
return
var/a2 = active2
var/t1 = copytext(sanitize(input("Add Comment:", "Secure. records", null, null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
var/counter = 1
while(active2.fields[text("com_[]", counter)])
counter++
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2053<BR>[]", authenticated, rank, time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1)
active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
if ("Delete Record (ALL)")
if (active1)
@@ -391,11 +428,13 @@ What a mess.*/
G.fields["name"] = "New Record"
G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
G.fields["rank"] = "Unassigned"
G.fields["real_rank"] = "Unassigned"
G.fields["sex"] = "Male"
G.fields["age"] = "Unknown"
G.fields["fingerprint"] = "Unknown"
G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable"
G.fields["species"] = "Human"
data_core.general += G
active1 = G
active2 = null
@@ -408,19 +447,19 @@ What a mess.*/
if("name")
if (istype(active1, /datum/data/record))
var/t1 = input("Please input name:", "Secure. records", active1.fields["name"], null) as text
if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
return
active1.fields["name"] = t1
if("id")
if (istype(active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["id"] = t1
if("fingerprint")
if (istype(active1, /datum/data/record))
var/t1 = copytext(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["fingerprint"] = t1
if("sex")
@@ -432,37 +471,37 @@ What a mess.*/
if("age")
if (istype(active1, /datum/data/record))
var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["age"] = t1
if("mi_crim")
if (istype(active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["mi_crim"] = t1
if("mi_crim_d")
if (istype(active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["mi_crim_d"] = t1
if("ma_crim")
if (istype(active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["ma_crim"] = t1
if("ma_crim_d")
if (istype(active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["ma_crim_d"] = t1
if("notes")
if (istype(active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please summarize notes:", "Secure. records", active2.fields["notes"], null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
var/t1 = copytext(html_encode(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["notes"] = t1
if("criminal")
@@ -481,11 +520,18 @@ What a mess.*/
if ((istype(active1, /datum/data/record) && L.Find(rank)))
temp = "<h5>Rank:</h5>"
temp += "<ul>"
for(var/rank in get_all_jobs())
for(var/rank in joblist)
temp += "<li><a href='?src=\ref[src];choice=Change Rank;rank=[rank]'>[rank]</a></li>"
temp += "</ul>"
else
alert(usr, "You do not have the required rank to do this!")
if("species")
if (istype(active1, /datum/data/record))
var/t1 = copytext(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["species"] = t1
//TEMPORARY MENU FUNCTIONS
else//To properly clear as per clear screen.
temp=null
@@ -493,11 +539,13 @@ What a mess.*/
if ("Change Rank")
if (active1)
active1.fields["rank"] = href_list["rank"]
if(href_list["rank"] in get_all_jobs())
if(href_list["rank"] in joblist)
active1.fields["real_rank"] = href_list["real_rank"]
if ("Change Criminal Status")
if (active2)
for(var/mob/living/carbon/human/H in player_list)
H.hud_updateflag |= 1 << WANTED_HUD
switch(href_list["criminal2"])
if("none")
active2.fields["criminal"] = "None"
@@ -526,11 +574,11 @@ What a mess.*/
else
temp = "This function does not appear to be working at the moment. Our apologies."
add_fingerprint(usr)
updateUsrDialog()
return
//computer.updateUsrDialog()
interact()
return
/obj/machinery/computer/secure_data/emp_act(severity)
/obj/machinery/computer3/secure_data/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
@@ -558,6 +606,6 @@ What a mess.*/
..(severity)
/obj/machinery/computer/secure_data/detective_computer
/obj/machinery/computer3/secure_data/detective_computer
icon = 'icons/obj/computer.dmi'
icon_state = "messyfiles"
@@ -3,7 +3,7 @@
there is nothing interactive about it.
*/
/obj/machinery/computer/shuttle
/obj/machinery/computer3/shuttle
name = "Shuttle"
desc = "For shuttle control."
icon_state = "shuttle"
@@ -10,7 +10,7 @@ var/specops_shuttle_can_send = 1
var/specops_shuttle_time = 0
var/specops_shuttle_timeleft = 0
/obj/machinery/computer/specops_shuttle
/obj/machinery/computer3/specops_shuttle
name = "Spec. Ops. Shuttle Console"
icon = 'icons/obj/computer.dmi'
icon_state = "shuttle"
@@ -159,22 +159,22 @@ var/specops_shuttle_timeleft = 0
if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return 0
else return 1
/obj/machinery/computer/specops_shuttle/attackby(I as obj, user as mob)
/obj/machinery/computer3/specops_shuttle/attackby(I as obj, user as mob)
return attack_hand(user)
/obj/machinery/computer/specops_shuttle/attack_ai(var/mob/user as mob)
/obj/machinery/computer3/specops_shuttle/attack_ai(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/specops_shuttle/attack_paw(var/mob/user as mob)
/obj/machinery/computer3/specops_shuttle/attack_paw(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/specops_shuttle/attackby(I as obj, user as mob)
/obj/machinery/computer3/specops_shuttle/attackby(I as obj, user as mob)
if(istype(I,/obj/item/card/emag))
user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals."
else
return attack_hand(user)
/obj/machinery/computer/specops_shuttle/attack_hand(var/mob/user as mob)
/obj/machinery/computer3/specops_shuttle/attack_hand(var/mob/user as mob)
if(!allowed(user))
user << "\red Access Denied."
return
@@ -204,7 +204,7 @@ var/specops_shuttle_timeleft = 0
popup.open()
return
/obj/machinery/computer/specops_shuttle/Topic(href, href_list)
/obj/machinery/computer3/specops_shuttle/Topic(href, href_list)
if(..())
return
@@ -1,33 +1,23 @@
/obj/machinery/computer3/station_alert
default_prog = /datum/file/program/station_alert
spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/networking/radio)
icon_state = "frame-eng"
/obj/machinery/computer/station_alert
/datum/file/program/station_alert
name = "Station Alert Console"
desc = "Used to access the station's automated alert system."
icon_state = "alert:0"
circuit = "/obj/item/part/board/circuit/stationalert"
active_state = "alert:0"
var/alarms = list("Fire"=list(), "Atmosphere"=list(), "Power"=list())
attack_ai(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
return
attack_hand(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
return
interact(mob/user)
usr.set_machine(src)
var/dat = ""
if(!interactable())
return
var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
dat += "<A HREF='?src=\ref[user];mach_close=alerts'>Close</A><br><br>"
for (var/cat in src.alarms)
dat += text("<h2>[]</h2>", cat)
dat += text("<B>[]</B><BR>\n", cat)
var/list/L = src.alarms[cat]
if (L.len)
for (var/alarm in L)
@@ -36,7 +26,7 @@
var/list/sources = alm[3]
dat += "<NOBR>"
dat += "&bull; "
dat += "[format_text(A.name)]"
dat += "[A.name]"
if (sources.len > 1)
dat += text(" - [] sources", sources.len)
dat += "</NOBR><BR>\n"
@@ -45,11 +35,10 @@
dat += "<BR>\n"
//user << browse(dat, "window=alerts")
//onclose(user, "alerts")
var/datum/browser/popup = new(user, "alerts", "Current Station Alerts")
popup.add_head_content("<META HTTP-EQUIV='Refresh' CONTENT='10'>")
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.set_title_image(usr.browse_rsc_icon(computer.icon, computer.icon_state))
popup.open()
return
Topic(href, href_list)
@@ -59,8 +48,6 @@
proc/triggerAlarm(var/class, area/A, var/O, var/alarmsource)
if(stat & (BROKEN))
return
var/list/L = src.alarms[class]
for (var/I in L)
if (I == A.name)
@@ -82,8 +69,6 @@
proc/cancelAlarm(var/class, area/A as area, obj/origin)
if(stat & (BROKEN))
return
var/list/L = src.alarms[class]
var/cleared = 0
for (var/I in L)
@@ -98,17 +83,15 @@
return !cleared
process()
if(stat & (BROKEN|NOPOWER))
icon_state = "atmos0"
return
var/active_alarms = 0
for (var/cat in src.alarms)
var/list/L = src.alarms[cat]
if(L.len) active_alarms = 1
if(active_alarms)
icon_state = "alert:2"
active_state = "alert:2"
else
icon_state = "alert:0"
active_state = "alert:0"
..()
return
@@ -1,7 +1,7 @@
#define SYNDICATE_SHUTTLE_MOVE_TIME 240
#define SYNDICATE_SHUTTLE_COOLDOWN 200
/obj/machinery/computer/syndicate_station
/obj/machinery/computer3/syndicate_station
name = "syndicate shuttle terminal"
icon = 'icons/obj/computer.dmi'
icon_state = "syndishuttle"
@@ -11,11 +11,11 @@
var/lastMove = 0
/obj/machinery/computer/syndicate_station/New()
/obj/machinery/computer3/syndicate_station/New()
curr_location= locate(/area/syndicate_station/start)
/obj/machinery/computer/syndicate_station/proc/syndicate_move_to(area/destination as area)
/obj/machinery/computer3/syndicate_station/proc/syndicate_move_to(area/destination as area)
if(moving) return
if(lastMove + SYNDICATE_SHUTTLE_COOLDOWN > world.time) return
var/area/dest_location = locate(destination)
@@ -36,16 +36,16 @@
return 1
/obj/machinery/computer/syndicate_station/attackby(obj/item/I as obj, mob/user as mob)
/obj/machinery/computer3/syndicate_station/attackby(obj/item/I as obj, mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/syndicate_station/attack_ai(mob/user as mob)
/obj/machinery/computer3/syndicate_station/attack_ai(mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/syndicate_station/attack_paw(mob/user as mob)
/obj/machinery/computer3/syndicate_station/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/syndicate_station/attack_hand(mob/user as mob)
/obj/machinery/computer3/syndicate_station/attack_hand(mob/user as mob)
if(!allowed(user))
user << "\red Access Denied"
return
@@ -69,7 +69,7 @@
return
/obj/machinery/computer/syndicate_station/Topic(href, href_list)
/obj/machinery/computer3/syndicate_station/Topic(href, href_list)
if(!isliving(usr)) return
var/mob/living/user = usr
@@ -99,5 +99,5 @@
updateUsrDialog()
return
/obj/machinery/computer/syndicate_station/bullet_act(var/obj/item/projectile/Proj)
/obj/machinery/computer3/syndicate_station/bullet_act(var/obj/item/projectile/Proj)
visible_message("[Proj] ricochets off [src]!") //let's not let them fuck themselves in the rear
@@ -10,7 +10,7 @@ var/syndicate_elite_shuttle_can_send = 1
var/syndicate_elite_shuttle_time = 0
var/syndicate_elite_shuttle_timeleft = 0
/obj/machinery/computer/syndicate_elite_shuttle
/obj/machinery/computer3/syndicate_elite_shuttle
name = "Elite Syndicate Squad Shuttle Console"
icon = 'icons/obj/computer.dmi'
icon_state = "syndishuttle"
@@ -172,22 +172,22 @@ var/syndicate_elite_shuttle_timeleft = 0
if(syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return 0
else return 1
/obj/machinery/computer/syndicate_elite_shuttle/attackby(I as obj, user as mob)
/obj/machinery/computer3/syndicate_elite_shuttle/attackby(I as obj, user as mob)
return attack_hand(user)
/obj/machinery/computer/syndicate_elite_shuttle/attack_ai(var/mob/user as mob)
/obj/machinery/computer3/syndicate_elite_shuttle/attack_ai(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/syndicate_elite_shuttle/attack_paw(var/mob/user as mob)
/obj/machinery/computer3/syndicate_elite_shuttle/attack_paw(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/syndicate_elite_shuttle/attackby(I as obj, user as mob)
/obj/machinery/computer3/syndicate_elite_shuttle/attackby(I as obj, user as mob)
if(istype(I,/obj/item/card/emag))
user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals."
else
return attack_hand(user)
/obj/machinery/computer/syndicate_elite_shuttle/attack_hand(var/mob/user as mob)
/obj/machinery/computer3/syndicate_elite_shuttle/attack_hand(var/mob/user as mob)
if(!allowed(user))
user << "\red Access Denied."
return
@@ -216,7 +216,7 @@ var/syndicate_elite_shuttle_timeleft = 0
popup.open()
return
/obj/machinery/computer/syndicate_elite_shuttle/Topic(href, href_list)
/obj/machinery/computer3/syndicate_elite_shuttle/Topic(href, href_list)
if(..())
return
@@ -0,0 +1,34 @@
/obj/machinery/computer3/laptop/vended
default_prog = /datum/file/program/welcome
/datum/file/program/welcome
name = "Welcome Screen"
desc = "First time boot splash screen"
active_state = "osod"
image = 'icons/ntos/program.png'
interact()
usr.set_machine(src)
if(!interactable())
return
var/dat = ""
dat += "<center><span style='font-size:24pt'><b>Welcome to NTOS</b></span></center>"
dat += "<center><span style='font-size:8pt'>Thank you for choosing NTOS, your gateway to the future of mobile computing technology, sponsored by Nanotrasen (R)</span></center><br>"
dat += "<span style='font-size:12pt'><b>Getting started with NTOS:</b></span><br>"
dat += "To leave a current program, click the X button in the top right corner of the window. This will return you to the NTOS desktop. \
From the desktop, you can open the hard drive, usually located in the top left corner to access all the programs installed on your computer. \
When you rented your laptop, you were supplied with programs that your Nanotrasen Issued ID has given you access to use. \
In the event of a serious error, the right click menu will give you the ability to reset your computer. To open and close your laptop, alt-click your device.\
If you have any questions or technical issues, please contact your local computer technical experts at your local Central Command."
popup.set_content(dat)
popup.set_title_image(usr.browse_rsc_icon(computer.icon, computer.icon_state))
popup.open()
return
Topic(href, href_list)
if(!interactable() || ..(href,href_list))
return
interact()
return
+2 -2
View File
@@ -10,7 +10,7 @@
var/name = "File"
var/extension = "dat"
var/volume = 10 // in KB
var/image = 'icons/NTOS/file.png' // determines the icon to use, found in icons/NTOS
var/image = 'icons/ntos/file.png' // determines the icon to use, found in icons/ntos
var/obj/machinery/computer3/computer // the parent computer, if fixed
var/obj/item/part/computer/storage/device // the device that is containing this file
@@ -108,7 +108,7 @@
/datum/file/data/text
name = "Text File"
extension = "txt"
image = 'icons/NTOS/file.png'
image = 'icons/ntos/file.png'
content = ""
file_increment = 0.002 // 0.002 kilobytes per character (1024 characters per KB)
+3 -2
View File
@@ -22,9 +22,10 @@
desc = "A clamshell portable computer. It is closed."
icon = 'icons/obj/computer3.dmi'
icon_state = "laptop-closed"
item_state = "laptop-inhand"
pixel_x = 2
pixel_y = -3
w_class = 4
w_class = 3
var/obj/machinery/computer3/laptop/stored_computer = null
@@ -122,7 +123,7 @@
else
stat &= ~NOPOWER
Destroy()
Del()
if(istype(loc,/obj/item/device/laptop))
var/obj/O = loc
spawn(5)
+398
View File
@@ -0,0 +1,398 @@
/obj/machinery/lapvend
name = "Laptop Vendor"
desc = "A generic vending machine."
icon = 'icons/obj/vending.dmi'
icon_state = "robotics"
layer = 2.9
anchored = 1
density = 1
var/datum/browser/popup = null
var/obj/machinery/computer3/laptop/vended/newlap = null
var/obj/item/device/laptop/relap = null
var/vendmode = 0
var/cardreader = 0
var/floppy = 0
var/radionet = 0
var/camera = 0
var/network = 0
var/power = 0
/obj/machinery/lapvend/New()
..()
spawn(4)
power_change()
return
return
/obj/machinery/lapvend/blob_act()
if (prob(50))
spawn(0)
del(src)
return
return
/obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(vendmode == 1)
if(istype(W, /obj/item/weapon/card))
var/obj/item/weapon/card/I = W
scan_card(I)
vendmode = 0
if(vendmode == 3)
if(istype(W,/obj/item/weapon/card))
var/obj/item/weapon/card/I = W
reimburse(I)
vendmode = 0
if(vendmode == 0)
if(istype(W, /obj/item/device/laptop))
var/obj/item/device/laptop/L = W
relap = L
calc_reimburse(L)
usr.drop_item()
L.loc = src
vendmode = 3
usr << "<span class='notice'>You slot your [L.name] into \The [src.name]</span>"
else
..()
/obj/machinery/lapvend/attack_hand(mob/user as mob)
user.set_machine(src)
var/vendorname = (src.name) //import the machine's name
var/dat = "<TT><center><b>[vendorname]</b></center><hr /><br>" //display the name, and added a horizontal rule
if(vendmode == 0)
dat += "<center><b>Please choose your laptop customization options</b></center><br>"
dat += "<center>Your comptuer will automatically be loaded with any programs you can use after the transaction is complete."
dat += "<center><b>Some programs will require additional components to be installed!</center></b><hr /><br>"
dat += "<center><b>HDD (Required)</b> : Added</center><br>"
dat += "<center><b>Card Reader</b> : <A href='?src=\ref[src];choice=single_add'>Single (50)</a> | <A href='?src=\ref[src];choice=dual_add'>Dual (125)</a><br>"
dat += "<center><b>Floppy Drive</b>: <A href='?src=\ref[src];choice=floppy_add'>Add (50)</a><br>"
dat += "<center><b>Radio Network card</b> <A href='?src=\ref[src];choice=radio_add'>Add (50)</a><br>"
dat += "<center><b>Camera Card</b> <A href='?src=\ref[src];choice=camnet_add'>Add (100)</a><br>"
dat += "<center><b> Network card</b> <A href='?src=\ref[src];choice=area_add'>Area (75)</a> <A href='?src=\ref[src];choice=prox_add'>Adjacent (50)</a><A href='?src=\ref[src];choice=cable_add'>Powernet (25)</a><br>"
dat += "<hr /><center> Power source upgrade</center> <A href='?src=\ref[src];choice=high_add'>Extended (175)</a> <A href='?src=\ref[src];choice=super_add'>Unreal (250)</a>"
if(vendmode == 0 || vendmode == 1)
dat += "<hr /><br><center>Cart</center><br>"
dat += "<b>Total: [total()]</b><br>"
if(cardreader == 1)
dat += "<A href='?src=\ref[src];choice=single_rem'>Card Reader: (single) (50)</a><br>"
else if (cardreader == 2)
dat += "<A href='?src=\ref[src];choice=dual_rem'>Card Reader: (double) (125)</a><br>"
else
dat += "Card Reader: None<br>"
if(floppy == 0)
dat += "Floppy Drive: None<br>"
else
dat += "<A href='?src=\ref[src];choice=floppy_rem'>Floppy Drive: Added (50)</a><br>"
if(radionet == 1)
dat += "<A href='?src=\ref[src];choice=radio_rem'>Radio Card: Added (50)</a><br>"
else
dat += "Radio Card: None<br>"
if(camera == 1)
dat += "<A href='?src=\ref[src];choice=camnet_rem'>Camera Card: Added (100)</a><br>"
else
dat += "Camera Card: None<br>"
if(network == 1)
dat += "<A href='?src=\ref[src];choice=area_rem'>Network card: Area (75)</a><br>"
else if(network == 2)
dat += "<A href='?src=\ref[src];choice=prox_rem'>Network card: Adjacent (50)</a><br>"
else if(network == 3)
dat += "<A href='?src=\ref[src];choice=cable_rem'>Network card: Powernet (25)</a><br>"
else
dat += "Network card: None"
if (power == 0)
dat += "Power source: Regular"
else if (power == 1)
dat += "<A href='?src=\ref[src];choice=high_rem'>Power source: Extended (175)</a><br>"
else
dat += "<A href='?src=\ref[src];choice=super_rem'>Power source: Unreal (250)</a><br>"
if(vendmode == 0)
dat += "<br><A href='?src=\ref[src];choice=vend'>Vend Laptop</a>"
if(vendmode == 1)
dat += "Please swipe your card and enter your PIN to complete the transaction"
if(vendmode == 3)
dat += "Please swipe your card and enter your PIN to be finish returning your computer<br>"
dat += "<a href='?src=\ref[src];choice=cancel'>Cancel</a>"
popup = new(user, "lapvend", name, 450, 500)
popup.set_content(dat)
popup.open()
return
/obj/machinery/lapvend/Topic(href, href_list)
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.set_machine(src)
switch(href_list["choice"])
if("single_add")
cardreader = 1
if ("dual_add")
cardreader = 2
if ("floppy_add")
floppy = 1
if ("radio_add")
radionet = 1
if ("camnet_add")
camera = 1
if ("area_add")
network = 1
if ("prox_add")
network = 2
if ("cable_add")
network = 3
if ("high_add")
power = 1
if ("super_add")
power = 2
if ("single_rem" || "dual_rem")
cardreader = 0
if ("floppy_rem")
floppy = 0
if ("radio_rem")
radionet = 0
if ("camnet_rem")
camera = 0
if ("area_rem" || "prox_rem" || "cable_rem")
network = 0
if ("high_rem" || "super_rem")
power = 0
if("vend")
vendmode = 1
if("cancel")
relap.loc = src.loc
relap = null
vendmode = 0
src.updateUsrDialog()
return
/obj/machinery/lapvend/proc/vend()
if(cardreader > 0)
if(cardreader == 1)
newlap.spawn_parts += (/obj/item/part/computer/cardslot)
else
newlap.spawn_parts += (/obj/item/part/computer/cardslot/dual)
if(floppy == 1)
newlap.spawn_parts += (/obj/item/part/computer/storage/removable)
if(radionet == 1)
newlap.spawn_parts += (/obj/item/part/computer/networking/radio)
if(camera == 1)
newlap.spawn_parts += (/obj/item/part/computer/networking/cameras)
if (network == 1)
newlap.spawn_parts += (/obj/item/part/computer/networking/area)
if (network == 2)
newlap.spawn_parts += (/obj/item/part/computer/networking/prox)
if (network == 3)
newlap.spawn_parts += (/obj/item/part/computer/networking/cable)
if (power == 1)
del(newlap.battery)
newlap.battery = new /obj/item/weapon/cell/high(newlap)
if (power == 2)
del(newlap.battery)
newlap.battery = new /obj/item/weapon/cell/super(newlap)
newlap.spawn_parts()
/obj/machinery/lapvend/proc/scan_card(var/obj/item/weapon/card/I)
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
if(vendor_account)
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
if(D)
var/transaction_amount = total()
if(transaction_amount <= D.money)
//transfer the money
D.money -= transaction_amount
vendor_account.money += transaction_amount
//Transaction logs
var/datum/transaction/T = new()
T.target_name = "[vendor_account.owner_name] (via [src.name])"
T.purpose = "Purchase of Laptop"
if(transaction_amount > 0)
T.amount = "([transaction_amount])"
else
T.amount = "[transaction_amount]"
T.source_terminal = src.name
T.date = current_date_string
T.time = worldtime2text()
D.transaction_log.Add(T)
//
T = new()
T.target_name = D.owner_name
T.purpose = "Purchase of Laptop"
T.amount = "[transaction_amount]"
T.source_terminal = src.name
T.date = current_date_string
T.time = worldtime2text()
vendor_account.transaction_log.Add(T)
newlap = new /obj/machinery/computer3/laptop/vended(src.loc)
choose_progs(C)
vend()
popup.close()
newlap.close_computer()
newlap = null
cardreader = 0
floppy = 0
radionet = 0
camera = 0
network = 0
power = 0
else
usr << "\icon[src]<span class='warning'>You don't have that much money!</span>"
else
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
else
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
/obj/machinery/lapvend/proc/total()
var/total = 0
if(cardreader == 1)
total += 50
if(cardreader == 2)
total += 125
if(floppy == 1)
total += 50
if(radionet == 1)
total += 50
if(camera == 1)
total += 100
if(network == 1)
total += 75
if(network == 2)
total += 50
if(network == 3)
total += 25
if(power == 1)
total += 175
if(power == 2)
total += 250
return total
/obj/machinery/lapvend/proc/choose_progs(var/obj/item/weapon/card/id/C)
if(access_security in C.access)
newlap.spawn_files += (/datum/file/program/secure_data)
newlap.spawn_files += (/datum/file/camnet_key)
newlap.spawn_files += (/datum/file/program/security)
if(access_armory in C.access)
newlap.spawn_files += (/datum/file/program/prisoner)
if(access_atmospherics in C.access)
newlap.spawn_files += (/datum/file/program/atmos_alert)
if(access_change_ids in C.access)
newlap.spawn_files += (/datum/file/program/card_comp)
if(access_heads in C.access)
newlap.spawn_files += (/datum/file/program/communications)
if(access_medical in C.access)
newlap.spawn_files += (/datum/file/program/crew)
newlap.spawn_files += (/datum/file/program/med_data)
if(access_engine in C.access)
newlap.spawn_files += (/datum/file/program/powermon)
if(access_research in C.access)
newlap.spawn_files += (/datum/file/camnet_key/research)
newlap.spawn_files += (/datum/file/camnet_key/bombrange)
newlap.spawn_files += (/datum/file/camnet_key/xeno)
if(access_rd in C.access)
newlap.spawn_files += (/datum/file/program/borg_control)
if(access_cent_specops in C.access)
newlap.spawn_files += (/datum/file/camnet_key/creed)
newlap.spawn_files += (/datum/file/program/arcade)
newlap.spawn_files += (/datum/file/camnet_key/entertainment)
newlap.update_spawn_files()
/obj/machinery/lapvend/proc/calc_reimburse(var/obj/item/device/laptop/L)
if(istype(L.stored_computer.cardslot,/obj/item/part/computer/cardslot))
cardreader = 1
if(istype(L.stored_computer.cardslot,/obj/item/part/computer/cardslot/dual))
cardreader = 2
if(istype(L.stored_computer.floppy,/obj/item/part/computer/storage/removable))
floppy = 1
if(istype(L.stored_computer.radio,/obj/item/part/computer/networking/radio))
radionet = 1
if(istype(L.stored_computer.camnet,/obj/item/part/computer/networking/cameras))
camera = 1
if(istype(L.stored_computer.net,/obj/item/part/computer/networking/area))
network = 1
if(istype(L.stored_computer.net,/obj/item/part/computer/networking/prox))
network = 2
if(istype(L.stored_computer.net,/obj/item/part/computer/networking/cable))
network = 3
if(istype(L.stored_computer.battery, /obj/item/weapon/cell/high))
power = 1
if(istype(L.stored_computer.battery, /obj/item/weapon/cell/super))
power = 2
/obj/machinery/lapvend/proc/reimburse(var/obj/item/weapon/card/I)
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
if(vendor_account)
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
if(D)
var/transaction_amount = total()
//transfer the money
D.money += transaction_amount
vendor_account.money -= transaction_amount
//Transaction logs
var/datum/transaction/T = new()
T.target_name = "[vendor_account.owner_name] (via [src.name])"
T.purpose = "Return purchase of Laptop"
if(transaction_amount > 0)
T.amount = "([transaction_amount])"
else
T.amount = "[transaction_amount]"
T.source_terminal = src.name
T.date = current_date_string
T.time = worldtime2text()
D.transaction_log.Add(T)
//
T = new()
T.target_name = D.owner_name
T.purpose = "Return purchase of Laptop"
T.amount = "[transaction_amount]"
T.source_terminal = src.name
T.date = current_date_string
T.time = worldtime2text()
vendor_account.transaction_log.Add(T)
del(relap)
vendmode = 0
cardreader = 0
floppy = 0
radionet = 0
camera = 0
network = 0
power = 0
else
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
else
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
+32 -26
View File
@@ -6,7 +6,7 @@ Programs are a file that can be executed
/datum/file/program
name = "Untitled"
extension = "prog"
image = 'icons/NTOS/program.png'
image = 'icons/ntos/program.png'
var/desc = "An unidentifiable program."
var/image/overlay = null // Icon to be put on top of the computer frame.
@@ -35,6 +35,12 @@ Programs are a file that can be executed
overlay = image('icons/obj/computer3.dmi',icon_state = active_state)
/datum/file/program/proc/decode(text)
//adds line breaks
text = replacetext(text, "\n","<BR>")
return text
/datum/file/program/execute(var/datum/file/source)
if(computer && !computer.stat)
@@ -148,7 +154,7 @@ Programs are a file that can be executed
if(!popup)
popup = new(user, "\ref[computer]", name, nref=src)
popup.set_title_image(usr.browse_rsc_icon(overlay.icon, overlay.icon_state))
popup.set_title_buttons(topic_link(src,"quit","<img src=\ref['icons/NTOS/tb_close.png']>"))
popup.set_title_buttons(topic_link(src,"quit","<img src=\ref['icons/ntos/tb_close.png']>"))
if(popup.user != user)
popup.user = user
popup.set_title_image(usr.browse_rsc_icon(overlay.icon, overlay.icon_state))
@@ -247,7 +253,7 @@ Programs are a file that can be executed
//
if("quit" in href_list)
computer.program = null
usr << browse(null,"window=\ref[computer]") // NTOS will need to resize the window
usr << browse(null,"window=\ref[computer]") // ntos will need to resize the window
computer.update_icon()
computer.updateDialog()
return 1
@@ -256,85 +262,85 @@ Programs are a file that can be executed
/datum/file/program/RD
name = "R&D Manager"
image = 'icons/NTOS/research.png'
image = 'icons/ntos/research.png'
desc = "A software suit for generic research and development machinery interaction. Comes pre-packaged with extensive cryptographic databanks for secure connections with external devices."
active_state = "rdcomp"
volume = 11000
/datum/file/program/RDserv
name = "R&D Server"
image = 'icons/NTOS/server.png'
image = 'icons/ntos/server.png'
active_state = "rdcomp"
volume = 9000
/datum/file/program/SuitSensors
name = "Crew Monitoring"
image = 'icons/NTOS/monitoring.png'
image = 'icons/ntos/monitoring.png'
active_state = "crew"
volume = 3400
/datum/file/program/Genetics
name = "Genetics Suite"
image = 'icons/NTOS/genetics.png'
image = 'icons/ntos/genetics.png'
desc = "A sophisticated software suite containing read-only genetics hardware specifications and a highly compressed genome databank."
active_state = "dna"
volume = 8000
/datum/file/program/Cloning
name = "Cloning Platform"
image = 'icons/NTOS/cloning.png'
image = 'icons/ntos/cloning.png'
desc = "A software platform for accessing external cloning apparatus."
active_state = "dna"
volume = 7000
/datum/file/program/TCOMmonitor
name = "TComm Monitor"
image = 'icons/NTOS/tcomms.png'
image = 'icons/ntos/tcomms.png'
active_state = "comm_monitor"
volume = 5500
/datum/file/program/TCOMlogs
name = "TComm Log View"
image = 'icons/NTOS/tcomms.png'
image = 'icons/ntos/tcomms.png'
active_state = "comm_logs"
volume = 5230
/datum/file/program/TCOMtraffic
name = "TComm Traffic"
image = 'icons/NTOS/tcomms.png'
image = 'icons/ntos/tcomms.png'
active_state = "generic"
volume = 8080
/datum/file/program/securitycam
name = "Sec-Cam Viewport"
image = 'icons/NTOS/camera.png'
image = 'icons/ntos/camera.png'
drm = 1
active_state = "cameras"
volume = 2190
/datum/file/program/securityrecords
name = "Security Records"
image = 'icons/NTOS/records.png'
image = 'icons/ntos/records.png'
drm = 1
active_state = "security"
volume = 2520
/datum/file/program/medicalrecords
name = "Medical Records"
image = 'icons/NTOS/medical.png'
image = 'icons/ntos/medical.png'
drm = 1
active_state = "medcomp"
volume = 5000
/datum/file/program/SMSmonitor
name = "Messaging Monitor"
image = 'icons/NTOS/pda.png'
image = 'icons/ntos/pda.png'
active_state = "comm_monitor"
volume = 3070
/datum/file/program/OperationMonitor
name = "OR Monitor"
image = 'icons/NTOS/operating.png'
image = 'icons/ntos/operating.png'
active_state = "operating"
volume = 4750
@@ -343,40 +349,40 @@ Programs are a file that can be executed
active_state = "computer_generic"
volume = 520
/datum/file/program/PowerMonitor
/datum/file/program/powermon
name = "Power Grid"
image = 'icons/NTOS/power.png'
image = 'icons/ntos/power.png'
active_state = "power"
volume = 7200
/datum/file/program/PrisonerManagement
/datum/file/program/prisoner
name = "Prisoner Control"
image = 'icons/NTOS/prison.png'
image = 'icons/ntos/prison.png'
drm = 1
active_state = "power"
volume = 5000
/datum/file/program/Roboticscontrol
/datum/file/program/borg_control
name = "Cyborg Maint"
image = 'icons/NTOS/borgcontrol.png'
image = 'icons/ntos/borgcontrol.png'
active_state = "robot"
volume = 9050
/datum/file/program/AIupload
name = "AI Upload"
image = 'icons/NTOS/aiupload.png'
image = 'icons/ntos/aiupload.png'
active_state = "command"
volume = 5000
/datum/file/program/Cyborgupload
name = "Cyborg Upload"
image = 'icons/NTOS/borgupload.png'
image = 'icons/ntos/borgupload.png'
active_state = "command"
volume = 5000
/datum/file/program/Exosuit
name = "Exosuit Monitor"
image = 'icons/NTOS/exocontrol.png'
image = 'icons/ntos/exocontrol.png'
active_state = "mecha"
volume = 7000
@@ -387,7 +393,7 @@ Programs are a file that can be executed
/datum/file/program/Stationalert
name = "Alert Monitor"
image = 'icons/NTOS/alerts.png'
image = 'icons/ntos/alerts.png'
active_state = "computer_generic"
volume = 10150
@@ -7,12 +7,12 @@
icon_state = "datadisk_arcade"
spawn_files = list(/datum/file/program/arcade,/datum/file/program/arcade,/datum/file/program/arcade,/datum/file/program/arcade)
/obj/item/weapon/disk/file/aifixer
/*/obj/item/weapon/disk/file/aifixer
name = "AI System Integrity Restorer"
desc = "A program install disk."
icon = 'icons/obj/stock_parts.dmi'
icon_state = "datadisk_arcade"
spawn_files = list(/datum/file/program/aifixer)
spawn_files = list(/datum/file/program/aifixer)*/
/obj/item/weapon/disk/file/atmos_alert
name = "Atmospheric Alert Notifier"
@@ -22,7 +22,7 @@
execute(var/datum/file/program/source)
if(istype(usr,/mob/living/silicon))
return
if(istype(source,/datum/file/program/NTOS))
if(istype(source,/datum/file/program/ntos))
if(configurable)
configure()
return
+17 -18
View File
@@ -63,9 +63,11 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
if(!istype(S))
del src
return
if(!S.zone)
del src
return
var/datum/gas_mixture/air_contents = S.return_air()
//get liquid fuels on the ground.
@@ -84,9 +86,10 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
air_contents.trace_gases.Remove(fuel)
//check if there is something to combust
if(!air_contents.check_recombustability(liquid))
if(!air_contents.check_combustability(liquid))
//del src
RemoveFire()
return
//get a firelevel and set the icon
firelevel = air_contents.calculate_firelevel(liquid)
@@ -104,19 +107,20 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
//im not sure how to implement a version that works for every creature so for now monkeys are firesafe
for(var/mob/living/carbon/human/M in loc)
M.FireBurn(firelevel, air_contents.temperature, air_contents.return_pressure() ) //Burn the humans!
loc.fire_act(air_contents, air_contents.temperature, air_contents.return_volume())
for(var/atom/A in loc)
A.fire_act(air_contents, air_contents.temperature, air_contents.return_volume())
//spread
for(var/direction in cardinal)
if(S.open_directions & direction) //Grab all valid bordering tiles
var/turf/simulated/enemy_tile = get_step(S, direction)
var/turf/simulated/enemy_tile = get_step(S, direction)
if(istype(enemy_tile))
if(istype(enemy_tile))
if(S.open_directions & direction) //Grab all valid bordering tiles
var/datum/gas_mixture/acs = enemy_tile.return_air()
var/obj/effect/decal/cleanable/liquid_fuel/liq = locate() in enemy_tile
if(!acs) continue
if(!acs.check_recombustability(liq)) continue
if(!acs.check_combustability(liq)) continue
//If extinguisher mist passed over the turf it's trying to spread to, don't spread and
//reduce firelevel.
if(enemy_tile.fire_protection > world.time-30)
@@ -128,22 +132,17 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
if( prob( 50 + 50 * (firelevel/vsc.fire_firelevel_multiplier) ) && S.CanPass(null, enemy_tile, 0,0) && enemy_tile.CanPass(null, S, 0,0))
new/obj/fire(enemy_tile,firelevel)
else
enemy_tile.adjacent_fire_act(loc, air_contents, air_contents.temperature, air_contents.return_volume())
//seperate part of the present gas
//this is done to prevent the fire burning all gases in a single pass
var/datum/gas_mixture/flow = air_contents.remove_ratio(vsc.fire_consuption_rate)
///////////////////////////////// FLOW HAS BEEN CREATED /// DONT DELETE THE FIRE UNTIL IT IS MERGED BACK OR YOU WILL DELETE AIR ///////////////////////////////////////////////
if(flow)
if(flow.check_recombustability(liquid))
//Ensure flow temperature is higher than minimum fire temperatures.
//this creates some energy ex nihilo but is necessary to get a fire started
//lets just pretend this energy comes from the ignition source and dont mention this again
//flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature)
//burn baby burn!
flow.zburn(liquid,1)
//burn baby burn!
flow.zburn(liquid,1)
//merge the air back
S.assume_air(flow)
@@ -275,9 +274,9 @@ datum/gas_mixture/proc/check_combustability(obj/effect/decal/cleanable/liquid_fu
if(oxygen && (toxins || fuel || liquid))
if(liquid)
return 1
if (toxins >= 0.1)
if(QUANTIZE(toxins * vsc.fire_consuption_rate) >= 0.1)
return 1
if(fuel && fuel.moles >= 0.1)
if(fuel && QUANTIZE(fuel.moles * vsc.fire_consuption_rate) >= 0.1)
return 1
return 0
+10
View File
@@ -26,6 +26,10 @@
#endif
var/turf/unsim = get_step(src, d)
if(!unsim)
continue
block = unsim.c_airblock(src)
if(block & AIR_BLOCKED)
@@ -75,6 +79,10 @@
#endif
var/turf/unsim = get_step(src, d)
if(!unsim) //edge of map
continue
var/block = unsim.c_airblock(src)
if(block & AIR_BLOCKED)
@@ -108,6 +116,8 @@
if(istype(unsim, /turf/simulated))
var/turf/simulated/sim = unsim
sim.open_directions |= reverse_dir[d]
if(air_master.has_valid_zone(sim))
//Might have assigned a zone, since this happens for each direction.
-2
View File
@@ -22,7 +22,6 @@ var/global/list/side_effects = list() //list of all medical sideeffects types
var/global/list/mechas_list = list() //list of all mechs. Used by hostile mobs target tracking.
var/global/list/joblist = list() //list of all jobstypes, minus borg and AI
var/global/list/flag_list = list() //list of flags during Nations gamemode
var/global/list/clothing_list = list() //list of all /obj/item/clothing instances in the world
//Languages/species/whitelist.
var/global/list/all_species[0]
@@ -111,7 +110,6 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
var/datum/language/L = new T
all_languages[L.name] = L
var/rkey = 0
paths = typesof(/datum/species)-/datum/species
for(var/T in paths)
+4 -26
View File
@@ -563,31 +563,6 @@ var/list/sortMobsOrder = list( "/mob/living/silicon/ai",
return loc
// Registers the on-close verb for a browse window (client/verb/.windowclose)
// this will be called when the close-button of a window is pressed.
//
// This is usually only needed for devices that regularly update the browse window,
// e.g. canisters, timers, etc.
//
// windowid should be the specified window name
// e.g. code is : user << browse(text, "window=fred")
// then use : onclose(user, "fred")
//
// Optionally, specify the "ref" parameter as the controlled atom (usually src)
// to pass a "close=1" parameter to the atom's Topic() proc for special handling.
// Otherwise, the user mob's machine var will be reset directly.
//
/proc/onclose(mob/user, windowid, var/atom/ref=null)
if(!user.client) return
var/param = "null"
if(ref)
param = "\ref[ref]"
winset(user, windowid, "on-close=\".windowclose [param]\"")
//world << "OnClose [user]: [windowid] : ["on-close=\".windowclose [param]\""]"
// the on-close client verb
// called when a browser popup window is closed after registering with proc/onclose()
// if a valid atom reference is supplied, call the atom's Topic() with "close=1"
@@ -1491,6 +1466,8 @@ proc/rotate_icon(file, state, step = 1, aa = FALSE)
return result
/proc/format_text(text)
return replacetext(replacetext(text,"\proper ",""),"\improper ","")
/*
Standard way to write links -Sayu
@@ -1502,6 +1479,7 @@ Standard way to write links -Sayu
return "<a href='?src=\ref[D];[arglist]'>[content]</a>"
/proc/get_location_accessible(mob/M, location)
var/covered_locations = 0 //based on body_parts_covered
var/face_covered = 0 //based on flags_inv
@@ -1632,4 +1610,4 @@ atom/proc/GetTypeInAllContents(typepath)
processed |= A
return found
return found
+3 -1
View File
@@ -231,7 +231,9 @@ turf/proc/update_lumcount(amount, _lcolor, removing = 0)
l_color = null // All our color is gone, no color for us.
else if (colors && colors.len > 1)
var/maxdepth = 3 // Will blend 3 colors, anymore than that and it looks bad or we will get lag on every tile update.
var/currentblended = MixColors(colors.Copy(1,maxdepth+1))
var/currentblended = colors
if (colors.len > maxdepth)
currentblended = MixColors(colors.Copy(1,maxdepth+1))
if (currentblended)
//world << "Ended up with [currentblended]"
@@ -0,0 +1,278 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
// Controls the emergency shuttle
var/global/datum/emergency_shuttle_controller/emergency_shuttle
/datum/emergency_shuttle_controller
var/datum/shuttle/ferry/emergency/shuttle
var/list/escape_pods
var/launch_time //the time at which the shuttle will be launched
var/auto_recall = 0 //if set, the shuttle will be auto-recalled
var/auto_recall_time //the time at which the shuttle will be auto-recalled
var/evac = 0 //1 = emergency evacuation, 0 = crew transfer
var/wait_for_launch = 0 //if the shuttle is waiting to launch
var/autopilot = 1 //set to 0 to disable the shuttle automatically launching
var/deny_shuttle = 0 //allows admins to prevent the shuttle from being called
var/departed = 0 //if the shuttle has left the station at least once
/datum/emergency_shuttle_controller/proc/setup_pods()
escape_pods = list()
var/datum/shuttle/ferry/escape_pod/pod
pod = new()
pod.location = 0
pod.warmup_time = 0
pod.area_station = locate(/area/shuttle/escape_pod1/station)
pod.area_offsite = locate(/area/shuttle/escape_pod1/centcom)
pod.area_transition = locate(/area/shuttle/escape_pod1/transit)
pod.transit_direction = NORTH
pod.move_time = SHUTTLE_TRANSIT_DURATION_RETURN
escape_pods += pod
pod = new()
pod.location = 0
pod.warmup_time = 0
pod.area_station = locate(/area/shuttle/escape_pod2/station)
pod.area_offsite = locate(/area/shuttle/escape_pod2/centcom)
pod.area_transition = locate(/area/shuttle/escape_pod2/transit)
pod.transit_direction = NORTH
pod.move_time = SHUTTLE_TRANSIT_DURATION_RETURN
escape_pods += pod
pod = new()
pod.location = 0
pod.warmup_time = 0
pod.area_station = locate(/area/shuttle/escape_pod3/station)
pod.area_offsite = locate(/area/shuttle/escape_pod3/centcom)
pod.area_transition = locate(/area/shuttle/escape_pod3/transit)
pod.transit_direction = EAST
pod.move_time = SHUTTLE_TRANSIT_DURATION_RETURN
escape_pods += pod
//There is no pod 4, apparently.
pod = new()
pod.location = 0
pod.warmup_time = 0
pod.area_station = locate(/area/shuttle/escape_pod5/station)
pod.area_offsite = locate(/area/shuttle/escape_pod5/centcom)
pod.area_transition = locate(/area/shuttle/escape_pod5/transit)
pod.transit_direction = EAST //should this be WEST? I have no idea.
pod.move_time = SHUTTLE_TRANSIT_DURATION_RETURN
escape_pods += pod
/datum/emergency_shuttle_controller/proc/process()
if (wait_for_launch)
if (auto_recall && world.time >= auto_recall_time)
recall()
if (world.time >= launch_time) //time to launch the shuttle
stop_launch_countdown()
if (!shuttle.location) //leaving from the station
//launch the pods!
for (var/datum/shuttle/ferry/escape_pod/pod in escape_pods)
pod.launch(src)
if(autopilot)
shuttle.launch(src)
//called when the shuttle has arrived.
/datum/emergency_shuttle_controller/proc/shuttle_arrived()
if (!shuttle.location && autopilot) //at station
set_launch_countdown(SHUTTLE_LEAVETIME) //get ready to return
//begins the launch countdown and sets the amount of time left until launch
/datum/emergency_shuttle_controller/proc/set_launch_countdown(var/seconds)
wait_for_launch = 1
launch_time = world.time + seconds*10
/datum/emergency_shuttle_controller/proc/stop_launch_countdown()
wait_for_launch = 0
//calls the shuttle for an emergency evacuation
/datum/emergency_shuttle_controller/proc/call_evac()
if(!can_call()) return
//set the launch timer
autopilot = 1
set_launch_countdown(get_shuttle_prep_time())
auto_recall_time = rand(world.time + 300, launch_time - 300)
evac = 1
captain_announce("An emergency evacuation shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.")
world << sound('sound/AI/shuttlecalled.ogg')
for(var/area/A in world)
if(istype(A, /area/hallway))
A.readyalert()
//calls the shuttle for a routine crew transfer
/datum/emergency_shuttle_controller/proc/call_transfer()
if(!can_call()) return
//set the launch timer
autopilot = 1
set_launch_countdown(get_shuttle_prep_time())
auto_recall_time = rand(world.time + 300, launch_time - 300)
captain_announce("A crew transfer has been initiated. The shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.")
//recalls the shuttle
/datum/emergency_shuttle_controller/proc/recall()
if (!can_recall()) return
wait_for_launch = 0
shuttle.cancel_launch(src)
if (evac)
captain_announce("The emergency shuttle has been recalled.")
world << sound('sound/AI/shuttlerecalled.ogg')
for(var/area/A in world)
if(istype(A, /area/hallway))
A.readyreset()
evac = 0
else
captain_announce("The scheduled crew transfer has been cancelled.")
/datum/emergency_shuttle_controller/proc/can_call()
if (deny_shuttle)
return 0
if (shuttle.moving_status != SHUTTLE_IDLE || !shuttle.location) //must be idle at centcom
return 0
if (wait_for_launch) //already launching
return 0
return 1
//this only returns 0 if it would absolutely make no sense to recall
//e.g. the shuttle is already at the station or wasn't called to begin with
//other reasons for the shuttle not being recallable should be handled elsewhere
/datum/emergency_shuttle_controller/proc/can_recall()
if (shuttle.moving_status == SHUTTLE_INTRANSIT) //if the shuttle is already in transit then it's too late
return 0
if (!shuttle.location) //already at the station.
return 0
if (!wait_for_launch) //we weren't going anywhere, anyways...
return 0
return 1
/datum/emergency_shuttle_controller/proc/get_shuttle_prep_time()
// During mutiny rounds, the shuttle takes twice as long.
if(ticker && istype(ticker.mode,/datum/game_mode/mutiny))
return SHUTTLE_PREPTIME * 3 //15 minutes
return SHUTTLE_PREPTIME
/*
These procs are not really used by the controller itself, but are for other parts of the
game whose logic depends on the emergency shuttle.
*/
//so we don't have emergency_shuttle.shuttle.location everywhere
/datum/emergency_shuttle_controller/proc/location()
if (!shuttle)
return 1 //if we dont have a shuttle datum, just act like it's at centcom
return shuttle.location
//returns the time left until the shuttle arrives at it's destination, in seconds
/datum/emergency_shuttle_controller/proc/estimate_arrival_time()
var/eta
if (isnull(shuttle.last_move_time))
eta = launch_time + shuttle.move_time*10
else
eta = shuttle.last_move_time + shuttle.move_time*10
return (eta - world.time)/10
//returns the time left until the shuttle launches, in seconds
/datum/emergency_shuttle_controller/proc/estimate_launch_time()
return (launch_time - world.time)/10
/datum/emergency_shuttle_controller/proc/has_eta()
return (wait_for_launch || shuttle.moving_status != SHUTTLE_IDLE)
//returns 1 if the shuttle has gone to the station and come back at least once,
//used for game completion checking purposes
/datum/emergency_shuttle_controller/proc/returned()
return (departed && shuttle.moving_status != SHUTTLE_IDLE && shuttle.location) //we've gone to the station at least once, no longer in transit and are idle back at centcom
//returns 1 if the shuttle is not idle at centcom
/datum/emergency_shuttle_controller/proc/online()
if (!shuttle.location) //not at centcom
return 1
if (wait_for_launch || shuttle.moving_status != SHUTTLE_IDLE)
return 1
return 0
//returns 1 if the shuttle is currently in transit (or just leaving) to the station
/datum/emergency_shuttle_controller/proc/going_to_station()
return (!shuttle.direction && shuttle.moving_status != SHUTTLE_IDLE)
//returns 1 if the shuttle is currently in transit (or just leaving) to centcom
/datum/emergency_shuttle_controller/proc/going_to_centcom()
return (shuttle.direction && shuttle.moving_status != SHUTTLE_IDLE)
//returns 1 if the shuttle is docked at the station and waiting to leave
/datum/emergency_shuttle_controller/proc/waiting_to_leave()
if (shuttle.location)
return 0 //not at station
if (!wait_for_launch)
return 0 //not going anywhere
if (shuttle.moving_status != SHUTTLE_IDLE)
return 0 //shuttle is doing stuff
return 1
/*
Some slapped-together star effects for maximum spess immershuns. Basically consists of a
spawner, an ender, and bgstar. Spawners create bgstars, bgstars shoot off into a direction
until they reach a starender.
*/
/obj/effect/bgstar
name = "star"
var/speed = 10
var/direction = SOUTH
layer = 2 // TURF_LAYER
/obj/effect/bgstar/New()
..()
pixel_x += rand(-2,30)
pixel_y += rand(-2,30)
var/starnum = pick("1", "1", "1", "2", "3", "4")
icon_state = "star"+starnum
speed = rand(2, 5)
/obj/effect/bgstar/proc/startmove()
while(src)
sleep(speed)
step(src, direction)
for(var/obj/effect/starender/E in loc)
del(src)
/obj/effect/starender
invisibility = 101
/obj/effect/starspawner
invisibility = 101
var/spawndir = SOUTH
var/spawning = 0
/obj/effect/starspawner/West
spawndir = WEST
/obj/effect/starspawner/proc/startspawn()
spawning = 1
while(spawning)
sleep(rand(2, 30))
var/obj/effect/bgstar/S = new/obj/effect/bgstar(locate(x,y,z))
S.direction = spawndir
spawn()
S.startmove()
+5 -6
View File
@@ -51,8 +51,8 @@ datum/controller/game_controller/New()
if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase()
if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
if(!emergency_shuttle) emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle()
// if(!supply_shuttle) supply_shuttle = new /datum/controller/supply_shuttle()
if(!emergency_shuttle) emergency_shuttle = new /datum/emergency_shuttle_controller()
if(!shuttle_controller) shuttle_controller = new /datum/shuttle_controller()
datum/controller/game_controller/proc/setup()
world.tick_lag = config.Ticklag
@@ -71,9 +71,6 @@ datum/controller/game_controller/proc/setup()
if(!garbage)
garbage = new /datum/controller/garbage_collector()
if(!shuttles) setup_shuttles()
shuttle_list = shuttles
setup_objects()
setupgenetics()
setupfactions()
@@ -138,6 +135,8 @@ datum/controller/game_controller/proc/process()
controller_iteration++
vote.process()
// transfer_controller.process()
shuttle_controller.process()
process_newscaster()
//AIR
@@ -245,7 +244,7 @@ datum/controller/game_controller/proc/process()
total_cost = air_cost + sun_cost + mobs_cost + diseases_cost + machines_cost + objects_cost + networks_cost + powernets_cost + nano_cost + events_cost + puddles_cost + ticker_cost + gc_cost
var/end_time = world.timeofday
if(end_time < start_time)
if(end_time < start_time) //why not just use world.time instead?
start_time -= 864000 //deciseconds in a day
sleep( round(minimum_ticks - (end_time - start_time),1) )
else
+220 -482
View File
@@ -1,483 +1,221 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
// Controls the emergency shuttle
// these define the time taken for the shuttle to get to SS13
// and the time before it leaves again
#define SHUTTLEARRIVETIME 600 // 10 minutes = 600 seconds
#define SHUTTLELEAVETIME 180 // 3 minutes = 180 seconds
#define SHUTTLETRANSITTIME 120 // 2 minutes = 120 seconds
var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle
datum/shuttle_controller/emergency_shuttle
var/alert = 0 //0 = emergency, 1 = crew cycle
var/location = 0 //0 = somewhere far away (in spess), 1 = at SS13, 2 = returned from SS13
var/online = 0
var/direction = 1 //-1 = going back to central command, 1 = going to SS13, 2 = in transit to centcom (not recalled)
var/endtime // timeofday that shuttle arrives
var/timelimit //important when the shuttle gets called for more than shuttlearrivetime
//timeleft = 360 //600
var/fake_recall = 0 //Used in rounds to prevent "ON NOES, IT MUST [INSERT ROUND] BECAUSE SHUTTLE CAN'T BE CALLED"
var/always_fake_recall = 0
var/deny_shuttle = 0 //for admins not allowing it to be called.
var/departed = 0
// call the shuttle
// if not called before, set the endtime to T+600 seconds
// otherwise if outgoing, switch to incoming
proc/incall(coeff = 1)
if(deny_shuttle && alert == 1) //crew transfer shuttle does not gets recalled by gamemode
return
if(endtime)
if(direction == -1)
setdirection(1)
else
settimeleft(get_shuttle_arrive_time()*coeff)
online = 1
if(always_fake_recall)
fake_recall = rand(300,500) //turning on the red lights in hallways
if(alert == 0)
for(var/area/A in world)
if(istype(A, /area/hallway))
A.readyalert()
proc/get_shuttle_arrive_time()
// During mutiny rounds, the shuttle takes twice as long.
if(ticker && istype(ticker.mode,/datum/game_mode/mutiny))
return SHUTTLEARRIVETIME * 2
return SHUTTLEARRIVETIME
datum/shuttle_controller/emergency_shuttle/proc/shuttlealert(var/X)
alert = X
datum/shuttle_controller/emergency_shuttle/proc/recall()
if(direction == 1)
var/timeleft = timeleft()
if(alert == 0)
if(timeleft >= get_shuttle_arrive_time())
return
captain_announce("The emergency shuttle has been recalled.")
world << sound('sound/AI/shuttlerecalled.ogg')
setdirection(-1)
online = 1
for(var/area/A in world)
if(istype(A, /area/hallway))
A.readyreset()
return
else //makes it possible to send shuttle back.
captain_announce("The shuttle has been recalled.")
setdirection(-1)
online = 1
alert = 0 // set alert back to 0 after an admin recall
return
// returns the time (in seconds) before shuttle arrival
// note if direction = -1, gives a count-up to SHUTTLEARRIVETIME
datum/shuttle_controller/emergency_shuttle/proc/timeleft()
if(online)
var/timeleft = round((endtime - world.timeofday)/10 ,1)
if(direction == 1 || direction == 2)
return timeleft
else
return get_shuttle_arrive_time()-timeleft
else
return get_shuttle_arrive_time()
// sets the time left to a given delay (in seconds)
datum/shuttle_controller/emergency_shuttle/proc/settimeleft(var/delay)
endtime = world.timeofday + delay * 10
timelimit = delay
// sets the shuttle direction
// 1 = towards SS13, -1 = back to centcom
datum/shuttle_controller/emergency_shuttle/proc/setdirection(var/dirn)
if(direction == dirn)
return
direction = dirn
// if changing direction, flip the timeleft by SHUTTLEARRIVETIME
var/ticksleft = endtime - world.timeofday
endtime = world.timeofday + (get_shuttle_arrive_time()*10 - ticksleft)
return
datum/shuttle_controller/emergency_shuttle/proc/process()
datum/shuttle_controller/emergency_shuttle/process()
if(!online)
return
var/timeleft = timeleft()
if(timeleft > 1e5) // midnight rollover protection
timeleft = 0
switch(location)
if(0)
/* --- Shuttle is in transit to Central Command from SS13 --- */
if(direction == 2)
if(timeleft>0)
return 0
/* --- Shuttle has arrived at Centrcal Command --- */
else
// turn off the star spawners
/*
for(var/obj/effect/starspawner/S in world)
S.spawning = 0
*/
location = 2
//main shuttle
var/area/start_location = locate(/area/shuttle/escape/transit)
var/area/end_location = locate(/area/shuttle/escape/centcom)
start_location.move_contents_to(end_location, null, NORTH)
for(var/obj/machinery/door/unpowered/shuttle/D in end_location)
spawn(0)
D.locked = 0
D.open()
for(var/mob/M in end_location)
if(M.client)
spawn(0)
if(M.buckled)
shake_camera(M, 4, 1) // buckled, not a lot of shaking
else
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
if(istype(M, /mob/living/carbon))
if(!M.buckled)
M.Weaken(5)
//pods
start_location = locate(/area/shuttle/escape_pod1/transit)
end_location = locate(/area/shuttle/escape_pod1/centcom)
start_location.move_contents_to(end_location, null, NORTH)
for(var/obj/machinery/door/D in machines)
if( get_area(D) == end_location )
spawn(0)
D.open()
for(var/mob/M in end_location)
if(M.client)
spawn(0)
if(M.buckled)
shake_camera(M, 4, 1) // buckled, not a lot of shaking
else
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
if(istype(M, /mob/living/carbon))
if(!M.buckled)
M.Weaken(5)
start_location = locate(/area/shuttle/escape_pod2/transit)
end_location = locate(/area/shuttle/escape_pod2/centcom)
start_location.move_contents_to(end_location, null, NORTH)
for(var/obj/machinery/door/D in machines)
if( get_area(D) == end_location )
spawn(0)
D.open()
for(var/mob/M in end_location)
if(M.client)
spawn(0)
if(M.buckled)
shake_camera(M, 4, 1) // buckled, not a lot of shaking
else
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
if(istype(M, /mob/living/carbon))
if(!M.buckled)
M.Weaken(5)
start_location = locate(/area/shuttle/escape_pod3/transit)
end_location = locate(/area/shuttle/escape_pod3/centcom)
start_location.move_contents_to(end_location, null, NORTH)
for(var/obj/machinery/door/D in machines)
if( get_area(D) == end_location )
spawn(0)
D.open()
for(var/mob/M in end_location)
if(M.client)
spawn(0)
if(M.buckled)
shake_camera(M, 4, 1) // buckled, not a lot of shaking
else
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
if(istype(M, /mob/living/carbon))
if(!M.buckled)
M.Weaken(5)
start_location = locate(/area/shuttle/escape_pod5/transit)
end_location = locate(/area/shuttle/escape_pod5/centcom)
start_location.move_contents_to(end_location, null, EAST)
for(var/obj/machinery/door/D in machines)
if( get_area(D) == end_location )
spawn(0)
D.open()
for(var/mob/M in end_location)
if(M.client)
spawn(0)
if(M.buckled)
shake_camera(M, 4, 1) // buckled, not a lot of shaking
else
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
if(istype(M, /mob/living/carbon))
if(!M.buckled)
M.Weaken(5)
online = 0
return 1
/* --- Shuttle has docked centcom after being recalled --- */
if(timeleft>timelimit)
online = 0
direction = 1
endtime = null
return 0
else if((fake_recall != 0) && (timeleft <= fake_recall))
recall()
fake_recall = 0
return 0
/* --- Shuttle has docked with the station - begin countdown to transit --- */
else if(timeleft <= 0)
location = 1
var/area/start_location = locate(/area/shuttle/escape/centcom)
var/area/end_location = locate(/area/shuttle/escape/station)
var/list/dstturfs = list()
var/throwy = world.maxy
for(var/turf/T in end_location)
dstturfs += T
if(T.y < throwy)
throwy = T.y
// hey you, get out of the way!
for(var/turf/T in dstturfs)
// find the turf to move things to
var/turf/D = locate(T.x, throwy - 1, 1)
//var/turf/E = get_step(D, SOUTH)
for(var/atom/movable/AM as mob|obj in T)
AM.Move(D)
// NOTE: Commenting this out to avoid recreating mass driver glitch
/*
spawn(0)
AM.throw_at(E, 1, 1)
return
*/
if(istype(T, /turf/simulated))
del(T)
for(var/mob/living/carbon/bug in end_location) // If someone somehow is still in the shuttle's docking area...
bug.gib()
for(var/mob/living/simple_animal/pest in end_location) // And for the other kind of bug...
pest.gib()
start_location.move_contents_to(end_location)
settimeleft(SHUTTLELEAVETIME)
//send2irc("Server", "The Emergency Shuttle has docked with the station.")
captain_announce("The Emergency Shuttle has docked with the station. You have [round(timeleft()/60,1)] minutes to board the Emergency Shuttle.")
world << sound('sound/AI/shuttledock.ogg')
return 1
if(1)
// Just before it leaves, close the damn doors!
if(timeleft == 2 || timeleft == 1)
var/area/start_location = locate(/area/shuttle/escape/station)
for(var/obj/machinery/door/unpowered/shuttle/D in start_location)
spawn(0)
D.close()
D.locked = 1
if(timeleft>0)
return 0
/* --- Shuttle leaves the station, enters transit --- */
else
// Turn on the star effects
/* // kinda buggy atm, i'll fix this later
for(var/obj/effect/starspawner/S in world)
if(!S.spawning)
spawn() S.startspawn()
*/
departed = 1 // It's going!
location = 0 // in deep space
direction = 2 // heading to centcom
//main shuttle
var/area/start_location = locate(/area/shuttle/escape/station)
var/area/end_location = locate(/area/shuttle/escape/transit)
settimeleft(SHUTTLETRANSITTIME)
start_location.move_contents_to(end_location, null, NORTH)
// Close shuttle doors, lock
for(var/obj/machinery/door/unpowered/shuttle/D in end_location)
spawn(0)
D.close()
D.locked = 1
// Some aesthetic turbulance shaking
for(var/mob/M in end_location)
if(M.client)
spawn(0)
if(M.buckled)
shake_camera(M, 4, 1) // buckled, not a lot of shaking
else
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
if(istype(M, /mob/living/carbon))
if(!M.buckled)
M.Weaken(5)
//pods
start_location = locate(/area/shuttle/escape_pod1/station)
end_location = locate(/area/shuttle/escape_pod1/transit)
start_location.move_contents_to(end_location, null, NORTH)
for(var/obj/machinery/door/D in end_location)
spawn(0)
D.close()
for(var/mob/M in end_location)
if(M.client)
spawn(0)
if(M.buckled)
shake_camera(M, 4, 1) // buckled, not a lot of shaking
else
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
if(istype(M, /mob/living/carbon))
if(!M.buckled)
M.Weaken(5)
start_location = locate(/area/shuttle/escape_pod2/station)
end_location = locate(/area/shuttle/escape_pod2/transit)
start_location.move_contents_to(end_location, null, NORTH)
for(var/obj/machinery/door/D in end_location)
spawn(0)
D.close()
for(var/mob/M in end_location)
if(M.client)
spawn(0)
if(M.buckled)
shake_camera(M, 4, 1) // buckled, not a lot of shaking
else
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
if(istype(M, /mob/living/carbon))
if(!M.buckled)
M.Weaken(5)
start_location = locate(/area/shuttle/escape_pod3/station)
end_location = locate(/area/shuttle/escape_pod3/transit)
start_location.move_contents_to(end_location, null, NORTH)
for(var/obj/machinery/door/D in end_location)
spawn(0)
D.close()
for(var/mob/M in end_location)
if(M.client)
spawn(0)
if(M.buckled)
shake_camera(M, 4, 1) // buckled, not a lot of shaking
else
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
if(istype(M, /mob/living/carbon))
if(!M.buckled)
M.Weaken(5)
start_location = locate(/area/shuttle/escape_pod5/station)
end_location = locate(/area/shuttle/escape_pod5/transit)
start_location.move_contents_to(end_location, null, EAST)
for(var/obj/machinery/door/D in end_location)
spawn(0)
D.close()
for(var/mob/M in end_location)
if(M.client)
spawn(0)
if(M.buckled)
shake_camera(M, 4, 1) // buckled, not a lot of shaking
else
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
if(istype(M, /mob/living/carbon))
if(!M.buckled)
M.Weaken(5)
captain_announce("The Emergency Shuttle has left the station. Estimate [round(timeleft()/60,1)] minutes until the shuttle docks at Central Command.")
return 1
else
return 1
/*
Some slapped-together star effects for maximum spess immershuns. Basically consists of a
spawner, an ender, and bgstar. Spawners create bgstars, bgstars shoot off into a direction
until they reach a starender.
*/
/obj/effect/bgstar
name = "star"
var/speed = 10
var/direction = SOUTH
layer = 2 // TURF_LAYER
/obj/effect/bgstar/New()
..()
pixel_x += rand(-2,30)
pixel_y += rand(-2,30)
var/starnum = pick("1", "1", "1", "2", "3", "4")
icon_state = "star"+starnum
speed = rand(2, 5)
/obj/effect/bgstar/proc/startmove()
while(src)
sleep(speed)
step(src, direction)
for(var/obj/effect/starender/E in loc)
del(src)
/obj/effect/starender
invisibility = 101
/obj/effect/starspawner
invisibility = 101
var/spawndir = SOUTH
var/spawning = 0
/obj/effect/starspawner/West
spawndir = WEST
/obj/effect/starspawner/proc/startspawn()
spawning = 1
while(spawning)
sleep(rand(2, 30))
var/obj/effect/bgstar/S = new/obj/effect/bgstar(locate(x,y,z))
S.direction = spawndir
spawn()
S.startmove()
var/global/datum/shuttle_controller/shuttle_controller
/datum/shuttle_controller
var/list/shuttles //maps shuttle tags to shuttle datums, so that they can be looked up.
var/list/process_shuttles //simple list of shuttles, for processing
/datum/shuttle_controller/proc/process()
//process ferry shuttles
for (var/datum/shuttle/ferry/shuttle in process_shuttles)
if (shuttle.in_use)
shuttle.process()
/datum/shuttle_controller/New()
shuttles = list()
process_shuttles = list()
var/datum/shuttle/ferry/shuttle
// Escape shuttle and pods
shuttle = new/datum/shuttle/ferry/emergency()
shuttle.location = 1
shuttle.warmup_time = 10
shuttle.area_offsite = locate(/area/shuttle/escape/centcom)
shuttle.area_station = locate(/area/shuttle/escape/station)
shuttle.area_transition = locate(/area/shuttle/escape/transit)
shuttle.transit_direction = NORTH
shuttle.move_time = 300
//shuttle.docking_controller_tag = "supply_shuttle"
//shuttle.dock_target_station = "cargo_bay"
shuttles["Escape"] = shuttle
process_shuttles += shuttle
//give the emergency shuttle controller it's shuttle
emergency_shuttle.shuttle = shuttle
emergency_shuttle.setup_pods()
process_shuttles += emergency_shuttle.escape_pods
// Supply shuttle
shuttle = new/datum/shuttle/ferry/supply()
shuttle.location = 1
shuttle.warmup_time = 10
shuttle.area_offsite = locate(/area/supply/dock)
shuttle.area_station = locate(/area/supply/station)
shuttle.docking_controller_tag = "supply_shuttle"
shuttle.dock_target_station = "cargo_bay"
shuttles["Supply"] = shuttle
process_shuttles += shuttle
supply_controller.shuttle = shuttle
// Admin shuttles.
shuttle = new()
shuttle.location = 1
shuttle.warmup_time = 10
shuttle.area_offsite = locate(/area/shuttle/transport1/centcom)
shuttle.area_station = locate(/area/shuttle/transport1/station)
shuttle.docking_controller_tag = "centcom_shuttle"
shuttle.dock_target_station = "centcom_shuttle_dock_airlock"
shuttle.dock_target_offsite = "centcom_shuttle_bay"
shuttles["Centcom"] = shuttle
process_shuttles += shuttle
shuttle = new()
shuttle.location = 1
shuttle.warmup_time = 10 //want some warmup time so people can cancel.
shuttle.area_offsite = locate(/area/shuttle/administration/centcom)
shuttle.area_station = locate(/area/shuttle/administration/station)
shuttle.docking_controller_tag = "admin_shuttle"
shuttle.dock_target_station = "admin_shuttle_dock_airlock"
shuttle.dock_target_offsite = "admin_shuttle_bay"
shuttles["Administration"] = shuttle
process_shuttles += shuttle
shuttle = new()
shuttle.area_offsite = locate(/area/shuttle/alien/base)
shuttle.area_station = locate(/area/shuttle/alien/mine)
shuttles["Alien"] = shuttle
//process_shuttles += shuttle //don't need to process this. It can only be moved using admin magic anyways.
// Public shuttles
shuttle = new()
shuttle.location = 1
shuttle.warmup_time = 10
shuttle.area_offsite = locate(/area/shuttle/constructionsite/site)
shuttle.area_station = locate(/area/shuttle/constructionsite/station)
shuttle.docking_controller_tag = "engineering_shuttle"
shuttle.dock_target_station = "engineering_dock_airlock"
shuttle.dock_target_offsite = "engineering_station_airlock"
shuttles["Engineering"] = shuttle
process_shuttles += shuttle
shuttle = new()
shuttle.warmup_time = 10
shuttle.area_offsite = locate(/area/shuttle/mining/outpost)
shuttle.area_station = locate(/area/shuttle/mining/station)
shuttle.docking_controller_tag = "mining_shuttle"
shuttle.dock_target_station = "mining_dock_airlock"
shuttle.dock_target_offsite = "mining_outpost_airlock"
shuttles["Mining"] = shuttle
process_shuttles += shuttle
shuttle = new()
shuttle.warmup_time = 10
shuttle.area_offsite = locate(/area/shuttle/research/outpost)
shuttle.area_station = locate(/area/shuttle/research/station)
shuttle.docking_controller_tag = "research_shuttle"
shuttle.dock_target_station = "research_dock_airlock"
shuttle.dock_target_offsite = "research_outpost_dock"
shuttles["Research"] = shuttle
process_shuttles += shuttle
// ERT Shuttle
var/datum/shuttle/ferry/multidock/specops/ERT = new()
ERT.location = 0
ERT.warmup_time = 10
ERT.area_offsite = locate(/area/shuttle/specops/station) //centcom is the home station, the Exodus is offsite
ERT.area_station = locate(/area/shuttle/specops/centcom)
ERT.docking_controller_tag = "specops_shuttle_port"
ERT.docking_controller_tag_station = "specops_shuttle_port"
ERT.docking_controller_tag_offsite = "specops_shuttle_fore"
ERT.dock_target_station = "specops_centcom_dock"
ERT.dock_target_offsite = "specops_dock_airlock"
shuttles["Special Operations"] = ERT
process_shuttles += ERT
//Vox Shuttle.
var/datum/shuttle/multi_shuttle/VS = new/datum/shuttle/multi_shuttle()
VS.origin = /area/shuttle/vox/station
VS.destinations = list(
"Fore Starboard Solars" = locate(/area/vox_station/northeast_solars),
"Fore Port Solars" = locate(/area/vox_station/northwest_solars),
"Aft Starboard Solars" = locate(/area/vox_station/southeast_solars),
"Aft Port Solars" = locate(/area/vox_station/southwest_solars),
"Mining asteroid" = locate(/area/vox_station/mining)
)
VS.announcer = "NSV Icarus"
VS.arrival_message = "Attention, Exodus, we just tracked a small target bypassing our defensive perimeter. Can't fire on it without hitting the station - you've got incoming visitors, like it or not."
VS.departure_message = "Your guests are pulling away, Exodus - moving too fast for us to draw a bead on them. Looks like they're heading out of the system at a rapid clip."
VS.interim = locate(/area/vox_station/transit)
VS.warmup_time = 0
shuttles["Vox Skipjack"] = VS
//Nuke Ops shuttle.
var/datum/shuttle/multi_shuttle/MS = new/datum/shuttle/multi_shuttle()
MS.origin = /area/syndicate_station/start
MS.destinations = list(
"Northwest of the station" = locate(/area/syndicate_station/northwest),
"North of the station" = locate(/area/syndicate_station/north),
"Northeast of the station" = locate(/area/syndicate_station/northeast),
"Southwest of the station" = locate(/area/syndicate_station/southwest),
"South of the station" = locate(/area/syndicate_station/south),
"Southeast of the station" = locate(/area/syndicate_station/southeast),
"Telecomms Satellite" = locate(/area/syndicate_station/commssat),
"Mining Asteroid" = locate(/area/syndicate_station/mining)
)
MS.announcer = "NSV Icarus"
MS.arrival_message = "Attention, Exodus, you have a large signature approaching the station - looks unarmed to surface scans. We're too far out to intercept - brace for visitors."
MS.departure_message = "Your visitors are on their way out of the system, Exodus, burning delta-v like it's nothing. Good riddance."
MS.interim = locate(/area/syndicate_station/transit)
MS.warmup_time = 0
shuttles["Syndicate"] = MS
//This is called by gameticker after all the machines and radio frequencies have been properly initialized
/datum/shuttle_controller/proc/setup_shuttle_docks()
var/datum/shuttle/shuttle
var/datum/shuttle/ferry/multidock/multidock
var/list/dock_controller_map = list() //so we only have to iterate once through each list
//multidock shuttles
var/list/dock_controller_map_station = list()
var/list/dock_controller_map_offsite = list()
for (var/shuttle_tag in shuttles)
shuttle = shuttles[shuttle_tag]
if (shuttle.docking_controller_tag)
dock_controller_map[shuttle.docking_controller_tag] = shuttle
if (istype(shuttle, /datum/shuttle/ferry/multidock))
multidock = shuttle
dock_controller_map_station[multidock.docking_controller_tag_station] = multidock
dock_controller_map_offsite[multidock.docking_controller_tag_offsite] = multidock
//search for the controllers, if we have one.
if (dock_controller_map.len)
for (var/obj/machinery/embedded_controller/radio/C in machines) //only radio controllers are supported at the moment
if (istype(C.program, /datum/computer/file/embedded_program/docking))
if (C.id_tag in dock_controller_map)
shuttle = dock_controller_map[C.id_tag]
shuttle.docking_controller = C.program
dock_controller_map -= C.id_tag
if (C.id_tag in dock_controller_map_station)
multidock = dock_controller_map_station[C.id_tag]
if (istype(multidock))
multidock.docking_controller_station = C.program
dock_controller_map_station -= C.id_tag
if (C.id_tag in dock_controller_map_offsite)
multidock = dock_controller_map_offsite[C.id_tag]
if (istype(multidock))
multidock.docking_controller_offsite = C.program
dock_controller_map_offsite -= C.id_tag
//sanity check
if (dock_controller_map.len || dock_controller_map_station.len || dock_controller_map_offsite.len)
var/dat = ""
for (var/dock_tag in dock_controller_map + dock_controller_map_station + dock_controller_map_offsite)
dat += "\"[dock_tag]\", "
world << "/red /b warning: shuttles with docking tags [dat] could not find their controllers!"
//makes all shuttles docked to something at round start go into the docked state
for (var/shuttle_tag in shuttles)
shuttle = shuttles[shuttle_tag]
shuttle.dock()
+4 -1
View File
@@ -28,7 +28,7 @@
return
/client/proc/debug_controller(controller in list("Master","Failsafe","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply","Emergency Shuttle","Configuration","pAI", "Cameras","Garbage", "Crafting"))
/client/proc/debug_controller(controller in list("Master","Failsafe","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply","Emergency Shuttle","Configuration","pAI", "Cameras","Garbage", "Crafting", "Transfer Controller"))
set category = "Debug"
set name = "Debug Controller"
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
@@ -65,6 +65,9 @@
if("Supply")
debug_variables(supply_controller)
feedback_add_details("admin_verb","DSupply")
if("Shuttles")
debug_variables(shuttle_controller)
feedback_add_details("admin_verb","DShuttles")
if("Emergency Shuttle")
debug_variables(emergency_shuttle)
feedback_add_details("admin_verb","DEmergency")
+2 -5
View File
@@ -33,7 +33,6 @@
/datum/browser/proc/set_title(ntitle)
title = format_text(ntitle)
/datum/browser/proc/add_head_content(nhead_content)
head_content = nhead_content
@@ -144,10 +143,8 @@
// to pass a "close=1" parameter to the atom's Topic() proc for special handling.
// Otherwise, the user mob's machine var will be reset directly.
//
/proc/format_text(text)
return replacetext(replacetext(text,"\proper ",""),"\improper ","")
/proc/onclosed(mob/user, windowid, var/atom/ref=null)
/proc/onclose(mob/user, windowid, var/atom/ref=null)
if(!user || !user.client) return
var/param = "null"
if(ref)
@@ -173,7 +170,7 @@
if(hsrc)
//world << "[src] Topic [href] [hsrc]"
usr = src.mob
src.Topic("close=1", list("close"="1"), hsrc) // this will direct to the atom's
src.Topic("close=1", list("close"="1"), hsrc) // this will direct to the atom's
return // Topic() proc via client.Topic()
// no atomref specified (or not found)
+32
View File
@@ -1090,9 +1090,41 @@ var/list/ghostteleportlocs = list()
//Embassies
/area/embassy/
name = "\improper Embassy Hallway"
/area/embassy/tajaran
name = "\improper Tajaran Embassy"
icon_state = "tajaran"
/area/embassy/skrell
name = "\improper Skrell Embassy"
icon_state = "skrell"
/area/embassy/unathi
name = "\improper Unathi Embassy"
icon_state = "unathi"
/area/embassy/kidan
name = "\improper Kidan Embassy"
icon_state = "kidan"
/area/embassy/diona
name = "\improper Diona Embassy"
icon_state = "diona"
/area/embassy/slime
name = "\improper Slime Person Embassy"
icon_state = "slime"
/area/embassy/grey
name = "\improper Grey Embassy"
icon_state = "grey"
/area/embassy/vox
name = "\improper Vox Embassy"
icon_state = "vox"
+1 -1
View File
@@ -111,7 +111,7 @@ var/list/blob_nodes = list()
greet_blob(blob)
if(emergency_shuttle)
emergency_shuttle.always_fake_recall = 1
emergency_shuttle.auto_recall = 1
/*// Disable the blob event for this round.
if(events)
+32 -32
View File
@@ -8,7 +8,7 @@
/proc/iscultist(mob/living/M as mob)
return istype(M) && M.mind && ticker && ticker.mode && (M.mind in ticker.mode.cult)
/proc/is_convertable_to_cult(datum/mind/mind)
if(!istype(mind)) return 0
if(istype(mind.current, /mob/living/carbon/human) && (mind.assigned_role in list("Captain", "Chaplain"))) return 0
@@ -21,8 +21,8 @@
/datum/game_mode/cult
name = "cult"
config_tag = "cult"
restricted_jobs = list("Chaplain","AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Blueshield", "Nanotrasen Representative")
protected_jobs = list()
restricted_jobs = list("Chaplain","AI", "Cyborg", "Lawyer", "Head of Security", "Captain", "Head of Personnel", "Blueshield", "Nanotrasen Representative")
protected_jobs = list("Security Officer", "Warden", "Detective")
required_players = 5
required_players_secret = 15
required_enemies = 3
@@ -135,7 +135,7 @@
mob.mutations.Remove(M_CLUMSY)
add_cult_viewpoint(mob) // give them a viewpoint
var/obj/item/weapon/paper/talisman/supply/T = new(mob)
var/list/slots = list (
"backpack" = slot_in_backpack,
@@ -177,7 +177,7 @@
var/obj/cult_viewpoint/viewpoint = new(target)
viewpoint.loc = target
return viewpoint
/datum/game_mode/proc/add_cultist(datum/mind/cult_mind) //BASE
if (!istype(cult_mind))
@@ -200,11 +200,11 @@
cult -= cult_mind
cult_mind.current << "\red <FONT size = 3><B>An unfamiliar white light flashes through your mind, cleansing the taint of the dark-one and the memories of your time as his servant with it.</B></FONT>"
cult_mind.memory = ""
// remove the cult viewpoint object
var/obj/viewpoint = getCultViewpoint(cult_mind.current)
del(viewpoint)
update_cult_icons_removed(cult_mind)
if(show_message)
for(var/mob/M in viewers(cult_mind.current))
@@ -220,7 +220,7 @@
for(var/mob/spirit/currentSpirit in spirits)
reset_cult_icons_for_spirit(currentSpirit)
/datum/game_mode/proc/reset_cult_icons_for_cultist(var/datum/mind/target)
if(target.current)
if(target.current.client)
@@ -228,7 +228,7 @@
for(var/datum/mind/cultist in cult)
if(cultist.current)
add_cult_icon(target.current.client,cultist.current)
/datum/game_mode/proc/reset_cult_icons_for_spirit(mob/spirit/target)
if (target.client)
@@ -236,25 +236,25 @@
for(var/datum/mind/cultist in cult)
if(cultist.current)
add_cult_icon(target.client,cultist.current)
/datum/game_mode/proc/add_cult_icon(client/target_client,mob/target_mob)
var/I = image('icons/mob/mob.dmi', loc = target_mob, icon_state = "cult")
target_client.images += I
/datum/game_mode/proc/remove_cult_icon(client/target_client,mob/target_mob)
for(var/image/I in target_client.images)
if(I.icon_state == "cult" && I.loc == target_mob)
del(I)
/datum/game_mode/proc/remove_all_cult_icons_from_client(client/target)
for(var/image/I in target.images)
if(I.icon_state == "cult")
del(I)
/datum/game_mode/proc/remove_all_cult_icons(target)
var/datum/mind/cultist = target
if(istype(cultist))
@@ -268,65 +268,65 @@
remove_all_cult_icons_from_client(currentSpirit.client)
return TRUE
return FALSE
/datum/game_mode/proc/add_cult_icon_to_spirit(mob/spirit/currentSpirit,datum/mind/cultist)
if(!istype(currentSpirit) || !istype(cultist))
return FALSE
if (currentSpirit.client)
if (cultist.current)
add_cult_icon(currentSpirit.client,cultist.current)
/datum/game_mode/proc/add_cult_icon_to_cultist(datum/mind/first_cultist,datum/mind/second_cultist)
if(first_cultist.current && second_cultist.current)
if(first_cultist.current.client)
add_cult_icon(first_cultist.current.client, second_cultist.current)
/datum/game_mode/proc/remove_cult_icon_from_cultist(datum/mind/first_cultist,datum/mind/second_cultist)
if(first_cultist.current && second_cultist.current)
if(first_cultist.current.client)
remove_cult_icon(first_cultist.current.client,second_cultist.current)
/datum/game_mode/proc/remove_cult_icon_from_spirit(mob/spirit/currentSpirit,datum/mind/cultist)
if(!istype(currentSpirit) || !istype(cultist))
return FALSE
if (currentSpirit.client)
if (cultist.current)
remove_cult_icon(currentSpirit.client,cultist.current)
/datum/game_mode/proc/cult_icon_pair_link(datum/mind/first_cultist,datum/mind/second_cultist)
if (!istype(first_cultist) || !istype(second_cultist))
return 0
add_cult_icon_to_cultist(first_cultist,second_cultist)
add_cult_icon_to_cultist(second_cultist,first_cultist)
/datum/game_mode/proc/cult_icon_pair_unlink(datum/mind/first_cultist,datum/mind/second_cultist)
if (!istype(first_cultist) || !istype(second_cultist))
return 0
remove_cult_icon(first_cultist,second_cultist)
remove_cult_icon(second_cultist,first_cultist)
/datum/game_mode/proc/update_cult_icons_added(datum/mind/cult_mind)
spawn(0)
for(var/datum/mind/cultist in cult)
cult_icon_pair_link(cultist,cult_mind)
for(var/mob/spirit/currentSpirit in spirits)
add_cult_icon_to_spirit(currentSpirit,cult_mind)
/datum/game_mode/proc/update_cult_icons_removed(datum/mind/cult_mind)
spawn(0)
for(var/datum/mind/cultist in cult)
cult_icon_pair_unlink(cultist,cult_mind)
for(var/mob/spirit/currentSpirit in spirits)
remove_cult_icon_from_spirit(currentSpirit,cult_mind)
/datum/game_mode/cult/proc/get_unconvertables()
var/list/ucs = list()
@@ -364,7 +364,7 @@
/atom/proc/cult_log(var/message)
investigate_log(message, "cult")
/datum/game_mode/cult/declare_completion()
+1 -1
View File
@@ -189,7 +189,7 @@ Implants;
break
/datum/game_mode/proc/check_finished() //to be called by ticker
if(emergency_shuttle.location==2 || station_was_nuked)
if(emergency_shuttle.returned() || station_was_nuked)
return 1
return 0
+3 -12
View File
@@ -16,7 +16,6 @@ var/global/datum/controller/gameticker/ticker
var/event_time = null
var/event = 0
var/login_music // music played in pregame lobby
var/list/datum/mind/minds = list()//The people in the game. Used for objective tracking.
@@ -39,14 +38,6 @@ var/global/datum/controller/gameticker/ticker
var/initialtpass = 0 //holder for inital autotransfer vote timer
/datum/controller/gameticker/proc/pregame()
login_music = pick(\
'sound/music/therock.ogg',\
'sound/music/klendathu.ogg',\
'sound/music/knights.ogg',\
'sound/music/space.ogg',\
'sound/music/Title1.ogg',\
'sound/music/Title2.ogg',\
'sound/music/space_oddity.ogg') //Ground Control to Major Tom, this song is cool, what's going on?
do
pregame_timeleft = 180
world << "<B><FONT color='blue'>Welcome to the pre-game lobby!</FONT></B>"
@@ -135,7 +126,7 @@ var/global/datum/controller/gameticker/ticker
//here to initialize the random events nicely at round start
setup_economy()
setup_shuttle_docks()
shuttle_controller.setup_shuttle_docks()
spawn(0)//Forking here so we dont have to wait for this to finish
mode.post_setup()
@@ -379,10 +370,10 @@ var/global/datum/controller/gameticker/ticker
var/game_finished = 0
var/mode_finished = 0
if (config.continous_rounds)
game_finished = (emergency_shuttle.location == 2 || mode.station_was_nuked)
game_finished = (emergency_shuttle.returned() || mode.station_was_nuked)
mode_finished = (!post_game && mode.check_finished())
else
game_finished = (mode.check_finished() || (emergency_shuttle.location == 2 && emergency_shuttle.alert == 1))
game_finished = (mode.check_finished() || (emergency_shuttle.returned() && emergency_shuttle.evac == 1))
mode_finished = game_finished
if(!mode.explosion_in_progress && game_finished && (mode_finished || post_game))
@@ -67,7 +67,7 @@
AI_mind.current.icon_state = "ai-malf2"
*/
if(emergency_shuttle)
emergency_shuttle.always_fake_recall = 1
emergency_shuttle.auto_recall = 1
spawn (rand(waittime_l, waittime_h))
send_intercept()
..()
@@ -136,7 +136,7 @@
if (is_malf_ai_dead())
if(config.continous_rounds)
if(emergency_shuttle)
emergency_shuttle.always_fake_recall = 0
emergency_shuttle.auto_recall = 0
malf_mode_declared = 0
else
return 1
@@ -206,7 +206,7 @@
/datum/game_mode/malfunction/declare_completion()
var/malf_dead = is_malf_ai_dead()
var/crew_evacuated = (emergency_shuttle.location==2)
var/crew_evacuated = (emergency_shuttle.returned())
if ( station_captured && station_was_nuked)
feedback_set_details("round_end_result","win - AI win - nuke")
+6 -6
View File
@@ -267,7 +267,7 @@ datum
explanation_text = "Frame [target.current.real_name], the [target.assigned_role] for a crime and make sure they are arrested and brought back to the Centcom station alive. We'll handle the rest from there."
check_completion()
if(emergency_shuttle.location<2)
if(!emergency_shuttle.returned())
return 0
if(target.current.stat == 2)
return 0
@@ -313,7 +313,7 @@ datum
explanation_text = "[target.current.real_name], the [target.assigned_role] is a [pick("relative of a","friend of a","") + pick("high ranking","important","well-liked")] Syndicate [pick("Leader","Officer","Agent","sympathiser")]. Make sure they get off the station safely, while minimizing intervention."
check_completion()
if(emergency_shuttle.location<2)
if(!emergency_shuttle.returned())
return 0
if(target.current.stat == 2)
@@ -477,7 +477,7 @@ datum
explanation_text = "Hijack the emergency shuttle by escaping alone."
check_completion()
if(emergency_shuttle.location<2)
if(!emergency_shuttle.returned())
return 0
if(!owner.current || owner.current.stat == 2)
@@ -512,7 +512,7 @@ datum
explanation_text = "Escape on the shuttle alive, without being arrested."
check_completion()
if(emergency_shuttle.location<2)
if(!emergency_shuttle.returned())
return 0
if(!owner.current || owner.current.stat ==2)
@@ -1224,7 +1224,7 @@ datum
check_completion()
if(!istype(owner.current, /mob/living/silicon))
return 0
if(emergency_shuttle.location<2)
if(!emergency_shuttle.returned())
return 0
if(!owner.current)
return 0
@@ -1447,7 +1447,7 @@ datum/objective/silence
explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left."
check_completion()
if(emergency_shuttle.location<2)
if(!emergency_shuttle.returned())
return 0
var/area/shuttle = locate(/area/shuttle/escape/centcom)
+1 -1
View File
@@ -270,7 +270,7 @@ proc/issyndicate(mob/living/M as mob)
if(!is_type_in_list(disk_area, centcom_areas))
disk_rescued = 0
break
var/crew_evacuated = (emergency_shuttle.location==2)
var/crew_evacuated = (emergency_shuttle.returned())
//var/operatives_are_dead = is_operatives_are_dead()
+6 -6
View File
@@ -308,7 +308,7 @@ datum/objective/hijack
check_completion()
if(!owner.current || owner.current.stat)
return 0
if(emergency_shuttle.location<2)
if(!emergency_shuttle.returned())
return 0
if(issilicon(owner.current))
return 0
@@ -333,7 +333,7 @@ datum/objective/speciesist
return 1
check_completion()
if(emergency_shuttle.location<2)
if(!emergency_shuttle.location())
return 0
var/area/shuttle = locate(/area/shuttle/escape/centcom)
for(var/mob/living/carbon/human/player in player_list)
@@ -351,7 +351,7 @@ datum/objective/block
check_completion()
if(!istype(owner.current, /mob/living/silicon))
return 0
if(emergency_shuttle.location<2)
if(!emergency_shuttle.returned())
return 0
if(!owner.current)
return 0
@@ -369,7 +369,7 @@ datum/objective/silence
explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left."
check_completion()
if(emergency_shuttle.location<2)
if(!emergency_shuttle.returned())
return 0
for(var/mob/living/player in player_list)
@@ -393,7 +393,7 @@ datum/objective/escape
return 0
if(isbrain(owner.current))
return 0
if(emergency_shuttle.location<2)
if(!emergency_shuttle.returned())
return 0
if(!owner.current || owner.current.stat ==2)
return 0
@@ -684,7 +684,7 @@ datum/objective/absorb
explanation_text = "Our knowledge must live on. Make sure at least 5 acolytes escape on the shuttle to spread their work on an another station."
check_completion()
if(emergency_shuttle.location<2)
if(!emergency_shuttle.returned())
return 0
var/cultists_escaped = 0
+4 -3
View File
@@ -14,7 +14,8 @@
/datum/game_mode/revolution
name = "revolution"
config_tag = "revolution"
restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer", "Blueshield", "Nanotrasen Representative")
restricted_jobs = list("Lawyer", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer", "Blueshield", "Nanotrasen Representative")
protected_jobs = list("Security Officer", "Warden", "Detective")
required_players = 4
required_players_secret = 15
required_enemies = 3
@@ -91,7 +92,7 @@
greet_revolutionary(rev_mind)
modePlayer += head_revolutionaries
if(emergency_shuttle)
emergency_shuttle.always_fake_recall = 1
emergency_shuttle.auto_recall = 1
spawn (rand(waittime_l, waittime_h))
send_intercept()
..()
@@ -171,7 +172,7 @@
if(config.continous_rounds)
if(finished != 0)
if(emergency_shuttle)
emergency_shuttle.always_fake_recall = 0
emergency_shuttle.auto_recall = 0
return ..()
if(finished != 0)
return 1
+1 -1
View File
@@ -18,4 +18,4 @@
/datum/game_mode/sandbox/post_setup()
..()
if(emergency_shuttle)
emergency_shuttle.always_fake_recall = 1
emergency_shuttle.auto_recall = 1
+2 -2
View File
@@ -305,7 +305,7 @@
<B>Ore Mined:</B> [score_oremined] ([score_oremined * 2] Points)<BR>
<B>Refreshments Prepared:</B> [score_meals] ([score_meals * 5] Points)<BR>
<B>Research Completed:</B> [score_researchdone] ([score_researchdone * 30] Points)<BR>"}
if (emergency_shuttle.location == 2) dat += "<B>Shuttle Escapees:</B> [score_escapees] ([score_escapees * 25] Points)<BR>"
if (!emergency_shuttle.location()) dat += "<B>Shuttle Escapees:</B> [score_escapees] ([score_escapees * 25] Points)<BR>"
dat += {"<B>Random Events Endured:</B> [score_eventsendured] ([score_eventsendured * 50] Points)<BR>
<B>Whole Station Powered:</B> [score_powerbonus ? "Yes" : "No"] ([score_powerbonus * 2500] Points)<BR>
<B>Ultra-Clean Station:</B> [score_mess ? "No" : "Yes"] ([score_messbonus * 3000] Points)<BR><BR>
@@ -326,7 +326,7 @@
dat += {"<B>Richest Escapee:</B> [score_richestname], [score_richestjob]: $[num2text(score_richestcash,50)] ([score_richestkey])<BR>
<B>Most Battered Escapee:</B> [score_dmgestname], [score_dmgestjob]: [score_dmgestdamage] damage ([score_dmgestkey])<BR>"}
else
if (emergency_shuttle.location != 2) dat += "The station wasn't evacuated!<BR>"
if (emergency_shuttle.location()) dat += "The station wasn't evacuated!<BR>"
else dat += "No-one escaped!<BR>"
dat += {"<HR><BR>
<B><U>FINAL SCORE: [score_crewscore]</U></B><BR>"}
+11
View File
@@ -84,6 +84,17 @@
/var/const/access_cent_creed = 108//Creed's office.
/var/const/access_cent_captain = 109//Captain's office/ID comp/AI.
//EMBASSIES
/var/const/embassy_tajaran = 120
/var/const/embassy_skrell = 121
/var/const/embassy_unathi = 122
/var/const/embassy_diona = 123
/var/const/embassy_kidan = 124
/var/const/embassy_slime = 125
/var/const/embassy_grey = 126
/var/const/embassy_vox = 127
//The Syndicate
/var/const/access_syndicate = 150//General Syndicate Access
+36 -33
View File
@@ -29,7 +29,7 @@ var/shuttle_call/shuttle_calls[0]
from=get_turf(computer)
when=worldtime2text()
if(dir==SHUTTLE_RECALL)
var/timeleft=emergency_shuttle.timeleft()
var/timeleft=emergency_shuttle.estimate_arrival_time()
eta="[timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
// The communications computer
@@ -142,7 +142,7 @@ var/shuttle_call/shuttle_calls[0]
var/response = alert("Are you sure you wish to call the shuttle?", "Confirm", "Yes", "No")
if(response == "Yes")
call_shuttle_proc(usr)
if(emergency_shuttle.online)
if(emergency_shuttle.online())
post_status("shuttle")
setMenuState(usr,COMM_SCREEN_MAIN)
if("cancelshuttle")
@@ -150,8 +150,8 @@ var/shuttle_call/shuttle_calls[0]
if(src.authenticated)
var/response = alert("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No")
if(response == "Yes")
recall_shuttle(usr)
if(emergency_shuttle.online)
cancel_call_proc(usr)
if(emergency_shuttle.online())
post_status("shuttle")
setMenuState(usr,COMM_SCREEN_MAIN)
if("messagelist")
@@ -307,11 +307,11 @@ var/shuttle_call/shuttle_calls[0]
data["current_message"] = data["is_ai"] ? aicurrmsg : currmsg
var/shuttle[0]
shuttle["on"]=emergency_shuttle.online
if (emergency_shuttle.online && emergency_shuttle.location==0)
var/timeleft=emergency_shuttle.timeleft()
shuttle["on"]=emergency_shuttle.online()
if (emergency_shuttle.online() && emergency_shuttle.location())
var/timeleft=emergency_shuttle.estimate_arrival_time()
shuttle["eta"]="[timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
shuttle["pos"] = emergency_shuttle.location
shuttle["pos"] = !emergency_shuttle.location()
shuttle["can_recall"]=!(recall_time_limit && world.time >= recall_time_limit)
data["shuttle"]=shuttle
@@ -358,42 +358,49 @@ var/shuttle_call/shuttle_calls[0]
PS.allowedtocall = !(PS.allowedtocall)
/proc/call_shuttle_proc(var/mob/user)
if ((!( ticker ) || emergency_shuttle.location))
if ((!( ticker ) || !emergency_shuttle.location()))
return
if(sent_strike_team == 1)
user << "Centcom will not allow the shuttle to be called. Consider all contracts terminated."
return
if(world.time < 6000) // Ten minute grace period to let the game get going without lolmetagaming. -- TLE
user << "The emergency shuttle is refueling. Please wait another [round((6000-world.time)/600)] minutes before trying again."
if(emergency_shuttle.deny_shuttle)
user << "The emergency shuttle may not be sent at this time. Please try again later."
return
if(emergency_shuttle.direction == -1)
if(world.time < 6000) // Ten minute grace period to let the game get going without lolmetagaming. -- TLE
user << "The emergency shuttle is refueling. Please wait another [round((6000-world.time)/60)] minutes before trying again."
return
if(emergency_shuttle.going_to_centcom())
user << "The emergency shuttle may not be called while returning to CentCom."
return
if(emergency_shuttle.online)
if(emergency_shuttle.online())
user << "The emergency shuttle is already on its way."
return
emergency_shuttle.incall()
if(ticker.mode.name == "blob")
user << "Under directive 7-10, [station_name()] is quarantined until further notice."
return
emergency_shuttle.call_evac()
log_game("[key_name(user)] has called the shuttle.")
message_admins("[key_name_admin(user)] has called the shuttle.", 1)
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('sound/AI/shuttlecalled.ogg')
return
/proc/init_shift_change(var/mob/user, var/force = 0)
if ((!( ticker ) || emergency_shuttle.location))
if ((!( ticker ) || !emergency_shuttle.location()))
return
if(emergency_shuttle.direction == -1)
if(emergency_shuttle.going_to_centcom())
user << "The shuttle may not be called while returning to CentCom."
return
if(emergency_shuttle.online)
if(emergency_shuttle.online())
user << "The shuttle is already on its way."
return
@@ -408,32 +415,32 @@ var/shuttle_call/shuttle_calls[0]
return
if(world.time < 54000) // 30 minute grace period to let the game get going
user << "The shuttle is refueling. Please wait another [round((54000-world.time)/600)] minutes before trying again."//may need to change "/600"
user << "The shuttle is refueling. Please wait another [round((54000-world.time)/60)] minutes before trying again."
return
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "sandbox")
//New version pretends to call the shuttle but cause the shuttle to return after a random duration.
emergency_shuttle.fake_recall = rand(300,500)
emergency_shuttle.auto_recall = 1
if(ticker.mode.name == "epidemic")
user << "Under directive 7-10, [station_name()] is quarantined until further notice."
return
emergency_shuttle.shuttlealert(1)
emergency_shuttle.incall()
emergency_shuttle.call_transfer()
log_game("[key_name(user)] has called the shuttle.")
message_admins("[key_name_admin(user)] has called the shuttle - [formatJumpTo(user)].", 1)
captain_announce("A crew transfer has been initiated. The shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
captain_announce("A crew transfer has been initiated. The shuttle has been called. It will arrive in [round(emergency_shuttle.estimate_arrival_time()/60)] minutes.")
return
/proc/recall_shuttle(var/mob/user)
if ((!( ticker ) || emergency_shuttle.location || emergency_shuttle.direction == 0 || emergency_shuttle.timeleft() < 300))
/proc/cancel_call_proc(var/mob/user)
if (!( ticker ) || !emergency_shuttle.can_recall())
return
if(ticker.mode.name == "meteor")
return
if(emergency_shuttle.direction != -1 && emergency_shuttle.online) //check that shuttle isn't already heading to centcomm
if(!emergency_shuttle.going_to_centcom()) //check that shuttle isn't already heading to centcomm
emergency_shuttle.recall()
log_game("[key_name(user)] has recalled the shuttle.")
message_admins("[key_name_admin(user)] has recalled the shuttle - [formatJumpTo(user)].", 1)
@@ -479,11 +486,9 @@ var/shuttle_call/shuttle_calls[0]
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || sent_strike_team)
return ..()
emergency_shuttle.incall(2)
emergency_shuttle.call_evac()
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('sound/AI/shuttlecalled.ogg')
..()
@@ -504,10 +509,8 @@ var/shuttle_call/shuttle_calls[0]
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || sent_strike_team)
return ..()
emergency_shuttle.incall(2)
emergency_shuttle.call_evac()
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('sound/AI/shuttlecalled.ogg')
..()
+6 -4
View File
@@ -108,7 +108,9 @@
/obj/machinery/computer/crew/proc/scan()
for(var/obj/item/clothing/under/C in clothing_list)
if((C.has_sensor) && (istype(C.loc, /mob/living/carbon/human)))
tracked |= C
return 1
for(var/mob/living/carbon/human/H in mob_list)
if(istype(H.w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/C = H.w_uniform
if (C.has_sensor)
tracked |= C
return 1
+5 -6
View File
@@ -8,7 +8,7 @@
attackby(var/obj/item/weapon/card/W as obj, var/mob/user as mob)
if(stat & (BROKEN|NOPOWER)) return
if ((!( istype(W, /obj/item/weapon/card) ) || !( ticker ) || emergency_shuttle.location != 1 || !( user ))) return
if ((!( istype(W, /obj/item/weapon/card) ) || !( ticker ) || emergency_shuttle.location() || !( user ))) return
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (istype(W, /obj/item/device/pda))
var/obj/item/device/pda/pda = W
@@ -27,7 +27,7 @@
return 0
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")
if(emergency_shuttle.location != 1 && user.get_active_hand() != W)
if(emergency_shuttle.location() && user.get_active_hand() != W)
return 0
switch(choice)
if("Authorize")
@@ -41,8 +41,7 @@
message_admins("[key_name_admin(user)] has launched the shuttle")
log_game("[user.ckey] has launched the shuttle early")
world << "\blue <B>Alert: Shuttle launch time shortened to 10 seconds!</B>"
emergency_shuttle.online = 1
emergency_shuttle.settimeleft(10)
emergency_shuttle.set_launch_countdown(10)
//src.authorized = null
del(src.authorized)
src.authorized = list( )
@@ -59,11 +58,11 @@
else if (istype(W, /obj/item/weapon/card/emag) && !emagged)
var/choice = alert(user, "Would you like to launch the shuttle?","Shuttle control", "Launch", "Cancel")
if(!emagged && emergency_shuttle.location == 1 && user.get_active_hand() == W)
if(!emagged && !emergency_shuttle.location() && user.get_active_hand() == W)
switch(choice)
if("Launch")
world << "\blue <B>Alert: Shuttle launch time shortened to 10 seconds!</B>"
emergency_shuttle.settimeleft( 10 )
emergency_shuttle.set_launch_countdown(10)
emagged = 1
if("Cancel")
return
@@ -21,6 +21,7 @@
"processing" = airlock_program.memory["processing"],
"docking_status" = docking_program.get_docking_status(),
"airlock_disabled" = !(docking_program.undocked() || docking_program.override_enabled),
"override_enabled" = docking_program.override_enabled,
)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+3 -5
View File
@@ -29,7 +29,7 @@
if (istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow))
user << "<span class='notice'>Your gun's recharge port was removed to make room for a miniaturized reactor.</span>"
return
if(istype(G,/obj/item/device/laptop))
if(istype(G, /obj/item/device/laptop))
var/obj/item/device/laptop/L = G
if(!L.stored_computer.battery)
user << "There's no battery in it!"
@@ -86,9 +86,9 @@
if(istype(charging, /obj/item/device/laptop))
var/obj/item/device/laptop/L = charging
if(L.stored_computer.battery.charge < L.stored_computer.battery.maxcharge)
L.stored_computer.battery.give(1000)
L.stored_computer.battery.give(100)
icon_state = "recharger1"
use_power(2500)
use_power(250)
else
icon_state = "recharger2"
return
@@ -108,8 +108,6 @@
var/obj/item/weapon/melee/baton/B = charging
if(B.bcell)
B.bcell.charge = 0
else if(istype(charging, /obj/item/device/laptop))
charging.emp_act(severity)
..(severity)
/obj/machinery/recharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
+24 -16
View File
@@ -79,13 +79,15 @@
if(0) //blank
remove_display()
if(1) //emergency shuttle timer
if(emergency_shuttle.online)
var/line1
var/line2 = get_shuttle_timer()
if(emergency_shuttle.location == 1)
line1 = "-ETD-"
else
line1 = "-ETA-"
if(emergency_shuttle.waiting_to_leave())
var/line1 = "-ETD-"
var/line2 = get_shuttle_timer_departure()
if(length(line2) > CHARS_PER_LINE)
line2 = "Error!"
update_display(line1, line2)
else if(emergency_shuttle.has_eta())
var/line1 = "-ETA-"
var/line2 = get_shuttle_timer_arrival()
if(length(line2) > CHARS_PER_LINE)
line2 = "Error!"
update_display(line1, line2)
@@ -116,8 +118,8 @@
if(4) // supply shuttle timer
var/line1 = "SUPPLY"
var/line2 = ""
var/datum/shuttle/ferry/supply/shuttle = supply_controller.get_shuttle()
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
if (!shuttle)
line2 = "Error"
else if(shuttle.has_eta())
@@ -169,17 +171,23 @@
if(maptext != new_text)
maptext = new_text
proc/get_shuttle_timer()
var/timeleft = emergency_shuttle.timeleft()
if(timeleft)
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
return ""
proc/get_shuttle_timer_arrival()
var/timeleft = emergency_shuttle.estimate_arrival_time()
if(timeleft < 0)
return ""
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
proc/get_shuttle_timer_departure()
var/timeleft = emergency_shuttle.estimate_launch_time()
if(timeleft < 0)
return ""
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
proc/get_supply_shuttle_timer()
var/datum/shuttle/ferry/supply/shuttle = supply_controller.get_shuttle()
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
if (!shuttle)
return "Error"
if(shuttle.has_eta())
var/timeleft = round((shuttle.arrive_time - world.time) / 10,1)
if(timeleft < 0)
+1 -1
View File
@@ -987,7 +987,7 @@
return
var/passed
if(src.dna)
if (user.stat || !ishuman(user))
if (user.stat || ishuman(user))
if(user.dna.unique_enzymes==src.dna)
passed = 1
else if(src.operation_allowed(user))
+1 -1
View File
@@ -412,7 +412,7 @@
if(mode==47)
var/supplyData[0]
var/datum/shuttle/ferry/supply/shuttle = supply_controller.get_shuttle()
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
if (shuttle)
supplyData["shuttle_moving"] = shuttle.has_eta()
supplyData["shuttle_eta"] = shuttle.eta_minutes()
+34 -101
View File
@@ -25,87 +25,65 @@
flags = FPRINT | TABLEPASS | CONDUCT
origin_tech = "materials=1"
attack_verb = list("attacked", "stabbed", "poked")
hitsound = 'sound/weapons/bladeslice.ogg'
sharp = 0
var/loaded //Descriptive string for currently loaded food object.
/obj/item/weapon/kitchen/utensil/New()
if (prob(60))
src.pixel_y = rand(0, 4)
return
/*
* Spoons
*/
/obj/item/weapon/kitchen/utensil/spoon
name = "spoon"
desc = "SPOON!"
icon_state = "spoon"
attack_verb = list("attacked", "poked")
create_reagents(5)
/obj/item/weapon/kitchen/utensil/pspoon
name = "plastic spoon"
desc = "Super dull action!"
icon_state = "pspoon"
attack_verb = list("attacked", "poked")
/*
* Forks
*/
/obj/item/weapon/kitchen/utensil/fork
name = "fork"
desc = "Pointy."
icon_state = "fork"
sharp = 1
/obj/item/weapon/kitchen/utensil/fork/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
/obj/item/weapon/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head")
return ..()
if(user.a_intent != "help")
if(user.zone_sel.selecting == "head" || user.zone_sel.selecting == "eyes")
if((M_CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
else
return ..()
if (src.icon_state == "forkloaded") //This is a poor way of handling it, but a proper rewrite of the fork to allow for a more varied foodening can happen when I'm in the mood. --NEO
if (reagents.total_volume > 0)
reagents.trans_to_ingest(M, reagents.total_volume)
if(M == user)
for(var/mob/O in viewers(M, null))
O.show_message(text("\blue [] eats a delicious forkful of omelette!", user), 1)
O.show_message(text("\blue [] eats some [] from \the [].", user, loaded, src), 1)
M.reagents.add_reagent("nutriment", 1)
else
for(var/mob/O in viewers(M, null))
O.show_message(text("\blue [] feeds [] a delicious forkful of omelette!", user, M), 1)
O.show_message(text("\blue [] feeds [] some [] from \the []", user, M, loaded, src), 1)
M.reagents.add_reagent("nutriment", 1)
src.icon_state = "fork"
overlays.Cut()
return
else
if((M_CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
/obj/item/weapon/kitchen/utensil/fork
name = "fork"
desc = "It's a fork. Sure is pointy."
icon_state = "fork"
sharp = 1
/obj/item/weapon/kitchen/utensil/pfork
name = "plastic fork"
desc = "Yay, no washing up to do."
icon_state = "pfork"
/obj/item/weapon/kitchen/utensil/pfork/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
/obj/item/weapon/kitchen/utensil/spoon
name = "spoon"
desc = "It's a spoon. You can see your own upside-down face in it."
icon_state = "spoon"
attack_verb = list("attacked", "poked")
if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head")
return ..()
if (src.icon_state == "forkloaded") //This is a poor way of handling it, but a proper rewrite of the fork to allow for a more varied foodening can happen when I'm in the mood. --NEO
if(M == user)
for(var/mob/O in viewers(M, null))
O.show_message(text("\blue [] eats a delicious forkful of omelette!", user), 1)
M.reagents.add_reagent("nutriment", 1)
else
for(var/mob/O in viewers(M, null))
O.show_message(text("\blue [] feeds [] a delicious forkful of omelette!", user, M), 1)
M.reagents.add_reagent("nutriment", 1)
src.icon_state = "fork"
return
else
if((M_CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
/obj/item/weapon/kitchen/utensil/pspoon
name = "plastic spoon"
desc = "It's a plastic spoon. How dull."
icon_state = "pspoon"
attack_verb = list("attacked", "poked")
/*
* Knives
@@ -507,48 +485,3 @@
if(I)
step(I, pick(NORTH,SOUTH,EAST,WEST))
sleep(rand(2,4))
/////////////////////////////////////////////////////////////////////////////////////////
//Enough with the violent stuff, here's what happens if you try putting food on it
/////////////////////////////////////////////////////////////////////////////////////////////
/*/obj/item/weapon/tray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/kitchen/utensil/fork))
if (W.icon_state == "forkloaded")
user << "\red You already have omelette on your fork."
return
W.icon = 'icons/obj/kitchen.dmi'
W.icon_state = "forkloaded"
viewers(3,user) << "[user] takes a piece of omelette with his fork!"
reagents.remove_reagent("nutriment", 1)
if (reagents.total_volume <= 0)
del(src)*/
/* if (prob(33))
var/turf/location = H.loc
if (istype(location, /turf/simulated))
location.add_blood(H)
if (H.wear_mask)
H.wear_mask.add_blood(H)
if (H.head)
H.head.add_blood(H)
if (H.glasses && prob(33))
H.glasses.add_blood(H)
if (istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/user2 = user
if (user2.gloves)
user2.gloves.add_blood(H)
else
user2.add_blood(H)
if (prob(15))
if (user2.wear_suit)
user2.wear_suit.add_blood(H)
else if (user2.w_uniform)
user2.w_uniform.add_blood(H)*/
@@ -342,11 +342,11 @@
icon = 'icons/obj/food.dmi'
icon_state = "monkeycubebox"
storage_slots = 7
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/farwacube")
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/farwacube")
New()
..()
for(var/i = 1; i <= 5; i++)
new /obj/item/weapon/reagent_containers/food/snacks/farwacube/wrapped(src)
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/farwacube(src)
/obj/item/weapon/storage/box/stokcubes
name = "stok cube box"
@@ -354,11 +354,11 @@
icon = 'icons/obj/food.dmi'
icon_state = "monkeycubebox"
storage_slots = 7
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/stokcube")
can_hold = list("/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/stokcube")
New()
..()
for(var/i = 1; i <= 5; i++)
new /obj/item/weapon/reagent_containers/food/snacks/stokcube/wrapped(src)
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/stokcube(src)
/obj/item/weapon/storage/box/neaeracubes
name = "neaera cube box"
@@ -366,11 +366,11 @@
icon = 'icons/obj/food.dmi'
icon_state = "monkeycubebox"
storage_slots = 7
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/stokcube")
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube")
New()
..()
for(var/i = 1; i <= 5; i++)
new /obj/item/weapon/reagent_containers/food/snacks/neaeracube/wrapped(src)
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube(src)
/obj/item/weapon/storage/box/ids
name = "spare IDs"
+87 -5
View File
@@ -1,11 +1,12 @@
obj/structure
/obj/structure
icon = 'icons/obj/structures.dmi'
var/climbable
obj/structure/blob_act()
/obj/structure/blob_act()
if(prob(50))
del(src)
obj/structure/ex_act(severity)
/obj/structure/ex_act(severity)
switch(severity)
if(1.0)
qdel(src)
@@ -17,9 +18,90 @@ obj/structure/ex_act(severity)
if(3.0)
return
obj/structure/meteorhit(obj/O as obj)
/obj/structure/meteorhit(obj/O as obj)
del(src)
/obj/structure/Destroy()
if(hascall(src, "unbuckle"))
src:unbuckle()
src:unbuckle()
/obj/structure/New()
..()
if(climbable)
verbs += /obj/structure/proc/do_climb
/obj/structure/proc/do_climb()
set name = "Climb structure"
set desc = "Climbs onto a structure."
set category = "Object"
set src in oview(1)
if (!can_touch(usr) || !climbable)
return
usr.visible_message("<span class='warning'>[usr] starts climbing onto \the [src]!</span>")
if(!do_after(usr,50))
return
usr.loc = get_turf(src)
if (get_turf(usr) == get_turf(src))
usr.visible_message("<span class='warning'>[usr] climbs onto \the [src]!</span>")
/obj/structure/proc/structure_shaken()
for(var/mob/living/M in get_turf(src))
if(M.lying) return //No spamming this on people.
M.Weaken(5)
M << "\red You topple as \the [src] moves under you!"
if(prob(25))
var/damage = rand(15,30)
var/mob/living/carbon/human/H = M
if(!istype(M))
H << "\red You land heavily!"
M.adjustBruteLoss(damage)
return
var/datum/organ/external/affecting
switch(pick(list("ankle","wrist","head","knee","elbow")))
if("ankle")
affecting = H.get_organ(pick("l_foot", "r_foot"))
if("knee")
affecting = H.get_organ(pick("l_leg", "r_leg"))
if("wrist")
affecting = H.get_organ(pick("l_hand", "r_hand"))
if("elbow")
affecting = H.get_organ(pick("l_arm", "r_arm"))
if("head")
affecting = H.get_organ("head")
if(affecting)
M << "\red You land heavily on your [affecting.display_name]!"
affecting.take_damage(damage, 0)
if(affecting.parent)
affecting.parent.add_autopsy_data("Misadventure", damage)
else
H << "\red You land heavily!"
H.adjustBruteLoss(damage)
H.UpdateDamageIcon()
H.updatehealth()
return
/obj/structure/proc/can_touch(var/mob/user)
if (!user)
return 0
if (user.stat || user.restrained() || user.paralysis || user.sleeping || user.stunned || user.weakened)
return 0
if (issilicon(user))
user << "<span class='notice'>You need hands for this.</span>"
return 0
return 1
@@ -7,6 +7,7 @@
icon_state = "crate"
icon_opened = "crateopen"
icon_closed = "crate"
climbable = 1
// mouse_drag_pointer = MOUSE_ACTIVE_POINTER //???
var/rigged = 0
@@ -36,7 +37,11 @@
O.loc = get_turf(src)
icon_state = icon_opened
src.opened = 1
return 1
if(climbable)
structure_shaken()
return
/obj/structure/closet/crate/close()
if(!src.opened)
@@ -80,7 +80,7 @@
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
if (!ticker)
user << "You can't buckle anyone in before the game starts."
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.stunned || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
return
if (istype(M, /mob/living/carbon/slime))
+12 -11
View File
@@ -19,6 +19,8 @@
anchored = 1.0
layer = 2.8
throwpass = 1 //You can throw objects over this, despite it's density.")
climbable = 1
var/parts = /obj/item/weapon/table_parts
var/flipped = 0
var/health = 100
@@ -413,10 +415,7 @@
var/obj/structure/table/reinforced/R = T
if (R.status == 2)
return 0
if (!T)
return 1
else
return T.straight_table_check(direction)
return T.straight_table_check(direction)
/obj/structure/table/verb/do_flip()
set name = "Flip table"
@@ -424,18 +423,20 @@
set category = "Object"
set src in oview(1)
if (issilicon(usr))
usr << "<span class='notice'>You need hands for this.</span>"
return
if (isobserver(usr))
usr << "<span class='notice'>No haunting outside halloween.</span>n"
if (!can_touch(usr) || ismouse(usr))
return
if(!flip(get_cardinal_dir(usr,src)))
usr << "<span class='notice'>It won't budge.</span>"
else
usr.visible_message("<span class='warning'>[usr] flips \the [src]!</span>")
return
usr.visible_message("<span class='warning'>[usr] flips \the [src]!</span>")
if(climbable)
structure_shaken()
return
/obj/structure/table/proc/do_put()
set name = "Put table back"
set desc = "Puts flipped table back"
+2
View File
@@ -352,6 +352,8 @@
//checks if this window is full-tile one
/obj/structure/window/proc/is_fulltile()
if(dir & (dir - 1))
return 1
return 0
//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
-5
View File
@@ -53,11 +53,6 @@ var/const/SURROUND_CAP = 7
src << S
/client/proc/playtitlemusic()
if(!ticker || !ticker.login_music) return
if(prefs.sound & SOUND_LOBBY)
src << sound(ticker.login_music, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS
/proc/get_rand_frequency()
return rand(32000, 55000) //Frequency stuff only works with 45kbps oggs.
+11 -38
View File
@@ -143,22 +143,11 @@ var/list/mechtoys = list(
var/list/supply_packs = list()
//shuttle movement
var/movetime = 1200
var/shuttle_tag = "Supply"
var/datum/shuttle/ferry/supply/shuttle
New()
ordernum = rand(1,9000)
proc/get_shuttle()
if (!shuttles || !(shuttle_tag in shuttles))
return null
var/datum/shuttle/ferry/supply/shuttle = shuttles[shuttle_tag]
if (!istype(shuttle))
return null
return shuttle
//Supply shuttle ticker - handles supply point regenertion and shuttle travelling between centcomm and the station
proc/process()
for(var/typepath in (typesof(/datum/supply_packs) - /datum/supply_packs))
@@ -174,16 +163,6 @@ var/list/mechtoys = list(
sleep(processing_interval)
spawn(0)
set background = 1
while(1)
if(processing)
var/datum/shuttle/ferry/supply/shuttle = get_shuttle()
if (shuttle && shuttle.in_use)
shuttle.process_shuttle()
sleep(10)
//To stop things being sent to centcomm which should not be sent to centcomm. Recursively checks for these types.
proc/forbidden_atoms_check(atom/A)
if(istype(A,/mob/living))
@@ -204,21 +183,18 @@ var/list/mechtoys = list(
//Sellin
proc/sell()
var/datum/shuttle/ferry/supply/shuttle_datum = get_shuttle()
if (!shuttle_datum) return
var/area/shuttle = shuttle_datum.get_location_area()
if(!shuttle) return
var/area/area_shuttle = shuttle.get_location_area()
if(!area_shuttle) return
var/plasma_count = 0
var/plat_count = 0
for(var/atom/movable/MA in shuttle)
for(var/atom/movable/MA in area_shuttle)
if(MA.anchored) continue
// Must be in a crate!
if(istype(MA,/obj/structure/closet/crate))
callHook("sell_crate", list(MA, shuttle))
callHook("sell_crate", list(MA, area_shuttle))
points += points_per_crate
var/find_slip = 1
@@ -255,15 +231,12 @@ var/list/mechtoys = list(
proc/buy()
if(!shoppinglist.len) return
var/datum/shuttle/ferry/supply/shuttle_datum = get_shuttle()
if (!shuttle_datum) return
var/area/shuttle = shuttle_datum.get_location_area()
if(!shuttle) return
var/area/area_shuttle = shuttle.get_location_area()
if(!area_shuttle) return
var/list/clear_turfs = list()
for(var/turf/T in shuttle)
for(var/turf/T in area_shuttle)
if(T.density || T.contents.len) continue
clear_turfs += T
@@ -341,7 +314,7 @@ var/list/mechtoys = list(
if(temp)
dat = temp
else
var/datum/shuttle/ferry/supply/shuttle = supply_controller.get_shuttle()
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
if (shuttle)
dat += {"<BR><B>Supply shuttle</B><HR>
Location: [shuttle.has_eta() ? "Moving to station ([shuttle.eta_minutes()] Mins.)":shuttle.at_station() ? "Docked":"Away"]<BR>
@@ -468,7 +441,7 @@ var/list/mechtoys = list(
if (temp)
dat = temp
else
var/datum/shuttle/ferry/supply/shuttle = supply_controller.get_shuttle()
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
if (shuttle)
dat += "<BR><B>Supply shuttle</B><HR>"
dat += "\nLocation: "
@@ -527,7 +500,7 @@ var/list/mechtoys = list(
if(!supply_controller)
world.log << "## ERROR: Eek. The supply_controller controller datum is missing somehow."
return
var/datum/shuttle/ferry/supply/shuttle = supply_controller.get_shuttle()
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
if (!shuttle)
world.log << "## ERROR: Eek. The supply/shuttle datum is missing somehow."
return
+15
View File
@@ -77,6 +77,21 @@ var/list/wood_icons = list("wood","wood-broken")
src.hotspot_expose(500,CELL_VOLUME)
return
/turf/simulated/floor/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(!burnt && prob(5))
burn_tile()
else if(prob(1) && !is_plating())
make_plating()
burn_tile()
return
/turf/simulated/floor/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume)
var/dir_to = get_dir(src, adj_turf)
for(var/obj/structure/window/W in src)
if(W.dir == dir_to || W.is_fulltile()) //Same direction or diagonal (full tile)
W.fire_act(adj_air, adj_temp, adj_volume)
/turf/simulated/floor/blob_act()
return
+184 -99
View File
@@ -4,6 +4,15 @@
icon = 'icons/turf/walls.dmi'
var/mineral = "metal"
var/rotting = 0
var/damage = 0
var/damage_cap = 100 //Wall will break down to girders if damage reaches this point
var/damage_overlay
var/global/damage_overlays[8]
var/max_temperature = 1800 //K, walls will take damage if they're next to a fire hotter than this
opacity = 1
density = 1
blocks_air = 1
@@ -13,6 +22,89 @@
var/walltype = "metal"
/turf/simulated/wall/Del()
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
..()
/turf/simulated/wall/ChangeTurf(var/newtype)
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
..(newtype)
//Appearance
/turf/simulated/wall/examine()
. = ..()
if(!damage)
usr << "<span class='notice'>It looks fully intact.</span>"
else
var/dam = damage / damage_cap
if(dam <= 0.3)
usr << "<span class='warning'>It looks slightly damaged.</span>"
else if(dam <= 0.6)
usr << "<span class='warning'>It looks moderately damaged.</span>"
else
usr << "<span class='danger'>It looks heavily damaged.</span>"
if(rotting)
usr << "<span class='warning'>There is fungus growing on [src].</span>"
/turf/simulated/wall/proc/update_icon()
if(!damage_overlays[1]) //list hasn't been populated
generate_overlays()
if(!damage)
overlays.Cut()
return
var/overlay = round(damage / damage_cap * damage_overlays.len) + 1
if(overlay > damage_overlays.len)
overlay = damage_overlays.len
if(damage_overlay && overlay == damage_overlay) //No need to update.
return
overlays.Cut()
overlays += damage_overlays[overlay]
damage_overlay = overlay
return
/turf/simulated/wall/proc/generate_overlays()
var/alpha_inc = 256 / damage_overlays.len
for(var/i = 1; i <= damage_overlays.len; i++)
var/image/img = image(icon = 'icons/turf/walls.dmi', icon_state = "overlay_damage")
img.blend_mode = BLEND_MULTIPLY
img.alpha = (i * alpha_inc) - 1
damage_overlays[i] = img
//Damage
/turf/simulated/wall/proc/take_damage(dam)
if(dam)
damage = max(0, damage + dam)
update_damage()
return
/turf/simulated/wall/proc/update_damage()
var/cap = damage_cap
if(rotting)
cap = cap / 10
if(damage >= cap)
dismantle_wall()
else
update_icon()
return
/turf/simulated/wall/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume)
if(adj_temp > max_temperature)
take_damage(rand(10, 20) * (adj_temp / max_temperature))
return ..()
/turf/simulated/wall/proc/dismantle_wall(devastated=0, explode=0)
if(istype(src,/turf/simulated/wall/r_wall))
if(!devastated)
@@ -64,31 +156,76 @@
ChangeTurf(/turf/simulated/floor/plating)
/turf/simulated/wall/ex_act(severity)
if(rotting) severity = 1.0
switch(severity)
if(1.0)
//SN src = null
src.ChangeTurf(/turf/space)
return
if(2.0)
if (prob(50))
dismantle_wall(0,1)
if(prob(75))
take_damage(rand(150, 250))
else
dismantle_wall(1,1)
if(3.0)
var/proba
if (istype(src, /turf/simulated/wall/r_wall))
proba = 15
else
proba = 40
if (prob(proba))
dismantle_wall(0,1)
take_damage(rand(0, 250))
else
return
/turf/simulated/wall/blob_act()
if(prob(50) || rotting)
take_damage(rand(75, 125))
return
// Wall-rot effect, a nasty fungus that destroys walls.
/turf/simulated/wall/proc/rot()
if(!rotting)
rotting = 1
var/number_rots = rand(2,3)
for(var/i=0, i<number_rots, i++)
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Wallrot"
O.desc = "Ick..."
O.icon = 'icons/effects/wallrot.dmi'
O.pixel_x += rand(-10, 10)
O.pixel_y += rand(-10, 10)
O.anchored = 1
O.density = 1
O.layer = 5
O.mouse_opacity = 0
/turf/simulated/wall/proc/thermitemelt(mob/user as mob)
if(mineral == "diamond")
return
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Thermite"
O.desc = "Looks hot."
O.icon = 'icons/effects/fire.dmi'
O.icon_state = "2"
O.anchored = 1
O.density = 1
O.layer = 5
src.ChangeTurf(/turf/simulated/floor/plating)
var/turf/simulated/floor/F = src
F.burn_tile()
F.icon_state = "wall_thermite"
user << "<span class='warning'>The thermite starts melting through the wall.</span>"
spawn(100)
if(O) del(O)
// F.sd_LumReset() //TODO: ~Carn
return
/turf/simulated/wall/meteorhit(obj/M as obj)
if (prob(15) && !rotting)
dismantle_wall()
else if(prob(70) && !rotting)
ChangeTurf(/turf/simulated/floor/plating)
else
ReplaceWithLattice()
return 0
//Interactions
/turf/simulated/wall/attack_paw(mob/user as mob)
if ((M_HULK in user.mutations))
@@ -99,6 +236,7 @@
return
else
usr << text("\blue You punch the wall.")
take_damage(rand(25, 75))
return
return src.attack_hand(user)
@@ -110,11 +248,12 @@
dismantle_wall(1)
M << "<span class='info'>You smash through the wall.</span>"
else
M << "<span class='info'>This wall is far too strong for you to destroy.</span>"
else
M << "<span class='info'>You smash through the wall.</span>"
dismantle_wall(1)
return
M << text("\blue You smash against the wall.")
take_damage(rand(25, 75))
return
M << "\blue You push the wall but nothing happens!"
return
/turf/simulated/wall/attack_hand(mob/user as mob)
if (M_HULK in user.mutations)
@@ -125,6 +264,7 @@
return
else
usr << text("\blue You punch the wall.")
take_damage(rand(25, 75))
return
if(rotting)
@@ -192,21 +332,36 @@
//DECONSTRUCTION
if( istype(W, /obj/item/weapon/weldingtool) )
var/response = "Dismantle"
if(damage)
response = alert(user, "Would you like to repair or dismantle [src]?", "[src]", "Repair", "Dismantle")
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
user << "<span class='notice'>You begin slicing through the outer plating.</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
sleep(100)
if( !istype(src, /turf/simulated/wall) || !user || !WT || !WT.isOn() || !T ) return
if(WT.remove_fuel(0,user))
if(response == "Repair")
user << "<span class='notice'>You start repairing the damage to [src].</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, max(5, damage / 5)) && WT && WT.isOn())
user << "<span class='notice'>You finish repairing the damage to [src].</span>"
take_damage(-damage)
if( user.loc == T && user.get_active_hand() == WT )
user << "<span class='notice'>You remove the outer plating.</span>"
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff)
message_admins("[user.real_name] ([formatPlayerPanel(user,user.ckey)]) dismanted a wall with a pdiff of [pdiff] at [formatJumpTo(loc)]!")
log_admin("[user.real_name] ([user.ckey]) dismanted a wall with a pdiff of [pdiff] at [loc]!")
dismantle_wall()
else if(response == "Dismantle")
user << "<span class='notice'>You begin slicing through the outer plating.</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
sleep(100)
if( !istype(src, /turf/simulated/wall) || !user || !WT || !WT.isOn() || !T ) return
if( user.loc == T && user.get_active_hand() == WT )
user << "<span class='notice'>You remove the outer plating.</span>"
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff)
message_admins("[user.real_name] ([formatPlayerPanel(user,user.ckey)]) dismanted a wall with a pdiff of [pdiff] at [formatJumpTo(loc)]!")
log_admin("[user.real_name] ([user.ckey]) dismanted a wall with a pdiff of [pdiff] at [loc]!")
dismantle_wall()
return
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
@@ -321,73 +476,3 @@
else
return attack_hand(user)
return
// Wall-rot effect, a nasty fungus that destroys walls.
/turf/simulated/wall/proc/rot()
if(!rotting)
rotting = 1
var/number_rots = rand(2,3)
for(var/i=0, i<number_rots, i++)
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Wallrot"
O.desc = "Ick..."
O.icon = 'icons/effects/wallrot.dmi'
O.pixel_x += rand(-10, 10)
O.pixel_y += rand(-10, 10)
O.anchored = 1
O.density = 1
O.layer = 5
O.mouse_opacity = 0
/turf/simulated/wall/proc/thermitemelt(mob/user as mob)
if(mineral == "diamond")
return
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Thermite"
O.desc = "Looks hot."
O.icon = 'icons/effects/fire.dmi'
O.icon_state = "2"
O.anchored = 1
O.density = 1
O.layer = 5
src.ChangeTurf(/turf/simulated/floor/plating)
var/turf/simulated/floor/F = src
if(!F)
if(O)
message_admins("[user.real_name] ([formatPlayerPanel(user,user.ckey)]) thermited a wall into space at [formatJumpTo(loc)]!")
del(O)
user << "<span class='warning'>The thermite melts through the wall.</span>"
return
F.burn_tile()
F.icon_state = "wall_thermite"
user << "<span class='warning'>The thermite melts through the wall.</span>"
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff)
message_admins("[user.real_name] ([formatPlayerPanel(user,user.ckey)]) thermited a wall with a pdiff of [pdiff] at [formatJumpTo(loc)]!")
spawn(100)
if(O) del(O)
// F.sd_LumReset() //TODO: ~Carn
return
/turf/simulated/wall/meteorhit(obj/M as obj)
if (prob(15) && !rotting)
dismantle_wall()
else if(prob(70) && !rotting)
ChangeTurf(/turf/simulated/floor/plating)
else
ReplaceWithLattice()
return 0
/turf/simulated/wall/Destroy()
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
..()
/turf/simulated/wall/ChangeTurf(var/newtype)
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
..(newtype)
@@ -5,6 +5,9 @@
opacity = 1
density = 1
damage_cap = 200
max_temperature = 6000
walltype = "rwall"
var/d_state = 0
@@ -81,6 +84,19 @@
user << "<span class='notice'>This wall is too thick to slice through. You will need to find a different path.</span>"
return
if(damage && istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0,user))
user << "<span class='notice'>You start repairing the damage to [src].</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, max(5, damage / 5)) && WT && WT.isOn())
user << "<span class='notice'>You finish repairing the damage to [src].</span>"
take_damage(-damage)
return
else
user << "<span class='warning'>You need more welding fuel to complete this task.</span>"
return
var/turf/T = user.loc //get user's location for delay checks
//DECONSTRUCTION
+3
View File
@@ -137,6 +137,9 @@
return
return
/turf/proc/adjacent_fire_act(turf/simulated/floor/source, temperature, volume)
return
/turf/proc/is_plating()
return 0
/turf/proc/is_asteroid_floor()
+2
View File
@@ -175,6 +175,8 @@ var/list/carplist = list()
// list/traitors = list() //traitor list
var/list/cardinal = list( NORTH, SOUTH, EAST, WEST )
var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
// reverse_dir[dir] = reverse of dir
var/list/reverse_dir = list(2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13, 15, 32, 34, 33, 35, 40, 42, 41, 43, 36, 38, 37, 39, 44, 46, 45, 47, 16, 18, 17, 19, 24, 26, 25, 27, 20, 22, 21, 23, 28, 30, 29, 31, 48, 50, 49, 51, 56, 58, 57, 59, 52, 54, 53, 55, 60, 62, 61, 63)
var/datum/station_state/start_state = null
var/datum/configuration/config = null
+5 -5
View File
@@ -391,15 +391,15 @@
dat += "Current Game Mode: <B>[ticker.mode.name]</B><BR>"
dat += "Round Duration: <B>[round(world.time / 36000)]:[add_zero(world.time / 600 % 60, 2)]:[world.time / 100 % 6][world.time / 100 % 10]</B><BR>"
dat += "<B>Emergency shuttle</B><BR>"
if (!emergency_shuttle.online)
if (!emergency_shuttle.online())
dat += "<a href='?src=\ref[src];call_shuttle=1'>Call Shuttle</a><br>"
else
var/timeleft = emergency_shuttle.timeleft()
switch(emergency_shuttle.location)
if(0)
var/timeleft = emergency_shuttle.estimate_launch_time()
switch(emergency_shuttle.location())
if(1)
dat += "ETA: <a href='?src=\ref[src];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
dat += "<a href='?src=\ref[src];call_shuttle=2'>Send Back</a><br>"
if(1)
if(0)
dat += "ETA: <a href='?src=\ref[src];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
dat += "<a href='?src=\ref[src];delay_round_end=1'>[ticker.delay_end ? "End Round Normally" : "Delay Round End"]</a><br>"
if(ticker.mode.syndicates.len)
+24 -23
View File
@@ -218,36 +218,37 @@
switch(href_list["call_shuttle"])
if("1")
if ((!( ticker ) || emergency_shuttle.location))
if ((!( ticker ) || !emergency_shuttle.location()))
return
emergency_shuttle.incall()
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1)
if (emergency_shuttle.can_call())
emergency_shuttle.call_evac()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1)
if("2")
if ((!( ticker ) || emergency_shuttle.location || emergency_shuttle.direction == 0))
if (!( ticker ) || !emergency_shuttle.location())
return
switch(emergency_shuttle.direction)
if(-1)
emergency_shuttle.incall()
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1)
if(1)
emergency_shuttle.recall()
log_admin("[key_name(usr)] sent the Emergency Shuttle back")
message_admins("\blue [key_name_admin(usr)] sent the Emergency Shuttle back", 1)
if (emergency_shuttle.can_call())
emergency_shuttle.call_evac()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1)
else if (emergency_shuttle.can_recall())
emergency_shuttle.recall()
log_admin("[key_name(usr)] sent the Emergency Shuttle back")
message_admins("\blue [key_name_admin(usr)] sent the Emergency Shuttle back", 1)
href_list["secretsadmin"] = "check_antagonist"
else if(href_list["edit_shuttle_time"])
if(!check_rights(R_SERVER)) return
emergency_shuttle.settimeleft( input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", emergency_shuttle.timeleft() ) as num )
log_admin("[key_name(usr)] edited the Emergency Shuttle's timeleft to [emergency_shuttle.timeleft()]")
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [emergency_shuttle.timeleft()]", 1)
var/new_time_left = input("Enter new shuttle launch duration (seconds):","Edit Shuttle Timeleft", emergency_shuttle.estimate_launch_time() ) as num
emergency_shuttle.launch_time = world.time + new_time_left*10
log_admin("[key_name(usr)] edited the Emergency Shuttle's timeleft to [new_time_left]")
message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [new_time_left*10]", 1)
href_list["secretsadmin"] = "check_antagonist"
else if(href_list["delay_round_end"])
@@ -2047,15 +2048,15 @@
if("moveshuttle")
if(!shuttles) return // Something is very wrong, the global shuttle list has not been created.
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShA")
var/shuttle_tag = input("Which shuttle do you want to call?") as null|anything in shuttles
var/shuttle_tag = input("Which shuttle do you want to call?") as null|anything in shuttle_controller.shuttles
if(shuttle_tag)
var/datum/shuttle/S = shuttles[shuttle_tag]
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
if(istype(S) && S.moving_status == 0)
S.move()
message_admins("\blue [key_name_admin(usr)] moved the [shuttle_tag] shuttle", 1)
+12 -8
View File
@@ -367,7 +367,6 @@ Ccomp's first proc.
message_admins("Admin [key_name_admin(usr)] has [action] on joining the round if they use AntagHUD", 1)
*/
/*
If a guy was gibbed and you want to revive him, this is a good way to do so.
Works kind of like entering the game with a new character. Character receives a new mind if they didn't have one.
@@ -928,7 +927,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Admin"
set name = "Call Shuttle"
if ((!( ticker ) || emergency_shuttle.location))
if ((!( ticker ) || !emergency_shuttle.location()))
return
if(!check_rights(R_ADMIN)) return
@@ -936,16 +935,21 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") return
var/choice
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "confliction")
var/choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
if(choice == "Confirm")
emergency_shuttle.fake_recall = rand(300,500)
emergency_shuttle.auto_recall = 1 //enable auto-recall
else
return
emergency_shuttle.incall()
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('sound/AI/shuttlecalled.ogg')
choice = input("Is this an emergency evacuation or a crew transfer?") in list("Emergency", "Crew Transfer")
if (choice == "Emergency")
emergency_shuttle.call_evac()
else
emergency_shuttle.call_transfer()
feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
message_admins("\blue [key_name_admin(usr)] admin-called the emergency shuttle.", 1)
@@ -959,7 +963,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return
if(!ticker || emergency_shuttle.location || emergency_shuttle.direction == 0)
if(!ticker || !emergency_shuttle.can_recall())
return
emergency_shuttle.recall()
+1 -1
View File
@@ -30,7 +30,7 @@ var/global/sent_strike_team = 0
sent_strike_team = 1
if (emergency_shuttle.direction == 1 && emergency_shuttle.online == 1)
if (emergency_shuttle.can_recall())
emergency_shuttle.recall()
var/commando_number = commandos_possible //for selecting a leader
@@ -35,8 +35,8 @@ var/global/sent_syndicate_strike_team = 0
sent_syndicate_strike_team = 1
if (emergency_shuttle.direction == 1 && emergency_shuttle.online == 1)
emergency_shuttle.recall()
//if (emergency_shuttle.can_recall())
// emergency_shuttle.recall() //why, exactly? Admins can do this themselves.
var/syndicate_commando_number = syndicate_commandos_possible //for selecting a leader
var/syndicate_leader_selected = 0 //when the leader is chosen. The last person spawned.
+1 -4
View File
@@ -329,10 +329,7 @@
send_resources()
/*
if(prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates.
winset(src, "rpane.changelog", "background-color=#eaeaea;font-style=bold")
*/
nanomanager.send_resources(src)
//////////////
//DISCONNECT//
-8
View File
@@ -310,7 +310,6 @@ datum/preferences
dat += "-Color: <a href='?_src_=prefs;preference=UIcolor'><b>[UI_style_color]</b></a> <table style='display:inline;' bgcolor='[UI_style_color]'><tr><td>__</td></tr></table><br>"
dat += "-Alpha(transparence): <a href='?_src_=prefs;preference=UIalpha'><b>[UI_style_alpha]</b></a><br>"
dat += "<b>Play admin midis:</b> <a href='?_src_=prefs;preference=hear_midis'><b>[(sound & SOUND_MIDI) ? "Yes" : "No"]</b></a><br>"
dat += "<b>Play lobby music:</b> <a href='?_src_=prefs;preference=lobby_music'><b>[(sound & SOUND_LOBBY) ? "Yes" : "No"]</b></a><br>"
dat += "<b>Randomized Character Slot:</b> <a href='?_src_=prefs;preference=randomslot'><b>[randomslot ? "Yes" : "No"]</b></a><br>"
dat += "<b>Ghost ears:</b> <a href='?_src_=prefs;preference=ghost_ears'><b>[(toggles & CHAT_GHOSTEARS) ? "Nearest Creatures" : "All Speech"]</b></a><br>"
dat += "<b>Ghost sight:</b> <a href='?_src_=prefs;preference=ghost_sight'><b>[(toggles & CHAT_GHOSTSIGHT) ? "Nearest Creatures" : "All Emotes"]</b></a><br>"
@@ -1290,13 +1289,6 @@ datum/preferences
if("hear_midis")
sound ^= SOUND_MIDI
if("lobby_music")
sound ^= SOUND_LOBBY
if(sound & SOUND_LOBBY)
user << sound(ticker.login_music, repeat = 0, wait = 0, volume = 85, channel = 1)
else
user << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1)
if("ghost_ears")
toggles ^= CHAT_GHOSTEARS
@@ -68,32 +68,6 @@
src << "You will [(prefs.toggles & CHAT_PRAYER) ? "now" : "no longer"] see prayerchat."
feedback_add_details("admin_verb","TP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/toggletitlemusic()
set name = "Hear/Silence LobbyMusic"
set category = "Preferences"
set desc = "Toggles hearing the GameLobby music"
prefs.sound ^= SOUND_LOBBY
prefs.save_preferences(src)
if(prefs.sound & SOUND_LOBBY)
src << "You will now hear music in the game lobby."
if(istype(mob, /mob/new_player))
playtitlemusic()
else
src << "You will no longer hear music in the game lobby."
if(istype(mob, /mob/new_player))
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // stop the jamsz
feedback_add_details("admin_verb","TLobby") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/*
/client/verb/togglevoices()
set name = "Toggle player voices"
set category = "Preferences"
set desc = "Toggle hearing player voice sounds"
prefs.sound ^= SOUND_VOICES
prefs.save_preferences()
src << "You will [(prefs.sound & SOUND_VOICES) ? "now" : "no longer"] hear voices of players around you, or your own voice."
feedback_add_details("admin_verb","TVoice") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
*/
/client/verb/togglemidis()
set name = "Hear/Silence Midis"
-8
View File
@@ -2,14 +2,6 @@
name = "clothing"
var/list/species_restricted = null //Only these species can wear this kit.
/obj/item/clothing/New()
. = ..()
clothing_list += src
/obj/item/clothing/Del()
clothing_list -= src
return ..()
//BS12: Species-restricted clothing check.
/obj/item/clothing/mob_can_equip(M as mob, slot)
+2 -2
View File
@@ -256,7 +256,7 @@ log transactions
tried_account_num = held_card.associated_account_number
var/tried_pin = text2num(href_list["account_pin"])
authenticated_account = linked_db.attempt_account_access(tried_account_num, tried_pin, held_card && held_card.associated_account_number == tried_account_num ? 2 : 1)
authenticated_account = attempt_account_access(tried_account_num, tried_pin, held_card && held_card.associated_account_number == tried_account_num ? 2 : 1)
if(!authenticated_account)
number_incorrect_tries++
if(previous_account_number == tried_account_num)
@@ -389,7 +389,7 @@ log transactions
var/obj/item/device/pda/P = human_user.wear_id
I = P.id
if(I)
authenticated_account = linked_db.attempt_account_access(I.associated_account_number)
authenticated_account = attempt_account_access(I.associated_account_number)
if(authenticated_account)
human_user << "\blue \icon[src] Access granted. Welcome user '[authenticated_account.owner_name].'"
+1 -3
View File
@@ -361,9 +361,7 @@ var/global/list/all_money_accounts = list()
return 0
//this returns the first account datum that matches the supplied accnum/pin combination, it returns null if the combination did not match any account
/obj/machinery/account_database/proc/attempt_account_access(var/attempt_account_number, var/attempt_pin_number, var/security_level_passed = 0,var/pin_needed=1)
if(!activated)
return 0
/proc/attempt_account_access(var/attempt_account_number, var/attempt_pin_number, var/security_level_passed = 0,var/pin_needed=1)
for(var/datum/money_account/D in all_money_accounts)
if(D.account_number == attempt_account_number)
if( D.security_level <= security_level_passed && (!D.security_level || D.remote_access_pin == attempt_pin_number || !pin_needed) )
+2 -2
View File
@@ -143,7 +143,7 @@
if(linked_db)
var/attempt_account_num = input("Enter account number to pay EFTPOS charges into", "New account number") as num
var/attempt_pin = input("Enter pin code", "Account pin") as num
linked_account = linked_db.attempt_account_access(attempt_account_num, attempt_pin, 1)
linked_account = attempt_account_access(attempt_account_num, attempt_pin, 1)
else
usr << "\icon[src]<span class='warning'>Unable to connect to accounts database.</span>"
if("trans_purpose")
@@ -195,7 +195,7 @@
if(transaction_locked && !transaction_paid)
if(linked_account)
var/attempt_pin = input("Enter pin code", "EFTPOS transaction") as num
var/datum/money_account/D = linked_db.attempt_account_access(C.associated_account_number, attempt_pin, 2)
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
if(D)
if(transaction_amount <= D.money)
playsound(src, 'sound/machines/chime.ogg', 50, 1)
+19
View File
@@ -314,6 +314,17 @@ var/global/loopModeNames=list(
return
..()
/obj/machinery/media/jukebox/techno
name = "Techno disc"
desc = "Looks like an oldschool mixing board that somehow plays music, don't ask us how, we don't know."
state_base = "mixer"
playlist_id="club"
playlists=list(
"club" = "Club Mix",
)
/obj/machinery/media/jukebox/shuttle
playlist_id="shuttle"
// Must be defined on your server.
@@ -322,3 +333,11 @@ var/global/loopModeNames=list(
)
invisibility=101 // FAK U NO SONG 4 U
/obj/machinery/media/jukebox/lobby
playlist_id="lobby"
// Must be defined on your server.
playlists=list(
"lobby" = "Lobby Mix"
)
invisibility=101
autoplay = 1
+2 -2
View File
@@ -222,8 +222,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(ticker.mode:malf_mode_declared)
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
if(emergency_shuttle)
if(emergency_shuttle.online && emergency_shuttle.location < 2)
var/timeleft = emergency_shuttle.timeleft()
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
var/timeleft = emergency_shuttle.estimate_arrival_time()
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
@@ -167,8 +167,8 @@
stat(null, "Plasma Stored: [getPlasma()]/[max_plasma]")
if(emergency_shuttle)
if(emergency_shuttle.online && emergency_shuttle.location < 2)
var/timeleft = emergency_shuttle.timeleft()
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
var/timeleft = emergency_shuttle.estimate_arrival_time()
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
@@ -246,7 +246,7 @@
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
if(!key && brain_op_stage != 4 && stat != DEAD)
msg += "<span class='deadsay'>[t_He] [t_is] totally catatonic. The stresses of life in deep-space must have been too much for [t_him]. Any recovery is unlikely</span>\n"
msg += "<span class='deadsay'>[t_He] [t_is] fast asleep. It doesn't look like they are waking up anytime soon.</span>\n"
else if(!client && brain_op_stage != 4 && stat != DEAD)
msg += "[t_He] [t_has] suddenly fallen asleep.\n"
@@ -265,7 +265,7 @@
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name]!</span>\n"
continue
else
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name], it has"
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name]. It has"
if(temp.brute_dam) switch(temp.brute_dam)
if(0 to 20)
wound_flavor_text["[temp.display_name]"] += " some dents"
@@ -396,7 +396,7 @@
msg += "<span class='warning'><b>[src]'s skull is crushed and the brain is exposed to the air!</b></span>\n"
for(var/implant in get_visible_implants(1))
msg += "<span class='warning'><b>[src] has \a [implant] sticking out of their flesh!</span>\n"
msg += "<span class='warning'><b>[src] has \a [implant] sticking out of [t_his] flesh!</span>\n"
if(digitalcamo)
msg += "[t_He] [t_is] repulsively uncanny!\n"
if(decaylevel == 1)
@@ -195,8 +195,8 @@
if(ticker.mode:malf_mode_declared)
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
if(emergency_shuttle)
if(emergency_shuttle.online && emergency_shuttle.location < 2)
var/timeleft = emergency_shuttle.timeleft()
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
var/timeleft = emergency_shuttle.estimate_arrival_time()
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
@@ -66,13 +66,13 @@
if (organ_name in organs_by_name)
var/datum/organ/external/O = get_organ(organ_name)
if(amount > 0)
O.take_damage(amount, 0, sharp=is_sharp(damage_source), edge=has_edge(damage_source), used_weapon=damage_source)
else
//if you don't want to heal robot organs, they you will have to check that yourself before using this proc.
O.heal_damage(-amount, 0, internal=0, robo_repair=(O.status & ORGAN_ROBOT))
hud_updateflag |= 1 << HEALTH_HUD
/mob/living/carbon/human/proc/adjustFireLossByPart(var/amount, var/organ_name, var/obj/damage_source = null)
@@ -81,13 +81,13 @@
if (organ_name in organs_by_name)
var/datum/organ/external/O = get_organ(organ_name)
if(amount > 0)
O.take_damage(0, amount, sharp=is_sharp(damage_source), edge=has_edge(damage_source), used_weapon=damage_source)
else
//if you don't want to heal robot organs, they you will have to check that yourself before using this proc.
O.heal_damage(0, -amount, internal=0, robo_repair=(O.status & ORGAN_ROBOT))
hud_updateflag |= 1 << HEALTH_HUD
/mob/living/carbon/human/Stun(amount)
@@ -313,15 +313,8 @@ This function restores all organs.
if(istype(used_weapon,/obj/item/weapon))
var/obj/item/weapon/W = used_weapon //Sharp objects will always embed if they do enough damage.
if( (damage > (10*W.w_class)) && ( (sharp && !ismob(W.loc)) || prob(damage/W.w_class) ) )
organ.implants += W
visible_message("<span class='danger'>\The [W] sticks in the wound!</span>")
embedded_flag = 1
src.verbs += /mob/proc/yank_out_object
W.add_blood(src)
if(ismob(W.loc))
var/mob/living/H = W.loc
H.drop_item()
W.loc = src
organ.embed(W)
return 1
@@ -99,11 +99,8 @@ emp_act
(SP.name) = "[P.name] shrapnel"
(SP.desc) = "[SP.desc] It looks like it was fired from [P.shot_from]."
(SP.loc) = organ
organ.implants += SP
visible_message("<span class='danger'>The projectile sticks in the wound!</span>")
embedded_flag = 1
src.verbs += /mob/proc/yank_out_object
SP.add_blood(src)
organ.embed(SP)
return (..(P , def_zone))
+3 -2
View File
@@ -431,7 +431,8 @@
else
stop_pulling()
. = ..()
if ((s_active && !( s_active in contents ) ))
if (s_active && !( s_active in contents ) && get_turf(s_active) != get_turf(src)) //check !( s_active in contents ) first so we hopefully don't have to call get_turf() so much.
s_active.close(src)
if(update_slimes)
@@ -717,4 +718,4 @@
floating = 1
else if(!on && floating)
animate(src, pixel_y = initial(pixel_y), time = 10)
floating = 0
floating = 0
+6 -9
View File
@@ -303,14 +303,11 @@ var/list/ai_list = list()
call_shuttle_proc(src)
// hack to display shuttle timer
if(emergency_shuttle.online)
var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435)
if(!frequency) return
var/datum/signal/status_signal = new
status_signal.source = src
status_signal.transmission_method = 1
status_signal.data["command"] = "shuttle"
frequency.post_signal(src, status_signal)
if(emergency_shuttle.online())
var/obj/machinery/computer/communications/C = locate() in machines
if(C)
C.post_status("shuttle")
return
/mob/living/silicon/ai/verb/toggle_anchor()
@@ -337,7 +334,7 @@ var/list/ai_list = list()
if(AI.control_disabled)
src << "Wireless control is disabled!"
return
recall_shuttle(src)
cancel_call_proc(src)
return
/mob/living/silicon/ai/check_eye(var/mob/user as mob)
+1 -3
View File
@@ -39,11 +39,9 @@
callshuttle = 0
if(callshuttle == 3) //if all three conditions are met
emergency_shuttle.incall(2)
emergency_shuttle.call_evac()
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('sound/AI/shuttlecalled.ogg')
if(explosive)
spawn(10)
@@ -60,7 +60,6 @@
//Some tidying-up.
flavor_text = "It's a tiny little repair drone. The casing is stamped with an NT logo and the subscript: 'NanoTrasen Recursive Repair Systems: Fixing Tomorrow's Problem, Today!'"
updatename()
updateicon()
//Redefining some robot procs...
@@ -104,15 +103,8 @@
if(copytext(message,1,2) == "*")
return emote(copytext(message,2))
else if(length(message) >= 2)
if(copytext(message, 1 ,3) == ":b" || copytext(message, 1 ,3) == ":B")
if(!is_component_functioning("comms"))
src << "\red Your binary communications component isn't functional."
return
robot_talk(trim(copytext(message,3)))
else if(copytext(message, 1 ,3) == ":d" || copytext(message, 1 ,3) == ":d")
if(copytext(message, 1 ,3) == ":d" || copytext(message, 1 ,3) == ":D")
if(!is_component_functioning("radio"))
src << "\red Your radio transmitter isn't functional."
@@ -209,7 +201,7 @@
if(!allowed(usr))
user << "\red Access denied."
return
user.visible_message("\red \the [user] swipes \his ID card through \the [src], attempting to reboot it.", "\red You swipe your ID card through \the [src], attempting to reboot it.")
var/drones = 0
for(var/mob/living/silicon/robot/drone/D in world)
@@ -329,8 +321,8 @@
full_law_reset()
src << "<br><b>You are a maintenance drone, a tiny-brained robotic repair machine</b>."
src << "You have no individual will, no personality, and no drives or urges other than your laws."
src << "Use <b>:b</b> to talk to your fellow synthetics, or use <b>say</b> to speak silently to other drones nearby."
src << "Remember, you are <b>lawed against interference with the crew</b>."
src << "Use <b>:b</b> to talk to your fellow synthetics, <b>:d</b> to talk to other drones, and <b>say</b> to speak silently to your nearby fellows."
src << "Remember, you are <b>lawed against interference with the crew</b>. Also remember, <b>you DO NOT take orders from the AI.</b>"
src << "<b>Don't invade their worksites, don't steal their resources, don't tell them about the changeling in the toilets.</b>"
src << "<b>If a crewmember has noticed you, <i>you are probably breaking your first law</i></b>."
@@ -293,8 +293,8 @@
src.modules += new /obj/item/weapon/matter_decompiler(src)
src.modules += new /obj/item/weapon/reagent_containers/spray/cleaner/drone(src)
src.emag = new /obj/item/weapon/card/emag(src)
src.emag.name = "Cryptographic Sequencer"
src.emag = new /obj/item/weapon/pickaxe/plasmacutter(src)
src.emag.name = "Plasma Cutter"
for(var/T in stacktypes)
var/obj/item/stack/sheet/W = new T(src)

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