diff --git a/code/__DEFINES/MC.dm b/code/__DEFINES/MC.dm index 97ce6ef6fdd..161bb21d038 100644 --- a/code/__DEFINES/MC.dm +++ b/code/__DEFINES/MC.dm @@ -22,46 +22,46 @@ #define START_PROCESSING(Processor, Datum) if (!(Datum.datum_flags & DF_ISPROCESSING)) {Datum.datum_flags |= DF_ISPROCESSING;Processor.processing += Datum} #define STOP_PROCESSING(Processor, Datum) Datum.datum_flags &= ~DF_ISPROCESSING;Processor.processing -= Datum -//SubSystem flags (Please design any new flags so that the default is off, to make adding flags to subsystems easier) +//! SubSystem flags (Please design any new flags so that the default is off, to make adding flags to subsystems easier) -//subsystem does not initialize. +/// subsystem does not initialize. #define SS_NO_INIT 1 -//subsystem does not fire. -// (like can_fire = 0, but keeps it from getting added to the processing subsystems list) -// (Requires a MC restart to change) +/** subsystem does not fire. */ +/// (like can_fire = 0, but keeps it from getting added to the processing subsystems list) +/// (Requires a MC restart to change) #define SS_NO_FIRE 2 -//subsystem only runs on spare cpu (after all non-background subsystems have ran that tick) -// SS_BACKGROUND has its own priority bracket +/** subsystem only runs on spare cpu (after all non-background subsystems have ran that tick) */ +/// SS_BACKGROUND has its own priority bracket #define SS_BACKGROUND 4 -//subsystem does not tick check, and should not run unless there is enough time (or its running behind (unless background)) +/// subsystem does not tick check, and should not run unless there is enough time (or its running behind (unless background)) #define SS_NO_TICK_CHECK 8 -//Treat wait as a tick count, not DS, run every wait ticks. -// (also forces it to run first in the tick, above even SS_NO_TICK_CHECK subsystems) -// (implies all runlevels because of how it works) -// (overrides SS_BACKGROUND) -// This is designed for basically anything that works as a mini-mc (like SStimer) +/** Treat wait as a tick count, not DS, run every wait ticks. */ +/// (also forces it to run first in the tick, above even SS_NO_TICK_CHECK subsystems) +/// (implies all runlevels because of how it works) +/// (overrides SS_BACKGROUND) +/// This is designed for basically anything that works as a mini-mc (like SStimer) #define SS_TICKER 16 -//keep the subsystem's timing on point by firing early if it fired late last fire because of lag -// ie: if a 20ds subsystem fires say 5 ds late due to lag or what not, its next fire would be in 15ds, not 20ds. +/** keep the subsystem's timing on point by firing early if it fired late last fire because of lag */ +/// ie: if a 20ds subsystem fires say 5 ds late due to lag or what not, its next fire would be in 15ds, not 20ds. #define SS_KEEP_TIMING 32 -//Calculate its next fire after its fired. -// (IE: if a 5ds wait SS takes 2ds to run, its next fire should be 5ds away, not 3ds like it normally would be) -// This flag overrides SS_KEEP_TIMING +/** Calculate its next fire after its fired. */ +/// (IE: if a 5ds wait SS takes 2ds to run, its next fire should be 5ds away, not 3ds like it normally would be) +/// This flag overrides SS_KEEP_TIMING #define SS_POST_FIRE_TIMING 64 -//SUBSYSTEM STATES -#define SS_IDLE 0 //aint doing shit. -#define SS_QUEUED 1 //queued to run -#define SS_RUNNING 2 //actively running -#define SS_PAUSED 3 //paused by mc_tick_check -#define SS_SLEEPING 4 //fire() slept. -#define SS_PAUSING 5 //in the middle of pausing +//! SUBSYSTEM STATES +#define SS_IDLE 0 /// aint doing shit. +#define SS_QUEUED 1 /// queued to run +#define SS_RUNNING 2 /// actively running +#define SS_PAUSED 3 /// paused by mc_tick_check +#define SS_SLEEPING 4 /// fire() slept. +#define SS_PAUSING 5 /// in the middle of pausing #define SUBSYSTEM_DEF(X) GLOBAL_REAL(SS##X, /datum/controller/subsystem/##X);\ /datum/controller/subsystem/##X/New(){\ diff --git a/code/datums/components/README.md b/code/datums/components/README.md index b617c8a25b1..26a4b0fe2a4 100644 --- a/code/datums/components/README.md +++ b/code/datums/components/README.md @@ -50,9 +50,9 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo 1. `/datum/component/var/datum/parent` (protected, read-only) * The datum this component belongs to * Never `null` in child procs -1. `report_signal_origin` (protected, boolean) - * If `TRUE`, will invoke the callback when signalled with the signal type as the first argument. - * `FALSE` by default. +1. `report_signal_origin` (protected, boolean) + * If `TRUE`, will invoke the callback when signalled with the signal type as the first argument. + * `FALSE` by default. ### Procs diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index de3a4e730cd..f2b195c32d5 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -1,3 +1,33 @@ +/** # Snacks + +Items in the "Snacks" subcategory are food items that people actually eat. The key points are that they are created +already filled with reagents and are destroyed when empty. Additionally, they make a "munching" noise when eaten. + +Notes by Darem: Food in the "snacks" subtype can hold a maximum of 50 units. Generally speaking, you don't want to go over 40 +total for the item because you want to leave space for extra condiments. If you want effect besides healing, add a reagent for +it. Try to stick to existing reagents when possible (so if you want a stronger healing effect, just use omnizine). On use +effect (such as the old officer eating a donut code) requires a unique reagent (unless you can figure out a better way). + +The nutriment reagent and bitesize variable replace the old heal_amt and amount variables. Each unit of nutriment is equal to +2 of the old heal_amt variable. Bitesize is the rate at which the reagents are consumed. So if you have 6 nutriment and a +bitesize of 2, then it'll take 3 bites to eat. Unlike the old system, the contained reagents are evenly spread among all +the bites. No more contained reagents = no more bites. + +Here is an example of the new formatting for anyone who wants to add more food items. +``` +/obj/item/reagent_containers/food/snacks/xenoburger //Identification path for the object. + name = "Xenoburger" //Name that displays in the UI. + desc = "Smells caustic. Tastes like heresy." //Duh + icon_state = "xburger" //Refers to an icon in food.dmi +/obj/item/reagent_containers/food/snacks/xenoburger/Initialize() //Don't mess with this. | nO I WILL MESS WITH THIS + . = ..() //Same here. + reagents.add_reagent("xenomicrobes", 10) //This is what is in the food item. you may copy/paste + reagents.add_reagent("nutriment", 2) //this line of code for all the contents. + bitesize = 3 //This is the amount each bite consumes. +``` + +All foods are distributed among various categories. Use common sense. +*/ /obj/item/reagent_containers/food/snacks name = "snack" desc = "Yummy." @@ -294,40 +324,8 @@ M.emote("me", 1, "[sattisfaction_text]") qdel(src) - -////////////////////////////////////////////////// -////////////////////////////////////////////Snacks -////////////////////////////////////////////////// -//Items in the "Snacks" subcategory are food items that people actually eat. The key points are that they are created -// already filled with reagents and are destroyed when empty. Additionally, they make a "munching" noise when eaten. - -//Notes by Darem: Food in the "snacks" subtype can hold a maximum of 50 units Generally speaking, you don't want to go over 40 -// total for the item because you want to leave space for extra condiments. If you want effect besides healing, add a reagent for -// it. Try to stick to existing reagents when possible (so if you want a stronger healing effect, just use omnizine). On use -// effect (such as the old officer eating a donut code) requires a unique reagent (unless you can figure out a better way). - -//The nutriment reagent and bitesize variable replace the old heal_amt and amount variables. Each unit of nutriment is equal to -// 2 of the old heal_amt variable. Bitesize is the rate at which the reagents are consumed. So if you have 6 nutriment and a -// bitesize of 2, then it'll take 3 bites to eat. Unlike the old system, the contained reagents are evenly spread among all -// the bites. No more contained reagents = no more bites. - -//Here is an example of the new formatting for anyone who wants to add more food items. -///obj/item/reagent_containers/food/snacks/xenoburger //Identification path for the object. -// name = "Xenoburger" //Name that displays in the UI. -// desc = "Smells caustic. Tastes like heresy." //Duh -// icon_state = "xburger" //Refers to an icon in food.dmi -///obj/item/reagent_containers/food/snacks/xenoburger/Initialize() //Don't mess with this. | nO I WILL MESS WITH THIS -// . = ..() //Same here. -// reagents.add_reagent("xenomicrobes", 10) //This is what is in the food item. you may copy/paste -// reagents.add_reagent("nutriment", 2) //this line of code for all the contents. -// bitesize = 3 //This is the amount each bite consumes. - -//All foods are distributed among various categories. Use common sense. - -/////////////////////////////////////////////////Store//////////////////////////////////////// -// All the food items that can store an item inside itself, like bread or cake. - - +// //////////////////////////////////////////////Store//////////////////////////////////////// +/// All the food items that can store an item inside itself, like bread or cake. /obj/item/reagent_containers/food/snacks/store w_class = WEIGHT_CLASS_NORMAL var/stored_item = 0 diff --git a/code/modules/keybindings/readme.md b/code/modules/keybindings/readme.md index 6c0369d7c7f..f57d8d55ffa 100644 --- a/code/modules/keybindings/readme.md +++ b/code/modules/keybindings/readme.md @@ -1,7 +1,8 @@ # In-code keypress handling system This whole system is heavily based off of forum_account's keyboard library. -Thanks to forum_account for saving the day, the library can be found [here](https://secure.byond.com/developer/Forum_account/Keyboard)! +Thanks to forum_account for saving the day, the library can be found +[here](https://secure.byond.com/developer/Forum_account/Keyboard)! .dmf macros have some very serious shortcomings. For example, they do not allow reusing parts of one macro in another, so giving cyborgs their own shortcuts to swap active module couldn't @@ -30,10 +31,11 @@ pressed. No client-set keybindings at this time, but it shouldn't be too hard if someone wants. -Notes about certain keys -`Tab` has client-sided behavior but acts normally -`T`, `O`, and `M` move focus to the input when pressed. This fires the keyUp macro right away. -`\` needs to be escaped in the dmf so any usage is `\\` +Notes about certain keys: + +* `Tab` has client-sided behavior but acts normally +* `T`, `O`, and `M` move focus to the input when pressed. This fires the keyUp macro right away. +* `\` needs to be escaped in the dmf so any usage is `\\` You cannot `TICK_CHECK` or check `world.tick_usage` inside of procs called by key down and up events. They happen outside of a byond tick and have no meaning there. Key looping diff --git a/code/modules/modular_computers/documentation.md b/code/modules/modular_computers/documentation.md index 88d8602729d..246da7c3d9c 100644 --- a/code/modules/modular_computers/documentation.md +++ b/code/modules/modular_computers/documentation.md @@ -1,32 +1,62 @@ +# Modular computer programs - -#Modular computer programs Ok. so a quick rundown on how to make a program. This is kind of a shitty documentation, but oh well I was asked to. - ## Base setup -This is how the base program is setup. the rest is mostly tgui stuff. I'll use the ntnetmonitor as a base +This is how the base program is setup. the rest is mostly tgui stuff. I'll use the ntnetmonitor as a base ```DM /datum/computer_file/program/ntnetmonitor - filename = "ntmonitor" //This is obviously the name of the file itself. not much to be said - filedesc = "NTNet Diagnostics and Monitoring" // This is sort of the official name. it's what shows up on the main menu - program_icon_state = "comm_monitor" // This is what the screen will look like when the program is active - extended_desc = "This program is a dummy. // This is a sort of a description, visible when looking on the ntnet - size = 12 // size of the program. Big programs need more hard drive space. Don't make it too big though. - requires_ntnet = 1 // If this is set, the program will not run without an ntnet connection, and will close if the connection is lost. Mainly for primarily online programs. - required_access = access_network //This is access required to run the program itself. ONLY SET THIS FOR SUPER SECURE SHIT. This also acts as transfer_access as well. - transfer_access = access_change_ids // This is the access needed to download from ntnet or host on the ptp program. This is what you want to use most of the time. - available_on_ntnet = 1 //If it's available to download on ntnet. pretty self explanatory. - available_on_syndinet = 0 // ditto but on emagged syndie net. Use this for antag programs - usage_flags = PROGRAM_ALL // Bitflags (PROGRAM_CONSOLE, PROGRAM_LAPTOP, PROGRAM_TABLET combination) or PROGRAM_ALL - //^^- The comment above sorta explains it. Use this to limit what kind of machines can run the program. For example, comms program should be limited to consoles and laptops. - var/ui_header = "downloader_finished.gif" //This one is kinda cool. If you have the program minimized, this will show up in the header of the computer screen. - //you can even have the program change what the header is based on the situation! see alarm.dm for an example. + /// This is obviously the name of the file itself. not much to be said + filename = "ntmonitor" + + /// This is sort of the official name. it's what shows up on the main menu + filedesc = "NTNet Diagnostics and Monitoring" + + /// This is what the screen will look like when the program is active + program_icon_state = "comm_monitor" + + /// This is a sort of a description, visible when looking on the ntnet + extended_desc = "This program is a dummy." + + /// size of the program. Big programs need more hard drive space. Don't + /// make it too big though. + size = 12 + + /// If this is set, the program will not run without an ntnet connection, + /// and will close if the connection is lost. Mainly for primarily online + /// programs. + requires_ntnet = 1 + + /// This is access required to run the program itself. ONLY SET THIS FOR + /// SUPER SECURE SHIT. This also acts as transfer_access as well. + required_access = access_network + + /// This is the access needed to download from ntnet or host on the ptp + /// program. This is what you want to use most of the time. + transfer_access = access_change_ids + + /// If it's available to download on ntnet. pretty self explanatory. + available_on_ntnet = 1 + + /// ditto but on emagged syndie net. Use this for antag programs + available_on_syndinet = 0 + + /// Bitflags (PROGRAM_CONSOLE, PROGRAM_LAPTOP, PROGRAM_TABLET combination) + /// or PROGRAM_ALL. Use this to limit what kind of machines can run the + /// program. For example, comms program should be limited to consoles and laptops. + usage_flags = PROGRAM_ALL + + /// This one is kinda cool. If you have the program minimized, this will + /// show up in the header of the computer screen. You can even have the + /// program change what the header is based on the situation! See `alarm.dm` + /// for an example. + var/ui_header = "downloader_finished.gif" ``` -##Preinstalls +## Preinstalls + Now. for pre-installing stuff. Primarily done for consoles, there's an install_programs() proc in the console presets file in the machines folder. @@ -42,4 +72,3 @@ Basically, you want to do cpu.hard_drive.store_file(new/*program path here*()) Probably pretty self explanatory, but just in case. Will probably be expanded when new features come around or I get asked to mention something. -