diff --git a/code/modules/mob/living/silicon/robot/robot_life.dm b/code/modules/mob/living/silicon/robot/robot_life.dm index fb5fb6b3396..7f104251361 100644 --- a/code/modules/mob/living/silicon/robot/robot_life.dm +++ b/code/modules/mob/living/silicon/robot/robot_life.dm @@ -11,7 +11,6 @@ if(.) handle_robot_hud_updates() handle_robot_cell() - process_locks() update_items() @@ -121,16 +120,6 @@ if(module_state_3) module_state_3:screen_loc = ui_inv3 -/mob/living/silicon/robot/proc/process_locks() - if(weapon_lock) - uneq_all() - weaponlock_time -- - if(weaponlock_time <= 0) - if(src.client) - to_chat(src, "Weapon Lock Timed Out!") - weapon_lock = FALSE - weaponlock_time = 120 - //Robots on fire /mob/living/silicon/robot/handle_fire() . = ..() diff --git a/code/modules/mob/living/silicon/robot/robot_mob.dm b/code/modules/mob/living/silicon/robot/robot_mob.dm index 057ed9a1f18..c3dd377d2f7 100644 --- a/code/modules/mob/living/silicon/robot/robot_mob.dm +++ b/code/modules/mob/living/silicon/robot/robot_mob.dm @@ -17,9 +17,9 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( var/sight_mode = 0 var/custom_name = "" - var/custom_sprite = FALSE //Due to all the sprites involved, a var for our custom borgs may be best + var/custom_sprite = FALSE // Due to all the sprites involved, a var for our custom borgs may be best. - //Hud stuff + // HUD stuff. var/atom/movable/screen/hands = null var/atom/movable/screen/inv1 = null var/atom/movable/screen/inv2 = null @@ -27,10 +27,11 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( var/atom/movable/screen/lamp_button = null var/atom/movable/screen/thruster_button = null - var/shown_robot_modules = FALSE //Used to determine whether they have the module menu shown or not + /// Used to determine whether the robot has the module menu shown or not. + var/shown_robot_modules = FALSE var/atom/movable/screen/robot_modules_background - //3 Modules can be activated at any one time. + // 3 Modules can be activated at any one time. var/obj/item/robot_module/module = null var/module_active = null var/module_state_1 = null @@ -42,81 +43,116 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( var/obj/item/stock_parts/cell/cell = null var/obj/machinery/camera/camera = null - // Components are basically robot organs. + /// Components are basically robot organs. var/list/components = list() - var/obj/item/robot_parts/robot_suit/robot_suit = null //Used for deconstruction to remember what the borg was constructed out of.. + /// Used for deconstruction to remember what the robot was constructed out of. + var/obj/item/robot_parts/robot_suit/robot_suit = null + /// Used for deconstruction to remember what the robot was constructed out of. var/obj/item/mmi/mmi = null var/obj/item/pda/silicon/robot/rbPDA = null var/datum/wires/robot/wires = null + /// Is the robot's maintenance panel open? var/opened = FALSE + /// Does the robot have a non-default sprite for an open service panel? var/custom_panel = null + /// Robot skins with non-default sprites for an open service panel. var/list/custom_panel_names = list("Cricket") + /// Robot skins with multiple variants for different modules. They require special handling to make their eyes display. var/list/custom_eye_names = list("Cricket", "Standard") - var/emagged = 0 + /// Has the robot been emagged? + var/emagged = FALSE + /// Can the robot be emagged? var/is_emaggable = TRUE + /// Is the robot protected from the visual portion of flashbangs and flashes(1)? Are they protected from laser pointer (2)? var/eye_protection = 0 + /// Is the robot protected from the audio component of flashbangs? Prevents inflicting confusion. var/ear_protection = FALSE + /// All incoming damage has this number subtracted from it. var/damage_protection = 0 + /// Is the robot immune to EMPs? var/emp_protection = FALSE - /// Value incoming brute damage to borgs is mutiplied by. + /// Incoming brute damage is multiplied by this number. var/brute_mod = 1 - /// Value incoming burn damage to borgs is multiplied by. + /// Incoming burn damage is multiplied by this number. var/burn_mod = 1 var/list/force_modules + /// Can a robot rename itself with the Namepick verb? var/allow_rename = TRUE + /// Setting to TRUE unlocks a borg's Safety Override modules. var/weapons_unlock = FALSE var/static_radio_channels = FALSE var/wiresexposed = FALSE + /// Is the robot's cover locked? var/locked = TRUE + /// Determines the ID access needed to unlock the robot's cover. var/list/req_one_access = list(ACCESS_ROBOTICS) + /// Used for robot access checks. var/list/req_access + /// Used when generating the number in default robot names. var/ident = 0 //var/list/laws = list() var/viewalerts = FALSE + /// What specialisation the robot has. var/modtype = "Default" var/datum/effect_system/spark_spread/spark_system //So they can initialize sparks whenever/N - var/low_power_mode = FALSE //whether the robot has no charge left. - var/weapon_lock = FALSE - var/weaponlock_time = 120 - var/lawupdate = TRUE //Cyborgs will sync their laws with their AI by default - var/lockcharge //Used when locking down a borg to preserve cell charge - var/speed = 0 //Cause sec borgs gotta go fast //No they dont! - var/scrambledcodes = FALSE // Used to determine if a borg shows up on the robotics console. Setting to TRUE hides them. - var/can_lock_cover = FALSE //Used to set if a borg can re-lock its cover. + /// Has the robot's power cell run out of charge? + var/low_power_mode = FALSE + /// Determines if the robot tries to sync its laws to a connected AI. + var/lawupdate = TRUE + /// Used when locking down a robot to preserve cell charge. + var/lockcharge + /// Speed modifier. Positive numbers reduce speed, negative numbers increase it. + var/speed = 0 + /// If set to TRUE, a robot will not be visible on the robotics control console. + var/scrambledcodes = FALSE + /// If set to TRUE, a robot can re-lock its own cover. + var/can_lock_cover = FALSE + /// Determines if a robot acts as a mobile security camera that can be observed through security consoles or by an AI. var/has_camera = TRUE - var/pdahide = FALSE //Used to hide the borg from the messenger list - var/tracking_entities = 0 //The number of known entities currently accessing the internal camera + /// If set to TRUE, the robot will be hidden on the PDA messenger list. + var/pdahide = FALSE + /// The number of known entities currently accessing the internal camera. + var/tracking_entities = 0 + /// Determines if the robot is referred to as an "Android", "Robot", or "Cyborg" based on the type of brain inside. var/braintype = "Cyborg" + /// The default skin of some special robots. var/base_icon = "" + /// If set to TRUE, the robot's 3 module slots will progressively become unusable as they take damage. var/modules_break = TRUE - var/lamp_max = 10 //Maximum brightness of a borg lamp. Set as a var for easy adjusting. - var/lamp_intensity = 0 //Luminosity of the headlamp. 0 is off. Higher settings than the minimum require power. - var/lamp_recharging = FALSE //Flag for if the lamp is on cooldown after being forcibly disabled. + /// Maximum brightness of a robot's headlamp. Set as a var for easy adjusting. + var/lamp_max = 10 + /// Luminosity of the headlamp. 0 is off. Higher settings than the minimum require power. Increments in steps of 2. + var/lamp_intensity = 0 + /// Flag for if the headlamp is on cooldown after being forcibly disabled (e.g. by a shadow deamon). + var/lamp_recharging = FALSE - /// When the camera moved signal was send last. Avoid overdoing it + /// When the camera moved signal was sent last. Avoid overdoing it. var/last_camera_update hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD) var/default_cell_type = /obj/item/stock_parts/cell/high - var/ionpulse = FALSE // Jetpack-like effect. - var/ionpulse_on = FALSE // Jetpack-like effect. - /// Does it clean the tile under it? + /// Does the robot have ion thrusters installed? + var/ionpulse = FALSE + /// Are the robot's ion thrusters activated? + var/ionpulse_on = FALSE + /// Does the robot clean dirt under it when it moves onto a tile? var/floorbuffer = FALSE var/datum/action/item_action/toggle_research_scanner/scanner = null var/list/module_actions = list() - var/has_advanced_reagent_vision = FALSE // Determines if the cyborg has advanced reagent vision. + /// If set to TRUE, the robot can see the types and precice quantities of reagents in transparent containers, the % amount of different reagents in opaque containers, and can identify different blood types. + var/has_advanced_reagent_vision = FALSE - /// Integer used to determine self-mailing location, used only by drones and saboteur borgs. + /// Integer used to determine self-mailing location, used only by drones and saboteur robots. var/mail_destination = 1 var/datum/ui_module/robot_self_diagnosis/self_diagnosis var/datum/ui_module/destination_tagger/mail_setter