Files
Citadel-Station-13-RP/code/_globalvars/bitfields.dm
silicons 934ad25bfe refactors: inventory, mousedrag, stripping, species bodytypes, inventory HUD, and probably some unrelated things (#4092)
* start

* i hate people who pack shit into one file

* sigh

* regex

* inventory rework

* stubs

* regex

* this is insanity

* oh no

* backend moment

* a

* changes

* wild

* regexing

* changes

* put in hands

* more errorS

* attackby

* more helpers

* replacements

* wild

* fixes

* pain

* fxies

* fixes

* unneeded

* ape

* ape

* wild

* wild

* more

* wild

* there

* fixes

* fixes

* l

* wild

* more

* moer

* fixes

* enough for todayd

* regexing

* long time coming

* shaking and crying

* end me

* fixes

* fixes

* e

* fxies

* rig refactor moment

* fixes

* fixes

* fixes

* fixes

* out with the shitcode

* thanks git

* partial rig rewrite here we go

* more

* fixes

* WWWW

* ok

* wild

* bitfield defines

* nobludgeon

* pain

* pain

* fixes

* more

* wild

* wild

* fixes

* pain

* move behaviorsr

* fixes

* next up, finishing core procs

* y

* .

* time to finish this

* time to finish this

* propagate accessories

* hate this accursed engine

* hate this accursed engine

* pain

* more

* cancer

* epic

* genuinely hate

* wild

* that

* why

* circuitry is my bane

* y

* how

* sort

* logging

* logging

* im dying

* fixes

* next

* f

* more

* epic style

* fixes

* on meta

* fix

* wild

* uh

* quirky

* fixes

* agh

* pain

* fixes

* fix

* sigh

* a

* epic1

* fixes

* ugh

* epic

* fixes

* uhh.

* is this even a fix

* fix

* fixes

* fixes

* we love optimization

* wear over system

* correct

* worn over stuff

* just augments

* coggy

* implant magnetic catch

* implant magnetic catch

* fixe

* a

* g

* t

* fix

* fix

* wack!

* fix

* a

* semantics

* fix

* that

* fixes

* handle denesting

* w

* fixes

* e

* bugs

* fixes

* fixes

* unit tests

* absolutely wild

* fixes

* fix

* fix

* fixes

* on god this is bad

* fixes

* fixes

* fix

* fix

* wacky!

* fix

* wack

* manual

* fixes

* closets

* OOPS

* wack

* pain

* pain

* flags

* regex

* fixes

* wakc

* changes

* more

* augh

* more

* replaces

* more

* that

* acc

* acc

* fix

* fix

* fix

* oh woops that was important

* wack

* epic

Co-authored-by: fake_vm_user <fake_vm_user>
Co-authored-by: VM_USER <VM_USER>
2022-07-29 00:20:47 -07:00

170 lines
4.3 KiB
Plaintext

GLOBAL_LIST_INIT(bitfields, generate_bitfields())
/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
/// 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
// sue me i haven't slept in 18 hours
// tl;dr convert these into DEFINE_BITFIELD's later
#define FLAG(flag) "[#flag]" = flag
return bitfields + list(
"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
),
"mob_class" = list(
FLAG(MOB_CLASS_PLANT),
FLAG(MOB_CLASS_ANIMAL),
FLAG(MOB_CLASS_HUMANOID),
FLAG(MOB_CLASS_SYNTHETIC),
FLAG(MOB_CLASS_SLIME),
FLAG(MOB_CLASS_ABERRATION),
FLAG(MOB_CLASS_DEMONIC),
FLAG(MOB_CLASS_BOSS),
FLAG(MOB_CLASS_ILLUSION),
FLAG(MOB_CLASS_PHOTONIC)
),
"movement_type" = list(
FLAG(UNSTOPPABLE),
FLAG(GROUND),
FLAG(FLYING),
FLAG(PHASING),
FLAG(VENTCRAWLING),
FLAG(FLOATING)
),
"reagents_holder_flags" = list(
"INJECTABLE" = INJECTABLE,
"DRAWABLE" = DRAWABLE,
"REFILLABLE" = REFILLABLE,
"DRAINABLE" = DRAINABLE,
"TRANSPARENT" = TRANSPARENT,
"AMOUNT_VISIBLE" = AMOUNT_VISIBLE,
"NO_REACT" = NO_REACT,
),
"sight" = list(
"SEE_INFRA" = SEE_INFRA,
"SEE_SELF" = SEE_SELF,
"SEE_MOBS" = SEE_MOBS,
"SEE_OBJS" = SEE_OBJS,
"SEE_TURFS" = SEE_TURFS,
"SEE_PIXELS" = SEE_PIXELS,
"SEE_THRU" = SEE_THRU,
"SEE_BLACKNESS" = SEE_BLACKNESS,
"BLIND" = BLIND
),
/*
"admin_flags" = list(
"BUILDMODE" = R_BUILD,
"ADMIN" = R_ADMIN,
"BAN" = R_BAN,
"FUN" = R_FUN,
"SERVER" = R_SERVER,
"DEBUG" = R_DEBUG,
"POSSESS" = R_POSSESS,
"PERMISSIONS" = R_PERMISSIONS,
"STEALTH" = R_STEALTH,
"POLL" = R_POLL,
"VAREDIT" = R_VAREDIT,
"SOUNDS" = R_SOUND,
"SPAWN" = R_SPAWN,
"AUTOLOGIN" = R_AUTOADMIN,
"DBRANKS" = R_DBRANKS
),
*/
/*
"pass_flags" = list(
"PASSTABLE" = PASSTABLE,
"PASSGLASS" = PASSGLASS,
"PASSGRILLE" = PASSGRILLE,
"PASSBLOB" = PASSBLOB,
"PASSMOB" = PASSMOB,
"PASSCLOSEDTURF" = PASSCLOSEDTURF,
"LETPASSTHROW" = LETPASSTHROW
),
"resistance_flags" = list(
"LAVA_PROOF" = LAVA_PROOF,
"FIRE_PROOF" = FIRE_PROOF,
"FLAMMABLE" = FLAMMABLE,
"ON_FIRE" = ON_FIRE,
"UNACIDABLE" = UNACIDABLE,
"ACID_PROOF" = ACID_PROOF,
"INDESTRUCTIBLE" = INDESTRUCTIBLE,
"FREEZE_PROOF" = FREEZE_PROOF
),
"clothing_flags" = list(
"LAVAPROTECT" = LAVAPROTECT,
"STOPSPRESSUREDAMAGE" = STOPSPRESSUREDAMAGE,
"BLOCK_GAS_SMOKE_EFFECT" = BLOCK_GAS_SMOKE_EFFECT,
"MASKINTERNALS" = MASKINTERNALS,
"NOSLIP" = NOSLIP,
"THICKMATERIAL" = THICKMATERIAL,
"VOICEBOX_TOGGLABLE" = VOICEBOX_TOGGLABLE,
"VOICEBOX_DISABLED" = VOICEBOX_DISABLED,
"SCAN_REAGENTS" = SCAN_REAGENTS,
"BLOCKS_SHOVE_KNOCKDOWN" = BLOCKS_SHOVE_KNOCKDOWN,
"SNUG_FIT" = SNUG_FIT,
"ANTI_TINFOIL_MANEUVER" = ANTI_TINFOIL_MANEUVER,
),
"tesla_flags" = list(
"TESLA_MOB_DAMAGE" = TESLA_MOB_DAMAGE,
"TESLA_OBJ_DAMAGE" = TESLA_OBJ_DAMAGE,
"TESLA_MOB_STUN" = TESLA_MOB_STUN,
"TESLA_ALLOW_DUPLICATES" = TESLA_ALLOW_DUPLICATES,
"TESLA_MACHINE_EXPLOSIVE" = TESLA_MACHINE_EXPLOSIVE,
),
"smooth" = list(
"SMOOTH_TRUE" = SMOOTH_TRUE,
"SMOOTH_MORE" = SMOOTH_MORE,
"SMOOTH_DIAGONAL" = SMOOTH_DIAGONAL,
"SMOOTH_BORDER" = SMOOTH_BORDER,
"SMOOTH_QUEUED" = SMOOTH_QUEUED,
),
"car_traits" = list(
"CAN_KIDNAP" = CAN_KIDNAP,
),
*/
/*
"rad_flags" = list(
"RAD_PROTECT_CONTENTS" = RAD_PROTECT_CONTENTS,
"RAD_NO_CONTAMINATE" = RAD_NO_CONTAMINATE,
),
"disease_flags" = list (
"CURABLE" = CURABLE,
"CAN_CARRY" = CAN_CARRY,
"CAN_RESIST" = CAN_RESIST
),
"mob_biotypes" = list (
"MOB_ORGANIC" = MOB_ORGANIC,
"MOB_MINERAL" = MOB_MINERAL,
"MOB_ROBOTIC" = MOB_ROBOTIC,
"MOB_UNDEAD" = MOB_UNDEAD,
"MOB_HUMANOID" = MOB_HUMANOID,
"MOB_BUG" = MOB_BUG,
"MOB_BEAST" = MOB_BEAST,
"MOB_EPIC" = MOB_EPIC,
"MOB_REPTILE" = MOB_REPTILE,
"MOB_SPIRIT" = MOB_SPIRIT
)
*/
)
#undef FLAG