Skip to content

Instantly share code, notes, and snippets.

@mloc
Created October 5, 2017 13:36
Show Gist options
  • Save mloc/6f80b1818b3429a2ae2df60d74126a6f to your computer and use it in GitHub Desktop.
Save mloc/6f80b1818b3429a2ae2df60d74126a6f to your computer and use it in GitHub Desktop.
#define CONFIG_FILE(file_id, file_name) \
/decl/config_entry/file_id {} \
/decl/config_file/file_id { \
id = #file_id; \
file_path = file_name; \
entry_type = /decl/config_entry/file_id; \
holder_type = /datum/config_file/file_id; \
} \
/datum/config_file/file_id {} \
/datum/config_holder { \
var/datum/config_file/file_id/file_id; \
}
#define CONFIG_ENTRY(file_id, var_name, var_type) \
/datum/config_file/file_id { \
var/var_name; \
} \
/decl/config_entry/file_id/var_name { \
__type = CONFIG_TYPE_##var_type; \
__var_name = #var_name; \
} \
/decl/config_entry/file_id/var_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment