From c2f054fd813087e46c351da6465093770c8fd5cb Mon Sep 17 00:00:00 2001 From: Batrachophreno Date: Sat, 9 Aug 2025 08:22:56 -0400 Subject: [PATCH] DMdocs (#21103) Progress on DMDocs. PRing progress so far so there's not one mega PR later with 1500 affected files. I want my goddamn highlight text on what all these goddamn procs goddamn do goddamnit. >:( No actual code change anywhere in this PR, only comments. --------- Signed-off-by: Batrachophreno --- code/__DEFINES/machinery.dm | 10 +- code/__HELPERS/game.dm | 82 +++-- code/__HELPERS/heap.dm | 31 +- code/__HELPERS/icon_smoothing.dm | 32 +- code/__HELPERS/icons.dm | 36 +- code/__HELPERS/lists.dm | 325 ++++++++++++------ code/__HELPERS/names.dm | 61 ++-- code/__HELPERS/text.dm | 14 +- code/__HELPERS/time.dm | 36 +- code/__HELPERS/type2type.dm | 10 +- code/_onclick/adjacent.dm | 7 +- code/_onclick/ai.dm | 45 ++- code/_onclick/rig.dm | 8 +- code/controllers/subsystems/icon_updates.dm | 9 +- code/controllers/subsystems/radiation.dm | 61 +++- code/datums/outfits/outfit.dm | 80 +++-- code/datums/underwear/underwear.dm | 21 +- code/game/area/area_power.dm | 16 +- code/game/area/areas.dm | 50 ++- code/game/atom/_atom.dm | 69 ++-- code/game/atom/atom_examine.dm | 82 +++-- code/game/machinery/Beacon.dm | 8 +- code/game/machinery/alarm.dm | 41 ++- code/game/machinery/atmoalter/canister.dm | 12 +- code/game/machinery/camera/camera.dm | 3 +- code/game/machinery/camera/motion.dm | 3 +- code/game/machinery/cloning.dm | 4 +- code/game/machinery/doors/blast_door.dm | 87 +++-- code/game/machinery/doors/firedoor.dm | 58 +++- code/game/machinery/hologram.dm | 6 +- code/game/machinery/iv_drip.dm | 14 +- code/game/machinery/machinery.dm | 12 +- .../machinery/telecomms/telecommunications.dm | 6 +- code/game/objects/items/devices/PDA/radio.dm | 2 +- .../game/objects/items/stacks/sheets/glass.dm | 12 +- .../objects/items/stacks/tiles/tile_types.dm | 8 +- code/game/objects/items/toys.dm | 38 +- code/game/objects/items/weapons/RFD.dm | 51 ++- code/game/objects/items/weapons/autopsy.dm | 11 +- code/game/objects/items/weapons/cards_ids.dm | 37 +- .../objects/items/weapons/chaplain_items.dm | 11 +- .../objects/items/weapons/cigs_lighters.dm | 15 +- code/game/objects/items/weapons/dice.dm | 9 +- code/game/objects/items/weapons/landmines.dm | 3 +- .../items/weapons/material/twohanded.dm | 6 +- code/game/objects/items/weapons/mop.dm | 13 +- code/game/objects/items/weapons/paint.dm | 6 +- .../game/objects/items/weapons/power_cells.dm | 25 +- .../objects/items/weapons/storage/bags.dm | 26 +- .../objects/items/weapons/storage/boxes.dm | 39 ++- .../objects/items/weapons/storage/fancy.dm | 12 +- .../objects/items/weapons/storage/secure.dm | 10 +- code/game/objects/items/weapons/stunbaton.dm | 12 +- .../objects/items/weapons/surgery_tools.dm | 14 +- .../objects/items/weapons/swords_axes_etc.dm | 4 +- .../objects/items/weapons/tanks/tank_types.dm | 12 +- .../objects/items/weapons/teleportation.dm | 8 +- code/game/objects/items/weapons/tools.dm | 3 +- .../crates_lockers/closets/job_closets.dm | 6 +- .../crates_lockers/closets/utility_closets.dm | 14 +- code/game/objects/structures/morgue.dm | 8 +- .../structures/stool_bed_chair_nest/bed.dm | 4 +- code/modules/alarm/alarm.dm | 69 ++-- code/modules/alarm/alarm_handler.dm | 9 +- code/modules/clothing/head/misc_special.dm | 12 +- code/modules/clothing/suits/miscellaneous.dm | 4 +- code/modules/clothing/suits/utility.dm | 6 +- code/modules/clothing/under/jobs/security.dm | 6 +- code/modules/library/lib_items.dm | 6 +- code/modules/library/lib_machines.dm | 10 +- code/modules/mapping/reader.dm | 2 +- code/modules/mining/machine_rigpress.dm | 2 +- .../mob/living/simple_animal/parrot.dm | 12 +- code/modules/mob/mob_helpers.dm | 53 ++- .../modular_computers/hardware/hard_drive.dm | 16 +- .../modular_computers/hardware/hardware.dm | 12 +- code/modules/paperwork/filingcabinet.dm | 6 +- code/modules/paperwork/pen.dm | 12 +- code/modules/paperwork/photography.dm | 10 +- code/modules/power/apc.dm | 24 +- code/modules/power/fusion/core/_core.dm | 12 +- code/modules/power/fusion/core/core_field.dm | 91 ++++- code/modules/radiation/radiation.dm | 37 +- .../Chemistry-Reagents-Medicine.dm | 26 +- code/modules/recycling/disposal.dm | 134 ++++---- html/changelogs/Bat-dmdocs.yml | 58 ++++ maps/runtime/code/runtime.dm | 37 +- maps/sccv_horizon/areas/_horizon_areas.dm | 29 +- 88 files changed, 1574 insertions(+), 879 deletions(-) create mode 100644 html/changelogs/Bat-dmdocs.yml diff --git a/code/__DEFINES/machinery.dm b/code/__DEFINES/machinery.dm index 4a219432b00..ab24920d62f 100644 --- a/code/__DEFINES/machinery.dm +++ b/code/__DEFINES/machinery.dm @@ -104,14 +104,14 @@ GLOBAL_LIST_INIT(restricted_camera_networks, list(NETWORK_ERT,NETWORK_MERCENARY, #define STATUS_DISABLED 0 // RED Visability #define STATUS_CLOSE -1 // Close the interface -/* - * Atmospherics Machinery. -*/ +/** + * Atmospherics Machinery. + */ -///Maximum flowrate, in L/s, that the scrubbers use when siphoning. Anything higher than `CELL_VOLUME` has no effect. +/// Maximum flowrate, in L/s, that the scrubbers use when siphoning. Anything higher than `CELL_VOLUME` has no effect. #define MAX_SIPHON_FLOWRATE 5000 -///Maximum flowrate, in L/s, that the scrubbers use when scrubbing from a turf. +/// Maximum flowrate, in L/s, that the scrubbers use when scrubbing from a turf. #define MAX_SCRUBBER_FLOWRATE 400 #define ATMOS_PUMP_MAX_PRESSURE 15000 diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index a8a0aa6be4c..ce053410be5 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -10,7 +10,12 @@ max_z = max(z, max_z) return max_z -/proc/get_area_name(N) //get area by its name +/** + * Get area by its name. + * + * * N - Exact name being searched + */ +/proc/get_area_name(N) for(var/area/A in get_sorted_areas()) if(A.name == N) return A @@ -22,10 +27,10 @@ return A /** - * For use only on the Horizon. - * Prepends a given area's name with its department and deck # for presentation. Returns a string. - * Example of a fully configured area name output: - * Engineering (Atmospherics) - Deck 1 - Combustion Turbine - Port Amidships, Aft + * For use only on the Horizon. + * Prepends a given area's name with its department and deck # for presentation. Returns a string. + * Example of a fully configured area name output: + * Engineering (Atmospherics) - Deck 1 - Combustion Turbine - Port Amidships, Aft */ /proc/get_area_display_name(var/area/A, var/show_dept = TRUE, var/show_subdept = TRUE, var/show_deck = TRUE, var/show_location = TRUE, var/show_hidden_depts = FALSE) if(!is_station_area(A)) @@ -67,9 +72,12 @@ if(get_dist(source, user) <= 1) return 1 - return 0 //not in range and not telekinetic + // Not in range and not telekinetic + return 0 -// Will recursively loop through an atom's locs until it finds the atom loc above a turf or its target_atom +/** + * Will recursively loop through an atom's locs until it finds the atom loc above a turf or its target_atom + */ /proc/recursive_loc_turf_check(var/atom/O, var/recursion_limit = 3, var/atom/target_atom) if(recursion_limit <= 0 || isturf(O.loc) || O == target_atom) return O @@ -109,11 +117,15 @@ return last_atom_before_turf -/proc/get_cardinal_step_away(atom/start, atom/finish) //returns the position of a step from start away from finish, in one of the cardinal directions - //returns only NORTH, SOUTH, EAST, or WEST +/** + * Returns the position of a step from start away from finish, in one of the cardinal directions + */ +/proc/get_cardinal_step_away(atom/start, atom/finish) + // Returns only NORTH, SOUTH, EAST, or WEST var/dx = finish.x - start.x var/dy = finish.y - start.y - if(abs(dy) > abs (dx)) //slope is above 1:1 (move horizontally in a tie) + // Slope is above 1:1 (move horizontally in a tie) + if(abs(dy) > abs (dx)) if(dy > 0) return get_step(start, SOUTH) else @@ -323,25 +335,35 @@ else return (GLOB.cult.current_antagonists.len > spookiness_threshold) -/// Adds an image to a client's `.images`. Useful as a callback. +/** + * Adds an image to a client's `.images`. Useful as a callback. + */ /proc/add_image_to_client(image/image_to_remove, client/add_to) add_to?.images += image_to_remove -/// Like add_image_to_client, but will add the image from a list of clients +/** + * Like add_image_to_client, but will add the image from a list of clients + */ /proc/add_image_to_clients(image/image_to_remove, list/show_to) for(var/client/add_to in show_to) add_to.images += image_to_remove -/// Removes an image from a client's `.images`. Useful as a callback. +/** + * Removes an image from a client's `.images`. Useful as a callback. + */ /proc/remove_image_from_client(image/image_to_remove, client/remove_from) remove_from?.images -= image_to_remove -/// Like remove_image_from_client, but will remove the image from a list of clients +/** + * Like remove_image_from_client, but will remove the image from a list of clients + */ /proc/remove_image_from_clients(image/image_to_remove, list/hide_from) for(var/client/remove_from in hide_from) remove_from.images -= image_to_remove -/// Add an image to a list of clients and calls a proc to remove it after a duration +/** + * Add an image to a list of clients and calls a proc to remove it after a duration + */ /proc/flick_overlay_global(image/image_to_show, list/show_to, duration) if(!show_to || !length(show_to) || !image_to_show) return @@ -351,9 +373,10 @@ /** * Helper atom that copies an appearance and exists for a period -*/ + * A list of `/atom/movable` this visual was or will be added into the `vis_contents` of + */ /atom/movable/flick_visual - ///A list of `/atom/movable` this visual was or will be added into the `vis_contents` of + VAR_PROTECTED/list/atom/movable/owners = null /atom/movable/flick_visual/New(loc, list/atom/movable/owners) @@ -363,19 +386,20 @@ src.owners = owners - +/** + * Remove us from the vis_contents of the owners, so we can be garbage collected + * "As anything" is important here, as our "atom/movable" could also be a turf, as per https://secure.byond.com/docs/ref/index.html#/atom/var/vis_contents + */ /atom/movable/flick_visual/Destroy(force) - - //Remove us from the vis_contents of the owners, so we can be garbage collected - //"As anything" is important here, as our "atom/movable" could also be a turf, as per https://secure.byond.com/docs/ref/index.html#/atom/var/vis_contents for(var/atom/movable/an_owner as anything in src.owners) an_owner.vis_contents -= src src.owners = null . = ..() - -///Flicks a certain overlay onto an atom, handling icon_state strings +/** + * Flicks a certain overlay onto an atom, handling icon_state strings + */ /atom/proc/flick_overlay(image_to_show, list/show_to, duration, layer) var/image/passed_image = \ istext(image_to_show) \ @@ -384,8 +408,10 @@ flick_overlay_global(passed_image, show_to, duration) -/// Takes the passed in MA/icon_state, mirrors it onto ourselves, and displays that in world for duration seconds -/// Returns the displayed object, you can animate it and all, but you don't own it, we'll delete it after the duration +/** + * Takes the passed in MA/icon_state, mirrors it onto ourselves, and displays that in world for duration seconds + * Returns the displayed object, you can animate it and all, but you don't own it, we'll delete it after the duration + */ /atom/proc/flick_overlay_view(mutable_appearance/display, duration) if(!display) return null @@ -402,7 +428,7 @@ var/atom/movable/lies_to_children = src - // This is faster then pooling. I promise + /// This is faster then pooling. I promise var/atom/movable/flick_visual/visual = new(null, list(lies_to_children)) visual.appearance = passed_appearance visual.mouse_opacity = MOUSE_OPACITY_TRANSPARENT @@ -414,7 +440,9 @@ /area/flick_overlay_view(mutable_appearance/display, duration) return -// makes peoples byond icon flash on the taskbar +/** + * Makes people's byond icon flash on the taskbar. + */ /proc/window_flash(client/C) if(ismob(C)) var/mob/M = C diff --git a/code/__HELPERS/heap.dm b/code/__HELPERS/heap.dm index eeabfa6a20b..79db6731173 100644 --- a/code/__HELPERS/heap.dm +++ b/code/__HELPERS/heap.dm @@ -11,7 +11,8 @@ cmp = compare /datum/heap/Destroy(force) - for(var/i in L) // because this is before the list helpers are loaded + // Because this is before the list helpers are loaded + for(var/i in L) qdel(i) L = null return ..() @@ -19,14 +20,17 @@ /datum/heap/proc/is_empty() return !length(L) -//insert and place at its position a new node in the heap +/** + * insert and place at A's position a new node in the heap + */ /datum/heap/proc/insert(A) - L.Add(A) swim(length(L)) -//removes and returns the first element of the heap -//(i.e the max or the min dependant on the comparison function) +/** + * Removes and returns the first element of the heap + * (i.e the max or the min dependant on the comparison function) + */ /datum/heap/proc/pop() if(!length(L)) return 0 @@ -37,7 +41,9 @@ if(length(L)) sink(1) -//Get a node up to its right position in the heap +/** + * Get a node up to its right position in the heap + */ /datum/heap/proc/swim(index) var/parent = round(index * 0.5) @@ -46,7 +52,9 @@ index = parent parent = round(index * 0.5) -//Get a node down to its right position in the heap +/** + * Get a node down to its right position in the heap. + */ /datum/heap/proc/sink(index) var/g_child = get_greater_child(index) @@ -55,8 +63,9 @@ index = g_child g_child = get_greater_child(index) -//Returns the greater (relative to the comparison proc) of a node children -//or 0 if there's no child +/** + * Returns the greater (relative to the comparison proc) of a node children or 0 if there's no child. + */ /datum/heap/proc/get_greater_child(index) if(index * 2 > length(L)) return 0 @@ -69,7 +78,9 @@ else return index * 2 -//Replaces a given node so it verify the heap condition +/** + * Replaces a given node so it verify the heap condition + */ /datum/heap/proc/resort(A) var/index = L.Find(A) diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm index e3c6271db1a..85f2b601027 100644 --- a/code/__HELPERS/icon_smoothing.dm +++ b/code/__HELPERS/icon_smoothing.dm @@ -44,10 +44,13 @@ var/tmp/top_right_corner var/tmp/bottom_left_corner var/tmp/bottom_right_corner - var/list/canSmoothWith = null // TYPE PATHS I CAN SMOOTH WITH~~~~~ If this is null and atom is smooth, it smooths only with itself + /// TYPE PATHS I CAN SMOOTH WITH - If this is null and atom is smooth, it smooths only with itself + var/list/canSmoothWith = null var/list/can_blend_with = null - var/blend_overlay //Icon state of the blending overlay. - var/attach_overlay //Icon state of the overlay this object uses to attach to other objects. + /// Icon state of the blending overlay. + var/blend_overlay + /// Icon state of the overlay this object uses to attach to other objects. + var/attach_overlay /atom/movable var/can_be_unanchored = 0 @@ -56,10 +59,14 @@ /turf var/list/fixed_underlay - var/smooth_underlays // Determines if we should attempt to generate turf underlays for this type. - var/tile_decal_state // override if you don't want decals to cut from the icon state directly but something else. used for coloring decals, mostly - var/tile_outline // decal effect for "sinking in" the edges. - var/tile_outline_alpha // how dark you want the sinking in to be. set this if you want above to do stuff. + /// Determines if we should attempt to generate turf underlays for this type. + var/smooth_underlays + /// Override if you don't want decals to cut from the icon state directly but something else. Used for coloring decals, mostly + var/tile_decal_state + /// Decal effect for "sinking in" the edges. + var/tile_outline + /// How dark you want the sinking in to be. Set this if you want above to do stuff. + var/tile_outline_alpha var/tile_outline_blend_process = ICON_OVERLAY /turf/simulated/wall/shuttle @@ -225,7 +232,7 @@ /turf/proc/get_underlays(var/list/adjacencies) SHOULD_NOT_SLEEP(TRUE) - //First of all, check if there are turfs like us we can ask for underlays. + // First of all, check if there are turfs like us we can ask for underlays. adjacencies = calculate_adjacencies() var/success = FALSE if (smooth_underlays) @@ -241,7 +248,7 @@ success = TRUE break - //if all else fails, ask our own turf + // If all else fails, ask our own turf if(!success) underlay_appearance.icon = base_icon underlay_appearance.icon_state = base_icon_state @@ -264,12 +271,15 @@ }\ } -//Blend atoms +/** + * Blend atoms + */ /atom/proc/handle_blending(adjacencies, var/list/dir_mods, var/overlay_layer = 3) SHOULD_NOT_SLEEP(TRUE) LAZYINITLIST(dir_mods) - var/walls_found = 0 //Bitfield of the directions of walls we've found. + // Bitfield of the directions of walls we've found. + var/walls_found = 0 for(var/adjacency in list(N_NORTH, N_EAST, N_SOUTH, N_WEST)) if(adjacencies & adjacency) var/turf/T = get_step(src, REVERSE_DIR(adjacency)) diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index e5a1ce15b7d..291b7afcd03 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -618,7 +618,8 @@ world else render_icon = FALSE - var/base_icon_dir //We'll use this to get the icon state to display if not null BUT NOT pass it to overlays as the dir we have + // We'll use this to get the icon state to display if not null BUT NOT pass it to overlays as the dir we have + var/base_icon_dir //Try to remove/optimize this section ASAP, CPU hog. //Determines if there's directionals. @@ -651,7 +652,8 @@ world PROCESS_OVERLAYS_OR_UNDERLAYS(flat, appearance.underlays, 0) PROCESS_OVERLAYS_OR_UNDERLAYS(flat, appearance.overlays, 1) - var/icon/add // Icon of overlay being added + // Icon of overlay being added + var/icon/add var/flatX1 = 1 var/flatX2 = flat.Width() @@ -1108,9 +1110,11 @@ lighting determines lighting capturing (optional), suppress_errors suppreses err icon2collapse = icon(icon2collapse, icon_state, dir, frame, moving) - var/list/name_and_ref = generate_and_hash_rsc_file(icon2collapse, icon_path)//pretend that tuples exist + // Pretend that tuples exist + var/list/name_and_ref = generate_and_hash_rsc_file(icon2collapse, icon_path) - var/rsc_ref = name_and_ref[1] //weird object thats not even readable to the debugger, represents a reference to the icons rsc entry + // Weird object thats not even readable to the debugger, represents a reference to the icons rsc entry + var/rsc_ref = name_and_ref[1] var/file_hash = name_and_ref[2] key = "[name_and_ref[3]].png" @@ -1211,16 +1215,30 @@ lighting determines lighting capturing (optional), suppress_errors suppreses err sleep(duration) CutOverlays(overlay_image) -/// Perform a shake on an atom, resets its position afterwards +/** + * Perform a shake on an atom, resets its position afterwards + * + * * pixelshiftx - x-axis pixel shift, default 2 + * * pixelshifty - y-axis pixel shift, default 2 + * * duration - how long to shake, default 2.5s + * * shake_interval = time between shakes, default 0.02 SECONDS + */ /atom/proc/Shake(pixelshiftx = 2, pixelshifty = 2, duration = 2.5 SECONDS, shake_interval = 0.02 SECONDS) var/initialpixelx = pixel_x var/initialpixely = pixel_y animate(src, pixel_x = initialpixelx + rand(-pixelshiftx,pixelshiftx), pixel_y = initialpixelx + rand(-pixelshifty,pixelshifty), time = shake_interval, flags = ANIMATION_PARALLEL) - for (var/i in 3 to ((duration / shake_interval))) // Start at 3 because we already applied one, and need another to reset + // Start at 3 because we already applied one, and need another to reset. + for (var/i in 3 to ((duration / shake_interval))) animate(pixel_x = initialpixelx + rand(-pixelshiftx,pixelshiftx), pixel_y = initialpixely + rand(-pixelshifty,pixelshifty), time = shake_interval) animate(pixel_x = initialpixelx, pixel_y = initialpixely, time = shake_interval) -///Checks if the given iconstate exists in the given file, caching the result. Setting scream to TRUE will print a stack trace ONCE. +/** + * Checks if the given iconstate exists in the given file, caching the result. + * + * * file - icon .dmi file + * * state - which state within the .dmi + * * scream - if TRUE, will print a stack trace ONCE + */ /proc/icon_exists(file, state, scream) var/static/list/icon_states_cache = list() if(icon_states_cache[file]?[state]) @@ -1274,7 +1292,9 @@ lighting determines lighting capturing (optional), suppress_errors suppreses err /// Cache of the width and height of icon files, to avoid repeating the same expensive operation GLOBAL_LIST_EMPTY(icon_dimensions) -/// Returns a list containing the width and height of an icon file +/** + * Returns a list containing the width and height of an icon file + */ /proc/get_icon_dimensions(icon_path) // Icons can be a real file(), a rsc backed file(), a dynamic rsc (dyn.rsc) reference (known as a cache reference in byond docs), or an /icon which is pointing to one of those. // Runtime generated dynamic icons are an unbounded concept cache identity wise, the same icon can exist millions of ways and holding them in a list as a key can lead to unbounded memory usage if called often by consumers. diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index 46f9ca38cc0..c4324de2ec1 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -1,8 +1,8 @@ /* * Holds procs to help with list operations * Contains groups: - * Misc - * Sorting + * * Misc + * * Sorting */ // Determiner constants @@ -15,11 +15,15 @@ * Misc */ -/// Sort any value in a list +/** + * Sort any value in a list. + */ /proc/sort_list(list/list_to_sort, cmp=/proc/cmp_text_asc) return sortTim(list_to_sort.Copy(), cmp) -/// Returns a list in plain english as a string +/** + * Returns a list in plain english as a string. + */ /proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" ) SHOULD_BE_PURE(TRUE) SHOULD_NOT_SLEEP(TRUE) @@ -42,21 +46,25 @@ return "[output][and_text][input[index]]" -/// Returns a newline-separated list that counts equal-ish items, outputting count and item names, optionally with icons and specific determiners +/** + * Returns a newline-separated list that counts equal-ish items, outputting count and item names, optionally with icons and specific determiners. + */ /proc/counting_english_list(var/list/input, output_icons = TRUE, determiners = DET_NONE, nothing_text = "nothing", line_prefix = "\t", first_item_prefix = "\n", last_item_suffix = "\n", and_text = "\n", comma_text = "\n", final_comma_text = "") - var/list/counts = list() // counted input items - var/list/items = list() // actual objects for later reference (for icons and formatting) - - // count items + // Counted input items. + var/list/counts = list() + // Actual objects for later reference (for icons and formatting). + var/list/items = list() + // Count items. for(var/item in input) - var/name = "[item]" // index items by name; usually works fairly well for loose equality + // Index items by name; usually works fairly well for loose equality. + var/name = "[item]" if(name in counts) counts[name]++ else counts[name] = 1 items.Add(item) - // assemble the output list + // Assemble the output list. var/list/out = list() var/i = 0 for(var/item in items) @@ -67,11 +75,12 @@ if(count > 1) item_str += "[count]x " - // atoms use special string conversion rules + // Atoms use special string conversion rules. if(isatom(item)) - // atoms/items/objects can be pretty and whatnot + // atoms/items/objects can be pretty and whatnot. var/atom/A = item - if(output_icons && isicon(A.icon) && !ismob(A)) // mobs tend to have unusable icons + // Mobs tend to have unusable icons. + if(output_icons && isicon(A.icon) && !ismob(A)) item_str += "[icon2html(A, viewers(get_turf(A)))] " switch(determiners) if(DET_NONE) item_str += A.name @@ -87,10 +96,13 @@ out.Add(item_str) i++ - // finally return the list using regular english_list builder + // Finally return the list using regular english_list builder. return english_list(out, nothing_text, and_text, comma_text, final_comma_text) -/// A "preset" for counting_english_list that displays the list "inline" (comma separated) + +/** + * A "preset" for counting_english_list that displays the list "inline" (comma separated). + */ /proc/inline_counting_english_list(var/list/input, output_icons = TRUE, determiners = DET_NONE, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "", line_prefix = "", first_item_prefix = "", last_item_suffix = "") return counting_english_list(input, output_icons, determiners, nothing_text, and_text, comma_text, final_comma_text) @@ -110,7 +122,9 @@ return TRUE return FALSE -/// Checks that all of the values are in the given list +/** + * Checks that all of the values are in the given list. + */ /proc/all_in_list(var/list/values, var/list/L) if(!istype(values) || !istype(L)) return FALSE @@ -126,7 +140,7 @@ return FALSE /** - * Checks if an object is of a type that derives from the parent types specified in the list, returns TRUE if so, FALSE otherwise + * Checks if an object is of a type that derives from the parent types specified in the list, returns TRUE if so, FALSE otherwise. * * * thing - The object to check * * types - A list of types to perform the check against @@ -160,17 +174,22 @@ return FALSE return TRUE -/// Removes any null entries from the list -/// Returns TRUE if the list had nulls, FALSE otherwise +/** + * Removes any null entries from the list. + * + * Returns TRUE if the list had nulls, FALSE otherwise. + */ /proc/listclearnulls(list/L) var/start_len = L.len var/list/N = new(start_len) L -= N return L.len < start_len -/// Returns list containing all the entries from first list that are not present in second. -/// If skiprep = 1, repeated elements are treated as one. -/// If either of arguments is not a list, returns null +/** + * Returns list containing all the entries from first list that are not present in second. + * If skiprep = 1, repeated elements are treated as one. + * If either of arguments is not a list, returns null. + */ /proc/difflist(var/list/first, var/list/second, var/skiprep=0) if(!islist(first) || !islist(second)) return @@ -183,9 +202,11 @@ result = first - second return result -/// Returns list containing entries that are in either list but not both. -/// If skipref = 1, repeated elements are treated as one. -/// If either of arguments is not a list, returns null +/** + * Returns list containing entries that are in either list but not both. + * If skipref = 1, repeated elements are treated as one. + * If either of arguments is not a list, returns null. + */ /proc/uniquemergelist(var/list/first, var/list/second, var/skiprep=0) if(!islist(first) || !islist(second)) return @@ -196,9 +217,11 @@ result = first ^ second return result -/// Returns a list with the results from both lists -/// If norepeat = TRUE, it won't include repeat instances. -/// If unpack = TRUE, it unpacks each list +/** + * Returns a list with the results from both lists. + * If norepeat = TRUE, it won't include repeat instances. + * If unpack = TRUE, it unpacks each list. + */ /proc/mergelists(var/list/first, var/list/second, var/norepeat = TRUE, var/unpack = FALSE) if(!islist(first) || !islist(second)) return @@ -217,8 +240,10 @@ result += A return result -/// Returns a list with the unpacked results from the list. -/// If repeatunpack = TRUE, it unpacks each found list within it +/** + * Returns a list with the unpacked results from the list. + * If repeatunpack = TRUE, it unpacks each found list within it. + */ /proc/unpacklist(var/list/packed, repeatunpack = TRUE) if(!islist(packed)) return @@ -236,20 +261,23 @@ result += A return result -/// Picks a random element by weight from a list. The list must be correctly constructed in this format: -/// mylist[myelement1] = myweight1 -/// mylist[myelement2] = myweight2 -/// The proc will return the element index, and not the weight. +/** + * Picks a random element by weight from a list. The list must be correctly constructed in this format: + * mylist[myelement1] = myweight1 + * mylist[myelement2] = myweight2 + * The proc will return the element index, and not the weight. + */ /proc/pickweight(list/L) var/total = 0 var/item for (item in L) if (isnull(L[item])) - //A default weight will no longer overwrite an explicitly set weight of 0 - //It will only use a default if no weight is defined + // A default weight will no longer overwrite an explicitly set weight of 0 + // It will only use a default if no weight is defined. L[item] = 1 total += L[item] - total = rand() * total//Allows it to handle noninteger weights + // Allows it to handle noninteger weights. + total = rand() * total for (item in L) total -= L[item] if (total <= 0) @@ -257,8 +285,9 @@ return null - -/// Pick a random element from the list and remove it from the list. +/** + * Pick a random element from the list and remove it from the list. + */ /proc/pick_n_take(list/listfrom) if (listfrom.len > 0) var/picked = pick(listfrom) @@ -266,7 +295,9 @@ return picked return null -/// Returns the top(last) element from the list and removes it from the list (typical stack function) +/** + * Returns the top(last) element from the list and removes it from the list (typical stack function). + */ /proc/pop(list/listfrom) if (listfrom.len > 0) var/picked = listfrom[listfrom.len] @@ -274,30 +305,37 @@ return picked return null -/// Returns the first element from the list and removes it from the list +/** + * Returns the first element from the list and removes it from the list. + */ /proc/popleft(list/L) if(length(L)) . = L[1] L.Cut(1,2) -/// Returns the next element in parameter list after first appearance of parameter element. If it is the last element of the list or not present in list, returns first element. +/** + * Returns the next element in parameter list after first appearance of parameter element. If it is the last element of the list or not present in list, returns first element. + */ /proc/next_in_list(element, list/L) for(var/i=1, i current_index) @@ -526,12 +595,15 @@ sort_result = sorttext(current_sort_text, current_item) switch(sort_result) + // current_sort_text < current_item if (1) - high_index = current_index - 1 // current_sort_text < current_item + high_index = current_index - 1 + // current_sort_text > current_item if (-1) - low_index = current_index + 1 // current_sort_text > current_item + low_index = current_index + 1 + // current_sort_text == current_item if (0) - low_index = current_index // current_sort_text == current_item + low_index = current_index break // Insert before low_index. @@ -565,15 +637,19 @@ /proc/is_list_containing_type(var/list/L, type) return count_by_type(L, type) == L.len -/// Creates every subtype of prototype (excluding prototype) and adds it to list L. -/// if no list/L is provided, one is created. +/** + * Creates every subtype of prototype (excluding prototype) and adds it to list L. + * If no list/L is provided, one is created. + */ /proc/init_subtypes(prototype, list/L) if(!istype(L)) L = list() for(var/path in subtypesof(prototype)) L += new path() return L -/// Returns a new list with only atoms that are in typecache L +/** + * Returns a new list with only atoms that are in typecache L. + */ /proc/typecache_filter_list(list/atoms, list/typecache) . = list() for(var/atom/A as anything in atoms) @@ -602,7 +678,9 @@ if(typecache[D.type]) return D -/// Like typesof() or subtypesof(), but returns a typecache instead of a list +/** + * Like typesof() or subtypesof(), but returns a typecache instead of a list. + */ /proc/typecacheof(path, ignore_root_path, only_root_path = FALSE) if(ispath(path)) var/list/types = list() @@ -630,7 +708,9 @@ L[T] = TRUE return L -/// Checks for specific types in specifically structured (Assoc "type" = TRUE) lists ('typecaches') +/** + * Checks for specific types in specifically structured (Assoc "type" = TRUE) lists ('typecaches'). + */ /proc/is_type_in_typecache(atom/A, list/L) if(!L || !L.len || !A) @@ -646,33 +726,42 @@ return total - -/// Move a single element from position fromIndex within a list, to position toIndex -/// All elements in the range [1,toIndex) before the move will be before the pivot afterwards -/// All elements in the range [toIndex, L.len+1) before the move will be after the pivot afterwards -/// In other words, it's as if the range [fromIndex,toIndex) have been rotated using a <<< operation common to other languages. -/// fromIndex and toIndex must be in the range [1,L.len+1] -/// This will preserve associations ~Carnie +/** + * Move a single element from position fromIndex within a list, to position toIndex. + * All elements in the range [1,toIndex) before the move will be before the pivot afterwards. + * All elements in the range [toIndex, L.len+1) before the move will be after the pivot afterwards. + * In other words, it's as if the range [fromIndex,toIndex) have been rotated using a <<< operation common to other languages. + * fromIndex and toIndex must be in the range [1,L.len+1]. + * This will preserve associations. + */ /proc/moveElement(list/L, fromIndex, toIndex) - if(fromIndex == toIndex || fromIndex+1 == toIndex) //no need to move + // No need to move. + if(fromIndex == toIndex || fromIndex+1 == toIndex) return + // Since a null will be inserted before fromIndex, the index needs to be nudged right by one if(fromIndex > toIndex) - ++fromIndex //since a null will be inserted before fromIndex, the index needs to be nudged right by one + ++fromIndex L.Insert(toIndex, null) L.Swap(fromIndex, toIndex) L.Cut(fromIndex, fromIndex+1) - -/// Move elements [fromIndex,fromIndex+len) to [toIndex-len, toIndex) -/// Same as moveElement but for ranges of elements -/// This will preserve associations ~Carnie +/** + * Move elements [fromIndex,fromIndex+len) to [toIndex-len, toIndex). + * Same as moveElement but for ranges of elements. + * This will preserve associations. + */ /proc/moveRange(list/L, fromIndex, toIndex, len=1) var/distance = abs(toIndex - fromIndex) - if(len >= distance) //there are more elements to be moved than the distance to be moved. Therefore the same result can be achieved (with fewer operations) by moving elements between where we are and where we are going. The result being, our range we are moving is shifted left or right by dist elements + // There are more elements to be moved than the distance to be moved. + // Therefore the same result can be achieved (with fewer operations) by moving elements between where we are and where we are going. + // The result being, our range we are moving is shifted left or right by dist elements. + if(len >= distance) + // No need to move. if(fromIndex <= toIndex) - return //no need to move - fromIndex += len //we want to shift left instead of right + return + // We want to shift left instead of right. + fromIndex += len for(var/i=0, i 0, words--) //Randomly picks from one of the choices below. + // Randomly picks from one of the choices below. + for(words, words > 0, words--) + // If there is only one word remaining and choice 1 or 2 have not been selected. + if(words == 1 && (1 in safety) && (2 in safety)) + // Select choice 1 or 2. + safety = list(pick(1,2)) + // Else if there is only one word remaining (and there were two originally), and 1 or 2 were chosen, + else if (words == 1 && maxwords == 2) + // Default to list 3 + safety = list(3) - if(words == 1 && (1 in safety) && (2 in safety)) //If there is only one word remaining and choice 1 or 2 have not been selected. - safety = list(pick(1,2)) //Select choice 1 or 2. - else if (words == 1 && maxwords == 2) //Else if there is only one word remaining (and there were two originally), and 1 or 2 were chosen, - safety = list(3) //Default to list 3 - - switch (pick(safety)) //Chance based on the safety list. - if (1) //1 and 2 can only be selected once each to prevent more than two specific names/places/etc. - switch (rand(1,2)) //Mainly to add more options later. + // Chance based on the safety list. + switch (pick(safety)) + // 1 and 2 can only be selected once each to prevent more than two specific names/places/etc. + if (1) + // Mainly to add more options later. + switch (rand(1,2)) if (1) code_phrase += pick(pick(GLOB.first_names_male, GLOB.first_names_female)) code_phrase += " " code_phrase += pick(GLOB.last_names) if (2) - code_phrase += pick(GLOB.joblist) //Returns a job. + // Returns a job. + code_phrase += pick(GLOB.joblist) safety -= 1 if (2) - switch (rand(1,2)) //Places or things. + // Places or things. + switch (rand(1,2)) if (1) code_phrase += pick(drinks) if (2) @@ -112,7 +130,8 @@ GLOBAL_VAR(syndicate_code_response) code_phrase += pick(drinks) safety -= 2 if (3) - switch (rand(1,3)) //Nouns, adjectives, verbs. Can be selected more than once. + // Nouns, adjectives, verbs. Can be selected more than once. + switch (rand(1,3)) if (1) code_phrase += pick(nouns) if (2) diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 75872faa58f..de781995a63 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -1,11 +1,11 @@ /* * Holds procs designed to help with filtering text * Contains groups: - * SQL sanitization - * Text sanitization - * Text searches - * Text modification - * Misc + * * SQL sanitization + * * Text sanitization + * * Text searches + * * Text modification + * * Misc */ @@ -13,7 +13,9 @@ * SQL sanitization */ -// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts. +/** + * Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts. + */ /proc/sanitizeSQL(var/t as text) var/sqltext = GLOB.dbcon.Quote(t); return copytext_char(sqltext, 2, length(sqltext));//Quote() adds quotes around input, we already do that diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm index 08476faa671..bff59cdf029 100644 --- a/code/__HELPERS/time.dm +++ b/code/__HELPERS/time.dm @@ -19,11 +19,20 @@ var/round_start_time /proc/time_stamp() return time2text(world.timeofday, "hh:mm:ss") -/* Returns 1 if it is the selected month and day */ +/** + * Check if specific day of the year + * + * * month - month in integer form + * * day - day in integer form + * + * Returns TRUE if the passed month/day is the current server world date + */ /proc/isDay(var/month, var/day) if(isnum(month) && isnum(day)) - var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month - var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day + // Get the current month + var/MM = text2num(time2text(world.timeofday, "MM")) + // Get the current day + var/DD = text2num(time2text(world.timeofday, "DD")) if(month == MM && day == DD) return 1 @@ -32,9 +41,16 @@ var/round_start_time //return 1 var/real_round_start_time -/proc/get_round_duration() //Real time since round has started, in ticks. + +/** + * Real time since round has started, in ticks. + */ +/proc/get_round_duration() return real_round_start_time ? (REALTIMEOFDAY - real_round_start_time) : 0 +/** + * Real time since round has started, in hours and minutes. + */ /proc/get_round_duration_formatted() var/duration = get_round_duration() var/hour = "[ round(duration / ( 1 HOUR) ) ]" @@ -49,12 +65,15 @@ var/real_round_start_time /var/midnight_rollovers = 0 /var/rollovercheck_last_timeofday = 0 /proc/update_midnight_rollover() - if (world.timeofday < rollovercheck_last_timeofday) //TIME IS GOING BACKWARDS! + // TIME IS GOING BACKWARDS! + if (world.timeofday < rollovercheck_last_timeofday) midnight_rollovers += 1 rollovercheck_last_timeofday = world.timeofday return midnight_rollovers -//returns timestamp in a sql and ISO 8601 friendly format +/** + * Returns timestamp in a SQL- and ISO 8601-friendly format. + */ /proc/SQLtime(timevar) if(!timevar) timevar = world.realtime @@ -73,8 +92,9 @@ var/real_round_start_time /proc/stop_watch(wh) return round(0.1 * (REALTIMEOFDAY - wh), 0.1) -//Takes a value of time in deciseconds. -//Returns a text value of that number in hours, minutes, or seconds. +/** + * Returns a text value of a given # of deciseconds in hours, minutes, or seconds. + */ /proc/DisplayTimeText(time_value, round_seconds_to = 0.1) var/second = FLOOR_FLOAT(time_value * 0.1, round_seconds_to) if(!second) diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index 8a79a3c9827..006c6a516f7 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -1,11 +1,11 @@ /* * Holds procs designed to change one type of value, into another. * Contains: - * text2list & list2text - * file2list - * angle2dir - * angle2text - * worldtime2text + * * text2list & list2text + * * file2list + * * angle2dir + * * angle2text + * * worldtime2text */ // Splits the text of a file at seperator and returns them in a list. diff --git a/code/_onclick/adjacent.dm b/code/_onclick/adjacent.dm index f6bbef0c825..dbe16746d7b 100644 --- a/code/_onclick/adjacent.dm +++ b/code/_onclick/adjacent.dm @@ -92,7 +92,9 @@ Quick adjacency (to turf): return TRUE return FALSE -// This is necessary for storage items not on your person. +/** + * This is necessary for storage items not on your person. + */ /obj/item/Adjacent(atom/neighbor, atom/target, atom/movable/mover, recurse = 1) if(neighbor == loc) return TRUE @@ -131,7 +133,8 @@ Quick adjacency (to turf): return FALSE /*** END AURORA SNOWFLAKE CODE ***/ - else if(!border_only) // dense, not on border, cannot pass over + // Dense, not on border, cannot pass over + else if(!border_only) return FALSE return TRUE diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index a77be0dd0e6..b86021b000e 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -96,7 +96,6 @@ than anything else in the game, atoms have separate procs for AI shift, ctrl, and alt clicking. */ - /mob/living/silicon/ai/ShiftClickOn(var/atom/A) if(!control_disabled && A.AIShiftClick(src)) return @@ -120,20 +119,31 @@ The following criminally helpful code is just the previous code cleaned up; I have no idea why it was in atoms.dm instead of respective files. */ - /atom/proc/AICtrlShiftClick() return /atom/proc/AIShiftClick(var/mob/user) return -/obj/machinery/door/airlock/AIShiftClick(var/mob/user) // Opens and closes doors! +/** + * Opens and closes doors! + * + * * mob/user - The mob doing it. + * + * Returns TRUE + */ +/obj/machinery/door/airlock/AIShiftClick(var/mob/user) open_interact(user, density) return TRUE /atom/proc/AICtrlClick(mob/user) return +/** + * Toggles airlock bolts. + * + * Returns TRUE + */ /obj/machinery/door/airlock/AICtrlClick(mob/user) // Bolts doors if(player_is_antag(user.mind)) bolts_override(user, !locked, FALSE, player_is_antag(user.mind)) @@ -141,11 +151,21 @@ bolts_interact(user, !locked, FALSE, player_is_antag(user.mind)) return TRUE -/obj/machinery/power/apc/AICtrlClick() // turns off/on APCs. +/** + * Turns on/off an APC (breaker toggle). + * + * Returns TRUE + */ +/obj/machinery/power/apc/AICtrlClick() toggle_breaker() return TRUE -/obj/machinery/turretid/AICtrlClick() //turns off/on Turrets +/** + * Turns on/off a turret. + * + * Returns TRUE + */ +/obj/machinery/turretid/AICtrlClick() enabled = !enabled updateTurrets() return TRUE @@ -153,7 +173,14 @@ /atom/proc/AIAltClick(var/mob/living/silicon/user) return AltClick(user) -/obj/machinery/door/airlock/AIAltClick(var/mob/living/silicon/user) // Electrifies doors. +/** + * Electrifies doors; non-antag silicons get a private IC 'naughty naughty' msg and nothing happens + * + * * /mob/living/silicon/user - The mob doing it. + * + * Returns TRUE or FALSE + */ +/obj/machinery/door/airlock/AIAltClick(var/mob/living/silicon/user) var/antag = player_is_antag(user.mind) if(!antag && (electrified_until == 0)) to_chat(user, SPAN_WARNING("Your programming prevents you from electrifying the door.")) @@ -173,9 +200,9 @@ /atom/proc/AIMiddleClick(var/mob/living/silicon/user) return FALSE -// -// Override AdjacentQuick for AltClicking -// +/** + * Override AdjacentQuick for AltClicking + */ /mob/living/silicon/ai/TurfAdjacent(var/turf/T) return (GLOB.cameranet && GLOB.cameranet.is_turf_visible(T)) diff --git a/code/_onclick/rig.dm b/code/_onclick/rig.dm index a0eeeb8b375..34d223b5b39 100644 --- a/code/_onclick/rig.dm +++ b/code/_onclick/rig.dm @@ -23,8 +23,8 @@ to_chat(src, "Hardsuit activation mode set to alt-click.") if(HARDSUIT_MODE_CTRL_CLICK) to_chat(src, "Hardsuit activation mode set to control-click.") + /// Should never get here, but just in case: else - // should never get here, but just in case: soft_assert(0, "Bad hardsuit click mode: [hardsuit_click_mode] - expected 0 to [MAX_HARDSUIT_CLICK_MODE]") to_chat(src, "Somehow you bugged the system. Setting your hardsuit mode to middle-click.") hardsuit_click_mode = HARDSUIT_MODE_MIDDLE_CLICK @@ -59,14 +59,16 @@ /mob/living/proc/HardsuitClickOn(var/atom/A, var/alert_ai = 0) if(!can_use_rig()) return FALSE - if(!canClick()) // return true to stop the initial click from going through if we're just on cooldown + // Return TRUE to stop the initial click from going through if we're just on cooldown + if(!canClick()) return TRUE var/obj/item/rig/rig = get_rig() if(istype(rig) && !rig.offline && rig.selected_module) if(src != rig.wearer && !rig.ai_can_move_suit(src, TRUE)) return FALSE rig.selected_module.do_engage(A, src, alert_ai) - if(ismob(A)) // No instant mob attacking - though modules have their own cooldowns + // No instant mob attacking - though modules have their own cooldowns + if(ismob(A)) setClickCooldown(DEFAULT_ATTACK_COOLDOWN) return TRUE return FALSE diff --git a/code/controllers/subsystems/icon_updates.dm b/code/controllers/subsystems/icon_updates.dm index ef1d8e0d170..202a218e1b5 100644 --- a/code/controllers/subsystems/icon_updates.dm +++ b/code/controllers/subsystems/icon_updates.dm @@ -11,7 +11,7 @@ SUBSYSTEM_DEF(icon_update) */ VAR_PRIVATE/list/icon_update_queue = list() - ///Deferred list, contains atoms that were not ready to be processed in the previous run + /// Deferred list, contains atoms that were not ready to be processed in the previous run VAR_PRIVATE/list/deferred = list() /datum/controller/subsystem/icon_update/stat_entry(msg) @@ -70,14 +70,14 @@ SUBSYSTEM_DEF(icon_update) var/atom/item_cache = item - //Skip atoms that are being deleted + // Skip atoms that are being deleted if(QDELETED(item_cache)) return if(!item_cache.icon_update_queued && (!item_cache.icon_update_delay || (item_cache.last_icon_update + item_cache.icon_update_delay < world.time))) item_cache.icon_update_queued = TRUE - //Determine if we got any parameter, and if we do set it in the associative list, otherwise just set it to TRUE + // Determine if we got any parameter, and if we do set it in the associative list, otherwise just set it to TRUE var/list/calling_arguments = length(args) > 1 ? args.Copy(2) : TRUE src.icon_update_queue[item_cache] = calling_arguments @@ -99,6 +99,9 @@ SUBSYSTEM_DEF(icon_update) src.icon_update_queue -= item_cache src.deferred -= item_cache +/** + * Updates the atom's icon based on current state(s). + */ /atom/proc/update_icon() SHOULD_NOT_SLEEP(TRUE) return diff --git a/code/controllers/subsystems/radiation.dm b/code/controllers/subsystems/radiation.dm index 3acbc119f6b..5605b81d557 100644 --- a/code/controllers/subsystems/radiation.dm +++ b/code/controllers/subsystems/radiation.dm @@ -4,9 +4,12 @@ SUBSYSTEM_DEF(radiation) priority = SS_PRIORITY_RADIATION flags = SS_NO_INIT - var/list/sources = list() // all radiation source datums - var/list/sources_assoc = list() // Sources indexed by turf for de-duplication. - var/list/resistance_cache = list() // Cache of turf's radiation resistance. + /// All radiation source datums. + var/list/sources = list() + /// Sources indexed by turf for de-duplication. + var/list/sources_assoc = list() + /// Cache of turf's radiation resistance. + var/list/resistance_cache = list() var/list/current_sources = list() var/list/current_res_cache = list() @@ -57,7 +60,9 @@ SUBSYSTEM_DEF(radiation) if (MC_TICK_CHECK) return -// Ray trace from all active radiation sources to T and return the strongest effect. +/** + * Ray trace from all active radiation sources to T and return the strongest effect. + */ /datum/controller/subsystem/radiation/proc/get_rads_at_turf(turf/T) . = 0 if(!istype(T)) @@ -69,7 +74,7 @@ SUBSYSTEM_DEF(radiation) continue // Already being affected by a stronger source if(source.source_turf.z != T.z) continue // Radiation is not multi-z - if(source.respect_maint) + if(source.respect_rad_shielding) var/area/A = T.loc if(A.area_flags & AREA_FLAG_RAD_SHIELDED) continue // In shielded area @@ -79,24 +84,30 @@ SUBSYSTEM_DEF(radiation) continue // Too far to possibly affect if(source.flat) . = max(., source.rad_power) - continue // No need to ray trace for flat field + continue // No need to ray trace for flat field // Okay, now ray trace to find resistence! var/turf/origin = source.source_turf var/working = source.rad_power + // Ray tracing. while(origin != T) - origin = get_step_towards(origin, T) //Raytracing - if(!resistance_cache[origin]) //Only get the resistance if we don't already know it. + origin = get_step_towards(origin, T) + // Only get the resistance if we don't already know it. + if(!resistance_cache[origin]) origin.calc_rad_resistance() if(origin.cached_rad_resistance) working = round((working / (origin.cached_rad_resistance * RADIATION_RESISTANCE_MULTIPLIER)), 0.1) + // Already affected by a stronger source (or its zero...) if((working <= .) || (working <= RADIATION_THRESHOLD_CUTOFF)) - break // Already affected by a stronger source (or its zero...) - . = max((working / (dist ** 2)), .) //Butchered version of the inverse square law. Works for this purpose + break + // Butchered version of the inverse square law. Works for this purpose. + . = max((working / (dist ** 2)), .) if(. <= RADIATION_THRESHOLD_CUTOFF) . = 0 -// Add a radiation source instance to the repository. It will override any existing source on the same turf. +/** + * Add a /datum/radiation_source instance to the repository. It will override any existing source on the same turf. + */ /datum/controller/subsystem/radiation/proc/add_source(datum/radiation_source/S) if(!isturf(S.source_turf)) return @@ -106,8 +117,12 @@ SUBSYSTEM_DEF(radiation) sources += S sources_assoc[S.source_turf] = S -// Creates a temporary radiation source that will decay -/datum/controller/subsystem/radiation/proc/radiate(source, power) //Sends out a radiation pulse, taking walls into account +/** + * Creates a /datum/radiation_source that will decay over time. + * + * This source will send out regular radiation pulses that take walls and distance into account. + */ +/datum/controller/subsystem/radiation/proc/radiate(source, power) if(!(source && power)) //Sanity checking return var/datum/radiation_source/S = new() @@ -115,21 +130,29 @@ SUBSYSTEM_DEF(radiation) S.update_rad_power(power) add_source(S) -// Sets the radiation in a range to a constant value. -/datum/controller/subsystem/radiation/proc/flat_radiate(source, power, range, respect_maint = FALSE) +/** + * Creates a /datum/radiation_source that will decay over time. + * + * This source will send out regular radiation pulses that will deliver + * identical radiation doses to everyone in range, irrespective of barriers + * in the way or their distance from the source. + */ +/datum/controller/subsystem/radiation/proc/flat_radiate(source, power, range, respect_rad_shielding = FALSE) if(!(source && power && range)) return var/datum/radiation_source/S = new() S.flat = TRUE S.range = range - S.respect_maint = respect_maint + S.respect_rad_shielding = respect_rad_shielding S.source_turf = get_turf(source) S.update_rad_power(power) add_source(S) -// Irradiates a full Z-level. Hacky way of doing it, but not too expensive. -/datum/controller/subsystem/radiation/proc/z_radiate(atom/source, power, respect_maint = FALSE) +/** + * Irradiates a full Z-level. Hacky way of doing it, but not too expensive. + */ +/datum/controller/subsystem/radiation/proc/z_radiate(atom/source, power, respect_rad_shielding = FALSE) if(!(power && source)) return var/turf/epicentre = locate(round(world.maxx / 2), round(world.maxy / 2), source.z) - flat_radiate(epicentre, power, world.maxx, respect_maint) + flat_radiate(epicentre, power, world.maxx, respect_rad_shielding) diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm index de2830a8d62..5cbf940c292 100644 --- a/code/datums/outfits/outfit.dm +++ b/code/datums/outfits/outfit.dm @@ -1,9 +1,11 @@ -/// General outfit abstraction. -/// To be used for both a mob's outfit (for a ghostspawner, ship/station job, corpse), -/// where the outfit is applied to the mob. -/// But also for "standalone" outfits (just items spawned in a locker, on the floor), -/// where the outfit items are "spilled" onto the floor (not all items, does not spawn IDs for example). +/** + * General outfit abstraction. + * To be used for both a mob's outfit (for a ghostspawner, ship/station job, corpse), + * where the outfit is applied to the mob. + * But also for "standalone" outfits (just items spawned in a locker, on the floor), + * where the outfit items are "spilled" onto the floor (not all items, does not spawn IDs for example). + */ /obj/outfit name = "Naked" icon = 'icons/effects/map_effects.dmi' @@ -16,11 +18,12 @@ var/collect_not_del = FALSE - //The following vars can either be a path or a list of paths - //If a list of paths is supplied a random item from that list is selected + // The following vars can either be a path or a list of paths. + /// If a list of paths is supplied a random item from that list is selected. var/uniform = null var/suit = null - var/back = null // Mutually exclusive with and will override backpack choices below. Use for RIGs, tanks, etc. + /// Mutually exclusive with and will override backpack choices below. Use for RIGs, tanks, etc. + var/back = null var/belt = null var/gloves = null var/wrist = null @@ -39,22 +42,24 @@ var/accessory = null var/suit_accessory = null - // species specific item paths, in the form of - // thing = list(SPECIES_NAME = /type/path/here) - // if no path is found, the default fallback (var without the species_ prefix) will be used + /** + * species specific item paths, in the form of + * thing = list(SPECIES_NAME = /type/path/here) + * if no path is found, the default fallback (var without the species_ prefix) will be used. + */ var/list/species_head var/list/species_suit var/list/species_gloves var/list/species_shoes - //The following vars must be paths + /// The following vars must be paths. var/l_hand = null var/r_hand = null var/id = null var/pda = null var/radio = null - // Must be paths, used to allow player-pref backpack choice + /// Must be paths, used to allow player-pref backpack choice. var/allow_backbag_choice = FALSE var/backpack = /obj/item/storage/backpack var/backpack_faction @@ -83,14 +88,20 @@ var/wrist_radio = /obj/item/device/radio/headset/wrist var/clipon_radio = /obj/item/device/radio/headset/wrist/clip - var/id_iff = IFF_DEFAULT // when spawning in, the ID will be set to this iff, preventing friendly fire + /// When spawning in, the ID will be set to this iff, preventing friendly fire. + var/id_iff = IFF_DEFAULT - var/internals_slot = null //ID of slot containing a gas tank - var/list/backpack_contents = list() //In the list(path=count,otherpath=count) format + /// ID of slot containing a gas tank. + var/internals_slot = null + /// In the list(path=count,otherpath=count) format. + var/list/backpack_contents = list() var/list/accessory_contents = list() - var/list/belt_contents = list() //In the list(path=count,otherpath=count) format - var/list/implants = null //A list of implants that should be implanted - var/list/spells = list() // A list of spells to grant + /// In the list(path=count,otherpath=count) format. + var/list/belt_contents = list() + /// A list of implants that should be implanted. + var/list/implants = null + /// A list of spells to grant. + var/list/spells = list() /obj/outfit/Initialize(mapload, ...) . = ..() @@ -98,10 +109,12 @@ if(loc!=null) spill() -/// Spawn the items on the loc turf. -/// Delete self later. +/** + * Spawn the items on the loc turf. + * Delete self later. + */ /obj/outfit/proc/spill() - // get a list of item types to spawn + // Get a list of item types to spawn. var/list/items = list( uniform, suit, @@ -159,7 +172,7 @@ new path(loc) /obj/outfit/proc/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - //to be overriden for customization depending on client prefs,species etc + // To be overriden for customization depending on client prefs, species etc if(allow_backbag_choice) switch(H.backbag) if (OUTFIT_NOTHING) @@ -170,8 +183,9 @@ back = backpack if (OUTFIT_GENERIC) back = /obj/item/storage/backpack + // Some may not have faction-specifics; fall back on job backpack if needed if (OUTFIT_FACTIONSPECIFIC) - back = backpack_faction ? backpack_faction : backpack // some may not have faction specific; fall back on job backpack if needed + back = backpack_faction ? backpack_faction : backpack if (OUTFIT_SATCHEL) switch(H.backbag_style) if (OUTFIT_JOBSPECIFIC) @@ -180,7 +194,8 @@ back = /obj/item/storage/backpack/satchel if (OUTFIT_FACTIONSPECIFIC) back = satchel_faction ? satchel_faction : satchel - if (OUTFIT_SATCHEL_ALT) // Leather Satchel + // Leather Satchel + if (OUTFIT_SATCHEL_ALT) switch(H.backbag_style) if (OUTFIT_JOBSPECIFIC) back = satchel_alt @@ -221,9 +236,10 @@ if (OUTFIT_FACTIONSPECIFIC) back = pocketbook_faction ? pocketbook_faction : pocketbook else - back = backpack //Department backpack - - if (H.backbag_color >= 2) // if theres a color switch em out for a recolorable one + // Department backpack + back = backpack + // If theres a color switch em out for a recolorable one + if (H.backbag_color >= 2) switch (H.backbag) if (OUTFIT_POCKETBOOK) back = /obj/item/storage/backpack/satchel/pocketbook/recolorable @@ -292,7 +308,8 @@ l_ear = null wrist = clipon_radio else - l_ear = headset //Department headset + // Department headset + l_ear = headset if(l_ear) equip_item(H, l_ear, slot_l_ear, callback = radio_callback) else if (wrist) @@ -305,6 +322,11 @@ // Used to equip an item to the mob. Mainly to prevent copypasta for collect_not_del. //override_collect temporarily allows equip_or_collect without enabling it for the job. Mostly used to prevent weirdness with hand equips when the player is missing one +/** + * Used to equip an item to the mob. Mainly to prevent copypasta for collect_not_del. + * + * * + */ /obj/outfit/proc/equip_item(mob/living/carbon/human/H, path, slot, var/override_collect = FALSE, var/item_color, var/datum/callback/callback) var/obj/item/I diff --git a/code/datums/underwear/underwear.dm b/code/datums/underwear/underwear.dm index 862a58cce85..c4fc6abefd5 100644 --- a/code/datums/underwear/underwear.dm +++ b/code/datums/underwear/underwear.dm @@ -8,7 +8,8 @@ * Categories * *************/ /datum/category_group/underwear - var/sort_order = 5 // Lower sort order is applied as icons first + // Lower sort order is applied as icons first + var/sort_order = 5 var/display_name var/gender = NEUTER @@ -36,7 +37,8 @@ /datum/category_group/underwear/undershirt name = "Undershirt" - sort_order = 4 // Undershirts currently have the lowest sort order because they may cover both underwear and socks. + /// Undershirts currently have the lowest sort order because they may cover both underwear and socks. + sort_order = 4 display_name = "undershirt" category_item_type = /datum/category_item/underwear/undershirt @@ -44,11 +46,16 @@ * Category entries * *******************/ /datum/category_item/underwear - var/always_last = FALSE // Should this entry be sorted last? - var/is_default = FALSE // Should this entry be considered the default for its type? - var/icon = 'icons/mob/underwear.dmi' // Which icon to get the underwear from - var/icon_state // And the particular item state - var/list/tweaks = list() // Underwear customisation + /// Should this entry be sorted last? + var/always_last = FALSE + /// Should this entry be considered the default for its type? + var/is_default = FALSE + /// Which icon to get the underwear from + var/icon = 'icons/mob/underwear.dmi' + /// And the particular item state + var/icon_state + /// Underwear customisation + var/list/tweaks = list() var/has_color = FALSE /datum/category_item/underwear/New() diff --git a/code/game/area/area_power.dm b/code/game/area/area_power.dm index beb26e7c951..f83bccc067d 100644 --- a/code/game/area/area_power.dm +++ b/code/game/area/area_power.dm @@ -20,7 +20,9 @@ return FALSE -// called when power status changes +/** + * Called when area power status changes. + */ /area/proc/power_change() SEND_SIGNAL(src, COMSIG_AREA_POWER_CHANGE) @@ -60,11 +62,15 @@ if(AREA_USAGE_ENVIRON) used_environ += amount -// Used by machines to update the area of power changes. +/** + * Used by machines to update the area of power changes. + */ /area/proc/power_use_change(old_amount, new_amount, chan) use_power(new_amount - old_amount, chan) -// Use this for one-time power draws from the area, usually for non-machines. +/** + * Use this for one-time power draws from the area, usually for non-machines. + */ /area/proc/use_power_oneoff(var/amount, var/chan) switch(chan) if(AREA_USAGE_EQUIP) @@ -74,7 +80,9 @@ if(AREA_USAGE_ENVIRON) oneoff_environ += amount -// This recomputes continued power usage; used for testing or error recovery. +/** + * This recomputes continued power usage; used for testing or error recovery. + */ /area/proc/retally_power() used_equip = 0 used_light = 0 diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 6098ac7cdeb..fc4f468ce86 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -98,7 +98,9 @@ GLOBAL_LIST_INIT(area_blurb_stated_to, list()) var/tmp/is_outside = OUTSIDE_NO -// Don't move this to Initialize(). Things in here need to run before SSatoms does. +/** + * Don't move this to Initialize(). Things in here need to run before SSatoms does. + */ /area/New() // DMMS hook - Required for areas to work properly. if (!GLOB.areas_by_type[type]) @@ -172,7 +174,14 @@ GLOBAL_LIST_INIT(area_blurb_stated_to, list()) /area/proc/is_no_crew_expected() return area_flags & AREA_FLAG_NO_CREW_EXPECTED -/area/proc/set_lightswitch(var/state) // Set lights in area. TRUE for on, FALSE for off, NULL for initial state. +/** + * Set lights in area. + * + * * state - TRUE for on, FALSE for off, NULL for initial state + * + * Returns `TRUE` + */ +/area/proc/set_lightswitch(var/state) if(isnull(state)) state = initial(lightswitch) @@ -292,7 +301,8 @@ GLOBAL_LIST_INIT(area_blurb_stated_to, list()) #define DO_PARTY(COLOR) animate(color = COLOR, time = 0.5 SECONDS, easing = QUAD_EASING) /area/update_icon() - if ((fire || eject || party || radiation_active) && (!requires_power||power_environ) && !istype(src, /area/space)) //If it doesn't require power, can still activate this proc. + // If it doesn't require power, can still activate this proc. + if ((fire || eject || party || radiation_active) && (!requires_power||power_environ) && !istype(src, /area/space)) if(radiation_active) color = "#30e63f" animate(src) // stop any current animations. @@ -404,24 +414,40 @@ GLOBAL_LIST_INIT(area_blurb_stated_to, list()) for(var/atom/movable/recipient as anything in gone.important_recursive_contents[RECURSIVE_CONTENTS_AREA_SENSITIVE]) SEND_SIGNAL(recipient, COMSIG_EXIT_AREA, src) -// Play Ambience +/** + * Plays ambiance for the provided mob. + * + * * mob/living/L - Affected mob. + */ /area/proc/play_ambience(var/mob/living/L) if((world.time >= L.client.ambience_last_played_time + 5 MINUTES) && prob(20)) var/picked_ambience = pick(ambience) L << sound(picked_ambience, volume = VOLUME_AMBIENCE, channel = CHANNEL_AMBIENCE) L.client.ambience_last_played_time = world.time -// Stop Ambience +/** + * Stops ambiance for the provided mob. + * + * * mob/living/L - Affected mob. + */ /area/proc/stop_ambience(var/mob/living/L) L << sound(null, channel = 2) -// Play Music +/** + * Plays music for the provided mob. + * + * * mob/living/L - Affected mob. + */ /area/proc/play_music(var/mob/living/L) if(src.music.len) var/picked_music = pick(music) L << sound(picked_music, volume = VOLUME_MUSIC, channel = 4) -// Stop Music +/** + * Stops music for the provided mob. + * + * * mob/living/L - Affected mob. + */ /area/proc/stop_music(var/mob/living/L) L << sound(null, channel = 4) @@ -467,8 +493,14 @@ GLOBAL_LIST_INIT(area_blurb_stated_to, list()) return FALSE return has_gravity -//A useful proc for events. -//This returns a random area of the station which is meaningful. Ie, a room somewhere +/** + * Useful proc for events. + * This returns a random area of the station which is meaningful. Ie, a room somewhere + * + * * filter_players - Default FALSE. If TRUE, skips areas without any players in them. + * + * Returns /area/ + */ /proc/random_station_area(var/filter_players = FALSE) var/list/possible = list() for(var/Y in GLOB.the_station_areas) diff --git a/code/game/atom/_atom.dm b/code/game/atom/_atom.dm index 51b823f9985..3ab96e26033 100644 --- a/code/game/atom/_atom.dm +++ b/code/game/atom/_atom.dm @@ -54,53 +54,46 @@ var/gfi_layer_rotation = GFI_ROTATION_DEFAULT /* - * EXTRA DESCRIPTIONS - * Adds additional information of different types about a given object. - * get_examine_text() in "obj\game\code\atom\atom_examine.dm" handles structure, formatting, etc. + * EXTRA DESCRIPTIONS + * Adds additional information of different types about a given object. + * get_examine_text() in "obj\game\code\atom\atom_examine.dm" handles structure, formatting, etc. * - * Most of these vars only concern objs, but they are initialized here in case any functionality - * is migrated elsewhere. + * Most of these vars only concern objs, but they are initialized here in case any functionality + * is migrated elsewhere. * - * These vars should not be set in the object definition, but in defined funcs just beneath definition. + * These vars should not be set in the object definition, but in defined funcs just beneath definition. */ - /// Text about the atom's damage/condition. - /// Gets built by children of /atom/proc/condition_hints() + /// Text about the atom's damage/condition. Gets built by children of /atom/proc/condition_hints() var/desc_damagecondition = null - /// Text about the atom's extended description, if any exists. - /// Should be a regular string. + /// Text about the atom's extended description, if any exists. Should be a regular string. var/desc_extended = null - /// Informs the user about how to use the item or about game controls. - /// Gets built by children of /atom/proc/mechanics_hints() + /// Informs the user about how to use the item or about game controls. Gets built by children of /atom/proc/mechanics_hints() var/desc_mechanics = null - /// Informs the user about how to assemble or disassemble the item. - /// Gets built by children of /atom/proc/build_hints() + /// Informs the user about how to assemble or disassemble the item. Gets built by children of /atom/proc/build_hints() var/desc_build = null - /// Blue text (SPAN_NOTICE()), informing the user about what upgrades the item has and what they do. - /// Gets built by children of /atom/proc/upgrade_hints() + /// Blue text (SPAN_NOTICE()), informing the user about what upgrades the item has and what they do. Gets built by children of /atom/proc/upgrade_hints() var/desc_upgrade = null - /// Informs the user about how they can use an object to antagonize. - /// Gets built by children of /atom/proc/antag_hints() + /// Informs the user about how they can use an object to antagonize. Gets built by children of /atom/proc/antag_hints() var/desc_antag = null - /// Feedback text. - /// Gets built by children of /atom/proc/feedback_hints() + /// Feedback text. Gets built by children of /atom/proc/feedback_hints() var/desc_feedback = null /* SSicon_update VARS */ - ///When was the last time (in `world.time`) that the icon of this atom was updated via `SSicon_update` + /// When was the last time (in `world.time`) that the icon of this atom was updated via `SSicon_update` var/tmp/last_icon_update = null - ///If the atom is currently queued to have it's icon updated in `SSicon_update` + /// If the atom is currently queued to have it's icon updated in `SSicon_update` var/tmp/icon_update_queued = FALSE - ///Delay to apply before updating the icon in `SSicon_update` + /// Delay to apply before updating the icon in `SSicon_update` var/icon_update_delay = null /// How this atom should react to having its astar blocking checked @@ -132,7 +125,7 @@ if(smoothing_flags & SMOOTH_QUEUED) SSicon_smooth.remove_from_queues(src) - //We're being destroyed, no need to update the icon + // We're being destroyed, no need to update the icon if(icon_update_queued) SSicon_update.remove_from_queue(src) @@ -142,7 +135,8 @@ if(length(atom_protected_overlay_cache)) LAZYCLEARLIST(atom_protected_overlay_cache) - orbiters = null // The component is attached to us normaly and will be deleted elsewhere + // The component is attached to us normaly and will be deleted elsewhere + orbiters = null . = ..() @@ -161,14 +155,23 @@ ricocheting_projectile.set_angle(new_angle_s) return TRUE -///Purpose: Determines if the object (or airflow) can pass this atom. -///Called by: Movement, airflow. -///Inputs: The moving atom (optional), target turf, "height" and air group -///Outputs: Boolean if can pass. -///**Please stop using this proc, use the `pass_flags_self` flags to determine what can pass unless you literally have no other choice** +/** + * Purpose: Determines if the object (or airflow) can pass this atom. + * Called by: Movement, airflow. + * + * **PLEASE STOP USING THIS PROC, use the `pass_flags_self` flags to determine what can pass unless you literally have no other choice** + * + * * atom/movable/mover - The moving atom (can be null) + * * turf/target - Target turf + * * height - "height", whatever that means. + * * air_group - air group (ZAS bullshit) + * + * Returns Boolean if can pass. + */ /atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0) - //I have condensed TG's `CanAllowThrough()` into this proc - if(mover) //Because some procs send null as a mover + // I have condensed TG's `CanAllowThrough()` into this proc + // Because some procs send null as a mover + if(mover) if(mover.movement_type & PHASING) return TRUE if(mover.pass_flags & pass_flags_self) @@ -179,7 +182,7 @@ return (!density || !height || air_group) /** - * An atom we are buckled or is contained within us has tried to move + * An atom we are buckled or is contained within us has tried to move. */ /atom/proc/relaymove(mob/living/user, direction) SHOULD_NOT_SLEEP(TRUE) diff --git a/code/game/atom/atom_examine.dm b/code/game/atom/atom_examine.dm index d91c050b727..9dad5cdf5c4 100644 --- a/code/game/atom/atom_examine.dm +++ b/code/game/atom/atom_examine.dm @@ -49,18 +49,18 @@ */ /** - * The structure of an object's examine box is as follows: - * [ Name ] [ Size ] - * [ Damage/Condition ] - * [ Description ] - * [ Extended Description*** ] - * [ Mechanics*** ] - * [ Assembly/Disassembly*** ] - * [ Upgrades*** ] - * [ Antagonist Interactions*** ] - * [ Status Feedback ] + * The structure of an object's examine box is as follows: + * [ Name ] [ Size ] + * [ Damage/Condition ] + * [ Description ] + * [ Extended Description*** ] + * [ Mechanics*** ] + * [ Assembly/Disassembly*** ] + * [ Upgrades*** ] + * [ Antagonist Interactions*** ] + * [ Status Feedback ] * -* Blocks marked with *** are collapsed by default. + * Blocks marked with *** are collapsed by default. */ /atom/proc/get_examine_text(mob/user, distance, is_adjacent, infix = "", suffix = "", show_extended) SHOULD_CALL_PARENT(TRUE) @@ -83,8 +83,9 @@ // Object name. I.e. "This is an Object. It is a normal-sized item." . += "[icon2html(src, user)] That's [f_name] [suffix]" + // Object description. if(src.desc) - . += src.desc // Object description. + . += src.desc // Returns a SPAN_* based on health, if configured. var/list/condition_hints = src.condition_hints() @@ -144,7 +145,9 @@ if(H.glasses) H.glasses.glasses_examine_atom(src, H) -// Used to check if "examine_fluff" from the HTML link in examine() is true, i.e. if it was clicked. +/** + * Used to check if "examine_fluff" from the HTML link in examine() is true, i.e. if it was clicked. + */ /atom/Topic(href, href_list) . = ..() if (.) @@ -178,6 +181,7 @@ return TRUE /** + * Builds the text block variables for get_examine_text * Builds the text block variables for get_examine_text. * Objects themselves are responsible for handling their own logic to build these hints. * See mecha.dm for an example of a system that relays hints from contained items to a parent. @@ -247,44 +251,64 @@ first_line = FALSE desc_feedback += "[feedback_hint]" -/// Should return a list() of SPAN_* strings in whatever format you like. -/// Existing style is SPAN_NOTICE for minor damage and SPAN_ALERT for anything worse. If the object's destruction -/// could have major adverse consequences, you might use SPAN_DANGER for critical damage. +/** + * Should return a list() of SPAN_* strings in whatever format you like. + * Accepted style is SPAN_NOTICE for minor damage and SPAN_ALERT for anything worse. If the object's destruction + * could have major adverse consequences, you might use SPAN_DANGER for critical damage. + */ /atom/proc/condition_hints() . = list() -/// Should return a list() of regular strings. +/** + * Should return a list() of regular strings. + */ /atom/proc/mechanics_hints() . = list() /* - * Children of assembly_hints() and disassembly_hints() should check the current state of the object, whether it - * has any eligible steps in its assembly or disassembly respectively, and if so, return hints to that end. + * Children of assembly_hints() and disassembly_hints() should check the current state of the object, whether it + * has any eligible steps in its assembly or disassembly respectively, and if so, return hints to that end. * - * It should be used to suggest steps toward or away from a completed 'form' of the object. - * For example, a table whose surface can be carpeted would have carpeting instructions in assembly_hints(). - * However, an IV drip which can have a gas tank attached to it would not have that described in assembly_hints(), - * as the IV drip itself is already 'completed,' and a gas tank is effectively just a swappable slot item for it. + * It should be used to suggest steps toward or away from a completed 'form' of the object. + * For example, a table whose surface can be carpeted would have carpeting instructions in assembly_hints(). + * However, an IV drip which can have a gas tank attached to it would not have that described in assembly_hints(), + * as the IV drip itself is already 'completed,' and a gas tank is effectively just a swappable slot item for it. * - * Look at existing objects' implementations and use your best judgement, or ask in Discord if need be! + * Look at existing objects' implementations and use your best judgement, or ask in Discord if need be! */ -/// Should return a list() of regular strings. +/** + * Should return a list() of regular strings. + * See the large comment block right above this in 'code/game/atom/atom_examine.dm' for nuanced details. + */ /atom/proc/assembly_hints(mob/user, distance, is_adjacent) . = list() -/// Should return a list() of regular strings. +/** + * Should return a list() of regular strings. + * See the large comment block right above this in 'code/game/atom/atom_examine.dm' for nuanced details. + */ /atom/proc/disassembly_hints(mob/user, distance, is_adjacent) . = list() +/** + * Should return a list() of regular strings. + */ /atom/proc/upgrade_hints(mob/user, distance, is_adjacent) . = list() -/// Should return a list() of regular strings. +/** + * Should return a list() of regular strings. + */ /atom/proc/antagonist_hints(mob/user, distance, is_adjacent) . = list() -/// Should return a list() of regular strings. It will accept SPAN_* strings, though for consistency's sake please -/// use SPAN_ALERT or SPAN_DANGER for negative/bad feedback. +/** + * Should return a list() of regular strings. It will accept SPAN_* strings, though for consistency's sake please + * use SPAN_ALERT or SPAN_DANGER for negative/bad feedback. + * + * For feedback data returning variable number values or important bools, please bold important var values for easy readability. + * Reference 'code/game/machinery/iv_drip.dm' for how bolding is used. + */ /atom/proc/feedback_hints(mob/user, distance, is_adjacent) . = list() diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm index dbefdd78f44..b65d4a0b181 100644 --- a/code/game/machinery/Beacon.dm +++ b/code/game/machinery/Beacon.dm @@ -3,7 +3,8 @@ desc = "A device that draws power from bluespace and creates a permanent tracking beacon." icon = 'icons/obj/objects.dmi' icon_state = "floor_beaconf" - level = 1 // underfloor + /// Underfloor + level = 1 layer = 2.5 anchored = TRUE idle_power_usage = 0 @@ -19,12 +20,13 @@ QDEL_NULL(beacon) return ..() - // update the invisibility and icon +/** + * Update the invisibility and icon + */ /obj/machinery/bluespace_beacon/hide(var/intact) set_invisibility(intact ? 101 : 0) update_icon() - // update the icon_state /obj/machinery/bluespace_beacon/update_icon() var/state="floor_beacon" diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 4382045aecf..99262d273a0 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -3,11 +3,16 @@ //////////////////////////////////////// #define AALARM_MODE_SCRUBBING 1 -#define AALARM_MODE_REPLACEMENT 2 //like scrubbing, but faster. -#define AALARM_MODE_PANIC 3 //constantly sucks all air -#define AALARM_MODE_CYCLE 4 //sucks off all air, then refill and switches to scrubbing -#define AALARM_MODE_FILL 5 //emergency fill -#define AALARM_MODE_OFF 6 //Shuts it all down. +/// Like scrubbing, but faster. +#define AALARM_MODE_REPLACEMENT 2 +/// Constantly sucks all air +#define AALARM_MODE_PANIC 3 +/// Sucks out all air, then refill and switches to scrubbing +#define AALARM_MODE_CYCLE 4 +/// Emergency fill +#define AALARM_MODE_FILL 5 +/// Shuts it all down. +#define AALARM_MODE_OFF 6 #define AALARM_SCREEN_MAIN 1 #define AALARM_SCREEN_VENT 2 @@ -90,7 +95,7 @@ pixel_x = -10; dir = EAST; \ pixel_x = 10; -//all air alarms in area are connected via magic +/// All air alarms in area are connected via magic /area var/list/air_vent_names = list() var/list/air_scrub_names = list() @@ -375,14 +380,18 @@ pixel_x = 10; //For colder alarms, allowing pressure to drop a bit below normal is necessary. Pressure fluctuates downwards //While temperature stabilises. -//Kitchen freezer +/** + * Kitchen freezer + */ /obj/machinery/alarm/freezer/Initialize() . = ..() TLV[GAS_OXYGEN] = list(16, 17, 135, 140) // Partial pressure, kpa TLV["pressure"] = list(ONE_ATMOSPHERE*0.50,ONE_ATMOSPHERE*0.70,ONE_ATMOSPHERE*1.10,ONE_ATMOSPHERE*1.20) TLV["temperature"] = list(0, 0, 273, T0C+40) // No lower limits. Alarm above 0c. Major alarm at harmful heat -//Refridgerated area, cold but above-freezing +/** + * Refridgerated area, cold but above-freezing + */ /obj/machinery/alarm/cold/Initialize() . = ..() TLV["pressure"] = list(ONE_ATMOSPHERE*0.70,ONE_ATMOSPHERE*0.80,ONE_ATMOSPHERE*1.10,ONE_ATMOSPHERE*1.20) /* kpa */ @@ -565,8 +574,9 @@ pixel_x = 10; environment.merge(gas) - -// Returns whether this air alarm thinks there is a breach, given the sensors that are available to it. +/** + * Returns whether this air alarm thinks there is a breach, given the sensors that are available to it. + */ /obj/machinery/alarm/proc/breach_detected() var/turf/simulated/location = loc @@ -641,7 +651,10 @@ pixel_x = 10; frequency = new_frequency radio_connection = SSradio.add_object(src, frequency, RADIO_TO_AIRALARM) -/obj/machinery/alarm/proc/send_signal(var/target, var/list/command)//sends signal 'command' to 'target'. Returns 0 if no radio connection, 1 otherwise +/** + * Sends signal 'command' to 'target'. Returns 0 if no radio connection, 1 otherwise + */ +/obj/machinery/alarm/proc/send_signal(var/target, var/list/command) if(!radio_connection) return 0 @@ -742,8 +755,10 @@ pixel_x = 10; var/remote_access = 0 if(state) var/list/href = state.href_list(user) - remote_connection = href["remote_connection"] // Remote connection means we're non-adjacent/connecting from another computer - remote_access = href["remote_access"] // Remote access means we also have the privilege to alter the air alarm. + /// Remote connection means we're non-adjacent/connecting from another computer + remote_connection = href["remote_connection"] + /// Remote access means we also have the privilege to alter the air alarm. + remote_access = href["remote_access"] data["locked"] = locked && !issilicon(user) data["remote_connection"] = remote_connection diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index b64de9531ab..3ded489fa4c 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -386,7 +386,8 @@ update_flag else can_label = 0 - air_contents.react() //cooking up air cans - add phoron and oxygen, then heat above PHORON_MINIMUM_BURN_TEMPERATURE + // Cooking up air cans - add phoron and oxygen, then heat above PHORON_MINIMUM_BURN_TEMPERATURE + air_contents.react() /obj/machinery/portable_atmospherics/canister/return_air() return air_contents @@ -454,7 +455,7 @@ update_flag var/datum/gas_mixture/thejetpack = jetpack.air_contents var/env_pressure = thejetpack.return_pressure() var/pressure_delta = min(10*ONE_ATMOSPHERE - env_pressure, (air_contents.return_pressure() - env_pressure)/2) - //Can not have a pressure delta that would cause environment pressure > tank pressure + // Cannot have a pressure delta that would cause environment pressure > tank pressure var/transfer_moles = 0 if((air_contents.temperature > 0) && (pressure_delta > 0)) transfer_moles = pressure_delta*thejetpack.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION)//Actually transfer the gas @@ -570,7 +571,9 @@ update_flag if(valve_open) log_open_userless("a signaler") -//Dirty way to fill room with gas. However it is a bit easier to do than creating some floor/engine/n2o -rastaf0 +/** + * Dirty way to fill room with gas. However it is a bit easier to do than creating some floor/engine/n2o -rastaf0 + */ /obj/machinery/portable_atmospherics/canister/sleeping_agent/roomfiller/Initialize() . = ..() air_contents.gas[GAS_N2O] = 9*4000 @@ -609,7 +612,8 @@ update_flag . = ..() src.air_contents.temperature = 303.15 -/obj/machinery/portable_atmospherics/canister/chlorine/antag // Keeping the chlorine canister with the skull on it seems fun for antags. +/// Keeping the chlorine canister with the skull on it seems fun for antags. +/obj/machinery/portable_atmospherics/canister/chlorine/antag name = "Canister: \[Cl2\]" icon_state = "poisonous" canister_color = "poisonous" diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 0e06a1ef98a..acef308e35c 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -21,7 +21,8 @@ var/toughness = 5 //sorta fragile // WIRES - var/datum/wires/camera/wires = null // Wires datum + /// Wires datum + var/datum/wires/camera/wires = null //OTHER diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm index 3bc42f3cdf7..167a7afe046 100644 --- a/code/game/machinery/camera/motion.dm +++ b/code/game/machinery/camera/motion.dm @@ -2,7 +2,8 @@ var/list/motionTargets = list() var/detectTime = 0 var/area/ai_monitored/area_motion = null - var/alarm_delay = 100 // Don't forget, there's another 10 seconds in queueAlarm() + /// Don't forget, there's another 10 seconds in queueAlarm() + var/alarm_delay = 100 movable_flags = MOVABLE_FLAG_PROXMOVE /obj/machinery/camera/proc/newTarget(var/mob/target) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 0bd4dd28b1c..cd40697a05c 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -439,7 +439,7 @@ to_chat(user, "You flip the write-protect tab to [read_only ? "protected" : "unprotected"].") /* - * Diskette Box + * Diskette Box */ /obj/item/storage/box/disks @@ -456,7 +456,7 @@ new /obj/item/disk/data(src) /* - * Manual -- A big ol' manual. + * Manual -- A big ol' manual. */ /obj/item/paper/Cloning diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm index 61861e1765b..606aa53ed27 100644 --- a/code/game/machinery/doors/blast_door.dm +++ b/code/game/machinery/doors/blast_door.dm @@ -23,7 +23,7 @@ /// Turning this off prevents awkward zone geometry in places like medbay lobby, for example. block_air_zones = 0 - // Icon states for different shutter types. Simply change this instead of rewriting the update_icon proc. + /// Icon states for different shutter types. Simply change this instead of rewriting the update_icon proc. var/icon_state_open = null var/icon_state_opening = null var/icon_state_closed = null @@ -37,7 +37,8 @@ var/datum/wifi/receiver/button/door/wifi_receiver var/securitylock = TRUE - var/fail_secure = FALSE // If the blast door should close when power goes out. + /// If the blast door should close when power goes out. + var/fail_secure = FALSE /obj/machinery/door/blast/Initialize() . = ..() @@ -52,17 +53,20 @@ QDEL_NULL(wifi_receiver) return ..() -// Proc: Bumped() -// Parameters: 1 (AM - Atom that tried to walk through this object) -// Description: If we are open returns zero, otherwise returns result of parent function. +/** + * If are open, return zero. Otherwise return result of parent function. + * + * * atom/bumped_atom - Atom that tried to walk through this object + */ /obj/machinery/door/blast/CollidedWith(atom/bumped_atom) if(!density) return ..() else return 0 -// Proc: update_icon() -// Parameters: None -// Description: Updates icon of this object. Uses icon state variables. + +/** + * Updates icon of this object. Uses icon state variables. + */ /obj/machinery/door/blast/update_icon() if(density) icon_state = icon_state_closed @@ -70,9 +74,9 @@ icon_state = icon_state_open return -// Proc: force_open() -// Parameters: None -// Description: Opens the door. No checks are done inside this proc. +/** + * Opens the door. No checks are done inside this proc. + */ /obj/machinery/door/blast/proc/force_open() src.operating = 1 playsound(src.loc, open_sound, 100, 1) @@ -85,9 +89,9 @@ src.layer = open_layer src.operating = 0 -// Proc: force_close() -// Parameters: None -// Description: Closes the door. No checks are done inside this proc. +/** + * Closes the door. No checks are done inside this proc. + */ /obj/machinery/door/blast/proc/force_close() if(density) return 0 @@ -102,19 +106,23 @@ sleep(15) src.operating = 0 -// Proc: force_toggle() -// Parameters: None -// Description: Opens or closes the door, depending on current state. No checks are done inside this proc. +/** + * Opens or closes the door, depending on current state. No checks are done inside this proc. + */ /obj/machinery/door/blast/proc/force_toggle() if(src.density) src.force_open() else src.force_close() -// Proc: attackby() -// Parameters: 2 (C - Item this object was clicked with, user - Mob which clicked this object) -// Description: If we are clicked with crowbar or wielded fire axe, try to manually open the door. -// This only works on broken doors or doors without power. Also allows repair with Plasteel. +/** + * If we are clicked with crowbar, wielded fire axe, etc., try to manually open the door. + * This only works on broken doors or doors without power. + * Also allows repair with Plasteel. + * + * * obj/item/attacking_item - Item this object was clicked with + * * mob/user - Mob which clicked this object + */ /obj/machinery/door/blast/attackby(obj/item/attacking_item, mob/user) if(!istype(attacking_item, /obj/item/forensics)) src.add_fingerprint(user) @@ -130,7 +138,6 @@ return TRUE - if(attacking_item.ishammer() || istype(attacking_item, /obj/item/crowbar/hydraulic_rescue_tool)) if(((stat & NOPOWER) || (stat & BROKEN)) && !src.operating) force_toggle() @@ -157,11 +164,9 @@ to_chat(usr, SPAN_WARNING("You don't have enough sheets to repair this! You need at least [amt] sheets.")) return TRUE - - -// Proc: open() -// Parameters: None -// Description: Opens the door. Does necessary checks. Automatically closes if autoclose is true +/** + * Opens the door. Does necessary checks. Automatically closes if autoclose is true. + */ /obj/machinery/door/blast/open() if (src.operating || (stat & BROKEN || stat & NOPOWER)) return @@ -170,9 +175,9 @@ addtimer(CALLBACK(src, PROC_REF(close)), 15 SECONDS) return 1 -// Proc: close() -// Parameters: None -// Description: Closes the door. Does necessary checks. +/** + * Closes the door. Does necessary checks. + */ /obj/machinery/door/blast/close() if (src.operating || (stat & BROKEN || stat & NOPOWER)) return @@ -183,9 +188,9 @@ take_damage(damage*0.2) -// Proc: repair() -// Parameters: None -// Description: Fully repairs the blast door. +/** + * Fully repairs the blast door. + */ /obj/machinery/door/blast/proc/repair() health = maxhealth if(stat & BROKEN) @@ -195,13 +200,16 @@ if(air_group) return 1 return ..() -// Controls how blast doors and shutters should act when power is lost or gained. +/** + * Controls how blast doors and shutters should act when power is lost or restored. + */ /obj/machinery/door/blast/power_change() ..() if(src.operating || (stat & BROKEN)) return + // Blast doors will only re-open when power is restored if they were open originally. if((stat & NOPOWER) && fail_secure) - securitylock = !density // Blast doors will only re-open when power is restored if they were open originally. + securitylock = !density INVOKE_ASYNC(src, PROC_REF(force_close)) else if(securitylock && fail_secure) INVOKE_ASYNC(src, PROC_REF(force_open)) @@ -213,7 +221,8 @@ // SUBTYPE: Regular // Your classical blast door, found almost everywhere. /obj/machinery/door/blast/regular - name = "blast door" //Because SDMM doesn't recognise the name otherwise, for some reason + //Because SDMM doesn't recognise the name otherwise, for some reason + name = "blast door" icon_state_open = "pdoor0" icon_state_opening = "pdoorc0" icon_state_closed = "pdoor1" @@ -223,7 +232,8 @@ block_air_zones = 1 /obj/machinery/door/blast/regular/open - name = "blast door" //Because SDMM doesn't recognise the name otherwise, for some reason + //Because SDMM doesn't recognise the name otherwise, for some reason + name = "blast door" icon_state = "pdoor0" density = FALSE opacity = FALSE @@ -257,7 +267,8 @@ block_air_zones = 1 /obj/machinery/door/blast/odin/open - name = "blast door" //Because SDMM doesn't recognise the name otherwise, for some reason + //Because SDMM doesn't recognise the name otherwise, for some reason + name = "blast door" icon_state = "pdoor0" density = 0 opacity = 0 diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 233290f6e2f..ccb6980b5e6 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -15,16 +15,21 @@ opacity = 0 density = 0 layer = OPEN_DOOR_LAYER - open_layer = OPEN_DOOR_LAYER // Just below doors when open - closed_layer = ABOVE_DOOR_LAYER // Just above doors when closed + /// Just below doors when open + open_layer = OPEN_DOOR_LAYER + /// Just above doors when closed + closed_layer = ABOVE_DOOR_LAYER - //These are frequenly used with windows, so make sure zones can pass. - //Generally if a firedoor is at a place where there should be a zone boundery then there will be a regular door underneath it. + /* + * These are frequently used with windows, so make sure zones can pass. + * Generally if a firedoor is at a place where there should be a zone boundary then there will be a regular door underneath it. + */ block_air_zones = 0 hashatch = 1 var/blocked = 0 - var/lockdown = 0 // When the door has detected a problem, it locks. + /// When the door has detected a problem, it locks. + var/lockdown = 0 var/pdiff_alert = 0 var/pdiff = 0 var/nextstate = null @@ -39,16 +44,19 @@ idle_power_usage = 5 dir = SOUTH - turf_hand_priority = 2 //Lower priority than normal doors to prevent interference + /// Lower priority than normal doors to prevent interference + turf_hand_priority = 2 - /// Enables smart generation of firedoor dir. - /// So it automatically aligns to face same dir as the door above it, etc. + /** + * Enables smart generation of firedoor dir. + * Makes it automatically aligns to face same dir as the door above it, etc. + */ var/enable_smart_generation = TRUE var/list/tile_info[4] var/list/dir_alerts[4] // 4 dirs, bitflags - // MUST be in same order as FIREDOOR_ALERT_* + /// MUST be in same order as FIREDOOR_ALERT_* var/list/ALERT_STATES=list( "hot", "cold" @@ -170,7 +178,7 @@ dir = SOUTH return . - // face same dir as door if on the same tile + /// Face same dir as door if on the same tile var/obj/machinery/door/airlock/door = locate(/obj/machinery/door/airlock, current_turf) if(istype(door)) dir = door.dir @@ -207,15 +215,17 @@ /obj/machinery/door/firedoor/attack_hand(mob/user as mob) add_fingerprint(user) + // Already doing something. if(operating) - return//Already doing something. + return if(blocked) to_chat(user, SPAN_WARNING("\The [src] is welded solid!")) return var/alarmed = lockdown - for(var/area/A in areas_added) //Checks if there are fire alarms in any areas associated with that firedoor + // Checks if there are fire alarms in any areas associated with that firedoor + for(var/area/A in areas_added) if(A.fire || A.air_doors_activated) alarmed = 1 if(user.incapacitated() || (get_dist(src, user) > 1 && !issilicon(user))) @@ -232,7 +242,8 @@ close(1) return - if(density && (stat & (BROKEN|NOPOWER))) //can still close without power + // Can still close without power + if(density && (stat & (BROKEN|NOPOWER))) to_chat(user, "\The [src] is not functioning, you'll have to force it open manually.") return @@ -273,8 +284,9 @@ /obj/machinery/door/firedoor/attackby(obj/item/attacking_item, mob/user) if(!istype(attacking_item, /obj/item/forensics)) add_fingerprint(user) + // Already doing something. if(operating) - return TRUE // Already doing something. + return TRUE if(attacking_item.iswelder() && !repairing) var/obj/item/weldingtool/WT = attacking_item if(WT.isOn()) @@ -365,9 +377,13 @@ return ..() // CHECK PRESSURE +/** + * Regular pressure checks. Has a +10s delay between each check. + */ /obj/machinery/door/firedoor/process() if(density && next_process_time <= world.time) - next_process_time = world.time + 100 // 10 second delays between process updates + // 10 second delays between process updates. + next_process_time = world.time + 100 var/changed = 0 lockdown=0 // Pressure alerts @@ -377,18 +393,21 @@ lockdown = 1 if(!pdiff_alert) pdiff_alert = 1 - changed = 1 // update_icon() + // update_icon() + changed = 1 else if(pdiff_alert) pdiff_alert = 0 - changed = 1 // update_icon() + // update_icon() + changed = 1 tile_info = getCardinalAirInfo(src.loc,list("temperature","pressure")) var/old_alerts = dir_alerts for(var/index = 1; index <= 4; index++) var/list/tileinfo=tile_info[index] + // Bad data. if(tileinfo==null) - continue // Bad data. + continue var/celsius = convert_k2c(tileinfo[1]) var/alerts = 0 @@ -447,8 +466,9 @@ update_icon() if(!forced) + // Needs power to open unless it was forced if(stat & (BROKEN|NOPOWER)) - return //needs power to open unless it was forced + return else use_power_oneoff(360) else diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 22c6a7e7e2e..94f1689be33 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -1,8 +1,8 @@ /* Holograms! * Contains: - * Holopad - * Hologram - * Other stuff + * * Holopad + * * Hologram + * * Other stuff */ /* diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index afd01ebd770..d312533cf99 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -10,20 +10,21 @@ var/last_full // Spam check var/last_warning - // Blood Stuff + /// Blood Stuff var/mob/living/carbon/human/attached = null var/obj/item/organ/external/vein = null var/obj/item/reagent_containers/beaker = null var/transfer_amount = REM var/transfer_limit = 4 - var/mode = TRUE // TRUE is injecting, FALSE is taking blood. + /// TRUE is injecting, FALSE is taking blood. + var/mode = TRUE var/toggle_stop = TRUE var/blood_message_sent = FALSE var/attach_delay = 5 var/armor_check = TRUE var/adv_scan = FALSE - // Supplemental Gas Stuff + /// Supplemental Gas Stuff var/mob/living/carbon/human/breather = null var/obj/item/clothing/mask/breath/breath_mask = null var/obj/item/tank/tank = null @@ -32,13 +33,14 @@ var/list/tank_blacklist = list(/obj/item/tank/emergency_oxygen, /obj/item/tank/jetpack) var/valve_open = FALSE var/tank_active = FALSE - var/epp = TRUE // Emergency Positive Pressure system. Can be toggled if you want to turn it off + /// Emergency Positive Pressure system. Can be toggled if you want to turn it off + var/epp = TRUE var/epp_active = FALSE - //Matrix stuff + /// Matrix stuff var/matrix/iv_matrix - //What we accept as a container for IV transfers. Prevents attaching food and organs to IVs. + /// What we accept as a container for IV transfers. Prevents attaching food and organs to IVs. var/list/accepted_containers = list( /obj/item/reagent_containers/blood, /obj/item/reagent_containers/glass/beaker, diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 21e6b92e397..92a15699211 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -138,11 +138,15 @@ Class Procs: var/clicksound //played sound on usage var/clickvol = 40 //volume - var/obj/item/device/assembly/signaler/signaler // signaller attached to the machine - var/obj/effect/overmap/visitable/linked // overmap sector the machine is linked to + /// Signaller attached to the machine + var/obj/item/device/assembly/signaler/signaler + /// Overmap sector the machine is linked to + var/obj/effect/overmap/visitable/linked - /// Manufacturer of this machine. Used for TGUI themes, when you have a base type and subtypes with different themes (like the coffee machine). - /// Pass the manufacturer in ui_data and then use it in the UI. + /** + * Manufacturer of this machine. Used for TGUI themes, when you have a base type and subtypes with different themes (like the coffee machine). + * Pass the manufacturer in ui_data and then use it in the UI. + */ var/manufacturer = null /obj/machinery/feedback_hints(mob/user, distance, is_adjacent) diff --git a/code/game/machinery/telecomms/telecommunications.dm b/code/game/machinery/telecomms/telecommunications.dm index 5c87475921d..86eb1ec5437 100644 --- a/code/game/machinery/telecomms/telecommunications.dm +++ b/code/game/machinery/telecomms/telecommunications.dm @@ -174,7 +174,7 @@ STOP_PROCESSING_MACHINE(src, MACHINERY_PROCESS_SELF) /** - * Previous implementation was to run EMP proc then restore, but was very buggy. This is a rudimentary alternate implementation, just flags processors to crap out. + * Previous implementation was to run EMP proc then restore, but was very buggy. This is a rudimentary alternate implementation, just flags processors to crap out. */ /obj/machinery/telecomms/proc/ion_storm() var/duration = 270 + rand(1,60) @@ -290,8 +290,8 @@ return signal && (!freq_listening.len || (signal.frequency in freq_listening)) /* - * Reception range of telecomms machines is limited via overmap_range - * Returns distance, not a boolean value, so don't do !get_reception or so help me god + * Reception range of telecomms machines is limited via overmap_range + * Returns distance, not a boolean value, so don't do !get_reception or so help me god */ /obj/machinery/telecomms/proc/get_signal_dist(datum/signal/subspace/signal) if(!SSatlas.current_map.use_overmap || !istype(linked) || !istype(signal.sector)) diff --git a/code/game/objects/items/devices/PDA/radio.dm b/code/game/objects/items/devices/PDA/radio.dm index 9abd8fafd1c..f7cac470ecc 100644 --- a/code/game/objects/items/devices/PDA/radio.dm +++ b/code/game/objects/items/devices/PDA/radio.dm @@ -36,7 +36,7 @@ return /* - * Radio Cartridge, essentially a signaler. + * Radio Cartridge, essentially a signaler. */ diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index 8dab24a86da..563d215c1b4 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -1,11 +1,11 @@ /* Glass stack types * Contains: - * Glass sheets - * Reinforced glass sheets - * Wired glass sheets - * Phoron Glass Sheets - * Reinforced Phoron Glass Sheets (AKA Holy fuck strong windows) - * Glass shards - TODO: Move this into code/game/object/item/weapons + * * Glass sheets + * * Reinforced glass sheets + * * Wired glass sheets + * * Phoron Glass Sheets + * * Reinforced Phoron Glass Sheets (AKA Holy fuck strong windows) + * * Glass shards - TODO: Move this into code/game/object/item/weapons */ /* diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index 299558baabd..8d6e0f6c7e8 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -1,9 +1,9 @@ /* Diffrent misc types of tiles * Contains: - * Prototype - * Grass - * Wood - * Carpet + * * Prototype + * * Grass + * * Wood + * * Carpet */ #define TILE_MATERIAL_AMOUNT 468 diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 11d7a965add..bba8b5050d4 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1,24 +1,24 @@ /* Toys! * Contains: - * Balloons - * Fake telebeacon - * Fake singularity - * Toy gun - * Toy crossbow - * Toy swords - * Toy bosun's whistle - * Toy mechs - * Snap pops - * Water flower - * Therapy dolls - * Toddler doll - * Inflatable duck - * Action figures - * Plushies - * Toy cult sword - * Ring bell - * Chess Pieces - * Stress ball + * * Balloons + * * Fake telebeacon + * * Fake singularity + * * Toy gun + * * Toy crossbow + * * Toy swords + * * Toy bosun's whistle + * * Toy mechs + * * Snap pops + * * Water flower + * * Therapy dolls + * * Toddler doll + * * Inflatable duck + * * Action figures + * * Plushies + * * Toy cult sword + * * Ring bell + * * Chess Pieces + * * Stress ball */ diff --git a/code/game/objects/items/weapons/RFD.dm b/code/game/objects/items/weapons/RFD.dm index da72335089d..15e3a0e71f2 100644 --- a/code/game/objects/items/weapons/RFD.dm +++ b/code/game/objects/items/weapons/RFD.dm @@ -42,10 +42,11 @@ ABSTRACT_TYPE(/obj/item/rfd) */ var/list/radial_modes = list() - var/stored_matter = 30 // Starts of full. + /// Starts off full. + var/stored_matter = 30 var/working = FALSE - ///The mode the RFD is currently operating in + /// The mode the RFD is currently operating in var/mode = RFD_FLOORS_AND_WALL var/number_of_modes = 1 @@ -77,13 +78,19 @@ ABSTRACT_TYPE(/obj/item/rfd) /obj/item/rfd/proc/can_use(var/mob/user,var/turf/T) return (user.Adjacent(T) && user.get_active_hand() == src && !user.stat && !user.restrained()) +/** + * Changes RFD mode. + */ /obj/item/rfd/attack_self(mob/user) - //Change the mode + // Change the mode if(++mode > number_of_modes) mode = RFD_FLOORS_AND_WALL to_chat(user, SPAN_NOTICE("The mode selection dial is now at [modes[mode]].")) playsound(get_turf(src), 'sound/weapons/laser_safetyon.ogg', 50, FALSE) +/** + * If attacked with a Compressed Matter Cartridge, refill the RFD by 10. + */ /obj/item/rfd/attackby(obj/item/attacking_item, mob/user) if(istype(attacking_item, /obj/item/rfd_ammo)) if((stored_matter + 10) > 30) @@ -97,7 +104,8 @@ ABSTRACT_TYPE(/obj/item/rfd) update_icon() return TRUE - if(attacking_item.isscrewdriver()) // Turning it into a crossbow + // Turning it into a crossbow, as you do. + if(attacking_item.isscrewdriver()) crafting = !crafting if(!crafting) to_chat(user, SPAN_NOTICE("You reassemble the RFD.")) @@ -107,7 +115,8 @@ ABSTRACT_TYPE(/obj/item/rfd) return TRUE if(crafting) - var/obj/item/crossbow // the thing we're gonna add, check what it is below + // The thing we're gonna add, check what it is below + var/obj/item/crossbow if(istype(attacking_item, /obj/item/crossbowframe)) var/obj/item/crossbowframe/F = attacking_item if(F.buildstate != 5) @@ -126,7 +135,8 @@ ABSTRACT_TYPE(/obj/item/rfd) if(crossbow) qdel(crossbow) - var/obj/item/gun/launcher/crossbow/RFD/CB = new(get_turf(user)) // Can be found in "crossbow.dm". + // Can be found in "crossbow.dm". + var/obj/item/gun/launcher/crossbow/RFD/CB = new(get_turf(user)) forceMove(CB) CB.stored_matter = src.stored_matter user.drop_from_inventory(src) @@ -143,11 +153,16 @@ ABSTRACT_TYPE(/obj/item/rfd) update_icon() return TRUE -/obj/item/rfd/update_icon() // For the fancy "ammo" counter. + // For the fancy "ammo" counter. +/** + * Adds a fancy ammo counter. + */ +/obj/item/rfd/update_icon() CutOverlays() var/ratio = 0 - ratio = stored_matter / 30 //30 is the hardcoded max capacity of the RFD + /// 30 is the hardcoded max capacity of the RFD + ratio = stored_matter / 30 ratio = max(round(ratio, 0.10) * 100, 10) AddOverlays("[icon_state]-[ratio]") @@ -184,7 +199,7 @@ ABSTRACT_TYPE(/obj/item/rfd) var/can_rwall = FALSE var/disabled = FALSE - ///A list of types that will be sent to the alter_atom proc if we click on them, rather than their turf. + /// A list of types that will be sent to the alter_atom proc if we click on them, rather than their turf. var/list/valid_atoms = list( /obj/machinery/door/airlock, /obj/structure/window_frame, @@ -239,7 +254,8 @@ ABSTRACT_TYPE(/obj/item/rfd) if(working) return FALSE - var/turf/T = isturf(A) ? A : null // the lower istypes will return false if T is null, which means we don't have to check whether it's an atom or a turf + // The lower istypes will return false if T is null, which means we don't have to check whether it's an atom or a turf + var/turf/T = isturf(A) ? A : null if(mode == RFD_FLOORS_AND_WALL) if(istype(T, /turf/space) || istype(T, T.baseturf)) build_cost = 1 @@ -354,7 +370,8 @@ ABSTRACT_TYPE(/obj/item/rfd) build_cost = null build_delay = null build_type = null - build_atom = null // So that it resets and any unintended functionality is avoided. + /// So that it resets and any unintended functionality is avoided. + build_atom = null return TRUE /obj/item/rfd/construction/borg @@ -380,7 +397,8 @@ ABSTRACT_TYPE(/obj/item/rfd) return (user.Adjacent(T) && !user.stat) /obj/item/rfd/construction/mounted/useResource(var/amount, var/mob/user) - var/cost = (amount * 130) // So that a rig with default powercell can build ~2.5x the stuff a fully-loaded RFD-C can. + /// So that a rig with default powercell can build ~2.5x the stuff a fully-loaded RFD-C can. + var/cost = (amount * 130) if(istype(loc, /obj/item/rig_module)) var/obj/item/rig_module/module = loc if(module.holder && module.holder.cell) @@ -692,9 +710,12 @@ ABSTRACT_TYPE(/obj/item/rfd) item_state = "rfd-p" modes = list(STANDARD_PIPE, SUPPLY_PIPE, SCRUBBER_PIPE, FUEL_PIPE, AUX_PIPE, DEVICES) var/selected_mode = STANDARD_PIPE - var/pipe_examine = "Pipe" // used in the examine proc to see what you're putting down at a glance - var/selected_pipe = 0 // default is standard pipe, used for the new pipe creation - build_cost = 1 // this RFD only uses 1 unit of power per pipe, but can be modified if need be in future + /// Used in the examine proc to see what you're putting down at a glance + var/pipe_examine = "Pipe" + /// Default is standard pipe, used for the new pipe creation + var/selected_pipe = 0 + /// This RFD only uses 1 unit of power per pipe, but can be modified if need be in future. + build_cost = 1 build_delay = 10 // The numbers below refer to the numberized designator for each pipe, which is used in obj/item/pipe's new diff --git a/code/game/objects/items/weapons/autopsy.dm b/code/game/objects/items/weapons/autopsy.dm index eec2b878b92..161c3273963 100644 --- a/code/game/objects/items/weapons/autopsy.dm +++ b/code/game/objects/items/weapons/autopsy.dm @@ -18,8 +18,10 @@ var/timeofdeath = null /datum/autopsy_data_scanner - var/weapon = null // this is the DEFINITE weapon type that was used - var/list/organs_scanned = list() // this maps a number of scanned organs to the wounds to those organs with this data's weapon type + /// The DEFINITE weapon type that was used. + var/weapon = null + /// This maps a number of scanned organs to the wounds to those organs with this data's weapon type. + var/list/organs_scanned = list() var/organ_names = "" /datum/autopsy_data @@ -84,7 +86,8 @@ var/datum/autopsy_data_scanner/D = wdata[wdata_idx] var/total_hits = 0 var/total_score = 0 - var/list/weapon_chances = list() // maps weapon names to a score + // Maps weapon names to a score + var/list/weapon_chances = list() var/age = 0 for(var/wound_idx in D.organs_scanned) @@ -105,7 +108,7 @@ var/damaging_weapon = (total_score != 0) - // total score happens to be the total damage + // Total score happens to be the total damage switch(total_score) if(0) damage_desc = "Unknown" diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index adc4e7084f7..0de304aae2b 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -1,9 +1,9 @@ /* Cards * Contains: - * DATA CARD - * ID CARD - * FINGERPRINT CARD HOLDER - * FINGERPRINT CARD + * * DATA CARD + * * ID CARD + * * FINGERPRINT CARD HOLDER + * * FINGERPRINT CARD */ @@ -22,7 +22,8 @@ w_class = WEIGHT_CLASS_TINY var/associated_account_number = 0 var/list/files = list( ) - var/last_flash = 0 //Spam limiter. + /// Spam limiter. + var/last_flash = 0 drop_sound = 'sound/items/drop/card.ogg' pickup_sound = 'sound/items/pickup/card.ogg' @@ -119,7 +120,8 @@ overlay_state = "id" var/list/access = list() - var/registered_name = ID_CARD_UNSET // The name registered_name on the card + /// The name registered_name on the card. + var/registered_name = ID_CARD_UNSET var/datum/weakref/mob_id slot_flags = SLOT_ID @@ -131,7 +133,8 @@ var/sex = ID_CARD_UNSET var/icon/front var/icon/side - var/mining_points //miners gotta eat + /// Miners gotta eat. + var/mining_points var/can_copy_access = FALSE var/access_copy_msg @@ -139,9 +142,13 @@ var/flipped = 0 var/wear_over_suit = 0 - //alt titles are handled a bit weirdly in order to unobtrusively integrate into existing ID system - var/assignment = null //can be alt title or the actual job - var/rank = null //actual job + /** + * Alt titles are handled a bit weirdly in order to unobtrusively integrate into existing ID system + * Can be alt title or the actual job. + */ + var/assignment = null + /// Actual job. + var/rank = null var/employer_faction = null var/datum/ntnet_user/chat_user @@ -159,7 +166,8 @@ /obj/item/card/id/on_slotmove(var/mob/living/user, slot) . = ..(user, slot) - BITSET(user.hud_updateflag, ID_HUD) //Update ID HUD if an ID is ever moved + // Update ID HUD if an ID is ever moved + BITSET(user.hud_updateflag, ID_HUD) /obj/item/card/id/proc/prevent_tracking() return 0 @@ -248,7 +256,8 @@ return /obj/item/card/id/proc/id_flash(var/mob/user, var/add_text = "", var/blind_add_text = "") - var/list/id_viewers = viewers(3, user) // or some other distance - this distance could be defined as a var on the ID + /// Or some other distance - could be defined as a var on the ID. + var/list/id_viewers = viewers(3, user) var/message = "[user] flashes [user.get_pronoun("his")] [icon2html(src, id_viewers)] [src.name]." var/blind_message = "You flash your [icon2html(src, id_viewers)] [src.name]." if(add_text != "") @@ -258,16 +267,13 @@ user.visible_message(message, blind_message) /obj/item/card/id/attack(mob/living/target_mob, mob/living/user, target_zone) - if(user.zone_sel.selecting == BP_R_HAND || user.zone_sel.selecting == BP_L_HAND) - if(!ishuman(target_mob)) return ..() if (dna_hash == ID_CARD_UNSET && ishuman(user)) var/response = alert(user, "This ID card has not been imprinted with biometric data. Would you like to imprint [target_mob]'s now?", "Biometric Imprinting", "Yes", "No") if (response == "Yes") - if (!user.Adjacent(target_mob) || user.restrained() || user.lying || user.stat) to_chat(user, SPAN_WARNING("You must remain adjacent to [target_mob] to scan their biometric data.")) return @@ -594,7 +600,6 @@ ..() // Contractor cards - /obj/item/card/id/idris name = "\improper Idris Incorporated identification card" desc = "A high-tech holocard, designed to project information about a sub-contractor from Idris Incorporated." diff --git a/code/game/objects/items/weapons/chaplain_items.dm b/code/game/objects/items/weapons/chaplain_items.dm index ccab93ad912..4d0e4f7b187 100644 --- a/code/game/objects/items/weapons/chaplain_items.dm +++ b/code/game/objects/items/weapons/chaplain_items.dm @@ -16,9 +16,12 @@ throw_range = 4 throwforce = 10 w_class = WEIGHT_CLASS_SMALL - var/can_change_form = TRUE // For holodeck check. - var/cooldown = 0 // Floor tap cooldown. - var/list/null_choices = list( //Generic nullrods only here, religion-specific ones should be on the religion datum + /// For holodeck check. + var/can_change_form = TRUE + /// Floor tap cooldown. + var/cooldown = 0 + /// Generic nullrods only here, religion-specific ones should be on the religion datum + var/list/null_choices = list( "Null Rod" = /obj/item/nullrod, "Null Staff" = /obj/item/nullrod/staff, "Null Orb" = /obj/item/nullrod/orb, @@ -41,7 +44,7 @@ icon_state = "tribunalrod" item_state = "tribunalrod" -// Unreassembleable Variant for the Holodeck +/// Unreassembleable Variant for the Holodeck /obj/item/nullrod/dominia/holodeck can_change_form = FALSE diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 7358b5c3881..462d5edf486 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -156,7 +156,8 @@ ABSTRACT_TYPE(/obj/item/clothing/mask/smokable) var/icon_on var/icon_off var/type_butt = null - var/chem_volume = 15 //Size of a syringe + /// Size of a syringe + var/chem_volume = 15 var/genericmes = "USER lights NAME with FLAME" var/matchmes = "USER lights NAME with FLAME" var/lightermes = "USER lights NAME with FLAME" @@ -165,14 +166,17 @@ ABSTRACT_TYPE(/obj/item/clothing/mask/smokable) var/ignitermes = "USER lights NAME with FLAME" var/initial_volume = 0 var/burn_rate = 0 - var/last_drag = 0 //Spam limiter for audio/message when taking a drag of cigarette. + /// Spam limiter for audio/message when taking a drag of cigarette. + var/last_drag = 0 drop_sound = 'sound/items/drop/food.ogg' pickup_sound = 'sound/items/pickup/food.ogg' /obj/item/clothing/mask/smokable/Initialize() . = ..() - atom_flags |= ATOM_FLAG_NO_REACT // so it doesn't react until you light it - create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15 + // So it doesn't react until you light it + atom_flags |= ATOM_FLAG_NO_REACT + // Making the cigarette a chemical holder with a maximum volume of 15 + create_reagents(chem_volume) /obj/item/clothing/mask/smokable/process() if(reagents && reagents.total_volume && burn_rate && !istype(loc, /obj/item/storage)) @@ -712,7 +716,8 @@ ABSTRACT_TYPE(/obj/item/clothing/mask/smokable) drop_sound = 'sound/items/drop/card.ogg' pickup_sound = 'sound/items/pickup/card.ogg' surgerysound = 'sound/items/surgery/cautery.ogg' - var/last_open = 0 //prevent message spamming. + /// Spam limiter. + var/last_open = 0 var/last_close = 0 var/flame_light_range = 1 var/flame_light_power = 2 diff --git a/code/game/objects/items/weapons/dice.dm b/code/game/objects/items/weapons/dice.dm index f01bd4c905c..8a7a57b65c6 100644 --- a/code/game/objects/items/weapons/dice.dm +++ b/code/game/objects/items/weapons/dice.dm @@ -8,10 +8,13 @@ max_amount = 6 base_icon = "d6" - var/side_mult = 1 // Used for d100s. + /// Used for d100s. + var/side_mult = 1 var/sides = 6 - var/weight_roll = 0 // chance of the dice falling on its favored number - var/favored_number = 1 //related to the var above + /// Chance of the dice falling on its favored number + var/weight_roll = 0 + /// Related to the var above. + var/favored_number = 1 /obj/item/stack/dice/Initialize() . = ..() diff --git a/code/game/objects/items/weapons/landmines.dm b/code/game/objects/items/weapons/landmines.dm index 030ccb24d86..3a935ca54d0 100644 --- a/code/game/objects/items/weapons/landmines.dm +++ b/code/game/objects/items/weapons/landmines.dm @@ -5,7 +5,8 @@ icon_state = "landmine" throwforce = 0 var/deployed = FALSE - var/deactivated = FALSE // add wire to re-activate + /// Add wire to re-activate + var/deactivated = FALSE /obj/item/landmine/Initialize() . = ..() diff --git a/code/game/objects/items/weapons/material/twohanded.dm b/code/game/objects/items/weapons/material/twohanded.dm index a4fd59e2660..93c4f3cd6a8 100644 --- a/code/game/objects/items/weapons/material/twohanded.dm +++ b/code/game/objects/items/weapons/material/twohanded.dm @@ -1,8 +1,8 @@ /* Two-handed Weapons * Contains: - * Twohanded - * Fireaxe - * Double-Bladed Energy Swords + * * Twohanded + * * Fireaxe + * * Double-Bladed Energy Swords */ /*################################################################## diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index cc2cd4aa8ab..c5c22eb0f25 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -19,6 +19,7 @@ var/mopping = 0 var/mopcount = 0 var/cleantime = 25 + /// Spam limiter. var/last_clean var/clean_msg = FALSE @@ -49,7 +50,8 @@ if(clean_msg) to_chat(user, SPAN_NOTICE("Your mop is dry!")) return - if(!(last_clean && world.time < last_clean + 120)) //spam is bad + // Spam is bad + if(!(last_clean && world.time < last_clean + 120)) user.visible_message(SPAN_WARNING("[user] begins to mop \the [get_turf(A)].")) clean_msg = TRUE last_clean = world.time @@ -86,9 +88,12 @@ throwforce = 14 throw_range = 8 cleantime = 15 - var/refill_enabled = TRUE //Self-refill toggle for when a janitor decides to mop with something other than water. - var/refill_rate = 0.5 //Rate per process() tick mop refills itself - var/refill_reagent = /singleton/reagent/water //Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING + // Self-refill toggle for when a janitor decides to mop with something other than water. + var/refill_enabled = TRUE + /// Rate per process() tick mop refills itself. W/ max volume 30, fully replenish in 120s (at 2s ticks) + var/refill_rate = 0.5 + // Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING + var/refill_reagent = /singleton/reagent/water /obj/item/mop/advanced/feedback_hints(mob/user, distance, is_adjacent) . += ..() diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index 184c54fe42b..93b9eea7f63 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -15,8 +15,10 @@ unacidable = 0 atom_flags = ATOM_FLAG_OPEN_CONTAINER fragile = 0 - var/paint_reagent = null //name of the reagent responsible for colouring the paint - var/paint_type = null //used for colouring detective technicolor coat and hat + /// Name of the reagent responsible for colouring the paint. + var/paint_reagent = null + /// Used for colouring detective technicolor coat and hat. + var/paint_type = null reagents_to_add = list(/singleton/reagent/paint = 4/5) /obj/item/reagent_containers/glass/paint/Initialize() diff --git a/code/game/objects/items/weapons/power_cells.dm b/code/game/objects/items/weapons/power_cells.dm index fc1932c07c1..b2166a1844e 100644 --- a/code/game/objects/items/weapons/power_cells.dm +++ b/code/game/objects/items/weapons/power_cells.dm @@ -11,10 +11,13 @@ throw_speed = 3 throw_range = 5 w_class = WEIGHT_CLASS_NORMAL - var/charge = 0 // note %age conveted to actual charge in New + /// Note %age converted to actual charge in New() + var/charge = 0 var/maxcharge = 1000 - var/rigged = 0 // true if rigged to explode - var/minor_fault = 0 //If not 100% reliable, it will build up faults. + /// True if rigged to explode + var/rigged = FALSE + /// If not 100% reliable, it will build up faults. + var/minor_fault = 0 matter = list(DEFAULT_WALL_MATERIAL = 700, MATERIAL_GLASS = 50) recyclable = TRUE @@ -148,7 +151,7 @@ maxcharge = 15000 matter = null - // slime cores recharges 10% every one minute + /// Slime cores recharges 10% every one minute. self_charge_percentage = 10 /obj/item/cell/slime/mechanics_hints(mob/user, distance, is_adjacent) @@ -157,7 +160,7 @@ /obj/item/cell/slime/antagonist_hints(mob/user, distance, is_adjacent) . += ..() - . += "Maybe be fucking careful if you try rigging this one." + . += "Auto-charges, so maybe be fucking careful if you try rigging this one." /obj/item/cell/nuclear name = "miniaturized nuclear power cell" @@ -167,13 +170,14 @@ maxcharge = 50000 matter = null - // nuclear cores recharges 20% every one minute + /// Nuclear cells recharge 20% every one minute. self_charge_percentage = 10 /obj/item/cell/device/emergency_light name = "miniature power cell" desc = "A small power cell intended for use with emergency lighting." - maxcharge = 120 //Emergency lights use 0.2 W per tick, meaning ~10 minutes of emergency power from a cell + /// Emergency lights use 0.2 W per tick, meaning ~10 minutes of emergency power from a cell + maxcharge = 120 w_class = WEIGHT_CLASS_TINY matter = list(MATERIAL_GLASS = 20) @@ -198,7 +202,8 @@ name = "hydrogen blaster canister" desc = "An industrial-grade hydrogen power cell, used in various blaster weapons- or blaster-adjacent power tools- in place of expensive phoron." icon_state = "hycell" - maxcharge = 10000 // hydrogen is actually used today in electric cars + /// Hydrogen is actually used today in electric cars + maxcharge = 10000 matter = list(DEFAULT_WALL_MATERIAL = 700, MATERIAL_GLASS = 70) w_class = WEIGHT_CLASS_SMALL drop_sound = 'sound/items/drop/gascan.ogg' @@ -220,7 +225,7 @@ maxcharge = 30000 matter = list(DEFAULT_WALL_MATERIAL = 20000, MATERIAL_GLASS = 10000, MATERIAL_URANIUM = 10000) - // nuclear mecha cores recharges 5% every one minute + /// Nuclear mecha cores recharges 5% every one minute self_charge_percentage = 5 /obj/item/cell/mecha/phoron @@ -230,5 +235,5 @@ maxcharge = 50000 matter = list(DEFAULT_WALL_MATERIAL = 20000, MATERIAL_GLASS = 10000, MATERIAL_PHORON = 5000) - // nuclear mecha cores recharges 10% every one minute + /// Phoron mecha cores recharges 10% every one minute self_charge_percentage = 10 diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 83aa876c676..3044a1e07f8 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -1,19 +1,17 @@ /* - * These absorb the functionality of the plant bag, ore satchel, etc. - * They use the use_to_pickup, quick_gather, and quick_empty functions - * that were already defined in weapon/storage, but which had been - * re-implemented in other classes. + * These absorb the functionality of the plant bag, ore satchel, etc. + * They use the use_to_pickup, quick_gather, and quick_empty functions + * that were already defined in weapon/storage, but which had been + * re-implemented in other classes. * - * Contains: - * Trash Bag - * Mining Satchel - * Plant Bag - * Sheet Snatcher - * Cash Bag - * Book Bag (New thing) - * Slime Bag (New thing) ~Chaoko99 - * - * -Sayu + * Contains: + * * Trash Bag + * * Mining Satchel + * * Plant Bag + * * Sheet Snatcher + * * Cash Bag + * * Book Bag + * * Slime Bag */ // Generic non-item diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 086868c7265..1836fed768c 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -1,24 +1,25 @@ /* - * Everything derived from the common cardboard box. - * Basically everything except the original is a kit (starts full). + * Everything derived from the common cardboard box. + * Basically everything except the original is a kit (starts full). * - * Contains: - * Empty box, starter boxes (survival/engineer), - * Latex glove and sterile mask boxes, - * Syringe, beaker, dna injector boxes, - * Blanks, flashbangs, and EMP grenade boxes, - * Tracking and chemical implant boxes, - * Prescription glasses and drinking glass boxes, - * Condiment bottle and silly cup boxes, - * Donkpocket and monkeycube boxes, - * ID boxes, - * Handcuff, mousetrap, and pillbottle boxes, - * Snap-pops, - * Replacement light boxes. - * Kitchen utensil box - * Random preserved snack box - * For syndicate call-ins see uplink_kits.dm - * Firing pin boxes - Testing and Normal. one for sec, one for science. + * Contains: + * * Empty box, starter boxes (survival/engineer) + * * Latex glove and sterile mask boxes + * * Syringe, beaker, dna injector boxes + * * Blanks, flashbangs, and EMP grenade boxes + * * Tracking and chemical implant boxes + * * Prescription glasses and drinking glass boxes + * * Condiment bottle and silly cup boxes + * * Donkpocket and monkeycube boxes + * * ID boxes + * * Handcuff, mousetrap, and pillbottle boxes + * * Snap-pops + * * Replacement light boxes. + * * Kitchen utensil box + * * Random preserved snack box + * * For syndicate call-ins see uplink_kits.dm + * * Firing pin boxes - Testing and Normal. one for sec, one for science. + * * Flag boxes (various national/corporate flag collections) */ /obj/item/storage/box diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index a5833560959..2f8b05d42c4 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -6,12 +6,12 @@ * * * Contains: - * Donut Box - * Egg Carton - * Candle Box - * Crayon Box - * Cigarette Box - * Match Box + * * Donut Box + * * Egg Carton + * * Candle Box + * * Crayon Box + * * Cigarette Box + * * Match Box */ /obj/item/storage/box/fancy diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index fd5c40b7d42..135058e2fc4 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -1,10 +1,10 @@ /* - * Absorbs /obj/item/secstorage. - * Reimplements it only slightly to use existing storage functionality. + * Absorbs /obj/item/secstorage. + * Reimplements it only slightly to use existing storage functionality. * - * Contains: - * Secure Briefcase - * Wall Safe + * Contains: + * * Secure Briefcase + * * Wall Safe */ // ----------------------------- diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index b4fa8d2b801..ead9c57ea98 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -1,4 +1,3 @@ -//replaces our stun baton code with /tg/station's code /obj/item/melee/baton name = "stunbaton" desc = "A stun baton for incapacitating people with." @@ -16,11 +15,13 @@ attack_verb = list("beaten") var/stunforce = 0 var/agonyforce = 60 - var/status = 0 //whether the thing is on or not + /// Whether the thing is on or not + var/status = 0 var/obj/item/cell/bcell var/hitcost = 1000 var/baton_color = "#FF6A00" - var/sheathed = 1 //electrocutes only on harm intent + /// Electrocutes only on harm intent + var/sheathed = 1 /obj/item/melee/baton/mechanics_hints(mob/user, distance, is_adjacent) . += ..() @@ -42,7 +43,10 @@ . = ..() update_icon() -/obj/item/melee/baton/loaded/Initialize() //this one starts with a cell pre-installed. +/** + * This one starts with a cell pre-installed. + */ +/obj/item/melee/baton/loaded/Initialize() bcell = new/obj/item/cell/high(src) . = ..() diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index 434ae9617a2..33beb689db7 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -1,12 +1,12 @@ /* Surgery Tools * Contains: - * Retractor - * Hemostat - * Cautery - * Surgical Drill - * Scalpel - * Circular Saw - * Tray + * * Retractor + * * Hemostat + * * Cautery + * * Surgical Drill + * * Scalpel + * * Circular Saw + * * Tray */ /obj/item/surgery name = "surgery tool parent item" diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index 34abdc005ca..c79c757338c 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -1,7 +1,7 @@ /* Weapons * Contains: - * Sword - * Classic Baton + * * Sword + * * Classic Baton */ diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm index 129f6893a8f..14f9c846f84 100644 --- a/code/game/objects/items/weapons/tanks/tank_types.dm +++ b/code/game/objects/items/weapons/tanks/tank_types.dm @@ -1,11 +1,11 @@ /* Types of tanks! * Contains: - * Oxygen - * Anesthetic - * Air - * Phoron - * Hydrogen - * Emergency Oxygen + * * Oxygen + * * Anesthetic + * * Air + * * Phoron + * * Hydrogen + * * Emergency Oxygen */ /* diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index 27a2f9d15d5..a8f19a6d9ae 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -1,9 +1,9 @@ /* Teleportation devices. * Contains: - * Locator - * Hand-tele - * Closet Teleporter - * Inhibitor handling proc for above + * * Locator + * * Hand-tele + * * Closet Teleporter + * * Inhibitor handling proc for above */ /* diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 4df99874a5e..4b4488c772f 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -146,7 +146,8 @@ surgerysound = 'sound/items/surgery/hemostat.ogg' drop_sound = 'sound/items/drop/wirecutter.ogg' pickup_sound = 'sound/items/pickup/wirecutter.ogg' - var/bomb_defusal_chance = 30 // 30% chance to safely defuse a bomb + /// 30% chance to safely defuse a bomb + var/bomb_defusal_chance = 30 build_from_parts = TRUE worn_overlay = "head" diff --git a/code/game/objects/structures/crates_lockers/closets/job_closets.dm b/code/game/objects/structures/crates_lockers/closets/job_closets.dm index bfcbcabfa07..e62931f84d0 100644 --- a/code/game/objects/structures/crates_lockers/closets/job_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/job_closets.dm @@ -1,8 +1,8 @@ /* Closets for specific jobs * Contains: - * Bartender - * Chef - * Lawyer + * * Bartender + * * Chef + * * Lawyer */ /* diff --git a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm index 7309f1ac6cf..4cb84b75d2b 100644 --- a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm @@ -1,12 +1,12 @@ /* Utility Closets * Contains: - * Emergency Closet - * Fire Closet - * Tool Closet - * Radiation Closet - * Bombsuit Closet - * Hydrant - * First Aid + * * Emergency Closet + * * Fire Closet + * * Tool Closet + * * Radiation Closet + * * Bombsuit Closet + * * Hydrant + * * First Aid */ /* diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 33e54a60e33..7afa8d556c3 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -1,9 +1,9 @@ /* Morgue stuff * Contains: - * Morgue - * Morgue trays - * Crematorium - * Crematorium trays + * * Morgue + * * Morgue trays + * * Crematorium + * * Crematorium trays */ /* diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 0bb179976de..963b4809af8 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -1,7 +1,7 @@ /* Beds... get your mind out of the gutter, they're for sleeping! * Contains: - * Beds - * Roller beds + * * Beds + * * Roller beds */ /* diff --git a/code/modules/alarm/alarm.dm b/code/modules/alarm/alarm.dm index 9fea011f80e..64947dbd53c 100644 --- a/code/modules/alarm/alarm.dm +++ b/code/modules/alarm/alarm.dm @@ -1,12 +1,19 @@ -#define ALARM_RESET_DELAY 100 // How long will the alarm/trigger remain active once origin/source has been found to be gone? +/// How long will the alarm/trigger remain active once origin/source has been found to be gone? +#define ALARM_RESET_DELAY 100 /datum/alarm_source - var/source = null // The source trigger - var/source_name = "" // The name of the source should it be lost (for example a destroyed camera) - var/duration = 0 // How long this source will be alarming, 0 for indefinetely. - var/severity = 1 // How severe the alarm from this source is. - var/start_time = 0 // When this source began alarming. - var/end_time = 0 // Use to set when this trigger should clear, in case the source is lost. + //// The source trigger + var/source = null + /// The name of the source should it be lost (for example a destroyed camera) + var/source_name = "" + /// How long this source will be alarming, 0 for indefinitely. + var/duration = 0 + /// How severe the alarm from this source is. + var/severity = 1 + /// When this source began alarming. + var/start_time = 0 + /// Use to set when this trigger should clear, in case the source is lost. + var/end_time = 0 /datum/alarm_source/New(var/atom/source) src.source = source @@ -14,20 +21,29 @@ source_name = source.get_source_name() /datum/alarm - var/atom/origin //Used to identify the alarm area. - var/list/sources = new() //List of sources triggering the alarm. Used to determine when the alarm should be cleared. - var/list/sources_assoc = new() //Associative list of source triggers. Used to efficiently acquire the alarm source. - var/list/cameras //List of cameras that can be switched to, if the player has that capability. - var/cache_id //ID for camera cache, changed by invalidateCameraCache(). - var/area/last_area //The last acquired area, used should origin be lost (for example a destroyed borg containing an alarming camera). - var/area/last_name //The last acquired name, used should origin be lost - var/area/last_camera_area //The last area in which cameras where fetched, used to see if the camera list should be updated. - var/end_time //Used to set when this alarm should clear, in case the origin is lost. + /// Used to identify the alarm area. + var/atom/origin + /// List of sources triggering the alarm. Used to determine when the alarm should be cleared. + var/list/sources = new() + /// Associative list of source triggers. Used to efficiently acquire the alarm source. + var/list/sources_assoc = new() + /// List of cameras that can be switched to, if the player has that capability. + var/list/cameras + /// ID for camera cache, changed by invalidateCameraCache(). + var/cache_id + /// The last acquired area, used should origin be lost (for example a destroyed borg containing an alarming camera). + var/area/last_area + /// The last acquired name, used should origin be lost. + var/area/last_name + /// The last area in which cameras where fetched, used to see if the camera list should be updated. + var/area/last_camera_area + /// Used to set when this alarm should clear, in case the origin is lost. + var/end_time /datum/alarm/New(var/atom/origin, var/atom/source, var/duration, var/severity) src.origin = origin - - cameras() // Sets up both cameras and last alarm area. + // Sets up both cameras and last alarm area. + cameras() set_source_data(source, duration, severity) /datum/alarm/process() @@ -38,8 +54,8 @@ // Has the alarm passed its best before date? if((AS.end_time && world.time > AS.end_time) || (AS.duration && world.time > (AS.start_time + AS.duration))) sources -= AS - // Has the source gone missing? Then reset the normal duration and set end_time - if(!AS.source && !AS.end_time) // end_time is used instead of duration to ensure the reset doesn't remain in the future indefinetely. + // Has the source gone missing? Then reset the normal duration and set end_time. + if(!AS.source && !AS.end_time) // end_time is used instead of duration to ensure the reset doesn't remain in the future indefinitely. AS.duration = 0 AS.end_time = world.time + ALARM_RESET_DELAY @@ -49,7 +65,7 @@ AS = new/datum/alarm_source(source) sources += AS sources_assoc[source] = AS - // Currently only non-0 durations can be altered (normal alarms VS EMP blasts) + // Currently only non-0 durations can be altered (normal alarms VS EMP blasts). if(AS.duration) duration = SecondsToTicks(duration) AS.duration = duration @@ -74,8 +90,11 @@ last_name = origin.get_alarm_name() return last_name +/** + * Resets the alarm's camera cache and tries to repopulate it (sometimes cameras move/leave, like borgs etc.). + */ /datum/alarm/proc/cameras() - // reset camera cache + // Reset camera cache. if(GLOB.camera_repository.camera_cache_id != cache_id) cameras = null cache_id = GLOB.camera_repository.camera_cache_id @@ -100,12 +119,18 @@ /****************** * Assisting procs * ******************/ +/** + * Returns the src's area. + */ /atom/proc/get_alarm_area() return get_area(src) /area/get_alarm_area() return src +/** + * Wrapper for get_area_display_name (no args). + */ /atom/proc/get_alarm_name() var/area/A = get_area(src) var/display_name = get_area_display_name(A) diff --git a/code/modules/alarm/alarm_handler.dm b/code/modules/alarm/alarm_handler.dm index 803cd07ba48..2c6d3445bd9 100644 --- a/code/modules/alarm/alarm_handler.dm +++ b/code/modules/alarm/alarm_handler.dm @@ -3,9 +3,12 @@ /datum/alarm_handler var/category = "" - var/list/datum/alarm/alarms = new // All alarms, to handle cases when an origin has been deleted with one or more active alarms - var/list/datum/alarm/alarms_assoc = new // Associative list of alarms, to efficiently acquire them based on origin. - var/list/listeners = new // A list of all objects interested in alarm changes. + // All alarms, to handle cases when an origin has been deleted with one or more active alarms + var/list/datum/alarm/alarms = new + // Associative list of alarms, to efficiently acquire them based on origin. + var/list/datum/alarm/alarms_assoc = new + // A list of all objects interested in alarm changes. + var/list/listeners = new /datum/alarm_handler/process() for(var/datum/alarm/A in alarms) diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 5bb5f2dde4d..2ecd2d8674d 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -1,11 +1,11 @@ /* * Contents: - * Welding mask - * Cakehat - * Ushanka - * Pumpkin head - * Chicken mask - * Warning cone + * * Welding mask + * * Cakehat + * * Ushanka + * * Pumpkin head + * * Chicken mask + * * Warning cone */ /* diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index a314ae264a3..9feb0eaec0a 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -1,7 +1,7 @@ /* * Contains: - * Costume - * Misc + * * Costume + * * Misc */ /* diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index 803b707458d..07f75cae902 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -1,8 +1,8 @@ /* * Contains: - * Fire protection - * Bomb protection - * Radiation protection + * * Fire protection + * * Bomb protection + * * Radiation protection */ /* diff --git a/code/modules/clothing/under/jobs/security.dm b/code/modules/clothing/under/jobs/security.dm index a4cf656f837..7318a8cde38 100644 --- a/code/modules/clothing/under/jobs/security.dm +++ b/code/modules/clothing/under/jobs/security.dm @@ -1,8 +1,8 @@ /* * Contains: - * Security - * Detective - * Head of Security + * * Security + * * Detective + * * Head of Security */ /* diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index bcfe2bade18..21c6fe99387 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -1,9 +1,9 @@ /* Library Items * * Contains: - * Bookcase - * Book - * Barcode Scanner + * * Bookcase + * * Book + * * Barcode Scanner */ diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 3a41cba9cb9..fd44a389e0a 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -1,11 +1,11 @@ /* Library Machines * * Contains: - * Borrowbook datum - * Library Public Computer - * Library Computer - * Library Scanner - * Book Binder + * * Borrowbook datum + * * Library Public Computer + * * Library Computer + * * Library Scanner + * * Book Binder */ /* diff --git a/code/modules/mapping/reader.dm b/code/modules/mapping/reader.dm index c8cdde1f039..b31e125312a 100644 --- a/code/modules/mapping/reader.dm +++ b/code/modules/mapping/reader.dm @@ -41,7 +41,7 @@ GLOBAL_DATUM_INIT(_preloader, /dmm_suite/preloader, new) * WORKING : * * 1) Makes an associative mapping of model_keys with model - * e.g aa = /turf/unsimulated/wall{icon_state = "rock"} + * e.g aa = /turf/unsimulated/wall{icon_state = "rock"} * 2) Read the map line by line, parsing the result (using parse_grid) * */ diff --git a/code/modules/mining/machine_rigpress.dm b/code/modules/mining/machine_rigpress.dm index 8fd86bd3987..3e4f11314e7 100644 --- a/code/modules/mining/machine_rigpress.dm +++ b/code/modules/mining/machine_rigpress.dm @@ -33,7 +33,7 @@ icon_state = "coinpress0" /** - * If a compatible item is fed into the machine, begin conversion. Only allow one at a time. + * If a compatible item is fed into the machine, begin conversion. Only allow one at a time. */ /obj/machinery/mineral/rigpress/attackby(obj/item/attacking_item, mob/user) if(!pressing) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 3f2c9936272..fbad9d10f4d 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -1,11 +1,11 @@ /* Parrots! * Contains - * Defines - * Inventory (headset stuff) - * Attack responces - * AI - * Procs / Verbs (usable by players) - * Sub-types + * * Defines + * * Inventory (headset stuff) + * * Attack responces + * * AI + * * Procs / Verbs (usable by players) + * * Sub-types */ /* diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index fc9d2ae2170..77ec8e1698e 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -1,5 +1,8 @@ // fun if you want to typecast humans/monkeys/etc without writing long path-filled lines. +/** + * Returns mob_size <= MOB_SMALL if used on a /mob/living. + */ /proc/issmall(A) if(A && istype(A, /mob/living)) var/mob/living/L = A @@ -39,7 +42,6 @@ /mob/living/carbon/human/isMonkey() return istype(species, /datum/species/monkey) - /proc/ishuman_species(A) if(istype(A, /mob/living/carbon/human)) var/mob/living/carbon/human/H = A @@ -148,7 +150,10 @@ /mob/living/carbon/alien/diona/is_diona() return DIONA_NYMPH -/proc/is_mob_special(A) // determines special mobs. has restrictions on certain things, like welderbombing +/** + * Determines special mobs; places restrictions on certain things, like welderbombing. + */ +/proc/is_mob_special(A) if(isrevenant(A)) return TRUE if(iszombie(A)) @@ -288,7 +293,9 @@ GLOBAL_LIST_INIT(organ_rel_size, list( BP_R_FOOT = 10 )) -///Find the mob at the bottom of a buckle chain +/** + * Find the mob at the bottom of a buckle chain. + */ /mob/proc/lowest_buckled_mob() . = src //buckled -> buckled_to from TG @@ -321,9 +328,11 @@ GLOBAL_LIST_INIT(organ_rel_size, list( zone = pick_weight(weighted_list ? weighted_list : GLOB.organ_rel_size) //Slightly different from TG, we have a list with organ sizes return zone -/// Emulates targetting a specific body part, and miss chances -/// May return null if missed -/// miss_chance_mod may be negative. +/** + * Emulates targetting a specific body part, and miss chances. + * May return null if missed. + * miss_chance_mod can be negative. + */ /proc/get_zone_with_miss_chance(zone, var/mob/target, var/miss_chance_mod = 0, var/ranged_attack=0, var/point_blank = FALSE) zone = check_zone(zone) @@ -351,7 +360,9 @@ GLOBAL_LIST_INIT(organ_rel_size, list( return pick(GLOB.base_miss_chance) return zone -// never a chance to miss, but you might not hit what you want to hit +/** + * No a chance to miss, but you might not hit what you want to hit. + */ /mob/living/heavy_vehicle/calculate_zone_with_miss_chance(zone, miss_chance_mod) var/miss_chance = 10 if(zone in GLOB.base_miss_chance) @@ -380,6 +391,9 @@ GLOBAL_LIST_INIT(organ_rel_size, list( chars[i] = "*" return sanitize(jointext(chars, "")) +/** + * The speech impediment, not the other thing. + */ /proc/slur(phrase, strength = 100) phrase = html_decode(phrase) var/leng = length_char(phrase) @@ -408,13 +422,18 @@ GLOBAL_LIST_INIT(organ_rel_size, list( if (7) newletter += "'" else - . = null // For dreamchecker, does nothing + . = null // For dreamchecker, does nothing. newphrase += "[newletter]" counter -= 1 return newphrase -/proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 for p will cause letters to be replaced instead of added - /* Turn text into complete gibberish! */ +/** + * Turns text into complete gibberish. + * + * * t - inputted message + * * p - higher than 70 cause letters to be replaced instead of added + */ +/proc/Gibberish(t, p) var/returntext = "" for(var/i = 1, i <= length(t), i++) @@ -430,13 +449,14 @@ GLOBAL_LIST_INIT(organ_rel_size, list( return returntext - +/** + * Stuttering. Is this even used anywhere??? + * + * The difference with stutter is that this proc can stutter more than 1 letter + * The issue here is that anything that does not have a space is treated as one word (in many instances). For instance, "LOOKING," is a word, including the comma. + * It's fairly easy to fix if dealing with single letters but not so much with compounds of letters. + */ /proc/ninjaspeak(n) -/* -The difference with stutter is that this proc can stutter more than 1 letter -The issue here is that anything that does not have a space is treated as one word (in many instances). For instance, "LOOKING," is a word, including the comma. -It's fairly easy to fix if dealing with single letters but not so much with compounds of letters./N -*/ var/te = html_decode(n) var/t = "" n = length(n) @@ -459,7 +479,6 @@ It's fairly easy to fix if dealing with single letters but not so much with comp p=p+n_mod return sanitize(t) - #define TICKS_PER_RECOIL_ANIM 2 #define PIXELS_PER_STRENGTH_VAL 16 diff --git a/code/modules/modular_computers/hardware/hard_drive.dm b/code/modules/modular_computers/hardware/hard_drive.dm index 5c44117034c..999edff6604 100644 --- a/code/modules/modular_computers/hardware/hard_drive.dm +++ b/code/modules/modular_computers/hardware/hard_drive.dm @@ -58,7 +58,7 @@ /** - * Returns number of stored files and storage usage/capacity. + * Returns number of stored files and storage usage/capacity. */ /obj/item/computer_hardware/hard_drive/diagnostics(var/mob/user) ..() @@ -67,7 +67,7 @@ to_chat(user, SPAN_NOTICE("Storage capacity: [used_capacity]/[max_capacity]GQ")) /** - * Use this proc to add file to the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks. + * Use this proc to add file to the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks. */ /obj/item/computer_hardware/hard_drive/proc/store_file(var/datum/computer_file/F) if(!F || !istype(F)) @@ -89,7 +89,7 @@ return TRUE /** - * Use this proc to add all basic functionality software to the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks. + * Use this proc to add all basic functionality software to the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks. */ /obj/item/computer_hardware/hard_drive/proc/install_default_programs() if(parent_computer) @@ -98,7 +98,7 @@ store_file(new /datum/computer_file/program/pai_access_lock(parent_computer)) // pAI access control, to stop pesky pAI from messing with computers /** - * Use this proc to remove files to the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks. + * Use this proc to remove files to the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks. */ /obj/item/computer_hardware/hard_drive/proc/remove_file(var/datum/computer_file/F) if(!F || !istype(F)) @@ -115,7 +115,7 @@ return FALSE /** - * Loops through all stored files and recalculates used_capacity of this drive + * Loops through all stored files and recalculates used_capacity of this drive */ /obj/item/computer_hardware/hard_drive/proc/recalculate_size() var/total_size = 0 @@ -124,7 +124,7 @@ used_capacity = total_size /** - * Checks whether file can be stored on the hard drive. + * Checks whether file can be stored on the hard drive. */ /obj/item/computer_hardware/hard_drive/proc/can_store_file(var/size = TRUE) // In the unlikely event someone manages to create that many files. @@ -139,7 +139,7 @@ return TRUE /** - * Checks whether we can store the file. We can only store unique files, so this checks whether we wouldn't get a duplicity by adding a file. + * Checks whether we can store the file. We can only store unique files, so this checks whether we wouldn't get a duplicity by adding a file. */ /obj/item/computer_hardware/hard_drive/proc/try_store_file(var/datum/computer_file/F) if(!F || !istype(F)) @@ -151,7 +151,7 @@ return can_store_file(F.size) /** - * Tries to find the file by filename. Returns null on failure. + * Tries to find the file by filename. Returns null on failure. */ /obj/item/computer_hardware/hard_drive/proc/find_file_by_name(var/filename) if(!check_functionality()) diff --git a/code/modules/modular_computers/hardware/hardware.dm b/code/modules/modular_computers/hardware/hardware.dm index 5408eaca12c..791a6991f81 100644 --- a/code/modules/modular_computers/hardware/hardware.dm +++ b/code/modules/modular_computers/hardware/hardware.dm @@ -23,19 +23,19 @@ var/malfunction_probability = 10 /** - * Default handling of hardware enable/disable. Override for specific functionality. + * Default handling of hardware enable/disable. Override for specific functionality. */ /obj/item/computer_hardware/proc/enable() . = enabled = TRUE /** - * Default handling of hardware enable/disable. Override for specific functionality. + * Default handling of hardware enable/disable. Override for specific functionality. */ /obj/item/computer_hardware/proc/disable() . = enabled = FALSE /** - * Default handling of hardware enable/disable. Override for specific functionality. + * Default handling of hardware enable/disable. Override for specific functionality. */ /obj/item/computer_hardware/proc/toggle() if(enabled) @@ -71,7 +71,7 @@ return ..() /** - * Called on multitool click, prints diagnostic information to the user. + * Called on multitool click, prints diagnostic information to the user. */ /obj/item/computer_hardware/proc/diagnostics(var/mob/user) to_chat(user, SPAN_NOTICE("Hardware Integrity Test... (Physical Damage: [damage]/[max_damage]) [damage > damage_failure ? "FAIL" : damage > damage_malfunction ? "WARN" : "PASS"]")) @@ -88,7 +88,7 @@ return ..() /** - * Handles damage checks + * Handles damage checks */ /obj/item/computer_hardware/proc/check_functionality() /// Turned off @@ -114,7 +114,7 @@ . += SPAN_WARNING("It seems to be slightly damaged.") /** - * Damages the component. Contains necessary checks. Negative damage "heals" the component. + * Damages the component. Contains necessary checks. Negative damage "heals" the component. */ /obj/item/computer_hardware/proc/take_damage(var/amount) damage += round(amount) /// We want nice rounded numbers here. diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index a132618946e..6e98bed78c8 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -1,8 +1,8 @@ /* Filing cabinets! * Contains: - * Filing Cabinets - * Security Record Cabinets - * Medical Record Cabinets + * * Filing Cabinets + * * Security Record Cabinets + * * Medical Record Cabinets */ diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index dbdb6c284a5..b14cf17ab64 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -1,11 +1,11 @@ /* Pens! * Contains: - * Pens - * PDA Pens - * Sleepy Pens - * Coloured Pens - * Parapens - * Fountain Pens + * * Pens + * * PDA Pens + * * Sleepy Pens + * * Coloured Pens + * * Parapens + * * Fountain Pens */ diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index ea4b5eb5517..096b8d7c7d5 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -1,9 +1,9 @@ /* Photography! - * Contains: - * Camera - * Camera Film - * Photos - * Photo Albums + * Contains: + * * Camera + * * Camera Film + * * Photos + * * Photo Albums */ /******* diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 51d80bce0e3..742282ab86c 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -84,20 +84,24 @@ ABSTRACT_TYPE(/obj/machinery/power/apc) var/area/area var/areastring = null var/obj/item/cell/cell - var/chargelevel = 0.0005 // Cap for how fast APC cells charge, as a percentage-per-tick (0.01 means cellcharge is capped to 1% per second) + /// Cap for how fast APC cells charge, as a percentage-per-tick (0.01 means cellcharge is capped to 1% per second) + var/chargelevel = 0.0005 var/cellused = 0 - var/start_charge = 90 // initial cell charge % + /// Initial cell charge % + var/start_charge = 90 var/cell_type = /obj/item/cell/apc var/opened = COVER_CLOSED var/shorted = FALSE - var/night_mode = FALSE// Determines if the light level is set to dimmed or not + /// Determines if the light level is set to dimmed or not + var/night_mode = FALSE var/lighting = CHANNEL_ON_AUTO var/equipment = CHANNEL_ON_AUTO var/environ = CHANNEL_ON_AUTO var/infected = FALSE var/operating = TRUE var/charging = CHARGING_OFF - var/chargemode = TRUE // whether we're trying to charge + // Whether we're trying to charge + var/chargemode = TRUE var/chargecount = 0 var/locked = TRUE var/coverlocked = TRUE @@ -110,11 +114,14 @@ ABSTRACT_TYPE(/obj/machinery/power/apc) var/lastused_charging = 0 var/lastused_total = 0 var/main_status = 0 - var/mob/living/silicon/ai/hacker = null // Malfunction var. If set AI hacked the APC and has full control. - powernet = 0 // set so that APCs aren't found as powernet nodes //Hackish, Horrible, was like this before I changed it :c + /// Malfunction var. If set AI hacked the APC and has full control. + var/mob/living/silicon/ai/hacker = null + /// Set so that APCs aren't found as powernet nodes. Hackish, Horrible, was like this before I changed it :c + powernet = 0 var/autoflag = AUTOFLAG_OFF var/has_electronics = HAS_ELECTRONICS_NONE - var/beenhit = 0 // used for counting how many times it has been hit, used for Aliens at the moment + /// Used for counting how many times it has been hit, used for Aliens at the moment + var/beenhit = 0 var/longtermpower = 10 var/datum/wires/apc/wires = null var/update_state = -1 @@ -133,7 +140,8 @@ ABSTRACT_TYPE(/obj/machinery/power/apc) var/emergency_lights = FALSE var/time = 0 - var/charge_mode = CHARGE_MODE_CHARGE // if we're actually able to charge + /// If we're actually able to charge + var/charge_mode = CHARGE_MODE_CHARGE var/last_time = 1 /obj/machinery/power/apc/mechanics_hints(mob/user, distance, is_adjacent) diff --git a/code/modules/power/fusion/core/_core.dm b/code/modules/power/fusion/core/_core.dm index 7b066db563d..e5ee7cab865 100644 --- a/code/modules/power/fusion/core/_core.dm +++ b/code/modules/power/fusion/core/_core.dm @@ -10,7 +10,8 @@ density = TRUE use_power = POWER_USE_IDLE idle_power_usage = 50 - active_power_usage = 500 //multiplied by field strength + /// Gets multiplied by field strength + active_power_usage = 500 anchored = FALSE var/obj/effect/fusion_em_field/owned_field @@ -25,11 +26,17 @@ connect_to_network() AddComponent(/datum/component/local_network_member, initial_id_tag) +/** + * If there's no powernet or no owned field, shutdown() in those cases too. + */ /obj/machinery/power/fusion_core/process() . = ..() if(stat & BROKEN || !powernet || !owned_field) Shutdown() +/** + * Create a new owned_field of appropriate strength and update power usage. + */ /obj/machinery/power/fusion_core/proc/Startup() if(owned_field) return @@ -39,6 +46,9 @@ update_use_power(POWER_USE_ACTIVE) . = 1 +/** + * If we're too hot, there's going to be an explosion, EMP, etc. Bad time. + */ /obj/machinery/power/fusion_core/proc/Shutdown(force_rupture) if(owned_field) icon_state = "core0" diff --git a/code/modules/power/fusion/core/core_field.dm b/code/modules/power/fusion/core/core_field.dm index 15d7c86d214..3c460e99eef 100644 --- a/code/modules/power/fusion/core/core_field.dm +++ b/code/modules/power/fusion/core/core_field.dm @@ -12,12 +12,15 @@ light_color = COLOR_RED mouse_opacity = MOUSE_OPACITY_ICON - var/size = 1 var/energy = 0 var/plasma_temperature = 0 var/radiation = 0 + /// The currently configured Field Strength (0.01 = 1 Tesla). var/field_strength = 0.01 + /// Radius of the EM field. Scales with Field Strength. + var/size = 1 var/tick_instability = 0 + /// Ranges from 0-1. At or over 1, boom. var/percent_unstable = 0 var/percent_unstable_archive = 0 @@ -88,7 +91,7 @@ particles.spawning = 0 //Turn off particles until something calls for it - //create the gimmicky things to handle field collisions + // Create the gimmicky things to handle field collisions var/obj/effect/fusion_particle_catcher/catcher catcher = new (locate(src.x,src.y,src.z)) @@ -124,6 +127,9 @@ addtimer(CALLBACK(src, PROC_REF(update_light_colors)), 10 SECONDS, TIMER_LOOP) radio = new /obj/item/device/radio{channels=list("Engineering")}(src) +/** + * Not blackbody radiation- with these colors, is some sort of space magic? + */ /obj/effect/fusion_em_field/proc/update_light_colors() var/use_range var/use_power = 0 @@ -164,6 +170,16 @@ UNLINT(var/dm_filter/bloom = filters[3]) UNLINT(bloom.alpha = alpha) +/** + * What are we doing every tick? A lot. + * * Grab some gas from the env and convert it to reactants for the pool. + * * Run react(), which updates a ton of vars for us to respond to here. + * * Based on our updated heat values, dump power into the power net. + * * Calculate what sort of entropy tax we're going to pay. + * * Run check_instability() and decide how sad/angry we are. + * * If we're sad/angry, try to send a warning. + * * Run radiate(). This is us paying the entropy tax. + */ /obj/effect/fusion_em_field/process() //make sure the field generator is still intact if(QDELETED(owned_core)) @@ -184,19 +200,19 @@ if(added_particles) uptake_gas.update_values() - //let the particles inside the field react + // Let the particles inside the field react. React() // Dump power to our powernet. owned_core.add_avail(FUSION_ENERGY_PER_K * plasma_temperature) - // Energy decay. + // Energy decay (entropy tax). if(plasma_temperature >= 1) var/lost = plasma_temperature*0.01 radiation += lost plasma_temperature -= lost - //handle some reactants formatting + // Handle some reactants formatting. for(var/reactant in reactants) var/amount = reactants[reactant] if(amount < 1) @@ -217,6 +233,19 @@ SSradiation.radiate(src, round(radiation*0.001)) return 1 +/** + * Handles checks for instability, does bad things if unstable. Instability + * ranges from 0 to 1. + * + * Possible consequences: + * * Field wobbles/ripples (visual only) + * * Fuel loss (rad spikes) + * * Flares (bigger rad spikes, bigger wobbles/ripples) + * * Rupture (you're fucked, we done) + * + * If instability hits 1, boom. Otherwise, this code looks fucked up, best + * document details later. + */ /obj/effect/fusion_em_field/proc/check_instability() if(tick_instability > 0) percent_unstable_archive = percent_unstable @@ -245,6 +274,7 @@ var/flare var/fuel_loss var/rupture + // Why the fuck are these less thans??? if(percent_unstable < 0.7) visible_message(SPAN_DANGER("\The [src] ripples uneasily, like a disturbed pond.")) fuel_loss = prob(5) @@ -323,6 +353,9 @@ radio.autosay(alert_msg, "INDRA Reactor Monitor") public_alert = FALSE +/** + * Handles visual animation. + */ /obj/effect/fusion_em_field/proc/Ripple(_size, _radius) if(!animating_ripple) UNLINT(var/dm_filter/ripple = filters[1]) @@ -338,6 +371,9 @@ /obj/effect/fusion_em_field/proc/is_shutdown_safe() return plasma_temperature < 1000 +/** + * EMP, rads, and a big fuckoff explosion. + */ /obj/effect/fusion_em_field/proc/Rupture() visible_message(SPAN_DANGER("\The [src] shudders like a dying animal before flaring to eye-searing brightness and rupturing!")) set_light(1, 0.1, 15, 2, "#ccccff") @@ -347,6 +383,10 @@ explosion(get_turf(owned_core), 8, 8) return +/** + * Sets field strength in Tesla, and corresponding field size. + * This currently does nothing mechanically, and the UI locks us to 100 max strength anyway. + */ /obj/effect/fusion_em_field/proc/ChangeFieldStrength(new_strength) var/calc_size = 1 if(new_strength <= 50) @@ -384,9 +424,10 @@ reactants[name] = quantity UpdateVisuals() +/** + * Create our plasma field and dump it into our environment. + */ /obj/effect/fusion_em_field/proc/RadiateAll(ratio_lost = 1) - - // Create our plasma field and dump it into our environment. var/turf/T = get_turf(src) if(istype(T)) var/datum/gas_mixture/plasma @@ -395,7 +436,8 @@ continue if(!plasma) plasma = new - plasma.adjust_gas(reactant, max(1,round(reactants[reactant]*0.1)), 0) // *0.1 to compensate for *10 when uptaking gas. + // *0.1 to compensate for *10 when uptaking gas. + plasma.adjust_gas(reactant, max(1,round(reactants[reactant]*0.1)), 0) if(!plasma) return plasma.temperature = (plasma_temperature/2) @@ -414,6 +456,22 @@ SSradiation.radiate(src, round(radiation*0.001)) Radiate() +/** + * Called as part of our regular Process() + * + * First, it checks if our current size is intersecting with any + * offending objects. If it is... Well, it won't be for long, since it'll + * probably blow up the entire reactor in about 5 seconds. + * + * After that, it'll return the air it stole this tick, just heated up. + * The max temperature is capped so it can't be used for TEGs or shit. + * + * I don't know why radiation is set to 0 after that, because it means + * that the INDRA is COMPLETELY radiation-free short of exploding it. + * + * Probably need to delete radiation = 0 after testing it doesn't generate + * unreasonable amounts of rads with current values. + */ /obj/effect/fusion_em_field/proc/Radiate() if(istype(loc, /turf)) for(var/atom/movable/AM in range(max(1,FLOOR(size/2, 1)), loc)) @@ -435,7 +493,8 @@ if(owned_core && owned_core.loc) var/datum/gas_mixture/environment = owned_core.loc.return_air() - if(environment && environment.temperature < (T0C+1000)) // Putting an upper bound on it to stop it being used in a TEG. + // Putting an upper bound on it to stop it being used in a TEG. + if(environment && environment.temperature < (T0C+1000)) environment.add_thermal_energy(plasma_temperature*20000) radiation = 0 @@ -450,13 +509,21 @@ catcher.UpdateSize() return changed -//the !!fun!! part +/** + * The !!fun!! part. + * + * Read through the whole code for actual details please, but TLDR: + * * Maximum of 10000 reactants present in the pool at a given time. + * * A random number of reactants are chosen to react in a given cycle. + * * Reactions follow a priority list- IE deut+trit before deut+deut. + * * + */ /obj/effect/fusion_em_field/proc/React() - //loop through the reactants in random order + // Loop through the reactants in random order var/list/react_pool = reactants.Copy() last_reactants = 0 - //cant have any reactions if there aren't any reactants present + // Can't have any reactions if there aren't any reactants present if(length(react_pool)) //determine a random amount to actually react this cycle, and remove it from the standard pool //this is a hack, and quite nonrealistic :( diff --git a/code/modules/radiation/radiation.dm b/code/modules/radiation/radiation.dm index e30a36ecbd4..a4b0a0783b0 100644 --- a/code/modules/radiation/radiation.dm +++ b/code/modules/radiation/radiation.dm @@ -1,12 +1,18 @@ // Describes a point source of radiation. Created either in response to a pulse of radiation, or over an irradiated atom. // Sources will decay over time, unless something is renewing their power! /datum/radiation_source - var/turf/source_turf // Location of the radiation source. - var/rad_power // Strength of the radiation being emitted. - var/decay = TRUE // True for automatic decay. False if owner promises to handle it (i.e. supermatter) - var/respect_maint = FALSE // True for not affecting AREA_FLAG_RAD_SHIELDED areas. - var/flat = FALSE // True for power falloff with distance. - var/range // Cached maximum range, used for quick checks against mobs. + /// Location of the radiation source. + var/turf/source_turf + /// Strength of the radiation being emitted. + var/rad_power + /// True for automatic decay. False if owner promises to handle it (i.e. Supermatter, INDRA, etc.) + var/decay = TRUE + /// True for not affecting AREA_FLAG_RAD_SHIELDED areas. + var/respect_rad_shielding = FALSE + /// True for power falloff with distance. + var/flat = FALSE + /// Cached maximum range, used for quick checks against mobs. + var/range /datum/radiation_source/New(source_turf, rad_power, decay = TRUE) src.source_turf = source_turf @@ -20,6 +26,9 @@ src.source_turf = null . = ..() +/** + * Initialization handling decaying sources. Decrease by RADIATION_DECAY_RATE per SSradiation.fire() in latter cases. + */ /datum/radiation_source/proc/update_rad_power(new_power = null) if(new_power == null || new_power == rad_power) return // No change @@ -28,7 +37,8 @@ else rad_power = new_power if(!flat) - range = min(round(sqrt(rad_power / RADIATION_LOWER_LIMIT)), 31) // R = rad_power / dist**2 - Solve for dist + // R = rad_power / dist**2 - Solve for dist + range = min(round(sqrt(rad_power / RADIATION_LOWER_LIMIT)), 31) /turf/var/cached_rad_resistance = 0 @@ -47,7 +57,8 @@ cached_rad_resistance = (density ? material.weight / RADIATION_MATERIAL_RESISTANCE_DIVISOR : 0) /obj - var/rad_resistance_modifier = 1 // Allow overriding rad resistance + /// Allow overriding rad resistance. + var/rad_resistance_modifier = 1 /** * Retrieves the atom's current radiation level. By default, this will return `loc.get_rads()`. @@ -65,14 +76,20 @@ /** * Called when radiation affects the atom. * - * **Parameters**: - * - `severity` - The amount of radiation being applied. Also see `RAD_LEVEL_*`. + * * severity - The amount of radiation being applied. Also see RAD_LEVEL_*. * * Returns boolean */ /atom/proc/rad_act(severity) return 1 +/** + * Called when radiation affects a /mob/living. + * + * * severity - The amount of radiation being applied. Anything over RAD_LEVEL_LOW will deal [severity] dispersed damage and run rad_act to everything in it. + * + * Returns boolean + */ /mob/living/rad_act(severity) if(severity > RAD_LEVEL_LOW) apply_damage(severity, DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index b44aa384f64..9080c706442 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -1200,19 +1200,19 @@ var/list/goodmessage_species /** - * We leave goodmessage_species null so no unnecessary checks are performed for most reagents. However, if we want a given reagent to have unique - * messages for consumers of a given species, its value can be set as below within the singleton/reagent/mental: + * We leave goodmessage_species null so no unnecessary checks are performed for most reagents. However, if we want a given reagent to have unique + * messages for consumers of a given species, its value can be set as below within the singleton/reagent/mental: * - * goodmessage_species = list( - * SPECIES_HUMAN = list("Damn you're high.","You're totally zooted!"), - * SPECIES_HUMAN_OFFWORLD = list("Damn you're WAY higher than normal humans. Like, you might even say outside the gravity well high.", "Zooted bo booted boyyy."), - * SPECIES_UNATHI = list("You feel like shit and want to die.","Why the fuck did you smoke that shitty human stuff."), - * SPECIES_SKRELL = list("Aaaaaaaaaaaa!","Aaaauuuuaaaa!","Waaaoouuuuaaaaahhh!"), - * SPECIES_SKRELL_AXIORI = list("If you weren't axiori you'd probably be having a bad time but you're pretty zooted.") - * ) + * goodmessage_species = list( + * SPECIES_HUMAN = list("Damn you're high.","You're totally zooted!"), + * SPECIES_HUMAN_OFFWORLD = list("Damn you're WAY higher than normal humans. Like, you might even say outside the gravity well high.", "Zooted bo booted boyyy."), + * SPECIES_UNATHI = list("You feel like shit and want to die.","Why the fuck did you smoke that shitty human stuff."), + * SPECIES_SKRELL = list("Aaaaaaaaaaaa!","Aaaauuuuaaaa!","Waaaoouuuuaaaaahhh!"), + * SPECIES_SKRELL_AXIORI = list("If you weren't axiori you'd probably be having a bad time but you're pretty zooted.") + * ) * - * No, there's not support right now for things like ALL_DIONA_SPECIES. Once somebody wants to make Vaurca-only drugs, they will probably - * implement support for it out of sheer annoyance though. + * No, there's not support right now for things like ALL_DIONA_SPECIES. Once somebody wants to make Vaurca-only drugs, they will probably + * implement support for it out of sheer annoyance though. */ fallback_specific_heat = 1.5 @@ -1239,8 +1239,8 @@ /** * Holds logic for returning feedback message strings based on race. - * 'goodmessage' is your generic catch-all list of message strings. - * 'goodmessage_species', if set, will override the 'goodmessage' list only for that species. + * 'goodmessage' is your generic catch-all list of message strings. + * 'goodmessage_species', if set, will override the 'goodmessage' list only for that species. */ /singleton/reagent/mental/proc/feedback_message(var/mob/living/carbon/human/mob) var/mob_species = mob.get_species() diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index f4d7f55bf2b..980dcb37fc5 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -1,11 +1,11 @@ /** - * Disposal bin - * Holds items for disposal into pipe system - * Draws air from turf, gradually charges internal reservoir - * Once full (~1 atm), uses air resv to flush items into the pipes - * Automatically recharges air (unless off), will flush when ready if pre-set - * Can hold items and human size things, no other draggables - * Toilets are a type of disposal bin for small objects only and work on magic. By magic, I mean torque rotation + * Disposal bin + * Holds items for disposal into pipe system + * Draws air from turf, gradually charges internal reservoir + * Once full (~1 atm), uses air resv to flush items into the pipes + * Automatically recharges air (unless off), will flush when ready if pre-set + * Can hold items and human size things, no other draggables + * Toilets are a type of disposal bin for small objects only and work on magic. By magic, I mean torque rotation */ /// kPa - assume the inside of a dispoal pipe is 1 atm, so that needs to be added. @@ -104,8 +104,8 @@ return TRUE /** - * Create a new disposal: - * Find the attached trunk (if present), and initialize gas reservoir. + * Create a new disposal: + * Find the attached trunk (if present), and initialize gas reservoir. */ /obj/machinery/disposal/Initialize() . = ..() @@ -138,7 +138,7 @@ return things /** - * Attack by an item places it into the disposal. + * Attack by an item places it into the disposal. */ /obj/machinery/disposal/attackby(obj/item/attacking_item, mob/user) if(stat & BROKEN || !attacking_item || !user) @@ -261,7 +261,7 @@ update() /** - * Handles mouse-dropping another mob or self onto disposal. + * Handles mouse-dropping another mob or self onto disposal. */ /obj/machinery/disposal/mouse_drop_receive(atom/dropped, mob/user, params) var/mob/target = dropped @@ -329,7 +329,7 @@ return 1 /** - * Attempt to move while inside. + * Attempt to move while inside. */ /obj/machinery/disposal/relaymove(mob/living/user, direction) . = ..() @@ -341,7 +341,7 @@ return /** - * Leave the disposal. + * Leave the disposal. */ /obj/machinery/disposal/proc/go_out(mob/user) @@ -353,7 +353,7 @@ return /** - * AI: as human but can't flush. + * AI: as human but can't flush. */ /obj/machinery/disposal/attack_ai(mob/user as mob) if(!ai_can_interact(user)) @@ -362,7 +362,7 @@ interact(user, !inside_bin) /** - * Human interacts with machine. + * Human interacts with machine. */ /obj/machinery/disposal/attack_hand(mob/user as mob) if(stat & BROKEN) @@ -424,7 +424,7 @@ . = TRUE /** - * Eject the contents of the disposal unit. + * Eject the contents of the disposal unit. */ /obj/machinery/disposal/proc/eject() for(var/atom/movable/AM in src) @@ -433,7 +433,7 @@ update() /** - * Update the icon & overlays to reflect mode & status + * Update the icon & overlays to reflect mode & status */ /obj/machinery/disposal/proc/update() ClearOverlays() @@ -462,7 +462,7 @@ AddOverlays("[icon_state]-ready") /** - * Timed process. Charge the gas reservoir and perform flush if ready. + * Timed process. Charge the gas reservoir and perform flush if ready. */ /obj/machinery/disposal/process() if((stat & BROKEN) || !is_on) @@ -502,7 +502,7 @@ return /** - * If powered and working, transfer gas from local env to internal reservoir and use the required power to do so. + * If powered and working, transfer gas from local env to internal reservoir and use the required power to do so. */ /obj/machinery/disposal/proc/pressurize() // Don't pressurize if there's no power. @@ -528,7 +528,7 @@ mode = MODE_READY /** - * Attempt to flush. If able, create a virtual holder object containing disposal bin & gas reservoir contents to ship through disposals network + * Attempt to flush. If able, create a virtual holder object containing disposal bin & gas reservoir contents to ship through disposals network */ /obj/machinery/disposal/proc/flush() set waitfor = FALSE @@ -583,7 +583,7 @@ return /** - * Called when area power changes. + * Called when area power changes. */ /obj/machinery/disposal/power_change() // do default setting/reset of stat NOPOWER bit @@ -593,7 +593,7 @@ return /** - * Called when holder is expelled from a disposal- should usually only occur if the pipe network is modified + * Called when holder is expelled from a disposal- should usually only occur if the pipe network is modified */ /obj/machinery/disposal/proc/expel(var/obj/disposalholder/H) @@ -637,10 +637,10 @@ /** - * Virtual disposal object - * Travels through pipes in lieu of actual items - * Contents will be items flushed by the disposal - * This allows the gas flushed to be tracked + * Virtual disposal object + * Travels through pipes in lieu of actual items + * Contents will be items flushed by the disposal + * This allows the gas flushed to be tracked */ /obj/disposalholder invisibility = 101 @@ -662,7 +662,7 @@ var/tmp/obj/structure/disposalpipe/tick_last /** - * Initialize a holder from the contents of a disposal unit. + * Initialize a holder from the contents of a disposal unit. */ /obj/disposalholder/proc/init(var/obj/machinery/disposal/D, var/datum/gas_mixture/flush_gas) gas = flush_gas// transfer gas resv. into holder object -- let's be explicit about the data this proc consumes, please. @@ -702,8 +702,8 @@ /** - * Start the movement process - * Argument is the disposal unit the holder started in + * Start the movement process + * Argument is the disposal unit the holder started in */ /obj/disposalholder/proc/start(var/obj/machinery/disposal/D) // No trunk connected, so expel immediately @@ -716,7 +716,7 @@ START_PROCESSING(SSdisposals, src) /** - * For the new SSdisposals-based movement. + * For the new SSdisposals-based movement. */ /obj/disposalholder/process() if (hasmob && prob(3)) @@ -751,13 +751,13 @@ tick_last = null /** - * Find the turf which should contain the next pipe + * Find the turf which should contain the next pipe */ /obj/disposalholder/proc/nextloc() return get_step(loc,dir) /** - * Find a matching pipe on a turf + * Find a matching pipe on a turf */ /obj/disposalholder/proc/findpipe(var/turf/T) if(!T) @@ -773,7 +773,7 @@ return null /** - * Merge two holder objects. Used when a a holder meets a stuck holder. + * Merge two holder objects. Used when a a holder meets a stuck holder. */ /obj/disposalholder/proc/merge(obj/disposalholder/other) for(var/atom/movable/AM in other) @@ -798,7 +798,7 @@ partialTag = new_tag /** - * Called when player tries to move while in a pipe. + * Called when player tries to move while in a pipe. */ /obj/disposalholder/relaymove(mob/living/user, direction) . = ..() @@ -820,7 +820,7 @@ playsound(src.loc, 'sound/effects/clang.ogg', 50, 0, 0) /** - * Called to vent all gas in holder to a location + * Called to vent all gas in holder to a location */ /obj/disposalholder/proc/vent_gas(atom/location) location.assume_air(gas) // vent all gas to turf @@ -859,7 +859,7 @@ LAZYADD(T.blueprints, I) /** - * Pipe is deleted. Ensure if holder is present, it is expelled. + * Pipe is deleted. Ensure if holder is present, it is expelled. */ /obj/structure/disposalpipe/Destroy() var/obj/disposalholder/H = locate() in src @@ -884,15 +884,15 @@ return ..() /** - * Returns the direction of the next pipe object, given the entrance dir - * By default, returns the bitmask of remaining directions + * Returns the direction of the next pipe object, given the entrance dir + * By default, returns the bitmask of remaining directions */ /obj/structure/disposalpipe/proc/nextdir(var/fromdir) return dpdir & (~turn(fromdir, 180)) /** - * Transfer the holder through this pipe segment - * Overriden for special behaviour + * Transfer the holder through this pipe segment + * Overriden for special behaviour */ /obj/structure/disposalpipe/proc/transfer(var/obj/disposalholder/H) var/nextdir = nextdir(H.dir) @@ -914,22 +914,22 @@ return P /** - * Update the icon_state to reflect hidden status + * Update the icon_state to reflect hidden status */ /obj/structure/disposalpipe/proc/update() var/turf/T = src.loc hide(!T.is_plating() && !istype(T,/turf/space)) // space never hides pipes /** - * Hide called by levelupdate if turf intact status changes - * Change visibility status and force update of icon + * Hide called by levelupdate if turf intact status changes + * Change visibility status and force update of icon */ /obj/structure/disposalpipe/hide(var/intact) set_invisibility(intact ? 101: 0) // hide if floor is intact /** - * Expel the held objects into a turf - * Called when there is a break in the pipe + * Expel the held objects into a turf + * Called when there is a break in the pipe */ /obj/structure/disposalpipe/proc/expel(var/obj/disposalholder/H, var/turf/T, var/direction) if(!istype(H) || !istype(T)) @@ -981,8 +981,8 @@ /** - * Call to break the pipe: will expel any holder inside at the time then delete the pipe - * remains: Set to leave broken pipe pieces in place. + * Call to break the pipe: will expel any holder inside at the time then delete the pipe + * remains: Set to leave broken pipe pieces in place. */ /obj/structure/disposalpipe/proc/broken(var/remains = 0) if(remains) @@ -1015,7 +1015,7 @@ /** - * Pipe is affected by an explosion + * Pipe is affected by an explosion */ /obj/structure/disposalpipe/ex_act(severity) switch(severity) @@ -1033,7 +1033,7 @@ /** - * Test pipe's health. Am I broken? + * Test pipe's health. Am I broken? */ /obj/structure/disposalpipe/proc/healthcheck() if(health < -2) @@ -1042,8 +1042,8 @@ broken(1) /** - * Attack by item - * Welding tool: Unfasten and convert to obj/disposalconstruct + * Attack by item + * Welding tool: Unfasten and convert to obj/disposalconstruct */ /obj/structure/disposalpipe/attackby(obj/item/attacking_item, mob/user) var/turf/T = src.loc @@ -1066,7 +1066,7 @@ to_chat(user, "You need more welding fuel to cut the pipe.") /** - * Called when pipe is cut by a welder. + * Called when pipe is cut by a welder. */ /obj/structure/disposalpipe/proc/welded() var/obj/structure/disposalconstruct/C = new (src.loc) @@ -1249,9 +1249,9 @@ update() /* - * Next direction to move: - * If coming in from secondary dirs, then next is primary dir. - * If coming in from primary dir, then next is equal chance of other dirs. + * Next direction to move: + * If coming in from secondary dirs, then next is primary dir. + * If coming in from primary dir, then next is equal chance of other dirs. */ /obj/structure/disposalpipe/junction/nextdir(var/fromdir) var/flipdir = turn(fromdir, 180) @@ -1394,10 +1394,10 @@ return sortType == checkTag /** - * Next direction to move: - * If coming in from negdir, then next is primary dir or sortdir. - * If coming in from posdir, then flip around and go back to posdir. - * If coming in from sortdir, go to posdir. + * Next direction to move: + * If coming in from negdir, then next is primary dir or sortdir. + * If coming in from posdir, then flip around and go back to posdir. + * If coming in from sortdir, go to posdir. */ /obj/structure/disposalpipe/sortjunction/nextdir(var/fromdir, var/sortTag) if(fromdir != sortdir) // probably came from the negdir @@ -1483,7 +1483,7 @@ update() /** - * Override attackby so we disallow trunkremoval when somethings ontop + * Override attackby so we disallow trunkremoval when somethings ontop */ /obj/structure/disposalpipe/trunk/attackby(obj/item/attacking_item, mob/user) @@ -1525,8 +1525,8 @@ to_chat(user, "You need more welding fuel to cut the pipe.") /* - * Would transfer to next pipe segment, but we are in a trunk. - * If not entering from disposal bin, transfer to linked object (outlet or bin) + * Would transfer to next pipe segment, but we are in a trunk. + * If not entering from disposal bin, transfer to linked object (outlet or bin) */ /obj/structure/disposalpipe/trunk/transfer(var/obj/disposalholder/H) @@ -1570,8 +1570,8 @@ update() /** - * Called when welded - * For broken pipe, remove and turn into scrap + * Called when welded + * For broken pipe, remove and turn into scrap */ /obj/structure/disposalpipe/broken/welded() // var/obj/item/scrap/S = new(src.loc) @@ -1698,14 +1698,14 @@ return /** - * Called when movable is expelled from a disposal pipe or outlet - * By default does nothing, override for special behaviour + * Called when movable is expelled from a disposal pipe or outlet + * By default does nothing, override for special behaviour */ /atom/movable/proc/pipe_eject(var/direction) return /** - * Check if mob has client, if so restore client view on eject + * Check if mob has client, if so restore client view on eject */ /mob/pipe_eject(var/direction) if (src.client) diff --git a/html/changelogs/Bat-dmdocs.yml b/html/changelogs/Bat-dmdocs.yml new file mode 100644 index 00000000000..6c014f260f8 --- /dev/null +++ b/html/changelogs/Bat-dmdocs.yml @@ -0,0 +1,58 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: Batrachophrenoboocosmomachia + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - code_imp: "DMdocs comment/documentation conversion progress." diff --git a/maps/runtime/code/runtime.dm b/maps/runtime/code/runtime.dm index 2c75778ddc5..d0d423a71c1 100644 --- a/maps/runtime/code/runtime.dm +++ b/maps/runtime/code/runtime.dm @@ -62,26 +62,25 @@ warehouse_basearea = /area/storage/primary /** - * This file is the only location in which runtime map areas should be defined. - * Each department (or other appropriate grouping) will have its own section that you can jump to with ctrl-f. - * For convenience, these groupings are: - * CREW_AREAS - * COMMAND_AREAS - * ENGINEERING_AREAS - * MAINTENANCE_AREAS - * MEDICAL_AREAS - * OPERATIONS_AREAS - * SCIENCE_AREAS - * SECURITY_AREAS - * SERVICE_AREAS - * TCOMMS_AREAS + * This file is the only location in which runtime map areas should be defined. + * Each department (or other appropriate grouping) will have its own section that you can jump to with ctrl-f. + * For convenience, these groupings are: + * * CREW_AREAS + * * COMMAND_AREAS + * * ENGINEERING_AREAS + * * MAINTENANCE_AREAS + * * MEDICAL_AREAS + * * OPERATIONS_AREAS + * * SCIENCE_AREAS + * * SECURITY_AREAS + * * SERVICE_AREAS + * * TCOMMS_AREAS * - * GUIDELINES: - * - The Horizon should not have any areas mapped to it which are defined outside this file. - * - Any PR that removes all areas of a given definition should also remove that definition from this file. - * - No area should exist across multiple decks. Ex., an elevator vestibule on all three decks should have three - * child definitions, one for each deck. This is both for organization and for managing area objects like APCs etc. - * - Update the groupings list if anything is added/removed. + * GUIDELINES: + * * The Horizon should not have any areas mapped to it which are defined outside this file. + * * Any PR that removes all areas of a given definition should also remove that definition from this file. + * * No area should exist across multiple decks. Ex., an elevator vestibule on all three decks should have three child definitions, one for each deck. This is both for organization and for managing area objects like APCs etc. + * * Update the groupings list if anything is added/removed. */ /// CIVILIAN_AREAS diff --git a/maps/sccv_horizon/areas/_horizon_areas.dm b/maps/sccv_horizon/areas/_horizon_areas.dm index 98dc8993708..24c5ead9448 100644 --- a/maps/sccv_horizon/areas/_horizon_areas.dm +++ b/maps/sccv_horizon/areas/_horizon_areas.dm @@ -1,23 +1,22 @@ /** - * Definitions for every area used on the SCCV Horizon map. + * Definitions for every area used on the SCCV Horizon map. * - * This file is only to contain definitions for the master horizon and horizon exterior areas, and this documentation. - * The other files in this subfolder ('maps/sccv_horizon/code/sccv_horizon_areas') are the remaining SCCV Horizon areas, - * divided broadly by department with the exception of horizon_areas_crew.dm. + * This file is only to contain definitions for the master horizon and horizon exterior areas, and this documentation. + * The other files in this subfolder ('maps/sccv_horizon/code/sccv_horizon_areas') are the remaining SCCV Horizon areas, + * divided broadly by department with the exception of horizon_areas_crew.dm. * - * While most should be self-explanatory by name, horizon_areas_crew is a catch-all file for all areas that are either 'public' - * (like hallways, washrooms) but also areas which are difficult to slot into a given department, like Head of Staff offices, - * non-dept storage, etc. If we add anything weird that doesn't fit neatly, add it there. + * While most should be self-explanatory by name, horizon_areas_crew is a catch-all file for all areas that are either 'public' + * (like hallways, washrooms) but also areas which are difficult to slot into a given department, like Head of Staff offices, + * non-dept storage, etc. If we add anything weird that doesn't fit neatly, add it there. * - * Whenever areas are added or removed from the Horizon, it should be handled within this subfolder. Whenever NBT comes, the - * definition names /area/horizon/. should just be replaced with /area/[whatever]/. + * Whenever areas are added or removed from the Horizon, it should be handled within this subfolder. Whenever NBT comes, the + * definition names /area/horizon/. should just be replaced with /area/[whatever]/. * - * GUIDELINES: - * - The Horizon should not have any areas mapped to it which are defined outside this file. - * - Any PR that removes all areas of a given definition should also remove or comment out that definition from here. - * - No area should exist across multiple decks. Ex., an elevator vestibule on all three decks should have three - * child definitions, one for each deck. This is both for organization and for managing area objects like APCs etc. - * - Update the groupings list if anything is added/removed. + * GUIDELINES: + * * The Horizon should not have any areas mapped to it which are defined outside this file. + * * Any PR that removes all areas of a given definition should also remove or comment out that definition from here. + * * No area should exist across multiple decks. Ex., an elevator vestibule on all three decks should have three child definitions, one for each deck. This is both for organization and for managing area objects like APCs etc. + * * Update the groupings list if anything is added/removed. */ /// SCCV Horizon master areas