-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b351d4
commit 13c3ba4
Showing
34 changed files
with
1,411 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
DEFINE_BITFIELD(mute_category, list( | ||
"MUTE_IC" = MUTE_IC, | ||
"MUTE_OOC" = MUTE_OOC, | ||
"MUTE_PRAY" = MUTE_PRAY, | ||
"MUTE_ADMINHELP" = MUTE_ADMINHELP, | ||
"MUTE_DEADCHAT" = MUTE_DEADCHAT, | ||
"MUTE_TTS" = SMOOTH_OBJMUTE_TTS, | ||
"MUTE_EMOTE" = MUTE_EMOTE, | ||
)) | ||
|
||
DEFINE_BITFIELD(rights, list( | ||
"R_BUILDMODE" = R_BUILDMODE, | ||
"R_ADMIN" = R_ADMIN, | ||
"R_BAN" = R_BAN, | ||
"R_EVENT" = R_EVENT, | ||
"R_SERVER" = R_SERVER, | ||
"R_DEBUG" = R_DEBUG, | ||
"R_POSSESS" = R_POSSESS, | ||
"R_PERMISSIONS" = R_PERMISSIONS, | ||
"R_STEALTH" = R_STEALTH, | ||
"R_REJUVINATE" = R_REJUVINATE, | ||
"R_VAREDIT" = R_VAREDIT, | ||
"R_SOUNDS" = R_SOUNDS, | ||
"R_SPAWN" = R_SPAWN, | ||
"R_MOD" = R_MOD, | ||
"R_MENTOR" = R_MENTOR, | ||
"R_PROCCALL" = R_PROCCALL, | ||
"R_VIEWRUNTIMES" = R_VIEWRUNTIMES, | ||
)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
GLOBAL_LIST_INIT(bitfields, generate_bitfields()) | ||
|
||
/// Specifies a bitfield for smarter debugging | ||
/datum/bitfield | ||
/// The variable name that contains the bitfield | ||
var/variable | ||
|
||
/// An associative list of the readable flag and its true value | ||
var/list/flags | ||
|
||
|
||
|
||
/datum/bitfield/can_vv_delete() | ||
return FALSE | ||
|
||
/datum/bitfield/vv_edit_var(var_name, var_value) | ||
return FALSE // no. | ||
|
||
/// Turns /datum/bitfield subtypes into a list for use in debugging | ||
/proc/generate_bitfields() | ||
var/list/bitfields = list() | ||
for (var/_bitfield in subtypesof(/datum/bitfield)) | ||
var/datum/bitfield/bitfield = new _bitfield | ||
bitfields[bitfield.variable] = bitfield.flags | ||
return bitfields | ||
|
||
|
||
/proc/translate_bitfield(variable_type, variable_name, variable_value) | ||
if(variable_type != VV_BITFIELD) | ||
return variable_value | ||
|
||
var/list/flags = list() | ||
for(var/flag in GLOB.bitfields[variable_name]) | ||
if(variable_value & GLOB.bitfields[variable_name][flag]) | ||
flags += flag | ||
if(length(flags)) | ||
return jointext(flags, ", ") | ||
return "NONE" | ||
|
||
/proc/input_bitfield(mob/user, bitfield, current_value) | ||
if(!user || !(bitfield in GLOB.bitfields)) | ||
return | ||
var/list/currently_checked = list() | ||
for(var/name in GLOB.bitfields[bitfield]) | ||
currently_checked[name] = (current_value & GLOB.bitfields[bitfield][name]) | ||
|
||
var/list/result = tgui_input_checkbox_list(user, "Редактирование битового поля для [bitfield].", "Битовое поле", currently_checked) | ||
if(isnull(result) || !islist(result)) | ||
return | ||
|
||
var/new_result = 0 | ||
for(var/name in GLOB.bitfields[bitfield]) | ||
if(result[name]) | ||
new_result |= GLOB.bitfields[bitfield][name] | ||
return new_result | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
DEFINE_BITFIELD(appearance_flags, list( | ||
"LONG_GLIDE" = LONG_GLIDE, | ||
"RESET_COLOR" = RESET_COLOR, | ||
"RESET_ALPHA" = RESET_ALPHA, | ||
"RESET_TRANSFORM" = RESET_TRANSFORM, | ||
"NO_CLIENT_COLOR" = NO_CLIENT_COLOR, | ||
"KEEP_TOGETHER" = KEEP_TOGETHER, | ||
"KEEP_APART" = KEEP_APART, | ||
"PLANE_MASTER" = PLANE_MASTER, | ||
"TILE_BOUND" = TILE_BOUND, | ||
"PIXEL_SCALE" = PIXEL_SCALE, | ||
"PASS_MOUSE" = PASS_MOUSE, | ||
"TILE_MOVER" = TILE_MOVER, | ||
)) | ||
|
||
DEFINE_BITFIELD(vis_flags, list( | ||
"VIS_HIDE" = VIS_HIDE, | ||
"VIS_INHERIT_DIR" = VIS_INHERIT_DIR, | ||
"VIS_INHERIT_ICON" = VIS_INHERIT_ICON, | ||
"VIS_INHERIT_ICON_STATE" = VIS_INHERIT_ICON_STATE, | ||
"VIS_INHERIT_ID" = VIS_INHERIT_ID, | ||
"VIS_INHERIT_LAYER" = VIS_INHERIT_LAYER, | ||
"VIS_INHERIT_PLANE" = VIS_INHERIT_PLANE, | ||
"VIS_UNDERLAY" = VIS_UNDERLAY, | ||
)) | ||
|
||
DEFINE_BITFIELD(datum_flags, list( | ||
"DF_ISPROCESSING" = DF_ISPROCESSING, | ||
"DF_VAR_EDITED" = DF_VAR_EDITED, | ||
"DF_USE_TAG" = DF_USE_TAG, | ||
)) | ||
|
||
DEFINE_BITFIELD(turf_flags, list( | ||
"NOJAUNT" = NOJAUNT, | ||
"UNUSED_RESERVATION_TURF" = UNUSED_RESERVATION_TURF, | ||
"RESERVATION_TURF" = RESERVATION_TURF, | ||
"NO_LAVA_GEN" = NO_LAVA_GEN, | ||
"NO_RUINS" = NO_RUINS, | ||
)) | ||
|
||
DEFINE_BITFIELD(pass_flags, list( | ||
"PASSTABLE" = PASSTABLE, | ||
"PASSGLASS" = PASSGLASS, | ||
"PASSGRILLE" = PASSGRILLE, | ||
"PASSBLOB" = PASSBLOB, | ||
"PASSMOB" = PASSMOB, | ||
"LETPASSTHROW" = LETPASSTHROW, | ||
"PASSMACHINE" = PASSMACHINE, | ||
"PASSSTRUCTURE" = PASSSTRUCTURE, | ||
"PASSFLAPS" = PASSFLAPS, | ||
"PASSFENCE" = PASSFENCE, | ||
"PASSDOOR" = PASSDOOR, | ||
"PASSVEHICLE" = PASSVEHICLE, | ||
"PASSITEM" = PASSITEM, | ||
"LETPASSCLICKS" = LETPASSCLICKS, | ||
)) | ||
|
||
DEFINE_BITFIELD(pass_flags_self, list( | ||
"PASSTABLE" = PASSTABLE, | ||
"PASSGLASS" = PASSGLASS, | ||
"PASSGRILLE" = PASSGRILLE, | ||
"PASSBLOB" = PASSBLOB, | ||
"PASSMOB" = PASSMOB, | ||
"LETPASSTHROW" = LETPASSTHROW, | ||
"PASSMACHINE" = PASSMACHINE, | ||
"PASSSTRUCTURE" = PASSSTRUCTURE, | ||
"PASSFLAPS" = PASSFLAPS, | ||
"PASSFENCE" = PASSFENCE, | ||
"PASSDOOR" = PASSDOOR, | ||
"PASSVEHICLE" = PASSVEHICLE, | ||
"PASSITEM" = PASSITEM, | ||
"LETPASSCLICKS" = LETPASSCLICKS, | ||
)) | ||
|
||
|
||
DEFINE_BITFIELD(gas_type, list( | ||
"LINDA_SPAWN_HEAT" = LINDA_SPAWN_HEAT, | ||
"LINDA_SPAWN_20C" = LINDA_SPAWN_20C, | ||
"LINDA_SPAWN_TOXINS" = LINDA_SPAWN_TOXINS, | ||
"LINDA_SPAWN_OXYGEN" = LINDA_SPAWN_OXYGEN, | ||
"LINDA_SPAWN_CO2" = LINDA_SPAWN_CO2, | ||
"LINDA_SPAWN_NITROGEN" = LINDA_SPAWN_NITROGEN, | ||
"LINDA_SPAWN_N2O" = LINDA_SPAWN_N2O, | ||
"LINDA_SPAWN_AGENT_B" = LINDA_SPAWN_AGENT_B, | ||
"LINDA_SPAWN_AIR" = LINDA_SPAWN_AIR, | ||
)) | ||
|
||
DEFINE_BITFIELD(spawn_contents, list( | ||
"LINDA_SPAWN_HEAT" = LINDA_SPAWN_HEAT, | ||
"LINDA_SPAWN_20C" = LINDA_SPAWN_20C, | ||
"LINDA_SPAWN_TOXINS" = LINDA_SPAWN_TOXINS, | ||
"LINDA_SPAWN_OXYGEN" = LINDA_SPAWN_OXYGEN, | ||
"LINDA_SPAWN_CO2" = LINDA_SPAWN_CO2, | ||
"LINDA_SPAWN_NITROGEN" = LINDA_SPAWN_NITROGEN, | ||
"LINDA_SPAWN_N2O" = LINDA_SPAWN_N2O, | ||
"LINDA_SPAWN_AGENT_B" = LINDA_SPAWN_AGENT_B, | ||
"LINDA_SPAWN_AIR" = LINDA_SPAWN_AIR, | ||
)) | ||
|
||
DEFINE_BITFIELD(qdel_flags, list( | ||
"QDEL_ITEM_ADMINS_WARNED" = QDEL_ITEM_ADMINS_WARNED, | ||
"QDEL_ITEM_SUSPENDED_FOR_LAG" = QDEL_ITEM_SUSPENDED_FOR_LAG, | ||
)) | ||
|
||
DEFINE_BITFIELD(movement_type, list( | ||
"GROUND" = GROUND, | ||
"FLYING" = FLYING, | ||
"VENTCRAWLING" = VENTCRAWLING, | ||
"FLOATING" = FLOATING, | ||
"PHASING" = PHASING, | ||
"UPSIDE_DOWN" = UPSIDE_DOWN, | ||
)) | ||
|
||
DEFINE_BITFIELD(area_flags, list( | ||
"UNIQUE_AREA" = UNIQUE_AREA, | ||
"CAVES_ALLOWED" = CAVES_ALLOWED, | ||
"FLORA_ALLOWED" = FLORA_ALLOWED, | ||
"MOB_SPAWN_ALLOWED" = MOB_SPAWN_ALLOWED, | ||
"MEGAFAUNA_SPAWN_ALLOWED" = MEGAFAUNA_SPAWN_ALLOWED, | ||
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
DEFINE_BITFIELD(disliked_food, list( | ||
"MEAT" = MEAT, | ||
"VEGETABLES" = VEGETABLES, | ||
"RAW" = RAW, | ||
"JUNKFOOD" = JUNKFOOD, | ||
"GRAIN" = GRAIN, | ||
"FRUIT" = FRUIT, | ||
"DAIRY" = DAIRY, | ||
"FRIED" = FRIED, | ||
"ALCOHOL" = ALCOHOL, | ||
"SUGAR" = SUGAR, | ||
"EGG" = EGG, | ||
"GROSS" = GROSS, | ||
"TOXIC" = TOXIC, | ||
)) | ||
DEFINE_BITFIELD(liked_food, list( | ||
"MEAT" = MEAT, | ||
"VEGETABLES" = VEGETABLES, | ||
"RAW" = RAW, | ||
"JUNKFOOD" = JUNKFOOD, | ||
"GRAIN" = GRAIN, | ||
"FRUIT" = FRUIT, | ||
"DAIRY" = DAIRY, | ||
"FRIED" = FRIED, | ||
"ALCOHOL" = ALCOHOL, | ||
"SUGAR" = SUGAR, | ||
"EGG" = EGG, | ||
"GROSS" = GROSS, | ||
"TOXIC" = TOXIC, | ||
)) | ||
|
||
DEFINE_BITFIELD(toxic_food, list( | ||
"MEAT" = MEAT, | ||
"VEGETABLES" = VEGETABLES, | ||
"RAW" = RAW, | ||
"JUNKFOOD" = JUNKFOOD, | ||
"GRAIN" = GRAIN, | ||
"FRUIT" = FRUIT, | ||
"DAIRY" = DAIRY, | ||
"FRIED" = FRIED, | ||
"ALCOHOL" = ALCOHOL, | ||
"SUGAR" = SUGAR, | ||
"EGG" = EGG, | ||
"GROSS" = GROSS, | ||
"TOXIC" = TOXIC, | ||
)) | ||
|
||
DEFINE_BITFIELD(foodtype, list( | ||
"MEAT" = MEAT, | ||
"VEGETABLES" = VEGETABLES, | ||
"RAW" = RAW, | ||
"JUNKFOOD" = JUNKFOOD, | ||
"GRAIN" = GRAIN, | ||
"FRUIT" = FRUIT, | ||
"DAIRY" = DAIRY, | ||
"FRIED" = FRIED, | ||
"ALCOHOL" = ALCOHOL, | ||
"SUGAR" = SUGAR, | ||
"EGG" = EGG, | ||
"GROSS" = GROSS, | ||
"TOXIC" = TOXIC, | ||
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
DEFINE_BITFIELD(smoothing_flags, list( | ||
"SMOOTH_CORNERS" = SMOOTH_CORNERS, | ||
"SMOOTH_BITMASK" = SMOOTH_BITMASK, | ||
"SMOOTH_DIAGONAL_CORNERS" = SMOOTH_DIAGONAL_CORNERS, | ||
"SMOOTH_BORDER" = SMOOTH_BORDER, | ||
"SMOOTH_QUEUED" = SMOOTH_QUEUED, | ||
"SMOOTH_OBJ" = SMOOTH_OBJ, | ||
"SMOOTH_BORDER_OBJECT" = SMOOTH_BORDER_OBJECT, | ||
"SMOOTH_BROKEN_TURF" = SMOOTH_BROKEN_TURF, | ||
"SMOOTH_BURNT_TURF" = SMOOTH_BURNT_TURF, | ||
"SMOOTH_FALSE" = SMOOTH_FALSE, | ||
"SMOOTH_TRUE" = SMOOTH_TRUE, | ||
"SMOOTH_MORE" = SMOOTH_MORE, | ||
"SMOOTH_DIAGONAL" = SMOOTH_DIAGONAL, | ||
)) | ||
|
||
|
||
DEFINE_BITFIELD(smoothing_junction, list( | ||
"NORTH_JUNCTION" = NORTH_JUNCTION, | ||
"SOUTH_JUNCTION" = SOUTH_JUNCTION, | ||
"EAST_JUNCTION" = EAST_JUNCTION, | ||
"WEST_JUNCTION" = WEST_JUNCTION, | ||
"NORTHEAST_JUNCTION" = NORTHEAST_JUNCTION, | ||
"SOUTHEAST_JUNCTION" = SOUTHEAST_JUNCTION, | ||
"SOUTHWEST_JUNCTION" = SOUTHWEST_JUNCTION, | ||
"NORTHWEST_JUNCTION" = NORTHWEST_JUNCTION, | ||
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
DEFINE_BITFIELD(department_flag, list( | ||
"JOBCAT_ENGSEC" = JOBCAT_ENGSEC, | ||
"JOBCAT_MEDSCI" = JOBCAT_MEDSCI, | ||
"JOBCAT_SUPPORT" = JOBCAT_SUPPORT, | ||
"JOBCAT_KARMA" = JOBCAT_KARMA, | ||
)) |
Oops, something went wrong.