mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-02-06 14:39:20 +00:00
* after dark * FIXES * breakin * butt * Update code/game/objects/items/devices/floor_painter.dm Co-authored-by: Cody Brittain <cbrittain10@yahoo.com> * Update code/game/objects/items/devices/floor_painter.dm Co-authored-by: Cody Brittain <cbrittain10@yahoo.com> * Update code/game/objects/structures/lattice.dm Co-authored-by: Cody Brittain <cbrittain10@yahoo.com> * testing 1 * a * FUCK THIS PRESET!!! * allah * OTEMACHI * tis' done * Project Exorcism : Sneed's Snairs (Formerly Chuck's) * Update code/game/objects/structures/stool_bed_chair_nest/chairs.dm * Update code/game/objects/structures/stool_bed_chair_nest/chairs.dm * Update stools.dm * Update code/game/objects/structures/stool_bed_chair_nest/stools.dm * Update code/game/objects/structures/stool_bed_chair_nest/stools.dm * Update stools.dm * Update chairs.dm * Update code/game/objects/structures/stool_bed_chair_nest/chairs.dm * inhand fixes * airlocks (matt has cooked) fuck * my cody plays the mamba * fuck * fixes layering issue * airlocks and everything else Please fucking kill me * underlays * unfuck blending * finished replacing old ass shit * your ass is geass * conflicts die now * public fat'wa * progress on walls and windows * more mapping * baltimore accents be like * minor progress * monitors * fire alarms and apc adjustments * apcs pixel adjustments, final airlock look * also grilles * shuttle wall start plus shuttle windows * starting consoles * table outlines * I love broke ass sprites * fixing the stupid ass exterior walls * light fuckery * terminal directionals, external airlocks, table fixes, blahblahblah * fix 1 * fix 2 * some more fixes * fix chairs * basic untested railings and updating colors from atteria * bridge and some fixes * removing some artifacts on the new walls * breaking wood tables and adding 4 wall materials * fix * compile & wood fixes * make the horizon compile again * railings, firedoors, ATMs, intercomms and tables again * mapping begins also some tweaks to map view of icons * full tile steel walls * i sure hope nothing bad happens * airlock updates (untested) * reverts most wall machinery * skull * wall coloring * makes the tg wood chill out * work on airlocks * hull consistency * cause you live forever in the lights you make * whoops can't show that in a christian manga * terminals should be on walls and everything's hunky dory now also i changed the wood stuff as per atteria's suggestion * fixing airlocks * fixes * window resprite, coloring adjustments * scc hull resprite * new grilles, frame edits, and borosilicate * greyscale wood palette improvement * shuttle windows * window frame fix * apc update * refit and reshaded fire alarms * mapping icon fixes * table fixes * map fixes, platforms and stairs * updates cutter, new walls and terminals * mapping fixes * fix preview * preview fix stone * stairs * initial work for the map * railing and windowpane fuckery * new external airlocks * a * fix the maps in preparation * wall object pixel offsets * air alarms D1 * extinguisher cabinets * APC DESTROYED MISSION ACCOMPLISHED GOOD WORK * deck 3: floor decals, APCs, air alarms, fire extinguisher cabinets * deck 3: fireaxe cabinet * /shuttle_landmark/distress/blue, move base_turf from map to obj def * intercom presets * formatting * deck 1: floor decals * deck 2: named area fix (LMAO), signs to use single quotes * deck 2: floor decals, APCs, air alarms, fire extinguisher cabinets, fireaxe cabinets * Platforms and stairs! * grates and bugfixes * Angled ship walls + grate color fix * corrects apc anim overlay * deck 2 and away site fixes # Conflicts: # maps/sccv_horizon/sccv_horizon-2_deck_2.dmm * deck 2 missing grate * warning stripes * railings and ledges * windows and fixtures * windoorsagain * airlocks pt1 * windows de-seamed and transparent * airlocks and pixel offsets * fixes for airlocks * more airlock fixes * presets for ringer, request console and newscaster * 132 * asfsaf * kitchen tiling * thicker freezer tile bevels * More angled walls * New shutters and blast doors * directional corrections * ops railing fixes * updated window map things and shutters * value changes and blast door changes * Ledges and platforms galore (D2/D3) * all decks: fix door dirs * all decks: newscasters, intercoms, requests consoles, ringer consoles * helm light blue decals to dark blue * supermatter door dir fix * fix directional presets (dirs/offsets): newscaster, intercom, requests console, ringer console * firedoor changes * deck 3: overlapping wall mountables fixes * map changes * airlock changes * map tweaks * airlock & stair icons * various mapping modifications * Double airlocks + fixing denied states + fixing airlocks on all levels * Rebase * directional terminals buttons and lights again, platform tweaks terminal north facing sprites, atm/food terminal directionals proper door control and lightswitch directionals (presets still need to be set up, mapping) re-adds new light tube sprites, again new sprites for floor lights and the other stuff that got added adjusted platforms to be recolorable, added light and dark versions, fixed some shading * missing ERT outfit thingy fix * floor lights fixed * deck 3: various small fixes * deck 1: various small fixes * deck 2: various small fixes * fixes * d2 fixes & multitile door fix * d2 fixes, remove unused airlock files, button icon fixes, window icon fixes * make it actually compile, oops! * make it actually compile, pt2 * CE office camera * pew pew pew * pew pew pew 2 * fixes * deck 3: buttons fixes * deck 3: button and other fixes * deck 3: fixes and stuff * D1 fixes & skrell airlocks * minor D2 tweaks * a lot of airlock-related fixes, glass tables, paint sprayer fixes, decal fixes, changelog * maintenance hatch sprites * fixing double doors * flips multi-tiles, fixes multi-tiles, adds desk windoors * new plastic flaps * deck 2: a few buttons * side + middle doors * created paths for 3-tiles doors * apply to map the 3 tiles airlocks * some fixes, windoor alpha * remove this random ass potted plant * more map fixes * holodeck disposal pipe fix * secure airlock sprites no code or obj definitions yet * vault airlock * vault door fixes * scc window alpha * adjusts double door glass, firedoor open state * adjusts construction states for doors * remove some defunct icons and fix anims * assembly stuff * pharma fixes * vault door dir * firedoor smart generation moved to its own proc * lift doors, d1 fixes * firedoor smart generation: adjacent wall check * firedoor smart generation: adjacent firedoor check * all decks: missing firedoor and other fixes * deck 2: weird maint stairs fix * oops * diona airlock fix * the shuttle wall gigadeath * fixes * some fixes for leftover map item paths, and double lattices * new diona walls * more fixes * and more * deck 1: fix out of bounds keys * deck 3: fix out of bounds keys * runtime 3: duplicate APCs fix * all decks: make all 3 tile wide doors glass --------- Co-authored-by: Wezzy <wowzewow@gmail.com> Co-authored-by: Wowzewow (Wezzy) <42310821+alsoandanswer@users.noreply.github.com> Co-authored-by: Cody Brittain <cbrittain10@yahoo.com> Co-authored-by: kyres1 <noodle.buster31@gmail.com> Co-authored-by: Matt Atlas <liermattia@gmail.com> Co-authored-by: atteria <tarkona@protonmail.com> Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> Co-authored-by: DreamySkrell <107256943+DreamySkrell@users.noreply.github.com> Co-authored-by: naut <nautilussplat@gmail.com> Co-authored-by: naut <55491249+nauticall@users.noreply.github.com>
254 lines
8.0 KiB
Plaintext
254 lines
8.0 KiB
Plaintext
/obj/machinery/computer/robotics
|
|
name = "robotics control console"
|
|
desc = "Used to remotely lockdown or detonate linked cyborgs."
|
|
icon = 'icons/obj/machinery/modular_console.dmi'
|
|
|
|
icon_screen = "robot"
|
|
icon_keyboard = "purple_key"
|
|
light_color = LIGHT_COLOR_PURPLE
|
|
|
|
req_one_access = list(access_rd, access_robotics)
|
|
circuit = /obj/item/circuitboard/robotics
|
|
|
|
var/safety = 1
|
|
|
|
|
|
/obj/machinery/computer/robotics/attack_ai(var/mob/user as mob)
|
|
if(!ai_can_interact(user))
|
|
return
|
|
ui_interact(user)
|
|
|
|
/obj/machinery/computer/robotics/attack_hand(var/mob/user as mob)
|
|
ui_interact(user)
|
|
|
|
/obj/machinery/computer/robotics/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
|
var/data[0]
|
|
data["robots"] = get_cyborgs(user)
|
|
data["safety"] = safety
|
|
// Also applies for cyborgs. Hides the manual self-destruct button.
|
|
data["is_ai"] = issilicon(user)
|
|
|
|
|
|
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
|
if(!ui)
|
|
ui = new(user, src, ui_key, "robot_control.tmpl", "Robotic Control Console", 400, 500)
|
|
ui.set_initial_data(data)
|
|
ui.open()
|
|
ui.set_auto_update(1)
|
|
|
|
/obj/machinery/computer/robotics/Topic(href, href_list)
|
|
if(..())
|
|
return
|
|
var/mob/user = usr
|
|
if(!src.allowed(user))
|
|
to_chat(user, "Access denied.")
|
|
return
|
|
|
|
// Destroys the cyborg
|
|
if(href_list["detonate"])
|
|
var/mob/living/silicon/robot/target = get_cyborg_by_name(href_list["detonate"])
|
|
if(!target || !istype(target))
|
|
return
|
|
if(isAI(user) && (target.connected_ai != user))
|
|
to_chat(user, "Access denied. This robot is not linked to you.")
|
|
return
|
|
// Cyborgs may blow up themselves via the console
|
|
if(isrobot(user) && user != target)
|
|
to_chat(user, "Access denied.")
|
|
return
|
|
var/choice = input("Really detonate [target.name]?") in list ("Yes", "No")
|
|
if(choice != "Yes")
|
|
return
|
|
if(!target || !istype(target))
|
|
return
|
|
|
|
// Antagonistic cyborgs? Left here for downstream
|
|
if(target.mind && target.mind.special_role && target.emagged)
|
|
to_chat(target, "Extreme danger. Termination codes detected. Scrambling security codes and automatic AI unlink triggered.")
|
|
target.ResetSecurityCodes()
|
|
return
|
|
|
|
if(target.emagged)
|
|
to_chat(user, "Access denied. Safety protocols are disabled.")
|
|
return
|
|
|
|
else
|
|
message_admins("[key_name_admin(usr)] detonated [target.name]!")
|
|
log_game("[key_name(usr)] detonated [target.name]!",ckey=key_name(usr))
|
|
to_chat(target, "<span class='danger'>Self-destruct command received.</span>")
|
|
spawn(10)
|
|
target.self_destruct()
|
|
|
|
|
|
|
|
// Locks or unlocks the cyborg
|
|
else if(href_list["lockdown"])
|
|
var/mob/living/silicon/robot/target = get_cyborg_by_name(href_list["lockdown"])
|
|
if(!target || !istype(target))
|
|
return
|
|
|
|
if(isAI(user) && (target.connected_ai != user))
|
|
to_chat(user, "Access denied. This robot is not linked to you.")
|
|
return
|
|
|
|
if(isrobot(user))
|
|
to_chat(user, "Access denied.")
|
|
return
|
|
|
|
if(target.emagged)
|
|
return
|
|
|
|
var/choice = input("Really [target.lock_charge ? "unlock" : "lockdown"] [target.name] ?") in list ("Yes", "No")
|
|
if(choice != "Yes")
|
|
return
|
|
|
|
if(!target || !istype(target))
|
|
return
|
|
|
|
target.SetLockdown(!target.lock_charge) // Toggle.
|
|
message_admins("[key_name_admin(usr)] [target.lock_charge ? "locked down" : "released"] [target.name]!")
|
|
log_game("[key_name(usr)] [target.lock_charge ? "locked down" : "released"] [target.name]!",ckey=key_name(usr))
|
|
to_chat(target, (target.lock_charge ? "You have been locked down!" : "Your lockdown has been lifted!"))
|
|
|
|
// Changes borg's access
|
|
else if(href_list["access"])
|
|
var/mob/living/silicon/robot/target = get_cyborg_by_name(href_list["access"])
|
|
if(!istype(target))
|
|
return
|
|
|
|
if(isAI(user) && (target.connected_ai != user))
|
|
to_chat(user, "Access denied. This robot is not linked to you.")
|
|
return
|
|
|
|
if(isrobot(user) || target.emagged)
|
|
to_chat(user, "Access denied.")
|
|
return
|
|
|
|
if(!istype(target))
|
|
return
|
|
|
|
if(!target.module)
|
|
to_chat(user, "\The [src]\s access protocols are immutable.")
|
|
return
|
|
|
|
target.module.all_access = !target.module.all_access
|
|
target.update_access()
|
|
|
|
var/log_message = "[key_name_admin(usr)] changed [target.name] access to [target.module.all_access ? "all access" : "role specific"]."
|
|
message_admins(log_message)
|
|
log_game(log_message, ckey = key_name(usr))
|
|
to_chat(target, ("Your access was changed to: [target.module.all_access ? "all access" : "role specific"]."))
|
|
|
|
// Remotely hacks the cyborg. Only antag AIs can do this and only to linked cyborgs.
|
|
else if(href_list["hack"])
|
|
var/mob/living/silicon/robot/target = get_cyborg_by_name(href_list["hack"])
|
|
if(!target || !istype(target))
|
|
return
|
|
|
|
// Antag AI checks
|
|
if(!istype(user, /mob/living/silicon/ai) || !(user.mind.special_role && user.mind.original == user))
|
|
to_chat(user, "Access denied.")
|
|
return
|
|
|
|
if(target.emagged)
|
|
to_chat(user, "Robot is already hacked.")
|
|
return
|
|
|
|
var/choice = input("Really hack [target.name]? This cannot be undone.") in list("Yes", "No")
|
|
if(choice != "Yes")
|
|
return
|
|
|
|
if(!target || !istype(target))
|
|
return
|
|
|
|
message_admins("[key_name_admin(usr)] emagged [target.name] using robotic console!")
|
|
log_game("[key_name(usr)] emagged [target.name] using robotic console!",ckey=key_name(usr))
|
|
target.emagged = 1
|
|
to_chat(target, "<span class='notice'>Failsafe protocols overriden. New tools available.</span>")
|
|
|
|
// Arms the emergency self-destruct system
|
|
else if(href_list["arm"])
|
|
if(istype(user, /mob/living/silicon))
|
|
to_chat(user, "Access denied.")
|
|
return
|
|
|
|
safety = !safety
|
|
to_chat(user, "You [safety ? "disarm" : "arm"] the emergency self destruct")
|
|
|
|
// Destroys all accessible cyborgs if safety is disabled
|
|
else if(href_list["nuke"])
|
|
if(istype(user, /mob/living/silicon))
|
|
to_chat(user, "Access denied.")
|
|
return
|
|
if(safety)
|
|
to_chat(user, "Self-destruct aborted - safety active")
|
|
return
|
|
|
|
message_admins("[key_name_admin(usr)] detonated all cyborgs!")
|
|
log_game("[key_name(usr)] detonated all cyborgs!",ckey=key_name(usr))
|
|
|
|
for(var/mob/living/silicon/robot/R in mob_list)
|
|
if(istype(R, /mob/living/silicon/robot/drone))
|
|
continue
|
|
// Ignore antagonistic cyborgs
|
|
if(R.scrambled_codes)
|
|
continue
|
|
if(R.emagged)
|
|
continue
|
|
to_chat(R, "<span class='danger'>Self-destruct command received.</span>")
|
|
spawn(10)
|
|
R.self_destruct()
|
|
|
|
|
|
// Proc: get_cyborgs()
|
|
// Parameters: 1 (operator - mob which is operating the console.)
|
|
// Description: Returns NanoUI-friendly list of accessible cyborgs.
|
|
/obj/machinery/computer/robotics/proc/get_cyborgs(var/mob/operator)
|
|
var/list/robots = list()
|
|
|
|
for(var/mob/living/silicon/robot/R in mob_list)
|
|
// Ignore drones
|
|
if(istype(R, /mob/living/silicon/robot/drone))
|
|
continue
|
|
// Ignore antagonistic cyborgs
|
|
if(R.scrambled_codes)
|
|
continue
|
|
|
|
var/list/robot = list()
|
|
robot["name"] = R.name
|
|
if(R.stat)
|
|
robot["status"] = "Not Responding"
|
|
else if(R.lock_charge) // changed this from !R.canmove to R.lock_charge because of issues with lockdown and chairs
|
|
robot["status"] = "Lockdown"
|
|
else
|
|
robot["status"] = "Operational"
|
|
|
|
if(R.cell)
|
|
robot["cell"] = 1
|
|
robot["cell_capacity"] = R.cell.maxcharge
|
|
robot["cell_current"] = R.cell.charge
|
|
robot["cell_percentage"] = round(R.cell.percent())
|
|
else
|
|
robot["cell"] = 0
|
|
|
|
robot["module"] = R.module ? R.module.name : "None"
|
|
robot["master_ai"] = R.connected_ai ? R.connected_ai.name : "None"
|
|
robot["hackable"] = 0
|
|
robot["access"] = R.module ? R.module.all_access : FALSE
|
|
// Antag AIs know whether linked cyborgs are hacked or not.
|
|
if(operator && istype(operator, /mob/living/silicon/ai) && (R.connected_ai == operator) && (operator.mind.special_role && operator.mind.original == operator))
|
|
robot["hacked"] = R.emagged ? 1 : 0
|
|
robot["hackable"] = R.emagged? 0 : 1
|
|
robots.Add(list(robot))
|
|
return robots
|
|
|
|
// Proc: get_cyborg_by_name()
|
|
// Parameters: 1 (name - Cyborg we are trying to find)
|
|
// Description: Helper proc for finding cyborg by name
|
|
/obj/machinery/computer/robotics/proc/get_cyborg_by_name(var/name)
|
|
if(!name)
|
|
return
|
|
for(var/mob/living/silicon/robot/R in mob_list)
|
|
if(R.name == name)
|
|
return R
|