Grep for space indentation (#54850)

#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
This commit is contained in:
TiviPlus
2020-11-30 18:48:40 +01:00
committed by GitHub
parent 84796e5372
commit 0eaab0bc54
468 changed files with 7623 additions and 7548 deletions
+69 -69
View File
@@ -91,11 +91,11 @@
my_atom = null
/**
* Used in attack logs for reagents in pills and such
*
* Arguments:
* * external_list - list of reagent types = amounts
*/
* Used in attack logs for reagents in pills and such
*
* Arguments:
* * external_list - list of reagent types = amounts
*/
/datum/reagents/proc/log_list(external_list)
if((external_list && !length(external_list)) || !length(reagent_list))
return "no reagents"
@@ -194,21 +194,21 @@
return master
/**
* Transfer some stuff from this holder to a target object
*
* Arguments:
* * obj/target - Target to attempt transfer to
* * amount - amount of reagent volume to transfer
* * multiplier - multiplies amount of each reagent by this number
* * preserve_data - if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred.
* * no_react - passed through to [/datum/reagents/proc/add_reagent]
* * mob/transfered_by - used for logging
* * remove_blacklisted - skips transferring of reagents with can_synth = FALSE
* * methods - passed through to [/datum/reagents/proc/expose_single] and [/datum/reagent/proc/on_transfer]
* * show_message - passed through to [/datum/reagents/proc/expose_single]
* * round_robin - if round_robin=TRUE, so transfer 5 from 15 water, 15 sugar and 15 plasma becomes 10, 15, 15 instead of 13.3333, 13.3333 13.3333. Good if you hate floating point errors
* * ignore_stomach - when using methods INGEST will not use the stomach as the target
*/
* Transfer some stuff from this holder to a target object
*
* Arguments:
* * obj/target - Target to attempt transfer to
* * amount - amount of reagent volume to transfer
* * multiplier - multiplies amount of each reagent by this number
* * preserve_data - if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred.
* * no_react - passed through to [/datum/reagents/proc/add_reagent]
* * mob/transfered_by - used for logging
* * remove_blacklisted - skips transferring of reagents with can_synth = FALSE
* * methods - passed through to [/datum/reagents/proc/expose_single] and [/datum/reagent/proc/on_transfer]
* * show_message - passed through to [/datum/reagents/proc/expose_single]
* * round_robin - if round_robin=TRUE, so transfer 5 from 15 water, 15 sugar and 15 plasma becomes 10, 15, 15 instead of 13.3333, 13.3333 13.3333. Good if you hate floating point errors
* * ignore_stomach - when using methods INGEST will not use the stomach as the target
*/
/datum/reagents/proc/trans_to(obj/target, amount = 1, multiplier = 1, preserve_data = TRUE, no_react = FALSE, mob/transfered_by, remove_blacklisted = FALSE, methods = NONE, show_message = TRUE, round_robin = FALSE, ignore_stomach = FALSE)
var/list/cached_reagents = reagent_list
if(!target || !total_volume)
@@ -354,13 +354,13 @@
return amount
/**
* Triggers metabolizing the reagents in this holder
*
* Arguments:
* * mob/living/carbon/C - The mob to metabolize in, if null it uses [/datum/reagents/var/my_atom]
* * can_overdose - Allows overdosing
* * liverless - Stops reagents that aren't set as [/datum/reagent/var/self_consuming] from metabolizing
*/
* Triggers metabolizing the reagents in this holder
*
* Arguments:
* * mob/living/carbon/C - The mob to metabolize in, if null it uses [/datum/reagents/var/my_atom]
* * can_overdose - Allows overdosing
* * liverless - Stops reagents that aren't set as [/datum/reagent/var/self_consuming] from metabolizing
*/
/datum/reagents/proc/metabolize(mob/living/carbon/C, can_overdose = FALSE, liverless = FALSE)
var/list/cached_reagents = reagent_list
var/list/cached_addictions = addiction_list
@@ -455,12 +455,12 @@
R.on_mob_end_metabolize(C)
/**
* Calls [/datum/reagent/proc/on_move] on every reagent in this holder
*
* Arguments:
* * atom/A - passed to on_move
* * Running - passed to on_move
*/
* Calls [/datum/reagent/proc/on_move] on every reagent in this holder
*
* Arguments:
* * atom/A - passed to on_move
* * Running - passed to on_move
*/
/datum/reagents/proc/conditional_update_move(atom/A, Running = 0)
var/list/cached_reagents = reagent_list
for(var/reagent in cached_reagents)
@@ -469,11 +469,11 @@
update_total()
/**
* Calls [/datum/reagent/proc/on_update] on every reagent in this holder
*
* Arguments:
* * atom/A - passed to on_update
*/
* Calls [/datum/reagent/proc/on_update] on every reagent in this holder
*
* Arguments:
* * atom/A - passed to on_update
*/
/datum/reagents/proc/conditional_update(atom/A)
var/list/cached_reagents = reagent_list
for(var/reagent in cached_reagents)
@@ -651,17 +651,17 @@
my_atom.on_reagent_change(CLEAR_REAGENTS)
/**
* Applies the relevant expose_ proc for every reagent in this holder
* * [/datum/reagent/proc/expose_mob]
* * [/datum/reagent/proc/expose_turf]
* * [/datum/reagent/proc/expose_obj]
*
* Arguments
* - Atom/A: What mob/turf/object is being exposed to reagents? This is your reaction target.
* - Methods: What reaction type is the reagent itself going to call on the reaction target? Types are TOUCH, INGEST, VAPOR, PATCH, and INJECT.
* - Volume_modifier: What is the reagent volume multiplied by when exposed? Note that this is called on the volume of EVERY reagent in the base body, so factor in your Maximum_Volume if necessary!
* - Show_message: Whether to display anything to mobs when they are exposed.
*/
* Applies the relevant expose_ proc for every reagent in this holder
* * [/datum/reagent/proc/expose_mob]
* * [/datum/reagent/proc/expose_turf]
* * [/datum/reagent/proc/expose_obj]
*
* Arguments
* - Atom/A: What mob/turf/object is being exposed to reagents? This is your reaction target.
* - Methods: What reaction type is the reagent itself going to call on the reaction target? Types are TOUCH, INGEST, VAPOR, PATCH, and INJECT.
* - Volume_modifier: What is the reagent volume multiplied by when exposed? Note that this is called on the volume of EVERY reagent in the base body, so factor in your Maximum_Volume if necessary!
* - Show_message: Whether to display anything to mobs when they are exposed.
*/
/datum/reagents/proc/expose(atom/A, methods = TOUCH, volume_modifier = 1, show_message = 1)
if(isnull(A))
return null
@@ -711,15 +711,15 @@
chem_temp = clamp(chem_temp + (J / (S * total_volume)), 2.7, 1000)
/**
* Adds a reagent to this holder
*
* Arguments:
* * reagent - The reagent id to add
* * amount - Amount to add
* * list/data - Any reagent data for this reagent, used for transferring data with reagents
* * reagtemp - Temperature of this reagent, will be equalized
* * no_react - prevents reactions being triggered by this addition
*/
* Adds a reagent to this holder
*
* Arguments:
* * reagent - The reagent id to add
* * amount - Amount to add
* * list/data - Any reagent data for this reagent, used for transferring data with reagents
* * reagtemp - Temperature of this reagent, will be equalized
* * no_react - prevents reactions being triggered by this addition
*/
/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300, no_react = 0)
if(!isnum(amount) || !amount)
return FALSE
@@ -933,11 +933,11 @@ Needs matabolizing takes into consideration if the chemical is matabolizing when
. = locate(type) in cached_reagents
/**
* Returns what this holder's reagents taste like
*
* Arguments:
* * minimum_percent - the lower the minimum percent, the more sensitive the message is.
*/
* Returns what this holder's reagents taste like
*
* Arguments:
* * minimum_percent - the lower the minimum percent, the more sensitive the message is.
*/
/datum/reagents/proc/generate_taste_message(minimum_percent=15,mob/living/taster)
var/list/out = list()
var/list/tastes = list() //descriptor = strength
@@ -993,12 +993,12 @@ Needs matabolizing takes into consideration if the chemical is matabolizing when
/**
* Convenience proc to create a reagents holder for an atom
*
* Arguments:
* * max_vol - maximum volume of holder
* * flags - flags to pass to the holder
*/
* Convenience proc to create a reagents holder for an atom
*
* Arguments:
* * max_vol - maximum volume of holder
* * flags - flags to pass to the holder
*/
/atom/proc/create_reagents(max_vol, flags)
if(reagents)
qdel(reagents)
@@ -1,9 +1,9 @@
/**
* Machine that allows to identify and separate reagents in fitting container
* as well as to create new containers with separated reagents in it.
*
* Contains logic for both ChemMaster and CondiMaster, switched by "condi".
*/
* Machine that allows to identify and separate reagents in fitting container
* as well as to create new containers with separated reagents in it.
*
* Contains logic for both ChemMaster and CondiMaster, switched by "condi".
*/
/obj/machinery/chem_master
name = "ChemMaster 3000"
desc = "Used to separate chemicals and distribute them in a variety of forms."
@@ -151,16 +151,16 @@
replace_beaker(user)
/**
* Handles process of moving input reagents containers in/from machine
*
* When called checks for previously inserted beaker and gives it to user.
* Then, if new_beaker provided, places it into src.beaker.
* Returns `boolean`. TRUE if user provided (ignoring whether threre was any beaker change) and FALSE if not.
*
* Arguments:
* * user - Mob that initialized replacement, gets previously inserted beaker if there's any
* * new_beaker - New beaker to insert. Optional
*/
* Handles process of moving input reagents containers in/from machine
*
* When called checks for previously inserted beaker and gives it to user.
* Then, if new_beaker provided, places it into src.beaker.
* Returns `boolean`. TRUE if user provided (ignoring whether threre was any beaker change) and FALSE if not.
*
* Arguments:
* * user - Mob that initialized replacement, gets previously inserted beaker if there's any
* * new_beaker - New beaker to insert. Optional
*/
/obj/machinery/chem_master/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
if(!user)
return FALSE
@@ -451,14 +451,14 @@
AM.pixel_y = AM.base_pixel_y - 8 + (round( . / 3)*8)
/**
* Translates styles data into UI compatible format
*
* Expects to receive list of availables condiment styles in its complete format, and transforms them in simplified form with enough data to get UI going.
* Returns list(list("id" = <key>, "className" = <icon class>, "title" = <name and desc>),..).
*
* Arguments:
* * styles - List of styles for condiment bottles in internal format: [/obj/machinery/chem_master/proc/get_condi_styles]
*/
* Translates styles data into UI compatible format
*
* Expects to receive list of availables condiment styles in its complete format, and transforms them in simplified form with enough data to get UI going.
* Returns list(list("id" = <key>, "className" = <icon class>, "title" = <name and desc>),..).
*
* Arguments:
* * styles - List of styles for condiment bottles in internal format: [/obj/machinery/chem_master/proc/get_condi_styles]
*/
/obj/machinery/chem_master/proc/strip_condi_styles_to_icons(list/styles)
var/list/icons = list()
for (var/s in styles)
@@ -473,26 +473,26 @@
return icons
/**
* Defines and provides list of available condiment bottle styles
*
* Uses typelist() for styles storage after initialization.
* For fallback style must provide style with key (const) CONDIMASTER_STYLE_FALLBACK
* Returns list(
* <key> = list(
* "icon_state" = <bottle icon_state>,
* "name" = <bottle name>,
* "desc" = <bottle desc>,
* ?"generate_name" = <if truthy, autogenerates default name from reagents instead of using "name">,
* ?"icon_empty" = <icon_state when empty>,
* ?"fill_icon_thresholds" = <list of thresholds for reagentfillings, no tresholds if not provided or falsy>,
* ?"inhand_icon_state" = <inhand icon_state, falsy - no icon, not provided - whatever is initial (currently "beer")>,
* ?"lefthand_file" = <file for inhand icon for left hand, ignored if "inhand_icon_state" not provided>,
* ?"righthand_file" = <same as "lefthand_file" but for right hand>,
* ),
* ..
* )
*
*/
* Defines and provides list of available condiment bottle styles
*
* Uses typelist() for styles storage after initialization.
* For fallback style must provide style with key (const) CONDIMASTER_STYLE_FALLBACK
* Returns list(
* <key> = list(
* "icon_state" = <bottle icon_state>,
* "name" = <bottle name>,
* "desc" = <bottle desc>,
* ?"generate_name" = <if truthy, autogenerates default name from reagents instead of using "name">,
* ?"icon_empty" = <icon_state when empty>,
* ?"fill_icon_thresholds" = <list of thresholds for reagentfillings, no tresholds if not provided or falsy>,
* ?"inhand_icon_state" = <inhand icon_state, falsy - no icon, not provided - whatever is initial (currently "beer")>,
* ?"lefthand_file" = <file for inhand icon for left hand, ignored if "inhand_icon_state" not provided>,
* ?"righthand_file" = <same as "lefthand_file" but for right hand>,
* ),
* ..
* )
*
*/
/obj/machinery/chem_master/proc/get_condi_styles()
var/list/styles = typelist("condi_styles")
if (!styles.len)
@@ -529,12 +529,12 @@
return styles
/**
* Provides condiment bottle style based on reagents.
*
* Gets style from available by key, using last part of main reagent type (eg. "rice" for /datum/reagent/consumable/rice) as key.
* If not available returns fallback style, or null if no such thing.
* Returns list that is one of condibottle styles from [/obj/machinery/chem_master/proc/get_condi_styles]
*/
* Provides condiment bottle style based on reagents.
*
* Gets style from available by key, using last part of main reagent type (eg. "rice" for /datum/reagent/consumable/rice) as key.
* If not available returns fallback style, or null if no such thing.
* Returns list that is one of condibottle styles from [/obj/machinery/chem_master/proc/get_condi_styles]
*/
/obj/machinery/chem_master/proc/guess_condi_style(datum/reagents/reagents)
var/list/styles = get_condi_styles()
if (reagents.reagent_list.len > 0)
@@ -547,16 +547,16 @@
return styles[CONDIMASTER_STYLE_FALLBACK]
/**
* Applies style to condiment bottle.
*
* Applies props provided in "style" assuming that "container" is freshly created with no styles applied before.
* User specified name for bottle applied after this method during bottle creation,
* so container.name overwritten here for consistency rather than with some purpose in mind.
*
* Arguments:
* * container - condiment bottle that gets style applied to it
* * style - assoc list, must probably one from [/obj/machinery/chem_master/proc/get_condi_styles]
*/
* Applies style to condiment bottle.
*
* Applies props provided in "style" assuming that "container" is freshly created with no styles applied before.
* User specified name for bottle applied after this method during bottle creation,
* so container.name overwritten here for consistency rather than with some purpose in mind.
*
* Arguments:
* * container - condiment bottle that gets style applied to it
* * style - assoc list, must probably one from [/obj/machinery/chem_master/proc/get_condi_styles]
*/
/obj/machinery/chem_master/proc/apply_condi_style(obj/item/reagent_containers/food/condiment/container, list/style)
container.name = style["name"]
container.desc = style["desc"]
@@ -570,11 +570,11 @@
container.righthand_file = style["righthand_file"]
/**
* Machine that allows to identify and separate reagents in fitting container
* as well as to create new containers with separated reagents in it.
*
* All logic related to this is in [/obj/machinery/chem_master] and condimaster specific UI enabled by "condi = TRUE"
*/
* Machine that allows to identify and separate reagents in fitting container
* as well as to create new containers with separated reagents in it.
*
* All logic related to this is in [/obj/machinery/chem_master] and condimaster specific UI enabled by "condi = TRUE"
*/
/obj/machinery/chem_master/condimaster
name = "CondiMaster 3000"
desc = "Used to create condiments and other cooking supplies."
+4 -4
View File
@@ -211,10 +211,10 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
return
/**
* New, standardized method for chemicals to affect hydroponics trays.
* Defined on a per-chem level as opposed to by the tray.
* Can affect plant's health, stats, or cause the plant to react in certain ways.
*/
* New, standardized method for chemicals to affect hydroponics trays.
* Defined on a per-chem level as opposed to by the tray.
* Can affect plant's health, stats, or cause the plant to react in certain ways.
*/
/datum/reagent/proc/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray, mob/user)
if(!mytray)
return
@@ -1463,7 +1463,7 @@
color = "#FFFFFF" // white
random_color_list = list("#FFFFFF") //doesn't actually change appearance at all
/* used by crayons, can't color living things but still used for stuff like food recipes */
/* used by crayons, can't color living things but still used for stuff like food recipes */
/datum/reagent/colorful_reagent/powder/red/crayon
name = "Red Crayon Powder"
+40 -40
View File
@@ -1,10 +1,10 @@
/**
* #Chemical Reaction
*
* Datum that makes the magic between reagents happen.
*
* Chemical reactions is a class that is instantiated and stored in a global list 'chemical_reactions_list'
*/
* #Chemical Reaction
*
* Datum that makes the magic between reagents happen.
*
* Chemical reactions is a class that is instantiated and stored in a global list 'chemical_reactions_list'
*/
/datum/chemical_reaction
///Results of the chemical reactions
var/list/results = new/list()
@@ -35,40 +35,40 @@
SSticker.OnRoundstart(CALLBACK(src,.proc/update_info))
/**
* Updates information during the roundstart
*
* This proc is mainly used by explosives but can be used anywhere else
* You should generally use the special reactions in [/datum/chemical_reaction/randomized]
* But for simple variable edits, like changing the temperature or adding/subtracting required reagents it is better to use this.
*/
* Updates information during the roundstart
*
* This proc is mainly used by explosives but can be used anywhere else
* You should generally use the special reactions in [/datum/chemical_reaction/randomized]
* But for simple variable edits, like changing the temperature or adding/subtracting required reagents it is better to use this.
*/
/datum/chemical_reaction/proc/update_info()
return
/**
* Shit that happens on reaction
*
* Proc where the additional magic happens.
* You dont want to handle mob spawning in this since there is a dedicated proc for that.client
* Arguments:
* * holder - the datum that holds this reagent, be it a beaker or anything else
* * created_volume - volume created when this is mixed. look at 'var/list/results'.
*/
* Shit that happens on reaction
*
* Proc where the additional magic happens.
* You dont want to handle mob spawning in this since there is a dedicated proc for that.client
* Arguments:
* * holder - the datum that holds this reagent, be it a beaker or anything else
* * created_volume - volume created when this is mixed. look at 'var/list/results'.
*/
/datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, created_volume)
return
//I recommend you set the result amount to the total volume of all components.
/**
* Magical mob spawning when chemicals react
*
* Your go to proc when you want to create new mobs from chemicals. please dont use on_reaction.
* Arguments:
* * holder - the datum that holds this reagent, be it a beaker or anything else
* * amount_to_spawn - how much /mob to spawn
* * reaction_name - what is the name of this reaction. be creative, the world is your oyster after all!
* * mob_class - determines if the mob will be friendly, neutral or hostile
* * mob_faction - used in determining targets, mobs from the same faction won't harm eachother.
* * random - creates random mobs. self explanatory.
*/
* Magical mob spawning when chemicals react
*
* Your go to proc when you want to create new mobs from chemicals. please dont use on_reaction.
* Arguments:
* * holder - the datum that holds this reagent, be it a beaker or anything else
* * amount_to_spawn - how much /mob to spawn
* * reaction_name - what is the name of this reaction. be creative, the world is your oyster after all!
* * mob_class - determines if the mob will be friendly, neutral or hostile
* * mob_faction - used in determining targets, mobs from the same faction won't harm eachother.
* * random - creates random mobs. self explanatory.
*/
/datum/chemical_reaction/proc/chemical_mob_spawn(datum/reagents/holder, amount_to_spawn, reaction_name, mob_class = HOSTILE_SPAWN, mob_faction = "chemicalsummon", random = TRUE)
if(holder?.my_atom)
var/atom/A = holder.my_atom
@@ -102,15 +102,15 @@
step(S, pick(NORTH,SOUTH,EAST,WEST))
/**
* Magical move-wooney that happens sometimes.
*
* Simulates a vortex that moves nearby movable atoms towards or away from the turf T.
* Range also determines the strength of the effect. High values cause nearby objects to be thrown.
* Arguments:
* * T - turf where it happens
* * setting_type - does it suck or does it blow?
* * range - range.
*/
* Magical move-wooney that happens sometimes.
*
* Simulates a vortex that moves nearby movable atoms towards or away from the turf T.
* Range also determines the strength of the effect. High values cause nearby objects to be thrown.
* Arguments:
* * T - turf where it happens
* * setting_type - does it suck or does it blow?
* * range - range.
*/
/proc/goonchem_vortex(turf/T, setting_type, range)
for(var/atom/movable/X in orange(range, T))
if(X.anchored)