@@ -182,7 +182,7 @@
|
||||
|
||||
/obj/machinery/sleeper/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return
|
||||
if(state_open)
|
||||
close_machine()
|
||||
|
||||
@@ -229,7 +229,7 @@ Class Procs:
|
||||
return !(stat & (NOPOWER|BROKEN|MAINT))
|
||||
|
||||
/obj/machinery/can_interact(mob/user)
|
||||
var/silicon = issiliconoradminghost(user)
|
||||
var/silicon = hasSiliconAccessInArea(user) || IsAdminGhost(user)
|
||||
if((stat & (NOPOWER|BROKEN)) && !(interaction_flags_machine & INTERACT_MACHINE_OFFLINE))
|
||||
return FALSE
|
||||
if(panel_open && !(interaction_flags_machine & INTERACT_MACHINE_OPEN))
|
||||
|
||||
@@ -105,7 +105,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
|
||||
/obj/machinery/announcement_system/ui_interact(mob/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
visible_message("<span class='warning'>[src] buzzes.</span>", "<span class='italics'>You hear a faint buzz.</span>")
|
||||
@@ -123,7 +123,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
/obj/machinery/announcement_system/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(!usr.canUseTopic(src, !issilicon(usr)))
|
||||
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
visible_message("<span class='warning'>[src] buzzes.</span>", "<span class='italics'>You hear a faint buzz.</span>")
|
||||
@@ -132,13 +132,13 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
|
||||
if(href_list["ArrivalTopic"])
|
||||
var/NewMessage = stripped_input(usr, "Enter in the arrivals announcement configuration.", "Arrivals Announcement Config", arrival)
|
||||
if(!usr.canUseTopic(src, !issilicon(usr)))
|
||||
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
if(NewMessage)
|
||||
arrival = NewMessage
|
||||
else if(href_list["NewheadTopic"])
|
||||
var/NewMessage = stripped_input(usr, "Enter in the departmental head announcement configuration.", "Head Departmental Announcement Config", newhead)
|
||||
if(!usr.canUseTopic(src, !issilicon(usr)))
|
||||
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
if(NewMessage)
|
||||
newhead = NewMessage
|
||||
@@ -157,7 +157,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
. = attack_ai(user)
|
||||
|
||||
/obj/machinery/announcement_system/attack_ai(mob/user)
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>[src]'s firmware appears to be malfunctioning!</span>")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -449,7 +449,7 @@
|
||||
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')
|
||||
@@ -318,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
|
||||
|
||||
@@ -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
|
||||
@@ -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"])
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
|
||||
@@ -140,7 +140,7 @@ obj/machinery/computer/teleporter/ui_interact(mob/user, ui_key = "main", datum/t
|
||||
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)
|
||||
@@ -168,7 +168,7 @@ obj/machinery/computer/teleporter/ui_interact(mob/user, ui_key = "main", datum/t
|
||||
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)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/obj/machinery/jukebox/ui_interact(mob/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return
|
||||
if (!anchored)
|
||||
to_chat(user,"<span class='warning'>This device must be anchored by a wrench!</span>")
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
/obj/machinery/dish_drive/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(user.canUseTopic(src, !issilicon(user)))
|
||||
if(user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
do_the_dishes(TRUE)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
|
||||
/obj/machinery/dna_scannernew/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return
|
||||
interact(user)
|
||||
return TRUE
|
||||
|
||||
@@ -676,7 +676,7 @@
|
||||
else
|
||||
. += "It looks very robust."
|
||||
|
||||
if(issilicon(user) && (!stat & BROKEN))
|
||||
if(hasSiliconAccessInArea(user) && (!stat & BROKEN))
|
||||
. += "<span class='notice'>Shift-click [src] to [ density ? "open" : "close"] it.</span>"
|
||||
. += "<span class='notice'>Ctrl-click [src] to [ locked ? "raise" : "drop"] its bolts.</span>"
|
||||
. += "<span class='notice'>Alt-click [src] to [ secondsElectrified ? "un-electrify" : "permanently electrify"] it.</span>"
|
||||
@@ -1322,9 +1322,9 @@
|
||||
if(density && !open(2)) //The airlock is still closed, but something prevented it opening. (Another player noticed and bolted/welded the airlock in time!)
|
||||
to_chat(user, "<span class='warning'>Despite your efforts, [src] managed to resist your attempts to open it!</span>")
|
||||
|
||||
/obj/machinery/door/airlock/hostile_lockdown(mob/origin)
|
||||
/obj/machinery/door/airlock/hostile_lockdown(mob/origin, aicontrolneeded = TRUE)
|
||||
// Must be powered and have working AI wire.
|
||||
if(canAIControl(src) && !stat)
|
||||
if((aicontrolneeded && canAIControl(src) && !stat) || !aicontrolneeded)
|
||||
locked = FALSE //For airlocks that were bolted open.
|
||||
safe = FALSE //DOOR CRUSH
|
||||
close()
|
||||
@@ -1334,9 +1334,9 @@
|
||||
LAZYADD(shockedby, "\[[TIME_STAMP("hh:mm:ss", FALSE)]\] [key_name(origin)]")
|
||||
|
||||
|
||||
/obj/machinery/door/airlock/disable_lockdown()
|
||||
/obj/machinery/door/airlock/disable_lockdown(aicontrolneeded = TRUE)
|
||||
// Must be powered and have working AI wire.
|
||||
if(canAIControl(src) && !stat)
|
||||
if((aicontrolneeded && canAIControl(src) && !stat) || !aicontrolneeded)
|
||||
unbolt()
|
||||
set_electrified(NOT_ELECTRIFIED)
|
||||
open()
|
||||
@@ -1528,7 +1528,7 @@
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/door/airlock/proc/user_allowed(mob/user)
|
||||
return (issilicon(user) && canAIControl(user)) || IsAdminGhost(user)
|
||||
return (hasSiliconAccessInArea(user) && canAIControl(user)) || IsAdminGhost(user)
|
||||
|
||||
/obj/machinery/door/airlock/proc/shock_restore(mob/user)
|
||||
if(!user_allowed(user))
|
||||
|
||||
@@ -514,7 +514,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
if(active_user && !isobserver(active_user) && get_dist(active_user,src)<=1 && usr!=active_user)
|
||||
to_chat(usr, "<span class='warning'>You must wait for [active_user] to finish and move away.</span>")
|
||||
return
|
||||
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && isturf(loc))) || issilicon(usr) || isobserver(usr))
|
||||
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && isturf(loc))) || hasSiliconAccessInArea(usr) || isobserver(usr))
|
||||
usr.set_machine(src)
|
||||
scan_user(usr)
|
||||
if(href_list["set_channel_name"])
|
||||
|
||||
@@ -865,7 +865,7 @@
|
||||
|
||||
/obj/machinery/turretid/examine(mob/user)
|
||||
. = ..()
|
||||
if(issilicon(user) && (!stat & BROKEN))
|
||||
if(hasSiliconAccessInArea(user) && (!stat & BROKEN))
|
||||
. += "<span class='notice'>Ctrl-click [src] to [ enabled ? "disable" : "enable"] turrets.</span>"
|
||||
. += "<span class='notice'>Alt-click [src] to set turrets to [ lethal ? "stun" : "kill"].</span>"
|
||||
|
||||
@@ -880,7 +880,7 @@
|
||||
to_chat(user, "You link \the [M.buffer] with \the [src]")
|
||||
return
|
||||
|
||||
if (issilicon(user))
|
||||
if (hasSiliconAccessInArea(user))
|
||||
return attack_hand(user)
|
||||
|
||||
if ( get_dist(src, user) == 0 ) // trying to unlock the interface
|
||||
@@ -921,7 +921,7 @@
|
||||
/obj/machinery/turretid/ui_interact(mob/user)
|
||||
. = ..()
|
||||
if ( get_dist(src, user) > 0 )
|
||||
if ( !(issilicon(user) || IsAdminGhost(user)) )
|
||||
if ( !(hasSiliconAccessInArea(user) || IsAdminGhost(user)) )
|
||||
to_chat(user, "<span class='notice'>You are too far away.</span>")
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=turretid")
|
||||
@@ -929,10 +929,10 @@
|
||||
|
||||
var/t = ""
|
||||
|
||||
if(locked && !(issilicon(user) || IsAdminGhost(user)))
|
||||
if(locked && !(hasSiliconAccessInArea(user) || IsAdminGhost(user)))
|
||||
t += "<div class='notice icon'>Swipe ID card to unlock interface</div>"
|
||||
else
|
||||
if(!issilicon(user) && !IsAdminGhost(user))
|
||||
if(!hasSiliconAccessInArea(user) && !IsAdminGhost(user))
|
||||
t += "<div class='notice icon'>Swipe ID card to lock interface</div>"
|
||||
t += "Turrets [enabled?"activated":"deactivated"] - <A href='?src=[REF(src)];toggleOn=1'>[enabled?"Disable":"Enable"]?</a><br>"
|
||||
t += "Currently set for [lethal?"lethal":"stun repeatedly"] - <A href='?src=[REF(src)];toggleLethal=1'>Change to [lethal?"Stun repeatedly":"Lethal"]?</a><br>"
|
||||
@@ -946,7 +946,7 @@
|
||||
if(..())
|
||||
return
|
||||
if (locked)
|
||||
if(!(issilicon(usr) || IsAdminGhost(usr)))
|
||||
if(!(hasSiliconAccessInArea(usr) || IsAdminGhost(usr)))
|
||||
to_chat(usr, "Control panel is locked!")
|
||||
return
|
||||
if (href_list["toggleOn"])
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(locked && !issilicon(user))
|
||||
if(locked && !hasSiliconAccessInArea(user))
|
||||
to_chat(user, "<span class='warning'>The machine is locked, you are unable to use it!</span>")
|
||||
return
|
||||
if(panel_open)
|
||||
@@ -370,7 +370,7 @@
|
||||
if(!anchored)
|
||||
to_chat(user, "<span class='warning'>\The [src] needs to be firmly secured to the floor first!</span>")
|
||||
return
|
||||
if(locked && !issilicon(user))
|
||||
if(locked && !hasSiliconAccessInArea(user))
|
||||
to_chat(user, "<span class='warning'>The controls are locked!</span>")
|
||||
return
|
||||
if(!power)
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
|
||||
var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network)
|
||||
|
||||
if(newnet && ((usr in range(1, src)) || issilicon(usr)))
|
||||
if(newnet && ((usr in range(1, src)) || hasSiliconAccessInArea(usr)))
|
||||
if(length(newnet) > 15)
|
||||
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
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))
|
||||
//Authenticate
|
||||
if (href_list["auth"])
|
||||
if(LINKED_SERVER_NONRESPONSIVE)
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
if(href_list["network"])
|
||||
|
||||
var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network)
|
||||
if(newnet && ((usr in range(1, src)) || issilicon(usr)))
|
||||
if(newnet && ((usr in range(1, src)) || hasSiliconAccessInArea(usr)))
|
||||
if(length(newnet) > 15)
|
||||
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/obj/machinery/telecomms/ui_interact(mob/user)
|
||||
. = ..()
|
||||
// You need a multitool to use this, or be silicon
|
||||
if(!issilicon(user))
|
||||
if(!hasSiliconAccessInArea(user))
|
||||
// istype returns false if the value is null
|
||||
if(!istype(user.get_active_held_item(), /obj/item/multitool))
|
||||
return
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
var/obj/item/multitool/P = null
|
||||
// Let's double check
|
||||
if(!issilicon(user) && istype(user.get_active_held_item(), /obj/item/multitool))
|
||||
if(!hasSiliconAccessInArea(user) && istype(user.get_active_held_item(), /obj/item/multitool))
|
||||
P = user.get_active_held_item()
|
||||
else if(isAI(user))
|
||||
var/mob/living/silicon/ai/U = user
|
||||
@@ -162,7 +162,7 @@
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(!issilicon(usr))
|
||||
if(!hasSiliconAccessInArea(usr))
|
||||
if(!istype(usr.get_active_held_item(), /obj/item/multitool))
|
||||
return
|
||||
|
||||
@@ -270,6 +270,6 @@
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/telecomms/proc/canAccess(mob/user)
|
||||
if(issilicon(user) || in_range(user, src))
|
||||
if(hasSiliconAccessInArea(user) || in_range(user, src))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/obj/machinery/transformer/examine(mob/user)
|
||||
. = ..()
|
||||
if(cooldown && (issilicon(user) || isobserver(user)))
|
||||
if(cooldown && (hasSiliconAccessInArea(user) || isobserver(user)))
|
||||
. += "It will be ready in [DisplayTimeText(cooldown_timer - world.time)]."
|
||||
|
||||
/obj/machinery/transformer/Destroy()
|
||||
|
||||
@@ -721,7 +721,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
return
|
||||
|
||||
/obj/item/pda/proc/remove_id(mob/user)
|
||||
if(issilicon(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(hasSiliconAccessInArea(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
do_remove_id(user)
|
||||
|
||||
@@ -916,7 +916,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
remove_pen()
|
||||
|
||||
/obj/item/pda/proc/toggle_light()
|
||||
if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE))
|
||||
if(hasSiliconAccessInArea(usr) || !usr.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if(fon)
|
||||
fon = FALSE
|
||||
@@ -928,7 +928,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
|
||||
/obj/item/pda/proc/remove_pen()
|
||||
|
||||
if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(hasSiliconAccessInArea(usr) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
|
||||
if(inserted_item)
|
||||
|
||||
@@ -609,7 +609,7 @@ Code:
|
||||
/obj/item/cartridge/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
if(!usr.canUseTopic(src, !issilicon(usr)))
|
||||
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=pda")
|
||||
return
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
#define HIJACK_APC_MAX_AMOUNT 5
|
||||
|
||||
/obj/item/implant/hijack
|
||||
name = "hijack implant"
|
||||
desc = "Allows you to control the machinery in a room by hacking into the APC."
|
||||
actions_types = list(/datum/action/item_action/hands_free/activate, /datum/action/item_action/removeAPCs, /datum/action/item_action/accessAPCs, /datum/action/item_action/stealthmodetoggle)
|
||||
activated = 1
|
||||
var/toggled = FALSE
|
||||
icon_state = "hijack"
|
||||
var/eye_color
|
||||
var/stealthmode = FALSE
|
||||
var/stealthcooldown = 0
|
||||
var/hijacking = FALSE
|
||||
|
||||
/obj/item/implant/hijack/activate()
|
||||
. = ..()
|
||||
toggled = !toggled
|
||||
imp_in.click_intercept = toggled ? src : null
|
||||
imp_in.siliconaccesstoggle = toggled ? TRUE : FALSE
|
||||
to_chat(imp_in,"<span class='notice'>You turn [toggled ? "on" : "off"] [src]'s silicon interactions.</span>")
|
||||
toggle_eyes()
|
||||
|
||||
/obj/item/implant/hijack/proc/toggle_eyes()
|
||||
if (!ishuman(imp_in))
|
||||
return
|
||||
var/on = toggled && !stealthmode
|
||||
var/mob/living/carbon/human/H = imp_in
|
||||
H.eye_color = on ? "ff0" : eye_color
|
||||
H.dna.update_ui_block(DNA_EYE_COLOR_BLOCK)
|
||||
H.update_body()
|
||||
|
||||
/obj/item/implant/hijack/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
if(..())
|
||||
ADD_TRAIT(target, TRAIT_HIJACKER, "implant")
|
||||
if (ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
eye_color = H.eye_color
|
||||
return TRUE
|
||||
|
||||
/obj/item/implant/hijack/removed(mob/target, silent = FALSE, special = 0)
|
||||
if(..())
|
||||
REMOVE_TRAIT(target, TRAIT_HIJACKER, "implant")
|
||||
for (var/area/area in imp_in.siliconaccessareas)
|
||||
imp_in.toggleSiliconAccessArea(area)
|
||||
var/obj/machinery/power/apc/apc = area.get_apc()
|
||||
if (apc)
|
||||
apc.hijacker = null
|
||||
apc.set_hijacked_lighting()
|
||||
apc.update_icon()
|
||||
if (ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
H.eye_color = eye_color
|
||||
return TRUE
|
||||
|
||||
/obj/item/implant/hijack/proc/InterceptClickOn(mob/living/user,params,atom/object)
|
||||
if (isitem(object) || !toggled || user.incapacitated())
|
||||
return
|
||||
if (stealthmode == FALSE && istype(object,/obj/machinery/power/apc) && !user.CanReach(object))
|
||||
if (hijack_remotely(object))
|
||||
return
|
||||
if (stealthmode && !user.CanReach(object))
|
||||
return
|
||||
if (!object.hasSiliconAccessInArea(imp_in))
|
||||
return
|
||||
var/list/modifiers = params2list(params)
|
||||
imp_in.face_atom(object)
|
||||
if (modifiers["shift"] && modifiers["ctrl"])
|
||||
object.AICtrlShiftClick(imp_in)
|
||||
return TRUE
|
||||
if (modifiers["shift"])
|
||||
object.AIShiftClick(imp_in)
|
||||
return TRUE
|
||||
if (modifiers["ctrl"])
|
||||
object.AICtrlClick(imp_in)
|
||||
return TRUE
|
||||
if (modifiers["alt"])
|
||||
object.AIAltClick(imp_in)
|
||||
return TRUE
|
||||
if (user.get_active_held_item())
|
||||
return
|
||||
if (user.CanReach(object))
|
||||
object.attack_robot(imp_in)
|
||||
else
|
||||
object.attack_ai(imp_in)
|
||||
return TRUE
|
||||
|
||||
/obj/item/implant/hijack/proc/hijack_remotely(obj/machinery/power/apc/apc)
|
||||
if (apc.hijacker || hijacking)
|
||||
return FALSE //can't remotely hijack an already hijacked APC
|
||||
hijacking = TRUE
|
||||
to_chat(imp_in, "<span class='notice'>Establishing remote connection with APC.</span>")
|
||||
if (!do_after(imp_in, 4 SECONDS,target=apc))
|
||||
to_chat(imp_in, "<span class='warning'>Aborting.</span>")
|
||||
hijacking = FALSE
|
||||
return TRUE
|
||||
if (LAZYLEN(imp_in.siliconaccessareas) >= HIJACK_APC_MAX_AMOUNT)
|
||||
to_chat(src,"<span class='warning'>You are connected to too many APCs! Too many more will fry your brain.</span>")
|
||||
hijacking = FALSE
|
||||
return TRUE
|
||||
imp_in.light_power = 2
|
||||
imp_in.light_range = 2
|
||||
imp_in.light_color = COLOR_YELLOW
|
||||
imp_in.update_light()
|
||||
imp_in.visible_message("<span class='warning'>[imp_in] starts glowing a with a hollow yellow light!</span>")
|
||||
to_chat(imp_in, "<span class='notice'>Beginning hijack of APC.</span>")
|
||||
if (do_after(imp_in, 21 SECONDS,target=apc))
|
||||
apc.hijacker = imp_in
|
||||
stealthmode = FALSE
|
||||
apc.set_hijacked_lighting()
|
||||
imp_in.toggleSiliconAccessArea(apc.area)
|
||||
apc.update_icon()
|
||||
stealthcooldown = world.time + 1 MINUTES + 30 SECONDS
|
||||
toggle_eyes()
|
||||
else
|
||||
to_chat(imp_in, "<span class='warning'>Aborting.</span>")
|
||||
hijacking = FALSE
|
||||
imp_in.light_power = 0
|
||||
imp_in.light_range = 0
|
||||
imp_in.light_color = COLOR_YELLOW
|
||||
imp_in.update_light()
|
||||
return TRUE
|
||||
@@ -74,4 +74,8 @@
|
||||
|
||||
/obj/item/implanter/stealth
|
||||
name = "implanter (stealth)"
|
||||
imp_type = /obj/item/implant/stealth
|
||||
imp_type = /obj/item/implant/stealth
|
||||
|
||||
/obj/item/implanter/hijack
|
||||
name = "implanter (hijack)"
|
||||
imp_type = /obj/item/implant/hijack
|
||||
@@ -125,7 +125,7 @@
|
||||
if ((M.client && M.machine == src))
|
||||
is_in_use = TRUE
|
||||
ui_interact(M)
|
||||
if(isAI(usr) || iscyborg(usr) || IsAdminGhost(usr))
|
||||
if(isAI(usr) || iscyborg(usr) || IsAdminGhost(usr) || hasSiliconAccessInArea(usr))
|
||||
if (!(usr in nearby))
|
||||
if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
|
||||
is_in_use = TRUE
|
||||
|
||||
@@ -168,7 +168,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
|
||||
|
||||
/obj/structure/bodycontainer/morgue/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return
|
||||
beeper = !beeper
|
||||
to_chat(user, "<span class='notice'>You turn the speaker function [beeper ? "on" : "off"].</span>")
|
||||
|
||||
Reference in New Issue
Block a user