diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 0efd5a1f79..c4c9d815a0 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -187,10 +187,10 @@ #define SPEECH_MESSAGE 1 // #define SPEECH_BUBBLE_TYPE 2 #define SPEECH_SPANS 3 - /* #define SPEECH_SANITIZE 4 +// #define SPEECH_SANITIZE 4 #define SPEECH_LANGUAGE 5 - #define SPEECH_IGNORE_SPAM 6 - #define SPEECH_FORCED 7 */ +// #define SPEECH_IGNORE_SPAM 6 +// #define SPEECH_FORCED 7 // /mob/living signals #define COMSIG_LIVING_FULLY_HEAL "living_fully_healed" //from base of /mob/living/fully_heal(): (admin_revive) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index ea1ccfa97b..d144254a50 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -110,6 +110,7 @@ #define TRAIT_NOHARDCRIT "nohardcrit" #define TRAIT_NOSOFTCRIT "nosoftcrit" #define TRAIT_MINDSHIELD "mindshield" +#define TRAIT_HIJACKER "hijacker" #define TRAIT_SIXTHSENSE "sixthsense" #define TRAIT_DISSECTED "dissected" #define TRAIT_FEARLESS "fearless" diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 3985659b71..beb005b8d1 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -44,6 +44,12 @@ index = findtext(t, char, index + length(char)) return t +/proc/sanitize_name(t,list/repl_chars = null) + if(t == "space" || t == "floor" || t == "wall" || t == "r-wall" || t == "monkey" || t == "unknown" || t == "inactive ai") //prevents these common metagamey names + alert("Invalid name.") + return "" + return sanitize(t) + /proc/sanitize_filename(t) return sanitize_simple(t, list("\n"="", "\t"="", "/"="", "\\"="", "?"="", "%"="", "*"="", ":"="", "|"="", "\""="", "<"="", ">"="")) @@ -775,4 +781,4 @@ GLOBAL_LIST_INIT(binary, list("0","1")) #define is_alpha(X) ((text2ascii(X) <= 122) && (text2ascii(X) >= 97)) -#define is_digit(X) ((length(X) == 1) && (length(text2num(X)) == 1)) \ No newline at end of file +#define is_digit(X) ((length(X) == 1) && (length(text2num(X)) == 1)) diff --git a/code/datums/action.dm b/code/datums/action.dm index 8659a9e7c4..54c719a6d5 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -544,6 +544,70 @@ cooldown = world.time owner.playsound_local(box, 'sound/misc/box_deploy.ogg', 50, TRUE) +/datum/action/item_action/removeAPCs + name = "Relinquish APC" + desc = "Let go of an APC, relinquish control back to the station." + icon_icon = 'icons/obj/implants.dmi' + button_icon_state = "hijackx" + +/datum/action/item_action/removeAPCs/Trigger() + var/list/areas = list() + for (var/area/a in owner.siliconaccessareas) + areas[a.name] = a + var/removeAPC = input("Select an APC to remove:","Remove APC Control",1) as null|anything in areas + if (!removeAPC) + return + var/area/area = areas[removeAPC] + var/obj/machinery/power/apc/apc = area.get_apc() + if (!apc || !(area in owner.siliconaccessareas)) + return + apc.hijacker = null + apc.update_icon() + apc.set_hijacked_lighting() + owner.toggleSiliconAccessArea(area) + +/datum/action/item_action/accessAPCs + name = "Access APC Interface" + desc = "Open the APC's interface." + icon_icon = 'icons/obj/implants.dmi' + button_icon_state = "hijacky" + +/datum/action/item_action/accessAPCs/Trigger() + var/list/areas = list() + for (var/area/a in owner.siliconaccessareas) + areas[a.name] = a + var/accessAPC = input("Select an APC to access:","Access APC Interface",1) as null|anything in areas + if (!accessAPC) + return + var/area/area = areas[accessAPC] + var/obj/machinery/power/apc/apc = area.get_apc() + if (!apc || !(area in owner.siliconaccessareas)) + return + apc.ui_interact(owner) + +/datum/action/item_action/stealthmodetoggle + name = "Toggle Stealth Mode" + desc = "Toggles the stealth mode on the hijack implant." + icon_icon = 'icons/obj/implants.dmi' + button_icon_state = "hijackz" + +/datum/action/item_action/stealthmodetoggle/Trigger() + var/obj/item/implant/hijack/H = target + if (!istype(H)) + return + if (H.stealthcooldown > world.time) + to_chat(owner,"The hijack implant's stealth mode toggle is still rebooting!") + return + H.stealthmode = !H.stealthmode + for (var/area/area in H.imp_in.siliconaccessareas) + var/obj/machinery/power/apc/apc = area.get_apc() + if (apc) + apc.set_hijacked_lighting() + apc.update_icon() + H.stealthcooldown = world.time + 15 SECONDS + H.toggle_eyes() + to_chat(owner,"You toggle the hijack implant's stealthmode [H.stealthmode ? "on" : "off"].") + /datum/action/item_action/flash name = "Flash" diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm index cf14da36a0..c7b9758bcb 100644 --- a/code/datums/diseases/advance/symptoms/heal.dm +++ b/code/datums/diseases/advance/symptoms/heal.dm @@ -448,9 +448,11 @@ symptom_delay_max = 1 passive_message = "Your skin glows faintly for a moment." var/cellular_damage = FALSE - threshold_desc = "Transmission 6: Additionally heals cellular damage and toxin lovers.
\ - Resistance 7: Increases healing speed." - + threshold_desc = list( + "Transmission 6" = "Additionally heals cellular damage and toxin lovers.", + "Resistance 7" = "Increases healing speed.", + ) + /datum/symptom/heal/radiation/Start(datum/disease/advance/A) if(!..()) return diff --git a/code/datums/elements/mob_holder.dm b/code/datums/elements/mob_holder.dm index 5b471a0dc7..a63be406c1 100644 --- a/code/datums/elements/mob_holder.dm +++ b/code/datums/elements/mob_holder.dm @@ -47,7 +47,7 @@ return FALSE source.visible_message("[user] starts picking up [source].", \ "[user] starts picking you up!") - if(!do_after(user, 20, target = src) || source.buckled) + if(!do_after(user, 20, target = source) || source.buckled) return FALSE source.visible_message("[user] picks up [source]!", \ diff --git a/code/datums/wires/airlock.dm b/code/datums/wires/airlock.dm index 315cfa59d6..b6699540c3 100644 --- a/code/datums/wires/airlock.dm +++ b/code/datums/wires/airlock.dm @@ -52,7 +52,7 @@ /datum/wires/airlock/interactable(mob/user) var/obj/machinery/door/airlock/A = holder - if(!issilicon(user) && A.isElectrified() && A.shock(user, 100)) + if(!A.hasSiliconAccessInArea(user) && A.isElectrified() && A.shock(user, 100)) return FALSE if(A.panel_open) return TRUE diff --git a/code/datums/wires/vending.dm b/code/datums/wires/vending.dm index 0c66f26a92..114791e873 100644 --- a/code/datums/wires/vending.dm +++ b/code/datums/wires/vending.dm @@ -12,7 +12,7 @@ /datum/wires/vending/interactable(mob/user) var/obj/machinery/vending/V = holder - if(!issilicon(user) && V.seconds_electrified && V.shock(user, 100)) + if(!V.hasSiliconAccessInArea(user) && V.seconds_electrified && V.shock(user, 100)) return FALSE if(V.panel_open) return TRUE diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index b6dc09eb59..b5ab859797 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -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() diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index a0666b3133..7132f046e6 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -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)) diff --git a/code/game/machinery/announcement_system.dm b/code/game/machinery/announcement_system.dm index 56227cdd53..5a597f7280 100644 --- a/code/game/machinery/announcement_system.dm +++ b/code/game/machinery/announcement_system.dm @@ -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("[src] buzzes.", "You hear a faint buzz.") @@ -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("[src] buzzes.", "You hear a faint buzz.") @@ -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, "[src]'s firmware appears to be malfunctioning!") diff --git a/code/game/machinery/computer/arcade/minesweeper.dm b/code/game/machinery/computer/arcade/minesweeper.dm index 641ef1c9cd..3e32c4ceeb 100644 --- a/code/game/machinery/computer/arcade/minesweeper.dm +++ b/code/game/machinery/computer/arcade/minesweeper.dm @@ -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 diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 1d54e8f772..211ff13486 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -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 ..() diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 6703bae525..b0e80b63d2 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -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, "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.") 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 diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 59574bc603..9d0053c9b2 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -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 diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index a31f6c71c8..5049a10d2b 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -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 diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index ecbde43044..f8dac1b100 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -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 diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 1388e3c8de..53f7cb7e32 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -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"]) diff --git a/code/game/machinery/computer/prisoner/management.dm b/code/game/machinery/computer/prisoner/management.dm index 496e14b8f1..4b4b39740a 100644 --- a/code/game/machinery/computer/prisoner/management.dm +++ b/code/game/machinery/computer/prisoner/management.dm @@ -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"]) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 42e31b2ea6..25f4237439 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -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) diff --git a/code/game/machinery/computer/teleporter.dm b/code/game/machinery/computer/teleporter.dm index 518f38fc35..6710258626 100644 --- a/code/game/machinery/computer/teleporter.dm +++ b/code/game/machinery/computer/teleporter.dm @@ -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, "No active connected stations located.") 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) diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm index 6bedfb0a10..6b0f00ca2e 100644 --- a/code/game/machinery/dance_machine.dm +++ b/code/game/machinery/dance_machine.dm @@ -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,"This device must be anchored by a wrench!") diff --git a/code/game/machinery/dish_drive.dm b/code/game/machinery/dish_drive.dm index 7f21d1c1b3..31e6a3cfeb 100644 --- a/code/game/machinery/dish_drive.dm +++ b/code/game/machinery/dish_drive.dm @@ -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 diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index cff2e361bd..60b5a52a10 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -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 diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index f28d520114..863f1e7b46 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -676,7 +676,7 @@ else . += "It looks very robust." - if(issilicon(user) && (!stat & BROKEN)) + if(hasSiliconAccessInArea(user) && (!stat & BROKEN)) . += "Shift-click [src] to [ density ? "open" : "close"] it." . += "Ctrl-click [src] to [ locked ? "raise" : "drop"] its bolts." . += "Alt-click [src] to [ secondsElectrified ? "un-electrify" : "permanently electrify"] it." @@ -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, "Despite your efforts, [src] managed to resist your attempts to open it!") -/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)) diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index b9d52b82ce..60085e0bf8 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -865,7 +865,7 @@ /obj/machinery/turretid/examine(mob/user) . = ..() - if(issilicon(user) && (!stat & BROKEN)) + if(hasSiliconAccessInArea(user) && (!stat & BROKEN)) . += "Ctrl-click [src] to [ enabled ? "disable" : "enable"] turrets." . += "Alt-click [src] to set turrets to [ lethal ? "stun" : "kill"]." @@ -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, "You are too far away.") 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 += "
Swipe ID card to unlock interface
" else - if(!issilicon(user) && !IsAdminGhost(user)) + if(!hasSiliconAccessInArea(user) && !IsAdminGhost(user)) t += "
Swipe ID card to lock interface
" t += "Turrets [enabled?"activated":"deactivated"] - [enabled?"Disable":"Enable"]?
" t += "Currently set for [lethal?"lethal":"stun repeatedly"] - Change to [lethal?"Stun repeatedly":"Lethal"]?
" @@ -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"]) diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 16016b8e18..b4288310b0 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -124,7 +124,7 @@ . = ..() if(.) return - if(locked && !issilicon(user)) + if(locked && !hasSiliconAccessInArea(user)) to_chat(user, "The machine is locked, you are unable to use it!") return if(panel_open) @@ -370,7 +370,7 @@ if(!anchored) to_chat(user, "\The [src] needs to be firmly secured to the floor first!") return - if(locked && !issilicon(user)) + if(locked && !hasSiliconAccessInArea(user)) to_chat(user, "The controls are locked!") return if(!power) diff --git a/code/game/machinery/telecomms/computers/logbrowser.dm b/code/game/machinery/telecomms/computers/logbrowser.dm index c1db49605c..f2b2c594b7 100644 --- a/code/game/machinery/telecomms/computers/logbrowser.dm +++ b/code/game/machinery/telecomms/computers/logbrowser.dm @@ -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 = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -" diff --git a/code/game/machinery/telecomms/computers/message.dm b/code/game/machinery/telecomms/computers/message.dm index 884c2bb37d..5e39997872 100644 --- a/code/game/machinery/telecomms/computers/message.dm +++ b/code/game/machinery/telecomms/computers/message.dm @@ -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) diff --git a/code/game/machinery/telecomms/computers/telemonitor.dm b/code/game/machinery/telecomms/computers/telemonitor.dm index aebef711a9..23c03514ca 100644 --- a/code/game/machinery/telecomms/computers/telemonitor.dm +++ b/code/game/machinery/telecomms/computers/telemonitor.dm @@ -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 = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -" diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 8cd8b479d8..4de8929b6b 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -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 diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index 3ff2424d83..4ed2473260 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -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() diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 6bac77258d..fe8f3ca626 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -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) diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm index 319949a687..1006fe9146 100644 --- a/code/game/objects/items/devices/PDA/cart.dm +++ b/code/game/objects/items/devices/PDA/cart.dm @@ -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 diff --git a/code/game/objects/items/implants/implant_hijack.dm b/code/game/objects/items/implants/implant_hijack.dm new file mode 100644 index 0000000000..8a08232859 --- /dev/null +++ b/code/game/objects/items/implants/implant_hijack.dm @@ -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,"You turn [toggled ? "on" : "off"] [src]'s silicon interactions.") + 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, "Establishing remote connection with APC.") + if (!do_after(imp_in, 4 SECONDS,target=apc)) + to_chat(imp_in, "Aborting.") + hijacking = FALSE + return TRUE + if (LAZYLEN(imp_in.siliconaccessareas) >= HIJACK_APC_MAX_AMOUNT) + to_chat(src,"You are connected to too many APCs! Too many more will fry your brain.") + 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("[imp_in] starts glowing a with a hollow yellow light!") + to_chat(imp_in, "Beginning hijack of APC.") + 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, "Aborting.") + hijacking = FALSE + imp_in.light_power = 0 + imp_in.light_range = 0 + imp_in.light_color = COLOR_YELLOW + imp_in.update_light() + return TRUE \ No newline at end of file diff --git a/code/game/objects/items/implants/implanter.dm b/code/game/objects/items/implants/implanter.dm index ab902369cc..a0e27f14f0 100644 --- a/code/game/objects/items/implants/implanter.dm +++ b/code/game/objects/items/implants/implanter.dm @@ -74,4 +74,8 @@ /obj/item/implanter/stealth name = "implanter (stealth)" - imp_type = /obj/item/implant/stealth \ No newline at end of file + imp_type = /obj/item/implant/stealth + +/obj/item/implanter/hijack + name = "implanter (hijack)" + imp_type = /obj/item/implant/hijack \ No newline at end of file diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index 21de34faa1..7879f50ada 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -1,7 +1,11 @@ /* Glass stack types * Contains: * Glass sheets + * Plasma glass * Reinforced glass sheets + * Reinforced plasma glass + * Titanium glass + * Plastitanium glass * Glass shards - TODO: Move this into code/game/object/item/weapons */ @@ -373,4 +377,8 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list( throwforce = 11 icon_state = "plasmalarge" materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT * 0.5, MAT_GLASS=MINERAL_MATERIAL_AMOUNT) - icon_prefix = "plasma" \ No newline at end of file + icon_prefix = "plasma" + +/obj/item/shard/plasma/alien + name = "alien shard" + desc = "A nasty looking shard of advanced alloy glass." \ No newline at end of file diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 53b78b2ecf..828ed96387 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -401,6 +401,8 @@ GLOBAL_LIST_INIT(abductor_recipes, list ( \ new/datum/stack_recipe("alien bed", /obj/structure/bed/abductor, 2, one_per_turf = 1, on_floor = 1), \ new/datum/stack_recipe("alien locker", /obj/structure/closet/abductor, 2, time = 15, one_per_turf = 1, on_floor = 1), \ new/datum/stack_recipe("alien table frame", /obj/structure/table_frame/abductor, 1, time = 15, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("alien bar stool", /obj/item/chair/stool/bar/alien, 1, time = 20, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("alien stool", /obj/item/chair/stool/alien, 1, time = 20, one_per_turf = 1, on_floor = 1), \ new/datum/stack_recipe("alien airlock assembly", /obj/structure/door_assembly/door_assembly_abductor, 4, time = 20, one_per_turf = 1, on_floor = 1), \ null, \ new/datum/stack_recipe("alien floor tile", /obj/item/stack/tile/mineral/abductor, 1, 4, 20), \ diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 45b9715b04..7fbdddbdc4 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -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 diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm index 9fa4d730b6..cc1a3c0922 100644 --- a/code/game/objects/structures/beds_chairs/chair.dm +++ b/code/game/objects/structures/beds_chairs/chair.dm @@ -370,6 +370,43 @@ item_state = "stool_bar" origin_type = /obj/structure/chair/stool/bar +////////////////////////// +//Alien(Disco) Stools!//// +////////////////////////// + +/obj/structure/chair/stool/alien + name = "alien stool" + desc = "A hard stool made of advanced alien alloy." + icon_state = "stoolalien" + icon = 'icons/obj/abductor.dmi' + item_chair = /obj/item/chair/stool/alien + buildstacktype = /obj/item/stack/sheet/mineral/abductor + buildstackamount = 1 + +/obj/structure/chair/stool/bar/alien + name = "bronze bar stool" + desc = "A hard bar stool made of advanced alien alloy." + icon_state = "baralien" + icon = 'icons/obj/abductor.dmi' + item_chair = /obj/item/chair/stool/bar/alien + buildstacktype = /obj/item/stack/sheet/mineral/abductor + buildstackamount = 1 + +/obj/item/chair/stool/alien + name = "stool" + icon_state = "stoolalien_toppled" + item_state = "stoolalien" + icon = 'icons/obj/abductor.dmi' + origin_type = /obj/structure/chair/stool/alien + break_chance = 0 //It's too sturdy. + +/obj/item/chair/stool/bar/alien + name = "bar stool" + icon_state = "baralien_toppled" + item_state = "baralien" + icon = 'icons/obj/abductor.dmi' + origin_type = /obj/structure/chair/stool/bar/alien + ////////////////////////// //Brass & Bronze stools!// ////////////////////////// diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 7696a13bb2..bf891ef223 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -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, "You turn the speaker function [beeper ? "on" : "off"].") diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index f7c5dce30f..e85cf1efa6 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -245,7 +245,7 @@ /obj/machinery/airalarm/ui_data(mob/user) var/data = list( "locked" = locked, - "siliconUser" = user.has_unlimited_silicon_privilege, + "siliconUser" = user.has_unlimited_silicon_privilege || hasSiliconAccessInArea(user), "emagged" = (obj_flags & EMAGGED ? 1 : 0), "danger_level" = danger_level, ) @@ -288,7 +288,7 @@ "danger_level" = cur_tlv.get_danger_level(environment.gases[gas_id] * partial_pressure) )) - if(!locked || user.has_unlimited_silicon_privilege) + if(!locked || user.has_unlimited_silicon_privilege || hasSiliconAccessInArea(user)) data["vents"] = list() for(var/id_tag in A.air_vent_names) var/long_name = A.air_vent_names[id_tag] @@ -368,7 +368,7 @@ /obj/machinery/airalarm/ui_act(action, params) if(..() || buildstage != 2) return - if((locked && !usr.has_unlimited_silicon_privilege) || (usr.has_unlimited_silicon_privilege && aidisabled)) + if((locked && !usr.has_unlimited_silicon_privilege && !hasSiliconAccessInArea(usr)) || (usr.has_unlimited_silicon_privilege && aidisabled)) return var/device_id = params["id_tag"] switch(action) @@ -840,7 +840,7 @@ /obj/machinery/airalarm/AltClick(mob/user) . = ..() - if(!user.canUseTopic(src, !issilicon(user)) || !isturf(loc)) + if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)) || !isturf(loc)) return togglelock(user) return TRUE diff --git a/code/modules/awaymissions/bluespaceartillery.dm b/code/modules/awaymissions/bluespaceartillery.dm index deb05920e2..ee4090b680 100644 --- a/code/modules/awaymissions/bluespaceartillery.dm +++ b/code/modules/awaymissions/bluespaceartillery.dm @@ -44,7 +44,7 @@ return if(reload < reload_cooldown) 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)) priority_announce("Bluespace artillery fire detected. Brace for impact.") message_admins("[ADMIN_LOOKUPFLW(usr)] has launched an artillery strike.") var/list/L = list() diff --git a/code/modules/cargo/supplypod_beacon.dm b/code/modules/cargo/supplypod_beacon.dm index 006f1a8084..668698d2e9 100644 --- a/code/modules/cargo/supplypod_beacon.dm +++ b/code/modules/cargo/supplypod_beacon.dm @@ -77,7 +77,7 @@ /obj/item/supplypod_beacon/AltClick(mob/user) . = ..() - if (!user.canUseTopic(src, !issilicon(user))) + if (!user.canUseTopic(src, !hasSiliconAccessInArea(user))) return if (express_console) unlink_console() diff --git a/code/modules/events/holiday/vday.dm b/code/modules/events/holiday/vday.dm index 13c516960a..899a083b7d 100644 --- a/code/modules/events/holiday/vday.dm +++ b/code/modules/events/holiday/vday.dm @@ -140,7 +140,7 @@ /obj/item/valentine/examine(mob/user) . = ..() if(in_range(user, src) || isobserver(user)) - if( !(ishuman(user) || isobserver(user) || issilicon(user)) ) + if( !(ishuman(user) || isobserver(user) || hasSiliconAccessInArea(user)) ) user << browse("[name][stars(message)]", "window=[name]") onclose(user, "[name]") else diff --git a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm index e4d36b29d2..e908662658 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm @@ -55,7 +55,7 @@ if(!operating) . += "Alt-click [src] to turn it on." - if(!in_range(user, src) && !issilicon(user) && !isobserver(user)) + if(!in_range(user, src) && !hasSiliconAccessInArea(user) && !isobserver(user)) . += "You're too far away to examine [src]'s contents and display!" return if(operating) @@ -63,7 +63,7 @@ return if(length(ingredients)) - if(issilicon(user)) + if(hasSiliconAccessInArea(user)) . += "\The [src] camera shows:" else . += "\The [src] contains:" @@ -187,14 +187,14 @@ /obj/machinery/microwave/AltClick(mob/user) . = ..() - if(user.canUseTopic(src, !issilicon(usr))) + if(user.canUseTopic(src, !hasSiliconAccessInArea(user))) cook() return TRUE /obj/machinery/microwave/ui_interact(mob/user) . = ..() - if(operating || panel_open || !anchored || !user.canUseTopic(src, !issilicon(user))) + if(operating || panel_open || !anchored || !user.canUseTopic(src, !hasSiliconAccessInArea(user))) return if(isAI(user) && (stat & NOPOWER)) return @@ -206,10 +206,10 @@ to_chat(user, "\The [src] is empty.") return - var/choice = show_radial_menu(user, src, isAI(user) ? ai_radial_options : radial_options, require_near = !issilicon(user)) + var/choice = show_radial_menu(user, src, isAI(user) ? ai_radial_options : radial_options, require_near = !hasSiliconAccessInArea(user)) // post choice verification - if(operating || panel_open || !anchored || !user.canUseTopic(src, !issilicon(user))) + if(operating || panel_open || !anchored || !user.canUseTopic(src, !hasSiliconAccessInArea(user))) return if(isAI(user) && (stat & NOPOWER)) return diff --git a/code/modules/holodeck/computer.dm b/code/modules/holodeck/computer.dm index d551222836..b5cbed8b79 100644 --- a/code/modules/holodeck/computer.dm +++ b/code/modules/holodeck/computer.dm @@ -92,7 +92,7 @@ data["emagged"] = TRUE data["emag_programs"] = emag_programs data["program"] = program - data["can_toggle_safety"] = issilicon(user) || IsAdminGhost(user) + data["can_toggle_safety"] = hasSiliconAccessInArea(user) || IsAdminGhost(user) return data @@ -109,7 +109,7 @@ if(A) load_program(A) if("safety") - if(!issilicon(usr) && !IsAdminGhost(usr)) + if(!hasSiliconAccessInArea(usr) && !IsAdminGhost(usr)) var/msg = "[key_name(usr)] attempted to emag the holodeck using a href they shouldn't have!" message_admins(msg) log_admin(msg) diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 8f2900c8a6..fb9bb8ba7b 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -105,7 +105,7 @@ return var/datum/browser/popup = new(user, "plantdna", "Plant DNA Manipulator", 450, 600) - if(!(in_range(src, user) || issilicon(user))) + if(!(in_range(src, user) || hasSiliconAccessInArea(user))) popup.close() return diff --git a/code/modules/integrated_electronics/core/printer.dm b/code/modules/integrated_electronics/core/printer.dm index f0aa10f2da..ea52b6d461 100644 --- a/code/modules/integrated_electronics/core/printer.dm +++ b/code/modules/integrated_electronics/core/printer.dm @@ -107,7 +107,7 @@ interact(user) /obj/item/integrated_circuit_printer/interact(mob/user) - if(!(in_range(src, user) || issilicon(user))) + if(!(in_range(src, user) || hasSiliconAccessInArea(user))) return if(isnull(current_category)) diff --git a/code/modules/jobs/access.dm b/code/modules/jobs/access.dm index 81f47b9a1e..eddb18b25e 100644 --- a/code/modules/jobs/access.dm +++ b/code/modules/jobs/access.dm @@ -4,7 +4,7 @@ //check if it doesn't require any access at all if(src.check_access(null)) return TRUE - if(issilicon(M)) + if(hasSiliconAccessInArea(M)) if(ispAI(M)) return FALSE return TRUE //AI can do whatever it wants diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 439fe491cc..10d9c5fb02 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -479,32 +479,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp pixel_y = 0 animate(src, pixel_y = 2, time = 10, loop = -1) -/mob/dead/observer/verb/observe() - set name = "Observe" - set category = "Ghost" - - var/list/creatures = getpois() - - reset_perspective(null) - - var/eye_name = null - - eye_name = input("Please, select a player!", "Observe", null, null) as null|anything in creatures - - if (!eye_name) - return - - var/mob/mob_eye = creatures[eye_name] - //Istype so we filter out points of interest that are not mobs - if(client && mob_eye && istype(mob_eye)) - client.eye = mob_eye - if(mob_eye.hud_used) - client.screen = list() - LAZYINITLIST(mob_eye.observers) - mob_eye.observers |= src - mob_eye.hud_used.show_hud(mob_eye.hud_used.hud_version, src) - observetarget = mob_eye - /mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak set category = "Ghost" set name = "Jump to Mob" @@ -831,6 +805,32 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp client.screen = list() hud_used.show_hud(hud_used.hud_version) +/mob/dead/observer/verb/observe() + set name = "Observe" + set category = "OOC" + + var/list/creatures = getpois() + + reset_perspective(null) + + var/eye_name = null + + eye_name = input("Please, select a player!", "Observe", null, null) as null|anything in creatures + + if (!eye_name) + return + + var/mob/mob_eye = creatures[eye_name] + //Istype so we filter out points of interest that are not mobs + if(client && mob_eye && istype(mob_eye)) + client.eye = mob_eye + if(mob_eye.hud_used) + client.screen = list() + LAZYINITLIST(mob_eye.observers) + mob_eye.observers |= src + mob_eye.hud_used.show_hud(mob_eye.hud_used.hud_version, src) + observetarget = mob_eye + /mob/dead/observer/verb/register_pai_candidate() set category = "Ghost" set name = "pAI Setup" diff --git a/code/modules/mob/dead/observer/say.dm b/code/modules/mob/dead/observer/say.dm index 2c4743f7d3..8712f39531 100644 --- a/code/modules/mob/dead/observer/say.dm +++ b/code/modules/mob/dead/observer/say.dm @@ -22,7 +22,7 @@ . = say_dead(message) /mob/dead/observer/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source) - . = ..() + SEND_SIGNAL(src, COMSIG_MOVABLE_HEAR, args) //parent calls can't overwrite the current proc args. var/atom/movable/to_follow = speaker if(radio_freq) var/atom/movable/virtualspeaker/V = speaker @@ -36,4 +36,3 @@ // Recompose the message, because it's scrambled by default message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode, FALSE, source) to_chat(src, "[link] [message]") - diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index b560699a58..7a5fca3562 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -99,6 +99,10 @@ . += "[t_He] [t_has] [glasses.get_examine_string(user)] covering [t_his] eyes." else if(eye_color == BLOODCULT_EYE && iscultist(src) && HAS_TRAIT(src, TRAIT_CULT_EYES)) . += "[t_His] eyes are glowing an unnatural red!" + else if(HAS_TRAIT(src, TRAIT_HIJACKER)) + var/obj/item/implant/hijack/H = user.getImplant(/obj/item/implant/hijack) + if (H && !H.stealthmode && H.toggled) + . += "[t_His] eyes are flickering a bright yellow!" //ears if(ears && !(SLOT_EARS in obscured)) diff --git a/code/modules/mob/living/carbon/human/species_types/dwarves.dm b/code/modules/mob/living/carbon/human/species_types/dwarves.dm index f5f238908c..15422b2cdd 100644 --- a/code/modules/mob/living/carbon/human/species_types/dwarves.dm +++ b/code/modules/mob/living/carbon/human/species_types/dwarves.dm @@ -54,21 +54,20 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) // //Dwarf Speech handling - Basically a filter/forces them to say things. The IC helper /datum/species/dwarf/proc/handle_speech(datum/source, list/speech_args) var/message = speech_args[SPEECH_MESSAGE] - if(message[1] != "*") - message = " [message]" //Credits to goonstation for the strings list. - var/list/dwarf_words = strings("dwarf_replacement.json", "dwarf") //thanks to regex too. + if(speech_args[SPEECH_LANGUAGE] != /datum/language/dwarf) // No accent if they speak their language + if(message[1] != "*") + message = " [message]" //Credits to goonstation for the strings list. + var/list/dwarf_words = strings("dwarf_replacement.json", "dwarf") //thanks to regex too. + for(var/key in dwarf_words) //Theres like 1459 words or something man. + var/value = dwarf_words[key] //Thus they will always be in character. + if(islist(value)) //Whether they like it or not. + value = pick(value) //This could be drastically reduced if needed though. + message = replacetextEx(message, " [uppertext(key)]", " [uppertext(value)]") + message = replacetextEx(message, " [capitalize(key)]", " [capitalize(value)]") + message = replacetextEx(message, " [key]", " [value]") //Also its scottish. - for(var/key in dwarf_words) //Theres like 1459 words or something man. - var/value = dwarf_words[key] //Thus they will always be in character. - if(islist(value)) //Whether they like it or not. - value = pick(value) //This could be drastically reduced if needed though. - - message = replacetextEx(message, " [uppertext(key)]", " [uppertext(value)]") - message = replacetextEx(message, " [capitalize(key)]", " [capitalize(value)]") - message = replacetextEx(message, " [key]", " [value]") //Also its scottish. - - if(prob(3)) - message += pick(" By Armok!") + if(prob(3)) + message += " By Armok!" speech_args[SPEECH_MESSAGE] = trim(message) //This mostly exists because my testdwarf's liver died while trying to also not die due to no alcohol. diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 0fb48f65b1..b20511986d 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -224,7 +224,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list( . = "[.]" /mob/living/Hear(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source) - . = ..() + SEND_SIGNAL(src, COMSIG_MOVABLE_HEAR, args) //parent calls can't overwrite the current proc args. if(!client) return var/deaf_message diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 33cbdb7cc9..ed0d0d02e8 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -315,10 +315,10 @@ var/is_anchored = FALSE if(move_resist == MOVE_FORCE_OVERPOWERING) move_resist = MOVE_FORCE_NORMAL + REMOVE_TRAIT(src, TRAIT_NO_TELEPORT, src) else is_anchored = TRUE move_resist = MOVE_FORCE_OVERPOWERING - REMOVE_TRAIT(src, TRAIT_NO_TELEPORT, src) ADD_TRAIT(src, TRAIT_NO_TELEPORT, src) to_chat(src, "You are now [is_anchored ? "" : "un"]anchored.") diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 69aacbf1d6..6112a1e800 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -810,14 +810,14 @@ Pass a positive integer as an argument to override a bot's default speed. switch(href_list["operation"]) if("patrol") - if(!issilicon(usr) && !IsAdminGhost(usr) && !(bot_core.allowed(usr) || !locked)) + if(!hasSiliconAccessInArea(usr) && !IsAdminGhost(usr) && !(bot_core.allowed(usr) || !locked)) return TRUE auto_patrol = !auto_patrol bot_reset() if("remote") remote_disabled = !remote_disabled if("hack") - if(!issilicon(usr) && !IsAdminGhost(usr)) + if(!hasSiliconAccessInArea(usr) && !IsAdminGhost(usr)) var/msg = "[key_name(usr)] attempted to hack a bot with a href that shouldn't be available!" message_admins(msg) log_admin(msg) @@ -836,7 +836,7 @@ Pass a positive integer as an argument to override a bot's default speed. to_chat(usr, "[text_dehack]") bot_reset() if("ejectpai") - if(paicard && (!locked || issilicon(usr) || IsAdminGhost(usr))) + if(paicard && (!locked || hasSiliconAccessInArea(usr) || IsAdminGhost(usr))) to_chat(usr, "You eject [paicard] from [bot_name]") ejectpai(usr) update_controls() @@ -863,13 +863,13 @@ Pass a positive integer as an argument to override a bot's default speed. if(emagged == 2) //An emagged bot cannot be controlled by humans, silicons can if one hacked it. if(!hacked) //Manually emagged by a human - access denied to all. return TRUE - else if(!issilicon(user) && !IsAdminGhost(user)) //Bot is hacked, so only silicons and admins are allowed access. + else if(!hasSiliconAccessInArea(user) && !IsAdminGhost(user)) //Bot is hacked, so only silicons and admins are allowed access. return TRUE return FALSE /mob/living/simple_animal/bot/proc/hack(mob/user) var/hack - if(issilicon(user) || IsAdminGhost(user)) //Allows silicons or admins to toggle the emag status of a bot. + if(hasSiliconAccessInArea(user) || IsAdminGhost(user)) //Allows silicons or admins to toggle the emag status of a bot. hack += "[emagged == 2 ? "Software compromised! Unit may exhibit dangerous or erratic behavior." : "Unit operating normally. Release safety lock?"]
" hack += "Harm Prevention Safety System: [emagged ? "DANGER" : "Engaged"]
" else if(!locked) //Humans with access can use this option to hide a bot from the AI's remote control panel and PDA control. @@ -878,7 +878,7 @@ Pass a positive integer as an argument to override a bot's default speed. /mob/living/simple_animal/bot/proc/showpai(mob/user) var/eject = "" - if((!locked || issilicon(usr) || IsAdminGhost(usr))) + if((!locked || hasSiliconAccessInArea(usr) || IsAdminGhost(usr))) if(paicard || allow_pai) eject += "Personality card status: " if(paicard) diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index cdb8ac820c..0e48723f37 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -298,7 +298,7 @@ Status: [on ? "On" : "Off"]
Behaviour controls are [locked ? "locked" : "unlocked"]
Maintenance panel panel is [open ? "opened" : "closed"]"}) - if(!locked || issilicon(user)|| IsAdminGhost(user)) + if(!locked || hasSiliconAccessInArea(user)|| IsAdminGhost(user)) dat += "
Clean Blood: [blood ? "Yes" : "No"]" dat += "
Clean Trash: [trash ? "Yes" : "No"]" dat += "
Exterminate Pests: [pests ? "Yes" : "No"]" diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 4e479dc75b..6d304c6782 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -110,7 +110,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]
"}, "[on ? "On" : "Off"]" ) - if(!locked || issilicon(user)|| IsAdminGhost(user)) + if(!locked || hasSiliconAccessInArea(user)|| IsAdminGhost(user)) if(!lasercolor) dat += text({"
Arrest Unidentifiable Persons: []
diff --git a/code/modules/mob/living/simple_animal/bot/firebot.dm b/code/modules/mob/living/simple_animal/bot/firebot.dm index 2b52da6821..6ab4dc36db 100644 --- a/code/modules/mob/living/simple_animal/bot/firebot.dm +++ b/code/modules/mob/living/simple_animal/bot/firebot.dm @@ -111,7 +111,7 @@ dat += "Maintenance panel panel is [open ? "opened" : "closed"]
" dat += "Behaviour controls are [locked ? "locked" : "unlocked"]
" - if(!locked || issilicon(user) || IsAdminGhost(user)) + if(!locked || hasSiliconAccessInArea(user) || IsAdminGhost(user)) dat += "Extinguish Fires: [extinguish_fires ? "Yes" : "No"]
" dat += "Extinguish People: [extinguish_people ? "Yes" : "No"]
" dat += "Patrol Station: [auto_patrol ? "Yes" : "No"]
" diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index cae707ce46..1bf3883ea7 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -83,7 +83,7 @@ dat += "None Loaded
" dat += "Behaviour controls are [locked ? "locked" : "unlocked"]
" - if(!locked || issilicon(user) || IsAdminGhost(user)) + if(!locked || hasSiliconAccessInArea(user) || IsAdminGhost(user)) dat += "Add tiles to new hull plating: [autotile ? "Yes" : "No"]
" dat += "Place floor tiles: [placetiles ? "Yes" : "No"]
" dat += "Replace existing floor tiles with custom tiles: [replacetiles ? "Yes" : "No"]
" diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index d844237a61..e491cff74a 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -90,7 +90,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"}, "[on ? "On" : "Off"]" ) - if(!locked || issilicon(user) || IsAdminGhost(user)) + if(!locked || hasSiliconAccessInArea(user) || IsAdminGhost(user)) dat += text({"
Auto Patrol: []"}, "[auto_patrol ? "On" : "Off"]" ) diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index a4496dd1f5..bb29cd3526 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -148,7 +148,7 @@ else dat += "None Loaded" dat += "
Behaviour controls are [locked ? "locked" : "unlocked"]
" - if(!locked || issilicon(user) || IsAdminGhost(user)) + if(!locked || hasSiliconAccessInArea(user) || IsAdminGhost(user)) dat += "Healing Threshold: " dat += "-- " dat += "- " diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 0e8e009ca8..b23f3f2baa 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -279,7 +279,7 @@ // TODO: remove this; PDAs currently depend on it /mob/living/simple_animal/bot/mulebot/get_controls(mob/user) - var/ai = issilicon(user) + var/ai = hasSiliconAccessInArea(user) var/dat dat += "

Multiple Utility Load Effector Mk. V

" dat += "ID: [id]
" diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 8302346a00..461fa9cf2a 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -110,7 +110,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"}, "[on ? "On" : "Off"]" ) - if(!locked || issilicon(user) || IsAdminGhost(user)) + if(!locked || hasSiliconAccessInArea(user) || IsAdminGhost(user)) dat += text({"
Arrest Unidentifiable Persons: []
Arrest for Unauthorized Weapons: []
@@ -131,7 +131,7 @@ Auto Patrol: []"}, /mob/living/simple_animal/bot/secbot/Topic(href, href_list) if(..()) return 1 - if(!issilicon(usr) && !IsAdminGhost(usr) && !(bot_core.allowed(usr) || !locked)) + if(!hasSiliconAccessInArea(usr) && !IsAdminGhost(usr) && !(bot_core.allowed(usr) || !locked)) return TRUE switch(href_list["operation"]) if("idcheck") diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 35c7510ad9..0e39f43263 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -808,7 +808,7 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) //Can the mob interact() with an atom? /mob/proc/can_interact_with(atom/A) - return IsAdminGhost(src) || Adjacent(A) + return IsAdminGhost(src) || Adjacent(A) || A.hasSiliconAccessInArea(src) //Can the mob use Topic to interact with machines /mob/proc/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 1402b78908..7d446e4ef0 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -121,4 +121,7 @@ var/mob/audiovisual_redirect //Mob to redirect messages, speech, and sounds to - var/voluntary_ghosted = FALSE //whether or not they voluntarily ghosted. + var/siliconaccessareas = list() + var/siliconaccesstoggle = FALSE + + var/voluntary_ghosted = FALSE //whether or not they voluntarily ghosted. \ No newline at end of file diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 393adb68d2..400e90266e 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -402,6 +402,32 @@ It's fairly easy to fix if dealing with single letters but not so much with comp return return TRUE +/atom/proc/hasSiliconAccessInArea(mob/user) + return user && (issilicon(user) || (user.siliconaccesstoggle && (get_area(src) in user.siliconaccessareas))) + +/mob/proc/toggleSiliconAccessArea(area/area) + if (area in siliconaccessareas) + siliconaccessareas -= area + to_chat(src,"You lost control of [area]!") + return FALSE + else + if (LAZYLEN(siliconaccessareas) < HIJACK_APC_MAX_AMOUNT) + siliconaccessareas += area + to_chat(src,"You successfully took control of [area].") + else + to_chat(src,"You are connected to too many APCs! Too many more will fry your brain.") + return FALSE + return TRUE + +/mob/proc/getImplant(type) + if (!istype(src,/mob/living)) + return + var/mob/living/L = src + for (var/I in L.implants) + if (istype(I,type)) + return I + return null + /proc/offer_control(mob/M) to_chat(M, "Control of your mob has been offered to dead players.") if(usr) diff --git a/code/modules/modular_computers/computers/item/computer_ui.dm b/code/modules/modular_computers/computers/item/computer_ui.dm index 3e67a14874..11f5145478 100644 --- a/code/modules/modular_computers/computers/item/computer_ui.dm +++ b/code/modules/modular_computers/computers/item/computer_ui.dm @@ -14,7 +14,7 @@ return 0 // Robots don't really need to see the screen, their wireless connection works as long as computer is on. - if(!screen_on && !issilicon(user)) + if(!screen_on && !hasSiliconAccessInArea(user)) if(ui) ui.close() return 0 diff --git a/code/modules/modular_computers/file_system/program.dm b/code/modules/modular_computers/file_system/program.dm index f661f0ec10..b54bc9f2be 100644 --- a/code/modules/modular_computers/file_system/program.dm +++ b/code/modules/modular_computers/file_system/program.dm @@ -87,7 +87,7 @@ if(IsAdminGhost(user)) return TRUE - if(issilicon(user)) + if(computer && computer.hasSiliconAccessInArea(user)) return TRUE if(ishuman(user)) diff --git a/code/modules/newscaster/newscaster_machine.dm b/code/modules/newscaster/newscaster_machine.dm index 6328087491..cb2016a1a1 100644 --- a/code/modules/newscaster/newscaster_machine.dm +++ b/code/modules/newscaster/newscaster_machine.dm @@ -338,7 +338,7 @@ GLOBAL_LIST_EMPTY(allCasters) /obj/machinery/newscaster/Topic(href, href_list) if(..()) return - if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && isturf(loc))) || issilicon(usr)) + if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && isturf(loc))) || hasSiliconAccessInArea(usr)) usr.set_machine(src) scan_user(usr) if(href_list["set_channel_name"]) diff --git a/code/modules/oracle_ui/hookup_procs.dm b/code/modules/oracle_ui/hookup_procs.dm index 0a092caf30..18d7bbfd8c 100644 --- a/code/modules/oracle_ui/hookup_procs.dm +++ b/code/modules/oracle_ui/hookup_procs.dm @@ -35,9 +35,9 @@ return ..() /obj/machinery/oui_canview(mob/user) - if(user.has_unlimited_silicon_privilege) + if(user.has_unlimited_silicon_privilege || hasSiliconAccessInArea(user)) return TRUE - if(!can_interact()) + if(!can_interact(user)) return FALSE if(iscyborg(user)) return can_see(user, src, 7) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 6a674fa6b1..b15b701272 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -106,6 +106,8 @@ var/update_overlay = -1 var/icon_update_needed = FALSE var/obj/machinery/computer/apc_control/remote_control = null + var/mob/living/carbon/hijacker + var/hijackerlast = FALSE /obj/machinery/power/apc/unlocked locked = FALSE @@ -260,7 +262,7 @@ . += "Alt-Click the APC to [ locked ? "unlock" : "lock"] the interface." - if(issilicon(user)) + if(area.hasSiliconAccessInArea(user)) . += "Ctrl-Click the APC to switch the breaker [ operating ? "off" : "on"]." // update the APC icon to show the three base states @@ -299,12 +301,15 @@ if(!(update_state & UPSTATE_ALLGOOD)) SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) - + var/hijackerreturn + if (hijacker) + var/obj/item/implant/hijack/H = hijacker.getImplant(/obj/item/implant/hijack) + hijackerreturn = H && !H.stealthmode if(update & 2) SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) if(!(stat & (BROKEN|MAINT)) && update_state & UPSTATE_ALLGOOD) SSvis_overlays.add_vis_overlay(src, icon, "apcox-[locked]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) - SSvis_overlays.add_vis_overlay(src, icon, "apco3-[charging]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) + SSvis_overlays.add_vis_overlay(src, icon, "apco3-[hijackerreturn ? "3" : charging]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) if(operating) SSvis_overlays.add_vis_overlay(src, icon, "apco0-[equipment]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) SSvis_overlays.add_vis_overlay(src, icon, "apco1-[lighting]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) @@ -319,6 +324,8 @@ light_color = LIGHT_COLOR_BLUE if(APC_FULLY_CHARGED) light_color = LIGHT_COLOR_GREEN + if (hijackerreturn) + light_color = LIGHT_COLOR_YELLOW set_light(lon_range) else if(update_state & UPSTATE_BLUESCREEN) light_color = LIGHT_COLOR_BLUE @@ -387,14 +394,19 @@ else if(environ==2) update_overlay |= APC_UPOVERLAY_ENVIRON2 - var/results = 0 - if(last_update_state == update_state && last_update_overlay == update_overlay) + var/hijackerreturn + if (hijacker) + var/obj/item/implant/hijack/H = hijacker.getImplant(/obj/item/implant/hijack) + hijackerreturn = H && !H.stealthmode + if(last_update_state == update_state && last_update_overlay == update_overlay && hijackerreturn ? hijackerlast : !hijackerlast) return 0 if(last_update_state != update_state) results += 1 - if(last_update_overlay != update_overlay) + if(last_update_overlay != update_overlay || hijackerreturn ? !hijackerlast : hijackerlast) results += 2 + if (hijackerreturn ? !hijackerlast : hijackerlast) + hijackerlast = hijackerreturn ? TRUE : FALSE return results // Used in process so it doesn't update the icon too much @@ -534,7 +546,7 @@ /obj/machinery/power/apc/attackby(obj/item/W, mob/living/user, params) - if(issilicon(user) && get_dist(src,user)>1) + if(area.hasSiliconAccessInArea(user) && get_dist(src,user)>1) return attack_hand(user) if (istype(W, /obj/item/stock_parts/cell) && opened) @@ -741,7 +753,7 @@ /obj/machinery/power/apc/AltClick(mob/user) . = ..() - if(!user.canUseTopic(src, !issilicon(user)) || !isturf(loc)) + if(!user.canUseTopic(src, !area.hasSiliconAccessInArea(user)) || !isturf(loc)) return togglelock(user) return TRUE @@ -756,7 +768,7 @@ else if(stat & (BROKEN|MAINT)) to_chat(user, "Nothing happens!") else - if(allowed(usr) && !wires.is_cut(WIRE_IDSCAN) && !malfhack) + if((allowed(usr) || area.hasSiliconAccessInArea(usr)) && !wires.is_cut(WIRE_IDSCAN) && !malfhack) locked = !locked to_chat(user, "You [ locked ? "lock" : "unlock"] the APC interface.") update_icon() @@ -833,6 +845,11 @@ if((stat & MAINT) && !opened) //no board; no interface return +/obj/machinery/power/apc/oui_canview(mob/user) + if(user.has_unlimited_silicon_privilege || area.hasSiliconAccessInArea(user)) + return TRUE + return ..() + /obj/machinery/power/apc/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) @@ -842,8 +859,12 @@ ui.open() /obj/machinery/power/apc/ui_data(mob/user) + var/obj/item/implant/hijack/H = user.getImplant(/obj/item/implant/hijack) + var/abilitiesavail = FALSE + if (H && !H.stealthmode && H.toggled) + abilitiesavail = TRUE var/list/data = list( - "locked" = locked && !(integration_cog && is_servant_of_ratvar(user)), + "locked" = locked && !(integration_cog && is_servant_of_ratvar(user)) && !area.hasSiliconAccessInArea(user), "lock_nightshift" = nightshift_requires_auth, "failTime" = failure_timer, "isOperating" = operating, @@ -853,11 +874,14 @@ "chargingStatus" = charging, "totalLoad" = DisplayPower(lastused_total), "coverLocked" = coverlocked, - "siliconUser" = user.has_unlimited_silicon_privilege || user.using_power_flow_console(), + "siliconUser" = user.has_unlimited_silicon_privilege || user.using_power_flow_console() || area.hasSiliconAccessInArea(user), "malfStatus" = get_malf_status(user), "emergencyLights" = !emergency_lights, "nightshiftLights" = nightshift_lights, - + "hijackable" = HAS_TRAIT(user,TRAIT_HIJACKER), + "hijacker" = hijacker == user ? TRUE : FALSE, + "drainavail" = cell && cell.percent() >= 85 && abilitiesavail, + "lockdownavail" = cell && cell.percent() >= 35 && abilitiesavail, "powerChannels" = list( list( "title" = "Equipment", @@ -925,17 +949,12 @@ /obj/machinery/power/apc/proc/can_use(mob/user, loud = 0) //used by attack_hand() and Topic() if(IsAdminGhost(user)) return TRUE + if (user == hijacker || (area.hasSiliconAccessInArea(user) && !aidisabled)) + return TRUE if(user.has_unlimited_silicon_privilege) var/mob/living/silicon/ai/AI = user var/mob/living/silicon/robot/robot = user - if ( \ - src.aidisabled || \ - malfhack && istype(malfai) && \ - ( \ - (istype(AI) && (malfai!=AI && malfai != AI.parent)) || \ - (istype(robot) && (robot in malfai.connected_robots)) \ - ) \ - ) + if (src.aidisabled || malfhack && istype(malfai) && ((istype(AI) && (malfai!=AI && malfai != AI.parent)) || (istype(robot) && (robot in malfai.connected_robots)))) if(!loud) to_chat(user, "\The [src] has eee disabled!") return FALSE @@ -945,11 +964,15 @@ . = ..() if (!. && !QDELETED(remote_control)) . = remote_control.can_interact(user) + if (hijacker == user && area.hasSiliconAccessInArea(user)) + return TRUE /obj/machinery/power/apc/ui_status(mob/user) . = ..() if (!QDELETED(remote_control) && user == remote_control.operator) . = UI_INTERACTIVE + if (user == hijacker && area.hasSiliconAccessInArea(user)) + . = UI_INTERACTIVE /obj/machinery/power/apc/ui_act(action, params) if(..() || !can_use(usr, 1)) @@ -959,7 +982,10 @@ failure_timer = 0 update_icon() update() - var/authorized = (!locked || usr.has_unlimited_silicon_privilege || (integration_cog && (is_servant_of_ratvar(usr)))) + if (action == "hijack" && can_use(usr, 1)) //don't need auth for hijack button + hijack(usr) + return + var/authorized = (!locked || usr.has_unlimited_silicon_privilege || area.hasSiliconAccessInArea(usr) || (integration_cog && (is_servant_of_ratvar(usr)))) if((action == "toggle_nightshift") && (!nightshift_requires_auth || authorized)) toggle_nightshift_lights() return TRUE @@ -967,7 +993,7 @@ return switch(action) if("lock") - if(usr.has_unlimited_silicon_privilege) + if(usr.has_unlimited_silicon_privilege || area.hasSiliconAccessInArea(usr)) if((obj_flags & EMAGGED) || (stat & (BROKEN|MAINT))) to_chat(usr, "The APC does not respond to the command.") else @@ -1001,7 +1027,7 @@ update() return TRUE if("overload") - if(usr.has_unlimited_silicon_privilege) + if(usr.has_unlimited_silicon_privilege || area.hasSiliconAccessInArea(usr)) overload_lighting() return TRUE if("hack") @@ -1023,7 +1049,26 @@ L.no_emergency = emergency_lights INVOKE_ASYNC(L, /obj/machinery/light/.proc/update, FALSE) CHECK_TICK - return TRUE + if("drain") + cell.use(cell.charge) + hijacker.toggleSiliconAccessArea(area) + hijacker = null + set_hijacked_lighting() + update_icon() + var/obj/item/implant/hijack/H = usr.getImplant(/obj/item/implant/hijack) + H.stealthcooldown = world.time + 2 MINUTES + energy_fail(30 SECONDS * (cell.charge / cell.maxcharge)) + if("lockdown") + var/celluse = rand(20,35) + celluse = celluse /100 + for (var/obj/machinery/door/D in GLOB.airlocks) + if (get_area(D) == area) + INVOKE_ASYNC(D,/obj/machinery/door.proc/hostile_lockdown,usr, FALSE) + addtimer(CALLBACK(D,/obj/machinery/door.proc/disable_lockdown, FALSE), 30 SECONDS) + cell.charge -= cell.maxcharge*celluse + var/obj/item/implant/hijack/H = usr.getImplant(/obj/item/implant/hijack) + H.stealthcooldown = world.time + 3 MINUTES + return TRUE /obj/machinery/power/apc/proc/toggle_breaker() if(!is_operational() || failure_timer) @@ -1032,6 +1077,39 @@ update() update_icon() +/obj/machinery/power/apc/proc/hijack(mob/living/L) + if (!istype(L)) + return + if (hijacker && hijacker != L) + var/obj/item/implant/hijack/H = L.getImplant(/obj/item/implant/hijack) + to_chat(L, "Someone already has control of this APC. Beginning counter-hijack.") + H.hijacking = TRUE + if (do_after(L,20 SECONDS,target=src)) + hijacker.toggleSiliconAccessArea(area) + if (L.toggleSiliconAccessArea(area)) + hijacker = L + update_icon() + set_hijacked_lighting() + H.hijacking = FALSE + return + else + to_chat(L, "Aborting.") + H.hijacking = FALSE + return + to_chat(L, "Beginning hijack of APC.") + var/obj/item/implant/hijack/H = L.getImplant(/obj/item/implant/hijack) + H.hijacking = TRUE + if (do_after(L,H.stealthmode ? 12 SECONDS : 5 SECONDS,target=src)) + if (L.toggleSiliconAccessArea(area)) + hijacker = L + update_icon() + set_hijacked_lighting() + H.hijacking = FALSE + else + to_chat(L, "Aborting.") + H.hijacking = FALSE + return + /obj/machinery/power/apc/proc/malfhack(mob/living/silicon/ai/malf) if(!istype(malf)) return @@ -1438,6 +1516,17 @@ L.update(FALSE) CHECK_TICK +/obj/machinery/power/apc/proc/set_hijacked_lighting() + set waitfor = FALSE + var/hijackerreturn + if (hijacker) + var/obj/item/implant/hijack/H = hijacker.getImplant(/obj/item/implant/hijack) + hijackerreturn = H && !H.stealthmode + for(var/obj/machinery/light/L in area) + L.hijacked = hijackerreturn + L.update(FALSE) + CHECK_TICK + /obj/machinery/power/apc/proc/update_nightshift_auth_requirement() nightshift_requires_auth = nightshift_toggle_requires_auth() diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 441eb27621..5ca09036ad 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -220,6 +220,7 @@ var/bulb_emergency_colour = "#FF3232" // determines the colour of the light while it's in emergency mode var/bulb_emergency_pow_mul = 0.75 // the multiplier for determining the light's power in emergency mode var/bulb_emergency_pow_min = 0.5 // the minimum value for the light's power in emergency mode + var/hijacked = FALSE // if true, the light is in a hijacked area /obj/machinery/light/broken status = LIGHT_BROKEN @@ -298,7 +299,10 @@ if(emergency_mode || (A && A.fire)) icon_state = "[base_state]_emergency" else - icon_state = "[base_state]" + if (hijacked) + icon_state = "[base_state]_hijacked" + else + icon_state = "[base_state]" if(on) var/mutable_appearance/glowybit = mutable_appearance(overlayicon, base_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) glowybit.alpha = CLAMP(light_power*250, 30, 200) @@ -326,6 +330,10 @@ var/area/A = get_base_area(src) if (A && A.fire) CO = bulb_emergency_colour + else if (hijacked) + BR = BR * 1.5 + PO = PO * 1.5 + CO = color ? color : LIGHT_COLOR_YELLOW else if (nightshift_enabled) BR = nightshift_brightness PO = nightshift_light_power @@ -355,7 +363,7 @@ if(on != on_gs) on_gs = on if(on) - static_power_used = brightness * 14.4 //20W per unit luminosity + static_power_used = brightness * 14.4 * (hijacked ? 2 : 1) //20W per unit luminosity addStaticPower(static_power_used, STATIC_LIGHT) else removeStaticPower(static_power_used, STATIC_LIGHT) diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 0abdc9a739..f41a6956a1 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -319,7 +319,7 @@ if(!is_operational()) return var/name = stripped_input(usr,"Name","What do you want to name this recipe?", "Recipe", MAX_NAME_LEN) - if(!usr.canUseTopic(src, !issilicon(usr))) + if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr))) return if(saved_recipes[name] && alert("\"[name]\" already exists, do you want to overwrite it?",, "Yes", "No") == "No") return diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 44148c85a7..66c663e2e4 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -261,7 +261,7 @@ return vol_each = min(reagents.total_volume / amount, 50) var/name = html_decode(stripped_input(usr,"Name:","Name your pill!", "[reagents.get_master_reagent_name()] ([vol_each]u)", MAX_NAME_LEN)) - if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr))) + if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr))) return var/obj/item/reagent_containers/pill/P var/target_loc = drop_location() @@ -288,7 +288,7 @@ reagents.trans_to(P,vol_each) else var/name = html_decode(stripped_input(usr, "Name:", "Name your pack!", reagents.get_master_reagent_name(), MAX_NAME_LEN)) - if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr))) + if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr))) return var/obj/item/reagent_containers/food/condiment/pack/P = new/obj/item/reagent_containers/food/condiment/pack(drop_location()) @@ -314,7 +314,7 @@ return vol_each = min(reagents.total_volume / amount, 40) var/name = html_decode(stripped_input(usr,"Name:","Name your patch!", "[reagents.get_master_reagent_name()] ([vol_each]u)", MAX_NAME_LEN)) - if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr))) + if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr))) return var/obj/item/reagent_containers/pill/P @@ -332,7 +332,7 @@ if(condi) var/name = html_decode(stripped_input(usr, "Name:","Name your bottle!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN)) - if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr))) + if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr))) return var/obj/item/reagent_containers/food/condiment/P = new(drop_location()) P.originalname = name @@ -345,7 +345,7 @@ amount_full = round(reagents.total_volume / 30) vol_part = ((reagents.total_volume*1000) % 30000) / 1000 //% operator doesn't support decimals. var/name = html_decode(stripped_input(usr, "Name:","Name your bottle!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN)) - if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr))) + if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr))) return var/obj/item/reagent_containers/glass/bottle/P @@ -373,7 +373,7 @@ amount_full = round(reagents.total_volume / 60) vol_part = reagents.total_volume % 60 var/name = html_decode(stripped_input(usr, "Name:","Name your hypovial!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN)) - if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr))) + if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr))) return var/obj/item/reagent_containers/glass/bottle/vial/small/P @@ -408,7 +408,7 @@ vol_each = min(reagents.total_volume / amount, 20) var/name = html_decode(stripped_input(usr,"Name:","Name your SmartDart!", "[reagents.get_master_reagent_name()] ([vol_each]u)", MAX_NAME_LEN)) - if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr))) + if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr))) return var/obj/item/reagent_containers/syringe/dart/D diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm index bba5371ef8..8870ef8ed5 100644 --- a/code/modules/reagents/chemistry/machinery/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -170,7 +170,7 @@ if(!A.mutable) return if(A) - var/new_name = stripped_input(usr, "Name the disease", "New name", "", MAX_NAME_LEN) + var/new_name = sanitize_name(html_encode(params["name"])) if(!new_name || ..()) return A.AssignName(new_name) diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 7e1b7ec018..b17c2dfb37 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -142,7 +142,7 @@ /obj/machinery/reagentgrinder/ui_interact(mob/user) // The microwave Menu //I am reasonably certain that this is not a microwave . = ..() - if(operating || !user.canUseTopic(src, !issilicon(user))) + if(operating || !user.canUseTopic(src, !hasSiliconAccessInArea(user))) return var/list/options = list() @@ -170,10 +170,10 @@ for(var/key in options) choice = key else - choice = show_radial_menu(user, src, options, require_near = !issilicon(user)) + choice = show_radial_menu(user, src, options, require_near = !hasSiliconAccessInArea(user)) // post choice verification - if(operating || (isAI(user) && stat & NOPOWER) || !user.canUseTopic(src, !issilicon(user))) + if(operating || (isAI(user) && stat & NOPOWER) || !user.canUseTopic(src, !hasSiliconAccessInArea(user))) return switch(choice) @@ -190,7 +190,7 @@ /obj/machinery/reagentgrinder/examine(mob/user) . = ..() - if(!in_range(user, src) && !issilicon(user) && !isobserver(user)) + if(!in_range(user, src) && !hasSiliconAccessInArea(user) && !isobserver(user)) . += "You're too far away to examine [src]'s contents and display!" return diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index 810124b2ba..7a3a7eeec2 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -725,11 +725,15 @@ All effects don't start immediately, but rather get worse over time; the rate is var/dorf_mode /datum/reagent/consumable/ethanol/manly_dorf/on_mob_metabolize(mob/living/M) + var/real_dorf = isdwarf(M) //_species(H, /datum/species/dwarf) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.dna.check_mutation(DWARFISM) || HAS_TRAIT(H, TRAIT_ALCOHOL_TOLERANCE)) + if(H.dna.check_mutation(DWARFISM) || HAS_TRAIT(H, TRAIT_ALCOHOL_TOLERANCE) || real_dorf) to_chat(H, "Now THAT is MANLY!") - boozepwr = 5 //We've had worse in the mines + if(real_dorf) + boozepwr = 100 // Don't want dwarves to die because of a low booze power + else + boozepwr = 5 //We've had worse in the mines dorf_mode = TRUE /datum/reagent/consumable/ethanol/manly_dorf/on_mob_life(mob/living/carbon/M) diff --git a/code/modules/research/designs/tool_designs.dm b/code/modules/research/designs/tool_designs.dm index 300fe6c68a..cf1c0563d5 100644 --- a/code/modules/research/designs/tool_designs.dm +++ b/code/modules/research/designs/tool_designs.dm @@ -27,7 +27,7 @@ desc = "A tool that can construct and deconstruct walls, airlocks and floors on the fly." id = "rcd_loaded" build_type = PROTOLATHE - materials = list(MAT_METAL = MINERAL_MATERIAL_AMOUNT, MAT_GLASS = MINERAL_MATERIAL_AMOUNT) // costs more than what it did in the autolathe, this one comes loaded. + materials = list(MAT_METAL = 36000) // costs more than what it did in the autolathe, this one comes loaded. build_path = /obj/item/construction/rcd/loaded category = list("Tool Designs") departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING diff --git a/code/modules/tgui/states.dm b/code/modules/tgui/states.dm index fc30d171fb..959f096d05 100644 --- a/code/modules/tgui/states.dm +++ b/code/modules/tgui/states.dm @@ -103,7 +103,7 @@ return UI_CLOSE var/dist = get_dist(src_object, src) - if(dist <= 1) // Open and interact if 1-0 tiles away. + if(dist <= 1 || src_object.hasSiliconAccessInArea(src)) // Open and interact if 1-0 tiles away. return UI_INTERACTIVE else if(dist <= 2) // View only if 2-3 tiles away. return UI_UPDATE diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index b75f212ba9..52f6efd3df 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -157,6 +157,7 @@ category = "Role-Restricted" exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) surplus = 0 + cant_discount = TRUE /datum/uplink_item/badass category = "(Pointless) Badassery" @@ -164,4 +165,4 @@ //Discounts (dynamically filled above) /datum/uplink_item/discounts - category = "Discounted Gear" \ No newline at end of file + category = "Discounted Gear" diff --git a/code/modules/uplink/uplink_items/uplink_implants.dm b/code/modules/uplink/uplink_items/uplink_implants.dm index d8a31a9b9c..02b8b1e01d 100644 --- a/code/modules/uplink/uplink_items/uplink_implants.dm +++ b/code/modules/uplink/uplink_items/uplink_implants.dm @@ -29,6 +29,22 @@ item = /obj/item/storage/box/syndie_kit/imp_freedom cost = 5 +/datum/uplink_item/implants/hijack + name = "Hijack Implant" + desc = "An implant that will let you hack into the APCs on station, allowing you to control them at will and the machinery within those rooms." + item = /obj/item/implanter/hijack + cost = 14 //really overkill, 14 tc, can still get caught in a room you haven't hijacked and you're fucked. + surplus = 0 //nope not having hijack implants with surplus crates nope nope nope nope + restricted = TRUE + +/datum/uplink_item/implants/radio + name = "Internal Syndicate Radio Implant" + desc = "An implant injected into the body, allowing the use of an internal Syndicate radio. \ + Used just like a regular headset, but can be disabled to use external headsets normally and to avoid detection." + item = /obj/item/storage/box/syndie_kit/imp_radio + cost = 4 + restricted = TRUE + /datum/uplink_item/implants/microbomb name = "Microbomb Implant" desc = "An implant injected into the body, and later activated either manually or automatically upon death. \ @@ -47,14 +63,6 @@ include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) restricted = TRUE -/datum/uplink_item/implants/radio - name = "Internal Syndicate Radio Implant" - desc = "An implant injected into the body, allowing the use of an internal Syndicate radio. \ - Used just like a regular headset, but can be disabled to use external headsets normally and to avoid detection." - item = /obj/item/storage/box/syndie_kit/imp_radio - cost = 4 - restricted = TRUE - /datum/uplink_item/implants/reviver name = "Reviver Implant" desc = "This implant will attempt to revive and heal you if you lose consciousness. Comes with an autosurgeon." diff --git a/html/changelogs/AutoChangeLog-pr-10596.yml b/html/changelogs/AutoChangeLog-pr-10596.yml new file mode 100644 index 0000000000..7f56a256a0 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-10596.yml @@ -0,0 +1,5 @@ +author: "Seris02" +delete-after: True +changes: + - rscadd: "hijack implant" + - code_imp: "changed mentions of the issilion proc to hasSiliconAccessInArea based on what the proc is used for" diff --git a/html/changelogs/AutoChangeLog-pr-10948.yml b/html/changelogs/AutoChangeLog-pr-10948.yml new file mode 100644 index 0000000000..f9da9463fc --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-10948.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Stopped role restricted uplink items from being discounted despite not being purchasable most times." diff --git a/html/changelogs/AutoChangeLog-pr-10967.yml b/html/changelogs/AutoChangeLog-pr-10967.yml new file mode 100644 index 0000000000..f242dd57bc --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-10967.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Fixed AI unanchoring not properly removing the no teleport trait. My bad." diff --git a/html/changelogs/AutoChangeLog-pr-10971.yml b/html/changelogs/AutoChangeLog-pr-10971.yml new file mode 100644 index 0000000000..e7882646f8 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-10971.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "Alien stools and chairs" diff --git a/html/changelogs/AutoChangeLog-pr-10976.yml b/html/changelogs/AutoChangeLog-pr-10976.yml new file mode 100644 index 0000000000..34ef082829 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-10976.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Fixed another issue with hering comsig." diff --git a/html/changelogs/AutoChangeLog-pr-10988.yml b/html/changelogs/AutoChangeLog-pr-10988.yml new file mode 100644 index 0000000000..ebd9de7689 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-10988.yml @@ -0,0 +1,4 @@ +author: "YakumoChen" +delete-after: True +changes: + - tweak: "Observe is back in the OOC tab" diff --git a/html/changelogs/AutoChangeLog-pr-11000.yml b/html/changelogs/AutoChangeLog-pr-11000.yml new file mode 100644 index 0000000000..5e496af81f --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11000.yml @@ -0,0 +1,4 @@ +author: "Seris02" +delete-after: True +changes: + - balance: "makes RCDs cost a better amount" diff --git a/html/changelogs/AutoChangeLog-pr-11001.yml b/html/changelogs/AutoChangeLog-pr-11001.yml new file mode 100644 index 0000000000..1cfa8977b4 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11001.yml @@ -0,0 +1,4 @@ +author: "Arturlang" +delete-after: True +changes: + - bugfix: "Fixed the pandemic naming and the radiation healing symptom UI crashing" diff --git a/icons/obj/abductor.dmi b/icons/obj/abductor.dmi index fd0893b300..75f84347b6 100644 Binary files a/icons/obj/abductor.dmi and b/icons/obj/abductor.dmi differ diff --git a/icons/obj/implants.dmi b/icons/obj/implants.dmi index 8dc2f08fdc..a6d4697673 100644 Binary files a/icons/obj/implants.dmi and b/icons/obj/implants.dmi differ diff --git a/icons/obj/lighting.dmi b/icons/obj/lighting.dmi index 396d681f22..675005da91 100644 Binary files a/icons/obj/lighting.dmi and b/icons/obj/lighting.dmi differ diff --git a/icons/obj/power.dmi b/icons/obj/power.dmi index 1ba953d284..1f84da44d4 100644 Binary files a/icons/obj/power.dmi and b/icons/obj/power.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 914abb9fe3..782edf2402 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -980,6 +980,7 @@ #include "code\game\objects\items\implants\implant_exile.dm" #include "code\game\objects\items\implants\implant_explosive.dm" #include "code\game\objects\items\implants\implant_freedom.dm" +#include "code\game\objects\items\implants\implant_hijack.dm" #include "code\game\objects\items\implants\implant_krav_maga.dm" #include "code\game\objects\items\implants\implant_mindshield.dm" #include "code\game\objects\items\implants\implant_misc.dm" diff --git a/tgui-next/packages/tgui/interfaces/Apc.js b/tgui-next/packages/tgui/interfaces/Apc.js index d74c3e8e57..c899ea8ae7 100644 --- a/tgui-next/packages/tgui/interfaces/Apc.js +++ b/tgui-next/packages/tgui/interfaces/Apc.js @@ -201,6 +201,29 @@ export const Apc = props => { onClick={() => act('toggle_nightshift')} /> )} /> + {data.hijackable && ( +
+