Merge remote-tracking branch 'upstream/master' into psych+paramedic
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
var/obj/structure/table/optable/table
|
||||
var/list/advanced_surgeries = list()
|
||||
var/datum/techweb/linked_techweb
|
||||
var/menu = MENU_OPERATION
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/machinery/computer/operating/Initialize()
|
||||
@@ -54,8 +53,6 @@
|
||||
var/list/data = list()
|
||||
data["table"] = table
|
||||
if(table)
|
||||
data["menu"] = menu
|
||||
|
||||
var/list/surgeries = list()
|
||||
for(var/X in advanced_surgeries)
|
||||
var/datum/surgery/S = X
|
||||
@@ -64,9 +61,8 @@
|
||||
surgery["desc"] = initial(S.desc)
|
||||
surgeries += list(surgery)
|
||||
data["surgeries"] = surgeries
|
||||
|
||||
data["patient"] = list()
|
||||
if(table.check_patient())
|
||||
data["patient"] = list()
|
||||
patient = table.patient
|
||||
switch(patient.stat)
|
||||
if(CONSCIOUS)
|
||||
@@ -110,15 +106,14 @@
|
||||
"alternative_step" = alternative_step,
|
||||
"alt_chems_needed" = alt_chems_needed
|
||||
))
|
||||
else
|
||||
data["patient"] = null
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/operating/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("change_menu")
|
||||
menu = text2num(params["menu"])
|
||||
. = TRUE
|
||||
if("sync")
|
||||
sync_surgeries()
|
||||
. = TRUE
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
|
||||
/obj/machinery/computer/apc_control/proc/log_activity(log_text)
|
||||
var/op_string = operator && !(obj_flags & EMAGGED) ? operator : "\[NULL OPERATOR\]"
|
||||
LAZYADD(logs, "<b>([STATION_TIME_TIMESTAMP("hh:mm:ss")])</b> [op_string] [log_text]")
|
||||
LAZYADD(logs, "<b>([STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)])</b> [op_string] [log_text]")
|
||||
|
||||
/mob/proc/using_power_flow_console()
|
||||
for(var/obj/machinery/computer/apc_control/A in range(1, src))
|
||||
|
||||
@@ -304,12 +304,12 @@
|
||||
/obj/machinery/computer/arcade/minesweeper/proc/custom_generation(mob/user)
|
||||
playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) //Entered into the menu so ping sound
|
||||
var/new_rows = input(user, "How many rows do you want? (Minimum: 4, Maximum: 30)", "Minesweeper Rows") as null|num
|
||||
if(!new_rows || !user.canUseTopic(src, !issilicon(user)))
|
||||
if(!new_rows || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return FALSE
|
||||
new_rows = CLAMP(new_rows + 1, 4, 30)
|
||||
playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10)
|
||||
var/new_columns = input(user, "How many columns do you want? (Minimum: 4, Maximum: 50)", "Minesweeper Squares") as null|num
|
||||
if(!new_columns || !user.canUseTopic(src, !issilicon(user)))
|
||||
if(!new_columns || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return FALSE
|
||||
new_columns = CLAMP(new_columns + 1, 4, 50)
|
||||
playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10)
|
||||
@@ -317,7 +317,7 @@
|
||||
var/lower_limit = round(grid_area*0.156)
|
||||
var/upper_limit = round(grid_area*0.85)
|
||||
var/new_mine_limit = input(user, "How many mines do you want? (Minimum: [lower_limit], Maximum: [upper_limit])", "Minesweeper Mines") as null|num
|
||||
if(!new_mine_limit || !user.canUseTopic(src, !issilicon(user)))
|
||||
if(!new_mine_limit || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return FALSE
|
||||
playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10)
|
||||
rows = new_rows
|
||||
|
||||
@@ -91,6 +91,8 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
icon_screen = "tank"
|
||||
icon_keyboard = "atmos_key"
|
||||
circuit = /obj/item/circuitboard/computer/atmos_control
|
||||
ui_x = 400
|
||||
ui_y = 925
|
||||
|
||||
var/frequency = FREQ_ATMOS_STORAGE
|
||||
var/list/sensors = list(
|
||||
@@ -125,7 +127,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_control", name, 400, 925, master_ui, state)
|
||||
ui = new(user, src, ui_key, "atmos_control", name, ui_x, ui_y, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/atmos_control/ui_data(mob/user)
|
||||
@@ -161,6 +163,20 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
|
||||
|
||||
//Incinerator sensor only
|
||||
/obj/machinery/computer/atmos_control/incinerator
|
||||
name = "Incinerator Air Control"
|
||||
sensors = list(ATMOS_GAS_MONITOR_SENSOR_INCINERATOR = "Incinerator Chamber")
|
||||
ui_x = 400
|
||||
ui_y = 300
|
||||
|
||||
//Toxins mix sensor only
|
||||
/obj/machinery/computer/atmos_control/toxinsmix
|
||||
name = "Toxins Mixing Air Control"
|
||||
sensors = list(ATMOS_GAS_MONITOR_SENSOR_TOXINS_LAB = "Toxins Mixing Chamber")
|
||||
ui_x = 400
|
||||
ui_y = 300
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
// LARGE TANK CONTROL
|
||||
/////////////////////////////////////////////////////////////
|
||||
@@ -174,6 +190,9 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
var/list/input_info
|
||||
var/list/output_info
|
||||
|
||||
ui_x = 500
|
||||
ui_y = 315
|
||||
|
||||
/obj/machinery/computer/atmos_control/tank/oxygen_tank
|
||||
name = "Oxygen Supply Control"
|
||||
input_tag = ATMOS_GAS_MONITOR_INPUT_O2
|
||||
@@ -216,12 +235,6 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
output_tag = ATMOS_GAS_MONITOR_OUTPUT_CO2
|
||||
sensors = list(ATMOS_GAS_MONITOR_SENSOR_CO2 = "Carbon Dioxide Tank")
|
||||
|
||||
/obj/machinery/computer/atmos_control/tank/incinerator
|
||||
name = "Incinerator Air Control"
|
||||
input_tag = ATMOS_GAS_MONITOR_INPUT_INCINERATOR
|
||||
output_tag = ATMOS_GAS_MONITOR_OUTPUT_INCINERATOR
|
||||
sensors = list(ATMOS_GAS_MONITOR_SENSOR_INCINERATOR = "Incinerator Chamber")
|
||||
|
||||
// This hacky madness is the evidence of the fact that a lot of machines were never meant to be constructable, im so sorry you had to see this
|
||||
/obj/machinery/computer/atmos_control/tank/proc/reconnect(mob/user)
|
||||
var/list/IO = list()
|
||||
@@ -235,7 +248,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
IO |= text[1]
|
||||
if(!IO.len)
|
||||
to_chat(user, "<span class='alert'>No machinery detected.</span>")
|
||||
var/S = input("Select the device set: ", "Selection", IO[1]) as anything in IO
|
||||
var/S = input("Select the device set: ", "Selection", IO[1]) as anything in sortList(IO)
|
||||
if(src)
|
||||
src.input_tag = "[S]_in"
|
||||
src.output_tag = "[S]_out"
|
||||
@@ -256,7 +269,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_control", name, 500, 305, master_ui, state)
|
||||
ui = new(user, src, ui_key, "atmos_control", name, ui_x, ui_y, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/atmos_control/tank/ui_data(mob/user)
|
||||
@@ -280,13 +293,19 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
if("input")
|
||||
signal.data += list("tag" = input_tag, "power_toggle" = TRUE)
|
||||
. = TRUE
|
||||
if("rate")
|
||||
var/target = text2num(params["rate"])
|
||||
if(!isnull(target))
|
||||
target = CLAMP(target, 0, MAX_TRANSFER_RATE)
|
||||
signal.data += list("tag" = input_tag, "set_volume_rate" = target)
|
||||
. = TRUE
|
||||
if("output")
|
||||
signal.data += list("tag" = output_tag, "power_toggle" = TRUE)
|
||||
. = TRUE
|
||||
if("pressure")
|
||||
var/target = input("New target pressure:", name, output_info ? output_info["internal"] : 0) as num|null
|
||||
if(!isnull(target) && !..())
|
||||
target = CLAMP(target, 0, 50 * ONE_ATMOSPHERE)
|
||||
var/target = text2num(params["pressure"])
|
||||
if(!isnull(target))
|
||||
target = CLAMP(target, 0, MAX_OUTPUT_PRESSURE)
|
||||
signal.data += list("tag" = output_tag, "set_internal_pressure" = target)
|
||||
. = TRUE
|
||||
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/security/can_interact(mob/user)
|
||||
if((!issilicon(user) && !Adjacent(user)) || is_blind(user) || !in_view_range(user, src))
|
||||
if((!hasSiliconAccessInArea(user) && !Adjacent(user)) || is_blind(user) || !in_view_range(user, src))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -47,7 +47,10 @@
|
||||
jump_action.Grant(user)
|
||||
actions += jump_action
|
||||
|
||||
/obj/machinery/computer/camera_advanced/proc/remove_eye_control(mob/living/user)
|
||||
/obj/machinery/proc/remove_eye_control(mob/living/user)
|
||||
CRASH("[type] does not implement ai eye handling")
|
||||
|
||||
/obj/machinery/computer/camera_advanced/remove_eye_control(mob/living/user)
|
||||
if(!user)
|
||||
return
|
||||
for(var/V in actions)
|
||||
@@ -69,7 +72,7 @@
|
||||
playsound(src, 'sound/machines/terminal_off.ogg', 25, 0)
|
||||
|
||||
/obj/machinery/computer/camera_advanced/check_eye(mob/user)
|
||||
if( (stat & (NOPOWER|BROKEN)) || (!Adjacent(user) && !user.has_unlimited_silicon_privilege) || user.eye_blind || user.incapacitated() )
|
||||
if( (stat & (NOPOWER|BROKEN)) || (!Adjacent(user) && hasSiliconAccessInArea(user)) || user.eye_blind || user.incapacitated() )
|
||||
user.unset_machine()
|
||||
|
||||
/obj/machinery/computer/camera_advanced/Destroy()
|
||||
@@ -157,7 +160,7 @@
|
||||
var/cooldown = 0
|
||||
var/acceleration = 1
|
||||
var/mob/living/eye_user = null
|
||||
var/obj/machinery/computer/camera_advanced/origin
|
||||
var/obj/machinery/origin
|
||||
var/eye_initialized = 0
|
||||
var/visible_icon = 0
|
||||
var/image/user_image = null
|
||||
@@ -170,7 +173,7 @@
|
||||
|
||||
/mob/camera/aiEye/remote/Destroy()
|
||||
if(origin && eye_user)
|
||||
origin.remove_eye_control(eye_user)
|
||||
origin.remove_eye_control(eye_user,src)
|
||||
origin = null
|
||||
. = ..()
|
||||
eye_user = null
|
||||
|
||||
@@ -171,7 +171,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
|
||||
/obj/machinery/computer/card/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)) || !is_operational())
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)) || !is_operational())
|
||||
return
|
||||
if(inserted_modify_id)
|
||||
if(id_eject(user, inserted_modify_id))
|
||||
@@ -360,7 +360,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(!usr.canUseTopic(src, !issilicon(usr)) || !is_operational())
|
||||
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr)) || !is_operational())
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=id_com")
|
||||
return
|
||||
@@ -392,7 +392,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
inserted_scan_id = id_to_insert
|
||||
updateUsrDialog()
|
||||
if ("auth")
|
||||
if ((!( authenticated ) && (inserted_scan_id || issilicon(usr)) || mode))
|
||||
if ((!( authenticated ) && (inserted_scan_id || hasSiliconAccessInArea(usr)) || mode))
|
||||
if (check_access(inserted_scan_id))
|
||||
region_access = list()
|
||||
head_subordinates = list()
|
||||
@@ -426,7 +426,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
get_subordinates("Quartermaster")
|
||||
if(region_access)
|
||||
authenticated = 1
|
||||
else if ((!( authenticated ) && issilicon(usr)) && (!inserted_modify_id))
|
||||
else if ((!( authenticated ) && hasSiliconAccessInArea(usr)) && (!inserted_modify_id))
|
||||
to_chat(usr, "<span class='warning'>You can't modify an ID without an ID inserted to modify! Once one is in the modify slot on the computer, you can log in.</span>")
|
||||
if ("logout")
|
||||
region_access = null
|
||||
@@ -481,7 +481,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
if ("reg")
|
||||
if (authenticated)
|
||||
var/t2 = inserted_modify_id
|
||||
if ((authenticated && inserted_modify_id == t2 && (in_range(src, usr) || issilicon(usr)) && isturf(loc)))
|
||||
if ((authenticated && inserted_modify_id == t2 && (in_range(src, usr) || hasSiliconAccessInArea(usr)) && isturf(loc)))
|
||||
var/newName = reject_bad_name(href_list["reg"])
|
||||
if(newName)
|
||||
inserted_modify_id.registered_name = newName
|
||||
|
||||
@@ -482,7 +482,7 @@
|
||||
|
||||
R.fields["ckey"] = mob_occupant.ckey
|
||||
R.fields["name"] = mob_occupant.real_name
|
||||
R.fields["id"] = copytext(md5(mob_occupant.real_name), 2, 6)
|
||||
R.fields["id"] = copytext_char(md5(mob_occupant.real_name), 2, 6)
|
||||
R.fields["UE"] = dna.unique_enzymes
|
||||
R.fields["UI"] = dna.uni_identity
|
||||
R.fields["SE"] = dna.struc_enzymes
|
||||
|
||||
@@ -443,13 +443,13 @@
|
||||
var/dat = ""
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_CALL)
|
||||
var/timeleft = SSshuttle.emergency.timeLeft()
|
||||
dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
|
||||
dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_leading(num2text(timeleft % 60), 2, "0")]"
|
||||
|
||||
|
||||
var/datum/browser/popup = new(user, "communications", "Communications Console", 400, 500)
|
||||
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
|
||||
|
||||
if(issilicon(user))
|
||||
if(issilicon(user) || (hasSiliconAccessInArea(user) && !in_range(user,src)))
|
||||
var/dat2 = interact_ai(user) // give the AI a different interact proc to limit its access
|
||||
if(dat2)
|
||||
dat += dat2
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
if(!user)
|
||||
return
|
||||
var/datum/browser/popup = new(user, "scannernew", "DNA Modifier Console", 800, 630) // Set up the popup browser window
|
||||
if(!(in_range(src, user) || issilicon(user)))
|
||||
if(!(in_range(src, user) || hasSiliconAccessInArea(user)))
|
||||
popup.close()
|
||||
return
|
||||
popup.add_stylesheet("scannernew", 'html/browser/scannernew.css')
|
||||
@@ -274,13 +274,18 @@
|
||||
var/max_line_len = 7*DNA_BLOCK_SIZE
|
||||
if(viable_occupant)
|
||||
temp_html += "<div class='dnaBlockNumber'>1</div>"
|
||||
var/len = length(viable_occupant.dna.uni_identity)
|
||||
for(var/i=1, i<=len, i++)
|
||||
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulseui;num=[i];'>[copytext(viable_occupant.dna.uni_identity,i,i+1)]</a>"
|
||||
if ((i % max_line_len) == 0)
|
||||
var/char = ""
|
||||
var/ui_text = viable_occupant.dna.uni_identity
|
||||
var/len_byte = length(ui_text)
|
||||
var/char_it = 0
|
||||
for(var/byte_it = 1, byte_it <= len_byte, byte_it += length(char))
|
||||
char_it++
|
||||
char = ui_text[byte_it]
|
||||
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulseui;num=[char_it];'>[char]</a>"
|
||||
if((char_it % max_line_len) == 0)
|
||||
temp_html += "</div><div class='clearBoth'>"
|
||||
if((i % DNA_BLOCK_SIZE) == 0 && i < len)
|
||||
temp_html += "<div class='dnaBlockNumber'>[(i / DNA_BLOCK_SIZE) + 1]</div>"
|
||||
if((char_it % DNA_BLOCK_SIZE) == 0 && byte_it < len_byte)
|
||||
temp_html += "<div class='dnaBlockNumber'>[(char_it / DNA_BLOCK_SIZE) + 1]</div>"
|
||||
else
|
||||
temp_html += "----"
|
||||
temp_html += "</div></div></div><br>"
|
||||
@@ -288,13 +293,18 @@
|
||||
temp_html += "<br><div class='line'><div class='statusLabel'>Structural Enzymes:</div><div class='statusValue'><div class='clearBoth'>"
|
||||
if(viable_occupant)
|
||||
temp_html += "<div class='dnaBlockNumber'>1</div>"
|
||||
var/len = length(viable_occupant.dna.struc_enzymes)
|
||||
for(var/i=1, i<=len, i++)
|
||||
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulsese;num=[i];'>[copytext(viable_occupant.dna.struc_enzymes,i,i+1)]</a>"
|
||||
if ((i % max_line_len) == 0)
|
||||
var/char = ""
|
||||
var/se_text = viable_occupant.dna.struc_enzymes
|
||||
var/len_byte = length(se_text)
|
||||
var/char_it = 0
|
||||
for(var/byte_it = 1, byte_it <= len_byte, byte_it += length(char))
|
||||
char_it++
|
||||
char = se_text[byte_it]
|
||||
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulsese;num=[char_it];'>[char]</a>"
|
||||
if((char_it % max_line_len) == 0)
|
||||
temp_html += "</div><div class='clearBoth'>"
|
||||
if((i % DNA_BLOCK_SIZE) == 0 && i < len)
|
||||
temp_html += "<div class='dnaBlockNumber'>[(i / DNA_BLOCK_SIZE) + 1]</div>"
|
||||
if((char_it % DNA_BLOCK_SIZE) == 0 && byte_it < len_byte)
|
||||
temp_html += "<div class='dnaBlockNumber'>[(char_it / DNA_BLOCK_SIZE) + 1]</div>"
|
||||
else
|
||||
temp_html += "----"
|
||||
temp_html += "</div></div></div>"
|
||||
@@ -308,7 +318,7 @@
|
||||
return
|
||||
if(!isturf(usr.loc))
|
||||
return
|
||||
if(!((isturf(loc) && in_range(src, usr)) || issilicon(usr)))
|
||||
if(!((isturf(loc) && in_range(src, usr)) || hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
if(current_screen == "working")
|
||||
return
|
||||
@@ -465,7 +475,7 @@
|
||||
viable_occupant.radiation += (RADIATION_IRRADIATION_MULTIPLIER*radduration*radstrength)/(connected.damage_coeff ** 2) //Read comment in "transferbuffer" section above for explanation
|
||||
switch(href_list["task"]) //Same thing as there but values are even lower, on best part they are about 0.0*, effectively no damage
|
||||
if("pulseui")
|
||||
var/len = length(viable_occupant.dna.uni_identity)
|
||||
var/len = length_char(viable_occupant.dna.uni_identity)
|
||||
num = WRAP(num, 1, len+1)
|
||||
num = randomize_radiation_accuracy(num, radduration + (connected.precision_coeff ** 2), len) //Each manipulator level above 1 makes randomization as accurate as selected time + manipulator lvl^2
|
||||
//Value is this high for the same reason as with laser - not worth the hassle of upgrading if the bonus is low
|
||||
@@ -473,12 +483,12 @@
|
||||
var/subblock = num - block*DNA_BLOCK_SIZE
|
||||
last_change = "UI #[block]-[subblock]; "
|
||||
|
||||
var/hex = copytext(viable_occupant.dna.uni_identity, num, num+1)
|
||||
var/hex = copytext_char(viable_occupant.dna.uni_identity, num, num+1)
|
||||
last_change += "[hex]"
|
||||
hex = scramble(hex, radstrength, radduration)
|
||||
last_change += "->[hex]"
|
||||
|
||||
viable_occupant.dna.uni_identity = copytext(viable_occupant.dna.uni_identity, 1, num) + hex + copytext(viable_occupant.dna.uni_identity, num+1, 0)
|
||||
viable_occupant.dna.uni_identity = copytext_char(viable_occupant.dna.uni_identity, 1, num) + hex + copytext_char(viable_occupant.dna.uni_identity, num + 1)
|
||||
viable_occupant.updateappearance(mutations_overlay_update=1)
|
||||
if("pulsese")
|
||||
var/len = length(viable_occupant.dna.struc_enzymes)
|
||||
@@ -489,12 +499,12 @@
|
||||
var/subblock = num - block*DNA_BLOCK_SIZE
|
||||
last_change = "SE #[block]-[subblock]; "
|
||||
|
||||
var/hex = copytext(viable_occupant.dna.struc_enzymes, num, num+1)
|
||||
var/hex = copytext_char(viable_occupant.dna.struc_enzymes, num, num+1)
|
||||
last_change += "[hex]"
|
||||
hex = scramble(hex, radstrength, radduration)
|
||||
last_change += "->[hex]"
|
||||
|
||||
viable_occupant.dna.struc_enzymes = copytext(viable_occupant.dna.struc_enzymes, 1, num) + hex + copytext(viable_occupant.dna.struc_enzymes, num+1, 0)
|
||||
viable_occupant.dna.struc_enzymes = copytext_char(viable_occupant.dna.struc_enzymes, 1, num) + hex + copytext_char(viable_occupant.dna.struc_enzymes, num + 1)
|
||||
viable_occupant.domutcheck()
|
||||
else
|
||||
current_screen = "mainmenu"
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
/obj/machinery/computer/launchpad
|
||||
name = "\improper launchpad control console"
|
||||
name = "launchpad control console"
|
||||
desc = "Used to teleport objects to and from a launchpad."
|
||||
icon_screen = "teleport"
|
||||
icon_keyboard = "teleport_key"
|
||||
circuit = /obj/item/circuitboard/computer/launchpad_console
|
||||
var/sending = TRUE
|
||||
var/current_pad //current pad viewed on the screen
|
||||
ui_x = 475
|
||||
ui_y = 260
|
||||
|
||||
var/selected_id
|
||||
var/list/obj/machinery/launchpad/launchpads
|
||||
var/maximum_pads = 4
|
||||
|
||||
@@ -18,7 +20,9 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/launchpad/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/multitool))
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!multitool_check_buffer(user, W))
|
||||
return
|
||||
var/obj/item/multitool/M = W
|
||||
if(M.buffer && istype(M.buffer, /obj/machinery/launchpad))
|
||||
if(LAZYLEN(launchpads) < maximum_pads)
|
||||
@@ -36,55 +40,7 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/launchpad/proc/get_pad(number)
|
||||
var/obj/machinery/launchpad/pad = launchpads[number]
|
||||
return pad
|
||||
|
||||
/obj/machinery/computer/launchpad/ui_interact(mob/user)
|
||||
. = ..()
|
||||
var/list/t = list()
|
||||
if(!LAZYLEN(launchpads))
|
||||
obj_flags &= ~IN_USE //Yeah so if you deconstruct teleporter while its in the process of shooting it wont disable the console
|
||||
t += "<div class='statusDisplay'>No launchpad located.</div><BR>"
|
||||
else
|
||||
for(var/i in 1 to LAZYLEN(launchpads))
|
||||
if(pad_exists(i))
|
||||
var/obj/machinery/launchpad/pad = get_pad(i)
|
||||
if(pad.stat & NOPOWER)
|
||||
t+= "<span class='linkOff'>[pad.display_name]</span>"
|
||||
else
|
||||
t+= "<A href='?src=[REF(src)];choose_pad=1;pad=[i]'>[pad.display_name]</A>"
|
||||
else
|
||||
launchpads -= get_pad(i)
|
||||
t += "<BR>"
|
||||
|
||||
if(current_pad)
|
||||
var/obj/machinery/launchpad/pad = get_pad(current_pad)
|
||||
t += "<div class='statusDisplay'><b>[pad.display_name]</b></div>"
|
||||
t += "<A href='?src=[REF(src)];change_name=1;pad=[current_pad]'>Rename</A>"
|
||||
t += "<A href='?src=[REF(src)];remove=1;pad=[current_pad]'>Remove</A><BR><BR>"
|
||||
t += "<A href='?src=[REF(src)];raisey=1;lowerx=1;pad=[current_pad]'>O</A>" //up-left
|
||||
t += "<A href='?src=[REF(src)];raisey=1;pad=[current_pad]'>^</A>" //up
|
||||
t += "<A href='?src=[REF(src)];raisey=1;raisex=1;pad=[current_pad]'>O</A><BR>" //up-right
|
||||
t += "<A href='?src=[REF(src)];lowerx=1;pad=[current_pad]'><</A>"//left
|
||||
t += "<A href='?src=[REF(src)];reset=1;pad=[current_pad]'>R</A>"//reset to 0
|
||||
t += "<A href='?src=[REF(src)];raisex=1;pad=[current_pad]'>></A><BR>"//right
|
||||
t += "<A href='?src=[REF(src)];lowery=1;lowerx=1;pad=[current_pad]'>O</A>"//down-left
|
||||
t += "<A href='?src=[REF(src)];lowery=1;pad=[current_pad]'>v</A>"//down
|
||||
t += "<A href='?src=[REF(src)];lowery=1;raisex=1;pad=[current_pad]'>O</A><BR>"//down-right
|
||||
t += "<BR>"
|
||||
t += "<div class='statusDisplay'>Current offset:</div><BR>"
|
||||
t += "<div class='statusDisplay'>[abs(pad.y_offset)] [pad.y_offset > 0 ? "N":"S"] <a href='?src=[REF(src)];sety=1;pad=[current_pad]'>\[SET\]</a></div><BR>"
|
||||
t += "<div class='statusDisplay'>[abs(pad.x_offset)] [pad.x_offset > 0 ? "E":"W"] <a href='?src=[REF(src)];setx=1;pad=[current_pad]'>\[SET\]</a></div><BR>"
|
||||
|
||||
t += "<BR><A href='?src=[REF(src)];launch=1;pad=[current_pad]'>Launch</A>"
|
||||
t += " <A href='?src=[REF(src)];pull=1;pad=[current_pad]'>Pull</A>"
|
||||
|
||||
var/datum/browser/popup = new(user, "launchpad", name, 300, 500)
|
||||
popup.set_content(t.Join())
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/computer/launchpad/proc/teleport(mob/user, obj/machinery/launchpad/pad)
|
||||
/obj/machinery/computer/launchpad/proc/teleport(mob/user, obj/machinery/launchpad/pad, sending)
|
||||
if(QDELETED(pad))
|
||||
to_chat(user, "<span class='warning'>ERROR: Launchpad not responding. Check launchpad integrity.</span>")
|
||||
return
|
||||
@@ -93,66 +49,83 @@
|
||||
return
|
||||
pad.doteleport(user, sending)
|
||||
|
||||
/obj/machinery/computer/launchpad/Topic(href, href_list)
|
||||
var/obj/machinery/launchpad/pad
|
||||
if(href_list["pad"])
|
||||
pad = get_pad(text2num(href_list["pad"]))
|
||||
/obj/machinery/computer/launchpad/proc/get_pad(number)
|
||||
var/obj/machinery/launchpad/pad = launchpads[number]
|
||||
return pad
|
||||
|
||||
/obj/machinery/computer/launchpad/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "launchpad_console", name, ui_x, ui_y, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/launchpad/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
var/list/pad_list = list()
|
||||
for(var/i in 1 to LAZYLEN(launchpads))
|
||||
if(pad_exists(i))
|
||||
var/obj/machinery/launchpad/pad = get_pad(i)
|
||||
var/list/this_pad = list()
|
||||
this_pad["name"] = pad.display_name
|
||||
this_pad["id"] = i
|
||||
if(pad.stat & NOPOWER)
|
||||
this_pad["inactive"] = TRUE
|
||||
pad_list += list(this_pad)
|
||||
else
|
||||
launchpads -= get_pad(i)
|
||||
data["launchpads"] = pad_list
|
||||
data["selected_id"] = selected_id
|
||||
if(selected_id)
|
||||
var/obj/machinery/launchpad/current_pad = launchpads[selected_id]
|
||||
data["x"] = current_pad.x_offset
|
||||
data["y"] = current_pad.y_offset
|
||||
data["pad_name"] = current_pad.display_name
|
||||
data["range"] = current_pad.range
|
||||
data["selected_pad"] = current_pad
|
||||
if(QDELETED(current_pad) || (current_pad.stat & NOPOWER))
|
||||
data["pad_active"] = FALSE
|
||||
return data
|
||||
data["pad_active"] = TRUE
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/launchpad/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
if(!LAZYLEN(launchpads))
|
||||
updateDialog()
|
||||
return
|
||||
var/obj/machinery/launchpad/current_pad = launchpads[selected_id]
|
||||
switch(action)
|
||||
if("select_pad")
|
||||
selected_id = text2num(params["id"])
|
||||
. = TRUE
|
||||
if("set_pos")
|
||||
var/new_x = text2num(params["x"])
|
||||
var/new_y = text2num(params["y"])
|
||||
current_pad.set_offset(new_x, new_y)
|
||||
. = TRUE
|
||||
if("move_pos")
|
||||
var/plus_x = text2num(params["x"])
|
||||
var/plus_y = text2num(params["y"])
|
||||
current_pad.set_offset(
|
||||
x = current_pad.x_offset + plus_x,
|
||||
y = current_pad.y_offset + plus_y
|
||||
)
|
||||
. = TRUE
|
||||
if("rename")
|
||||
. = TRUE
|
||||
var/new_name = params["name"]
|
||||
if(!new_name)
|
||||
return
|
||||
current_pad.display_name = new_name
|
||||
if("remove")
|
||||
if(usr && alert(usr, "Are you sure?", "Unlink Launchpad", "I'm Sure", "Abort") != "Abort")
|
||||
launchpads -= current_pad
|
||||
selected_id = null
|
||||
. = TRUE
|
||||
if("launch")
|
||||
teleport(usr, current_pad, TRUE)
|
||||
. = TRUE
|
||||
|
||||
if(href_list["choose_pad"])
|
||||
current_pad = text2num(href_list["pad"])
|
||||
|
||||
if(href_list["raisex"])
|
||||
if(pad.x_offset < pad.range)
|
||||
pad.x_offset++
|
||||
|
||||
if(href_list["lowerx"])
|
||||
if(pad.x_offset > (pad.range * -1))
|
||||
pad.x_offset--
|
||||
|
||||
if(href_list["raisey"])
|
||||
if(pad.y_offset < pad.range)
|
||||
pad.y_offset++
|
||||
|
||||
if(href_list["lowery"])
|
||||
if(pad.y_offset > (pad.range * -1))
|
||||
pad.y_offset--
|
||||
|
||||
if(href_list["reset"])
|
||||
pad.y_offset = 0
|
||||
pad.x_offset = 0
|
||||
|
||||
if(href_list["change_name"])
|
||||
var/new_name = stripped_input(usr, "What do you wish to name the launchpad?", "Launchpad", pad.display_name, 15)
|
||||
if(!new_name)
|
||||
return
|
||||
pad.display_name = new_name
|
||||
|
||||
if(href_list["setx"])
|
||||
var/newx = input(usr, "Input new x offset", pad.display_name, pad.x_offset) as null|num
|
||||
if(!isnull(newx))
|
||||
pad.x_offset = CLAMP(newx, -pad.range, pad.range)
|
||||
|
||||
if(href_list["sety"])
|
||||
var/newy = input(usr, "Input new y offset", pad.display_name, pad.y_offset) as null|num
|
||||
if(!isnull(newy))
|
||||
pad.y_offset = CLAMP(newy, -pad.range, pad.range)
|
||||
|
||||
if(href_list["remove"])
|
||||
if(usr && alert(usr, "Are you sure?", "Remove Launchpad", "I'm Sure", "Abort") != "Abort")
|
||||
launchpads -= pad
|
||||
|
||||
if(href_list["launch"])
|
||||
sending = TRUE
|
||||
teleport(usr, pad)
|
||||
|
||||
if(href_list["pull"])
|
||||
sending = FALSE
|
||||
teleport(usr, pad)
|
||||
|
||||
updateDialog()
|
||||
if("pull")
|
||||
teleport(usr, current_pad, FALSE)
|
||||
. = TRUE
|
||||
. = TRUE
|
||||
@@ -190,7 +190,7 @@
|
||||
if(!(active2 in GLOB.data_core.medical))
|
||||
active2 = null
|
||||
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr) || IsAdminGhost(usr))
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || hasSiliconAccessInArea(usr) || IsAdminGhost(usr))
|
||||
usr.set_machine(src)
|
||||
if(href_list["temp"])
|
||||
temp = null
|
||||
@@ -216,7 +216,7 @@
|
||||
else if(href_list["login"])
|
||||
var/mob/M = usr
|
||||
var/obj/item/card/id/I = M.get_idcard(TRUE)
|
||||
if(issilicon(M))
|
||||
if(hasSiliconAccessInArea(M))
|
||||
active1 = null
|
||||
active2 = null
|
||||
authenticated = 1
|
||||
@@ -478,7 +478,7 @@
|
||||
var/counter = 1
|
||||
while(active2.fields[text("com_[]", counter)])
|
||||
counter++
|
||||
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", authenticated, rank, STATION_TIME_TIMESTAMP("hh:mm:ss"), time2text(world.realtime, "MMM DD"), GLOB.year_integer, t1)
|
||||
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", authenticated, rank, STATION_TIME_TIMESTAMP("hh:mm:ss", world.time), time2text(world.realtime, "MMM DD"), GLOB.year_integer, t1)
|
||||
|
||||
else if(href_list["del_c"])
|
||||
if((istype(active2, /datum/data/record) && active2.fields[text("com_[]", href_list["del_c"])]))
|
||||
@@ -569,7 +569,7 @@
|
||||
if(user)
|
||||
if(message)
|
||||
if(authenticated)
|
||||
if(user.canUseTopic(src, !issilicon(user)))
|
||||
if(user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
if(!record1 || record1 == active1)
|
||||
if(!record2 || record2 == active2)
|
||||
return 1
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
/obj/machinery/computer/pod/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr))
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || hasSiliconAccessInArea(usr))
|
||||
usr.set_machine(src)
|
||||
if(href_list["power"])
|
||||
var/t = text2num(href_list["power"])
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
icon_keyboard = "security_key"
|
||||
req_access = list(ACCESS_ARMORY)
|
||||
circuit = /obj/item/circuitboard/computer/gulag_teleporter_console
|
||||
ui_x = 350
|
||||
ui_y = 295
|
||||
|
||||
var/default_goal = 200
|
||||
var/obj/machinery/gulag_teleporter/teleporter = null
|
||||
var/obj/structure/gulag_beacon/beacon = null
|
||||
@@ -22,7 +25,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "gulag_console", name, 455, 440, master_ui, state)
|
||||
ui = new(user, src, ui_key, "gulag_console", name, ui_x, ui_y, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/prisoner/gulag_teleporter_computer/ui_data(mob/user)
|
||||
@@ -50,13 +53,19 @@
|
||||
data["teleporter_location"] = "([teleporter.x], [teleporter.y], [teleporter.z])"
|
||||
data["teleporter_lock"] = teleporter.locked
|
||||
data["teleporter_state_open"] = teleporter.state_open
|
||||
else
|
||||
data["teleporter"] = null
|
||||
if(beacon)
|
||||
data["beacon"] = beacon
|
||||
data["beacon_location"] = "([beacon.x], [beacon.y], [beacon.z])"
|
||||
else
|
||||
data["beacon"] = null
|
||||
if(contained_id)
|
||||
data["id"] = contained_id
|
||||
data["id_name"] = contained_id.registered_name
|
||||
data["goal"] = contained_id.goal
|
||||
else
|
||||
data["id"] = null
|
||||
data["can_teleport"] = can_teleport
|
||||
|
||||
return data
|
||||
@@ -72,36 +81,41 @@
|
||||
switch(action)
|
||||
if("scan_teleporter")
|
||||
teleporter = findteleporter()
|
||||
return TRUE
|
||||
if("scan_beacon")
|
||||
beacon = findbeacon()
|
||||
return TRUE
|
||||
if("handle_id")
|
||||
if(contained_id)
|
||||
id_eject(usr)
|
||||
else
|
||||
id_insert(usr)
|
||||
return TRUE
|
||||
if("set_goal")
|
||||
var/new_goal = input("Set the amount of points:", "Points", contained_id.goal) as num|null
|
||||
var/new_goal = text2num(params["value"])
|
||||
if(!isnum(new_goal))
|
||||
return
|
||||
if(!new_goal)
|
||||
new_goal = default_goal
|
||||
if (new_goal > 1000)
|
||||
to_chat(usr, "The entered amount of points is too large. Points have instead been set to the maximum allowed amount.")
|
||||
contained_id.goal = CLAMP(new_goal, 0, 1000) //maximum 1000 points
|
||||
return TRUE
|
||||
if("toggle_open")
|
||||
if(teleporter.locked)
|
||||
to_chat(usr, "The teleporter is locked")
|
||||
to_chat(usr, "<span class='alert'>The teleporter must be unlocked first.</span>")
|
||||
return
|
||||
teleporter.toggle_open()
|
||||
return TRUE
|
||||
if("teleporter_lock")
|
||||
if(teleporter.state_open)
|
||||
to_chat(usr, "Close the teleporter before locking!")
|
||||
to_chat(usr, "<span class='alert'>The teleporter must be closed first.</span>")
|
||||
return
|
||||
teleporter.locked = !teleporter.locked
|
||||
return TRUE
|
||||
if("teleport")
|
||||
if(!teleporter || !beacon)
|
||||
return
|
||||
addtimer(CALLBACK(src, .proc/teleport, usr), 5)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/prisoner/gulag_teleporter_computer/proc/scan_machinery()
|
||||
teleporter = findteleporter()
|
||||
@@ -129,12 +143,12 @@
|
||||
say("[contained_id]'s ID card goal defaulting to [contained_id.goal] points.")
|
||||
log_game("[key_name(user)] teleported [key_name(prisoner)] to the Labor Camp [COORD(beacon)] for [id_goal_not_set ? "default goal of ":""][contained_id.goal] points.")
|
||||
teleporter.handle_prisoner(contained_id, temporary_record)
|
||||
playsound(src, 'sound/weapons/emitter.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/emitter.ogg', 50, TRUE)
|
||||
prisoner.forceMove(get_turf(beacon))
|
||||
prisoner.Stun(40) // small travel dizziness
|
||||
to_chat(prisoner, "<span class='warning'>The teleportation makes you a little dizzy.</span>")
|
||||
new /obj/effect/particle_effect/sparks(get_turf(prisoner))
|
||||
playsound(src, "sparks", 50, 1)
|
||||
playsound(src, "sparks", 50, TRUE)
|
||||
if(teleporter.locked)
|
||||
teleporter.locked = FALSE
|
||||
teleporter.toggle_open()
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
/obj/machinery/computer/prisoner/management/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr))
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || hasSiliconAccessInArea(usr))
|
||||
usr.set_machine(src)
|
||||
|
||||
if(href_list["id"])
|
||||
@@ -125,7 +125,7 @@
|
||||
to_chat(usr, "<span class='danger'>Unauthorized access.</span>")
|
||||
|
||||
else if(href_list["warn"])
|
||||
var/warning = copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN)
|
||||
var/warning = stripped_input(usr, "Message:", "Enter your message here!", "", MAX_MESSAGE_LEN)
|
||||
if(!warning)
|
||||
return
|
||||
var/obj/item/implant/I = locate(href_list["warn"]) in GLOB.tracked_implants
|
||||
|
||||
@@ -265,7 +265,7 @@ What a mess.*/
|
||||
active1 = null
|
||||
if(!( GLOB.data_core.security.Find(active2) ))
|
||||
active2 = null
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr) || IsAdminGhost(usr))
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || hasSiliconAccessInArea(usr) || IsAdminGhost(usr))
|
||||
usr.set_machine(src)
|
||||
switch(href_list["choice"])
|
||||
// SORTING!
|
||||
@@ -299,7 +299,7 @@ What a mess.*/
|
||||
if("Log In")
|
||||
var/mob/M = usr
|
||||
var/obj/item/card/id/I = M.get_idcard(TRUE)
|
||||
if(issilicon(M))
|
||||
if(hasSiliconAccessInArea(M))
|
||||
var/mob/living/silicon/borg = M
|
||||
active1 = null
|
||||
active2 = null
|
||||
@@ -456,7 +456,7 @@ What a mess.*/
|
||||
var/counter = 1
|
||||
while(active2.fields[text("com_[]", counter)])
|
||||
counter++
|
||||
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", src.authenticated, src.rank, STATION_TIME_TIMESTAMP("hh:mm:ss"), time2text(world.realtime, "MMM DD"), GLOB.year_integer, t1)
|
||||
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", src.authenticated, src.rank, STATION_TIME_TIMESTAMP("hh:mm:ss", world.time), time2text(world.realtime, "MMM DD"), GLOB.year_integer, t1)
|
||||
|
||||
if("Delete Record (ALL)")
|
||||
if(active1)
|
||||
@@ -544,7 +544,7 @@ What a mess.*/
|
||||
switch(href_list["field"])
|
||||
if("name")
|
||||
if(istype(active1, /datum/data/record) || istype(active2, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please input name:", "Secure. records", active1.fields["name"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = stripped_input(usr, "Please input name:", "Secure. records", active1.fields["name"], MAX_MESSAGE_LEN)
|
||||
if(!canUseSecurityRecordsConsole(usr, t1, a1))
|
||||
return
|
||||
if(istype(active1, /datum/data/record))
|
||||
@@ -636,7 +636,7 @@ What a mess.*/
|
||||
var/t2 = stripped_input(usr, "Please input minor crime details:", "Secure. records", "", null)
|
||||
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
||||
return
|
||||
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, STATION_TIME_TIMESTAMP("hh:mm:ss"))
|
||||
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, STATION_TIME_TIMESTAMP("hh:mm:ss", world.time))
|
||||
GLOB.data_core.addMinorCrime(active1.fields["id"], crime)
|
||||
investigate_log("New Minor Crime: <strong>[t1]</strong>: [t2] | Added to [active1.fields["name"]] by [key_name(usr)]", INVESTIGATE_RECORDS)
|
||||
if("mi_crim_delete")
|
||||
@@ -651,7 +651,7 @@ What a mess.*/
|
||||
var/t2 = stripped_input(usr, "Please input major crime details:", "Secure. records", "", null)
|
||||
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
||||
return
|
||||
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, STATION_TIME_TIMESTAMP("hh:mm:ss"))
|
||||
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, STATION_TIME_TIMESTAMP("hh:mm:ss", world.time))
|
||||
GLOB.data_core.addMajorCrime(active1.fields["id"], crime)
|
||||
investigate_log("New Major Crime: <strong>[t1]</strong>: [t2] | Added to [active1.fields["name"]] by [key_name(usr)]", INVESTIGATE_RECORDS)
|
||||
if("ma_crim_delete")
|
||||
@@ -802,7 +802,7 @@ What a mess.*/
|
||||
/obj/machinery/computer/secure_data/proc/canUseSecurityRecordsConsole(mob/user, message1 = 0, record1, record2)
|
||||
if(user)
|
||||
if(authenticated)
|
||||
if(user.canUseTopic(src, !issilicon(user)))
|
||||
if(user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
if(!trim(message1))
|
||||
return 0
|
||||
if(!record1 || record1 == active1)
|
||||
|
||||
@@ -20,17 +20,18 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "station_alert", name, 300, 500, master_ui, state)
|
||||
ui = new(user, src, ui_key, "station_alert", name, 325, 500, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/station_alert/ui_data(mob/user)
|
||||
. = list()
|
||||
var/list/data = list()
|
||||
|
||||
.["alarms"] = list()
|
||||
data["alarms"] = list()
|
||||
for(var/class in alarms)
|
||||
.["alarms"][class] = list()
|
||||
data["alarms"][class] = list()
|
||||
for(var/area in alarms[class])
|
||||
.["alarms"][class] += area
|
||||
data["alarms"][class] += area
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/station_alert/proc/triggerAlarm(class, area/A, O, obj/source)
|
||||
if(source.z != z)
|
||||
|
||||
@@ -136,7 +136,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
var/list/transferlog = list()
|
||||
|
||||
/obj/machinery/computer/telecrystals/boss/proc/logTransfer(logmessage)
|
||||
transferlog += ("<b>[STATION_TIME_TIMESTAMP("hh:mm:ss")]</b> [logmessage]")
|
||||
transferlog += ("<b>[STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)]</b> [logmessage]")
|
||||
|
||||
/obj/machinery/computer/telecrystals/boss/proc/scanUplinkers()
|
||||
for(var/obj/machinery/computer/telecrystals/uplinker/A in urange(scanrange, src.loc))
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
icon_keyboard = "teleport_key"
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
circuit = /obj/item/circuitboard/computer/teleporter
|
||||
ui_x = 475
|
||||
ui_y = 130
|
||||
var/regime_set = "Teleporter"
|
||||
var/id
|
||||
var/obj/machinery/teleport/station/power_station
|
||||
@@ -32,34 +34,30 @@
|
||||
break
|
||||
return power_station
|
||||
|
||||
/obj/machinery/computer/teleporter/ui_interact(mob/user)
|
||||
. = ..()
|
||||
var/data = "<h3>Teleporter Status</h3>"
|
||||
if(!power_station)
|
||||
data += "<div class='statusDisplay'>No power station linked.</div>"
|
||||
else if(!power_station.teleporter_hub)
|
||||
data += "<div class='statusDisplay'>No hub linked.</div>"
|
||||
obj/machinery/computer/teleporter/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "teleporter", name, ui_x, ui_y, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/teleporter/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["power_station"] = power_station ? TRUE : FALSE
|
||||
data["teleporter_hub"] = power_station?.teleporter_hub ? TRUE : FALSE
|
||||
data["regime_set"] = regime_set
|
||||
data["target"] = !target ? "None" : "[get_area(target)] [(regime_set != "Gate") ? "" : "Teleporter"]"
|
||||
data["calibrating"] = calibrating
|
||||
|
||||
if(power_station?.teleporter_hub?.calibrated || power_station?.teleporter_hub?.accuracy >= 3)
|
||||
data["calibrated"] = TRUE
|
||||
else
|
||||
data += "<div class='statusDisplay'>Current regime: [regime_set]<BR>"
|
||||
data += "Current target: [(!target) ? "None" : "[get_area(target)] [(regime_set != "Gate") ? "" : "Teleporter"]"]<BR>"
|
||||
if(calibrating)
|
||||
data += "Calibration: <font color='yellow'>In Progress</font>"
|
||||
else if(power_station.teleporter_hub.calibrated || power_station.efficiency >= 3)
|
||||
data += "Calibration: <font color='green'>Optimal</font>"
|
||||
else
|
||||
data += "Calibration: <font color='red'>Sub-Optimal</font>"
|
||||
data += "</div><BR>"
|
||||
data["calibrated"] = FALSE
|
||||
|
||||
data += "<A href='?src=[REF(src)];regimeset=1'>Change regime</A><BR>"
|
||||
data += "<A href='?src=[REF(src)];settarget=1'>Set target</A><BR>"
|
||||
return data
|
||||
|
||||
data += "<BR><A href='?src=[REF(src)];calibrate=1'>Calibrate Hub</A>"
|
||||
|
||||
var/datum/browser/popup = new(user, "teleporter", name, 400, 400)
|
||||
popup.set_content(data)
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/computer/teleporter/Topic(href, href_list)
|
||||
/obj/machinery/computer/teleporter/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -70,38 +68,39 @@
|
||||
say("Error: Calibration in progress. Stand by.")
|
||||
return
|
||||
|
||||
if(href_list["regimeset"])
|
||||
power_station.engaged = 0
|
||||
power_station.teleporter_hub.update_icon()
|
||||
power_station.teleporter_hub.calibrated = 0
|
||||
reset_regime()
|
||||
if(href_list["settarget"])
|
||||
power_station.engaged = 0
|
||||
power_station.teleporter_hub.update_icon()
|
||||
power_station.teleporter_hub.calibrated = 0
|
||||
set_target(usr)
|
||||
if(href_list["calibrate"])
|
||||
if(!target)
|
||||
say("Error: No target set to calibrate to.")
|
||||
return
|
||||
if(power_station.teleporter_hub.calibrated || power_station.efficiency >= 3)
|
||||
say("Hub is already calibrated!")
|
||||
return
|
||||
say("Processing hub calibration to target...")
|
||||
switch(action)
|
||||
if("regimeset")
|
||||
power_station.engaged = FALSE
|
||||
power_station.teleporter_hub.update_icon()
|
||||
power_station.teleporter_hub.calibrated = FALSE
|
||||
reset_regime()
|
||||
. = TRUE
|
||||
if("settarget")
|
||||
power_station.engaged = FALSE
|
||||
power_station.teleporter_hub.update_icon()
|
||||
power_station.teleporter_hub.calibrated = FALSE
|
||||
set_target(usr)
|
||||
. = TRUE
|
||||
if("calibrate")
|
||||
if(!target)
|
||||
say("Error: No target set to calibrate to.")
|
||||
return
|
||||
if(power_station.teleporter_hub.calibrated || power_station.teleporter_hub.accuracy >= 3)
|
||||
say("Hub is already calibrated!")
|
||||
return
|
||||
|
||||
calibrating = 1
|
||||
power_station.update_icon()
|
||||
spawn(50 * (3 - power_station.efficiency)) //Better parts mean faster calibration
|
||||
calibrating = 0
|
||||
if(check_hub_connection())
|
||||
power_station.teleporter_hub.calibrated = 1
|
||||
say("Calibration complete.")
|
||||
else
|
||||
say("Error: Unable to detect hub.")
|
||||
say("Processing hub calibration to target...")
|
||||
calibrating = TRUE
|
||||
power_station.update_icon()
|
||||
updateDialog()
|
||||
|
||||
updateDialog()
|
||||
spawn(50 * (3 - power_station.teleporter_hub.accuracy)) //Better parts mean faster calibration
|
||||
calibrating = FALSE
|
||||
if(check_hub_connection())
|
||||
power_station.teleporter_hub.calibrated = TRUE
|
||||
say("Calibration complete.")
|
||||
else
|
||||
say("Error: Unable to detect hub.")
|
||||
power_station.update_icon()
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/computer/teleporter/proc/check_hub_connection()
|
||||
if(!power_station)
|
||||
@@ -141,7 +140,7 @@
|
||||
L[avoid_assoc_duplicate_keys(M.real_name, areaindex)] = M
|
||||
|
||||
var/desc = input("Please select a location to lock in.", "Locking Computer") as null|anything in L
|
||||
if(!user.canUseTopic(src, !issilicon(user), NO_DEXTERY)) //check if we are still around
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user), NO_DEXTERY)) //check if we are still around
|
||||
return
|
||||
target = L[desc]
|
||||
if(imp_t)
|
||||
@@ -169,7 +168,7 @@
|
||||
to_chat(user, "<span class='alert'>No active connected stations located.</span>")
|
||||
return
|
||||
var/desc = input("Please select a station to lock in.", "Locking Computer") as null|anything in L
|
||||
if(!user.canUseTopic(src, !issilicon(user), NO_DEXTERY)) //again, check if we are still around
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user), NO_DEXTERY)) //again, check if we are still around
|
||||
return
|
||||
var/obj/machinery/teleport/station/target_station = L[desc]
|
||||
if(!target_station || !target_station.teleporter_hub)
|
||||
|
||||
Reference in New Issue
Block a user