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_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. |
Procs | |
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_entry | Check if the config entry should be made for a specific job By default returns TRUE, meaning that by default every job will have the config entry created by the datum An example of what this could be used for is: A value that only appears if the job is a head of staff |
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. |
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_entry
Check if the config entry should be made for a specific job By default returns TRUE, meaning that by default every job will have the config entry created by the datum An example of what this could be used for is: A value that only appears if the job is a head of staff
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.