render
This commit is contained in:
@@ -23,6 +23,18 @@ GLOBAL_LIST_INIT(dir2blockdir, list(
|
||||
|
||||
#define DIR2BLOCKDIR(d) (GLOB.dir2blockdir["[d]"])
|
||||
|
||||
GLOBAL_LIST_INIT(block_direction_names, list(
|
||||
"[BLOCK_DIR_NORTH]" = "Front",
|
||||
"[BLOCK_DIR_NORTHEAST]" = "Front Right",
|
||||
"[BLOCK_DIR_NORTHWEST]" = "Front Left",
|
||||
"[BLOCK_DIR_WEST]" = "Left",
|
||||
"[BLOCK_DIR_EAST]" = "Right",
|
||||
"[BLOCK_DIR_SOUTH]" = "Behind",
|
||||
"[BLOCK_DIR_SOUTHEAST]" = "Behind Right",
|
||||
"[BLOCK_DIR_SOUTHWEST]" = "Behind Left",
|
||||
"[BLOCK_DIR_ONTOP]" = "Ontop"
|
||||
))
|
||||
|
||||
/// If this is the value of active_block_starting it signals we want to interrupt the start
|
||||
#define ACTIVE_BLOCK_STARTING_INTERRUPT "INTERRUPT"
|
||||
|
||||
|
||||
@@ -161,9 +161,24 @@ GLOBAL_LIST_EMPTY(block_parry_data)
|
||||
|
||||
#define RENDER_VARIABLE_SIMPLE(varname, desc) dat += "<tr><th>[#varname]<br><i>[desc]</i></th><th>[varname]</th></tr>"
|
||||
#define RENDER_OVERRIDE_LIST(varname, desc) \
|
||||
|
||||
dat += "<tr><th>[#varname]<br><i>[desc]</i></th><th>"; \
|
||||
var/list/assembled__##varname = list(); \
|
||||
for(var/textbit in GLOB.attack_type_names){ \
|
||||
if(textbit in varname){ \
|
||||
assembled__##varname += "[GLOB.attack_type_names[textbit]] = varname[textbit]"; \
|
||||
} \
|
||||
} \
|
||||
dat += "[english_list(assembled__##varname)]</th>";
|
||||
#define RENDER_ATTACK_TYPES(varname, desc) dat += "<tr><th>[#varname]<br><i>[desc]</i></th><th>[english_list(bitfield2list(varname, GLOB.attack_type_names))]</th>"
|
||||
#define RENDER_BLOCK_DIRECTIONS(varname, desc) \
|
||||
dat += "<tr><th>[#varname]<br><i>[desc]</i></th><th>"; \
|
||||
var/list/assembled__##varname = list(); \
|
||||
for(var/textbit in GLOB.block_direction_names){ \
|
||||
if(textbit in varname){ \
|
||||
assembled__##varname += "[GLOB.block_direction_names[textbit]] = varname[textbit]"; \
|
||||
} \
|
||||
} \
|
||||
dat += "[english_list(assembled__##varname)]</th>";
|
||||
|
||||
/**
|
||||
* Generates a HTML render of this datum for self-documentation
|
||||
|
||||
Reference in New Issue
Block a user