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 <Batrochophreno@gmail.com>
This commit is contained in:
Batrachophreno
2025-08-09 08:22:56 -04:00
committed by GitHub
parent a840bd1cb1
commit c2f054fd81
88 changed files with 1574 additions and 879 deletions
@@ -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())
@@ -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.