/tg/ Station 13 - Modules - TypesVar Details - Proc Details

job_config_type

Lightweight datum simply used to store the applicable config type for each job such that the whole system is a tad bit more flexible.

Vars

datum_var_nameThe name of the variable on the job datum that we will be accessing.
nameThe name that will be used in the config file. This is also the key for the accessing the singleton. Use the JOB_CONFIG_* defines in __defines/jobs.dm to make sure you don't typo.

Procs

get_current_valueSimply gets the value of the config type for a given job. There can be overrides for special instances on subtypes.
set_current_valueThis is the proc that we actually invoke to set the config-based values for each job. Is also intended to handle all in-depth logic checks pertient to the job datum itself. Return TRUE if the value was set successfully (or if expected behavior did indeed occur), FALSE if it was not.
validate_valueValidate the value of the config type for a given job. There can be overrides for special instances on subtypes. Isn't meant for in-depth logic, just bare-bones sanity checks. Like: is this number a number? Is this string a string? Any sanity thing involving a specific job datum goes in set_current_value. Will return TRUE if the value is valid, FALSE if it is not.

Var Details

datum_var_name

The name of the variable on the job datum that we will be accessing.

name

The name that will be used in the config file. This is also the key for the accessing the singleton. Use the JOB_CONFIG_* defines in __defines/jobs.dm to make sure you don't typo.

Proc Details

get_current_value

Simply gets the value of the config type for a given job. There can be overrides for special instances on subtypes.

set_current_value

This is the proc that we actually invoke to set the config-based values for each job. Is also intended to handle all in-depth logic checks pertient to the job datum itself. Return TRUE if the value was set successfully (or if expected behavior did indeed occur), FALSE if it was not.

validate_value

Validate the value of the config type for a given job. There can be overrides for special instances on subtypes. Isn't meant for in-depth logic, just bare-bones sanity checks. Like: is this number a number? Is this string a string? Any sanity thing involving a specific job datum goes in set_current_value. Will return TRUE if the value is valid, FALSE if it is not.