From 01226e123aa7377ee5f78a85a022d2d1b95b8277 Mon Sep 17 00:00:00 2001 From: Adrer Date: Sun, 10 Mar 2024 18:51:42 +0100 Subject: [PATCH] Makes all bitflags use bitshifting (#24179) * Makes all bitflags use bitshifting * Update contributing.md * Updated spacing * Defunct --------- Co-authored-by: adrermail@gmail.com --- .github/CONTRIBUTING.md | 4 +- code/__DEFINES/admin_defines.dm | 54 +++---- code/__DEFINES/bots.dm | 12 +- code/__DEFINES/clothing_defines.dm | 61 ++++---- code/__DEFINES/combat_defines.dm | 24 +-- code/__DEFINES/flags.dm | 144 +++++++++--------- code/__DEFINES/genetics_defines.dm | 24 +-- code/__DEFINES/misc_defines.dm | 26 ++-- code/__DEFINES/mob_defines.dm | 68 ++++----- code/__DEFINES/preferences_defines.dm | 80 +++++----- code/__DEFINES/radio_defines.dm | 8 +- code/__DEFINES/shuttle_defines.dm | 6 +- code/__DEFINES/sight.dm | 6 +- code/__DEFINES/subsystems.dm | 10 +- .../subsystem/non_firing/SSatoms.dm | 8 +- code/datums/diseases/_disease.dm | 24 +-- code/game/dna/dna_modifier.dm | 6 +- .../machinery/computer/atmos_controllers.dm | 14 +- code/game/machinery/requests_console.dm | 6 +- .../machinery/portable/canister.dm | 16 +- code/modules/awaymissions/maploader/writer.dm | 14 +- code/modules/power/apc/apc_overlay.dm | 42 ++--- 22 files changed, 327 insertions(+), 330 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 33ddd50f5df..c0d21e56fbe 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -470,7 +470,7 @@ Look for code examples on how to properly use it. #### Bitflags -* We prefer using bitshift operators instead of directly typing out the value. I.E: +* Bitshift operators are mandatory, opposed to directly typing out the value. I.E: ```dm #define MACRO_ONE (1<<0) @@ -478,7 +478,7 @@ Look for code examples on how to properly use it. #define MACRO_THREE (1<<2) ``` -Is preferable to: +Is accepted, whereas the following is not: ```dm #define MACRO_ONE 1 diff --git a/code/__DEFINES/admin_defines.dm b/code/__DEFINES/admin_defines.dm index 04f7e9d922d..77c7d732d66 100644 --- a/code/__DEFINES/admin_defines.dm +++ b/code/__DEFINES/admin_defines.dm @@ -1,13 +1,13 @@ //A set of constants used to determine which type of mute an admin wishes to apply: //Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1) //Therefore there needs to be a gap between the flags for the automute flags -#define MUTE_IC 1 -#define MUTE_OOC 2 -#define MUTE_PRAY 4 -#define MUTE_ADMINHELP 8 -#define MUTE_DEADCHAT 16 -#define MUTE_EMOTE 32 -#define MUTE_ALL 63 +#define MUTE_IC (1<<0) +#define MUTE_OOC (1<<1) +#define MUTE_PRAY (1<<2) +#define MUTE_ADMINHELP (1<<3) +#define MUTE_DEADCHAT (1<<4) +#define MUTE_EMOTE (1<<5) +#define MUTE_ALL ((1<<6)-1) //5 bit bitmask, update me if we ever add more mute options. //Number of identical messages required to get the spam-prevention automute thing to trigger warnings and automutes #define SPAM_TRIGGER_WARNING 5 @@ -24,28 +24,28 @@ //Please don't edit these values without speaking to Errorage first ~Carn //Admin Permissions -#define R_BUILDMODE 1 -#define R_ADMIN 2 -#define R_BAN 4 -#define R_EVENT 8 -#define R_SERVER 16 -#define R_DEBUG 32 -#define R_POSSESS 64 -#define R_PERMISSIONS 128 -#define R_STEALTH 256 -#define R_REJUVINATE 512 -#define R_VAREDIT 1024 -#define R_SOUNDS 2048 -#define R_SPAWN 4096 -#define R_MOD 8192 -#define R_MENTOR 16384 -#define R_PROCCALL 32768 -#define R_VIEWRUNTIMES 65536 -#define R_MAINTAINER 131072 +#define R_BUILDMODE (1<<0) +#define R_ADMIN (1<<1) +#define R_BAN (1<<2) +#define R_EVENT (1<<3) +#define R_SERVER (1<<4) +#define R_DEBUG (1<<5) +#define R_POSSESS (1<<6) +#define R_PERMISSIONS (1<<7) +#define R_STEALTH (1<<8) +#define R_REJUVINATE (1<<9) +#define R_VAREDIT (1<<10) +#define R_SOUNDS (1<<11) +#define R_SPAWN (1<<12) +#define R_MOD (1<<13) +#define R_MENTOR (1<<14) +#define R_PROCCALL (1<<15) +#define R_VIEWRUNTIMES (1<<16) +#define R_MAINTAINER (1<<17) -#define R_MAXPERMISSION 131072 //This holds the maximum value for a permission. It is used in iteration, so keep it updated. +#define R_MAXPERMISSION (1<<17) //This holds the maximum value for a permission. It is used in iteration, so keep it updated. -#define R_HOST 262143 // Sum of all permissions to allow easy setting +#define R_HOST ((1<<18)-1) //17 bit bitmask, update me if we ever add more admin permissions. Sum of all permissions to allow easy setting. #define ADMIN_QUE(user,display) "[display]" #define ADMIN_FLW(user,display) "[display]" diff --git a/code/__DEFINES/bots.dm b/code/__DEFINES/bots.dm index 9301b1c7923..83485ff54a2 100644 --- a/code/__DEFINES/bots.dm +++ b/code/__DEFINES/bots.dm @@ -28,12 +28,12 @@ #define BOT_EAT_TILE 19 // adding said tiles to inventory (floorbots) //Bot types -#define SEC_BOT 1 // Secutritrons (Beepsky) and ED-209s -#define MULE_BOT 2 // MULEbots -#define FLOOR_BOT 4 // Floorbots -#define CLEAN_BOT 8 // Cleanbots -#define MED_BOT 16 // Medibots -#define HONK_BOT 32 // Honkbots +#define SEC_BOT (1<<0) // Secutritrons (Beepsky) and ED-209s +#define MULE_BOT (1<<1) // MULEbots +#define FLOOR_BOT (1<<2) // Floorbots +#define CLEAN_BOT (1<<3) // Cleanbots +#define MED_BOT (1<<4) // Medibots +#define HONK_BOT (1<<5) // Honkbots //Sentience types #define SENTIENCE_ORGANIC 1 diff --git a/code/__DEFINES/clothing_defines.dm b/code/__DEFINES/clothing_defines.dm index 7b1be1150a5..44b80437836 100644 --- a/code/__DEFINES/clothing_defines.dm +++ b/code/__DEFINES/clothing_defines.dm @@ -1,13 +1,14 @@ //Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses. -#define HIDEGLOVES 1 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDESUITSTORAGE 2 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDEJUMPSUIT 4 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDESHOES 8 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDETAIL 16 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDEMASK 1 //APPLIES ONLY TO HELMETS/MASKS!! -#define HIDEEARS 2 //APPLIES ONLY TO HELMETS/MASKS!! (ears means headsets and such) -#define HIDEEYES 4 //APPLIES ONLY TO HELMETS/MASKS!! (eyes means glasses) -#define HIDEFACE 8 //APPLIES ONLY TO HELMETS/MASKS!! Dictates whether we appear as unknown. +#define HIDEGLOVES (1<<0) //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDESUITSTORAGE (1<<1) //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDEJUMPSUIT (1<<2) //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDESHOES (1<<3) //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDETAIL (1<<4) //APPLIES ONLY TO THE EXTERIOR SUIT!! + +#define HIDEMASK (1<<0) //APPLIES ONLY TO HELMETS/MASKS!! +#define HIDEEARS (1<<1) //APPLIES ONLY TO HELMETS/MASKS!! (ears means headsets and such) +#define HIDEEYES (1<<2) //APPLIES ONLY TO HELMETS/MASKS!! (eyes means glasses) +#define HIDEFACE (1<<3) //APPLIES ONLY TO HELMETS/MASKS!! Dictates whether we appear as unknown. // Slot defines for var/list/inv_slots, some of these dont really show up on the HUD, // but still function like it in other ways. I know thats weird, and I hate it too. @@ -46,22 +47,22 @@ //Cant seem to find a mob bitflags area other than the powers one // bitflags for clothing parts -#define HEAD 1 -#define UPPER_TORSO 2 -#define LOWER_TORSO 4 -#define LEG_LEFT 8 -#define LEG_RIGHT 16 -#define LEGS 24 -#define FOOT_LEFT 32 -#define FOOT_RIGHT 64 -#define FEET 96 -#define ARM_LEFT 128 -#define ARM_RIGHT 256 -#define ARMS 384 -#define HAND_LEFT 512 -#define HAND_RIGHT 1024 -#define HANDS 1536 -#define FULL_BODY 2047 +#define HEAD (1<<0) +#define UPPER_TORSO (1<<1) +#define LOWER_TORSO (1<<2) +#define LEG_LEFT (1<<3) +#define LEG_RIGHT (1<<4) +#define LEGS (LEG_LEFT | LEG_RIGHT) +#define FOOT_LEFT (1<<5) +#define FOOT_RIGHT (1<<6) +#define FEET (FOOT_LEFT | FOOT_RIGHT) +#define ARM_LEFT (1<<7) +#define ARM_RIGHT (1<<8) +#define ARMS (ARM_LEFT | ARM_RIGHT) +#define HAND_LEFT (1<<9) +#define HAND_RIGHT (1<<10) +#define HANDS (HAND_LEFT | HAND_RIGHT) +#define FULL_BODY ((1<<11)-1) //10 bit bitmask, update me if we ever add more clothing parts. // bitflags for the percentual amount of protection a piece of clothing which covers the body part offers. // Used with human/proc/get_heat_protection() and human/proc/get_cold_protection() @@ -80,11 +81,11 @@ #define THERMAL_PROTECTION_HAND_RIGHT 0.025 //flags for covering body parts -#define GLASSESCOVERSEYES 1 -#define MASKCOVERSEYES 2 // get rid of some of the other mess in these flags -#define HEADCOVERSEYES 4 // feel free to realloc these numbers for other purposes -#define MASKCOVERSMOUTH 8 // on other items, these are just for mask/head -#define HEADCOVERSMOUTH 16 +#define GLASSESCOVERSEYES (1<<0) +#define MASKCOVERSEYES (1<<1) // get rid of some of the other mess in these flags +#define HEADCOVERSEYES (1<<2) // feel free to realloc these numbers for other purposes +#define MASKCOVERSMOUTH (1<<3) // on other items, these are just for mask/head +#define HEADCOVERSMOUTH (1<<4) // Suit sensor levels #define SUIT_SENSOR_OFF 0 diff --git a/code/__DEFINES/combat_defines.dm b/code/__DEFINES/combat_defines.dm index e2545149720..2a39c4bb769 100644 --- a/code/__DEFINES/combat_defines.dm +++ b/code/__DEFINES/combat_defines.dm @@ -36,20 +36,20 @@ #define SECONDS_TO_JITTER SECONDS_TO_LIFE_CYCLES*3 //I hate adding defines like this but I'd much rather deal with bitflags than lists and string searches -#define BRUTELOSS 1 -#define FIRELOSS 2 -#define TOXLOSS 4 -#define OXYLOSS 8 -#define SHAME 16 -#define OBLITERATION 32 +#define BRUTELOSS (1<<0) +#define FIRELOSS (1<<1) +#define TOXLOSS (1<<2) +#define OXYLOSS (1<<3) +#define SHAME (1<<4) +#define OBLITERATION (1<<5) //Bitflags defining which status effects could be or are inflicted on a mob -#define CANSTUN 1 -#define CANWEAKEN 2 -#define CANPARALYSE 4 -#define CANPUSH 8 -#define PASSEMOTES 16 //Mob has holders inside of it that need to see emotes. -#define GODMODE 32 +#define CANSTUN (1<<0) +#define CANWEAKEN (1<<1) +#define CANPARALYSE (1<<2) +#define CANPUSH (1<<3) +#define PASSEMOTES (1<<4) //Mob has holders inside of it that need to see emotes. +#define GODMODE (1<<5) //Health Defines #define HEALTH_THRESHOLD_CRIT 0 diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 07d497514be..0949d268070 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -2,77 +2,73 @@ #define NONE 0 //FLAGS BITMASK -#define STOPSPRESSUREDMAGE 1 //This flag is used on the flags variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_FLAG_BACK) if you see it anywhere To successfully stop you taking all pressure damage you must have both a suit and head item with this flag. -#define NODROP 2 // This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted. -#define NOBLUDGEON 4 // when an item has this it produces no "X has been hit by Y with Z" message with the default handler -#define AIRTIGHT 8 // mask allows internals -#define HANDSLOW 16 // If an item has this flag, it will slow you to carry it -#define CONDUCT 32 // conducts electricity (metal etc.) -#define ABSTRACT 64 // for all things that are technically items but used for various different stuff, made it 128 because it could conflict with other flags other way -#define ON_BORDER 128 // item has priority to check when entering or leaving -#define PREVENT_CLICK_UNDER 256 -#define NODECONSTRUCT 512 +#define STOPSPRESSUREDMAGE (1<<0) //This flag is used on the flags variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_FLAG_BACK) if you see it anywhere To successfully stop you taking all pressure damage you must have both a suit and head item with this flag. +#define NODROP (1<<1) // This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted. +#define NOBLUDGEON (1<<2) // when an item has this it produces no "X has been hit by Y with Z" message with the default handler +#define AIRTIGHT (1<<3) // mask allows internals +#define HANDSLOW (1<<4) // If an item has this flag, it will slow you to carry it +#define CONDUCT (1<<5) // conducts electricity (metal etc.) +#define ABSTRACT (1<<6) // for all things that are technically items but used for various different stuff, made it 128 because it could conflict with other flags other way +#define ON_BORDER (1<<7) // item has priority to check when entering or leaving +#define PREVENT_CLICK_UNDER (1<<8) +#define NODECONSTRUCT (1<<9) +#define EARBANGPROTECT (1<<10) +#define HEADBANGPROTECT (1<<11) -#define EARBANGPROTECT 1024 +#define BLOCK_GAS_SMOKE_EFFECT (1<<12) // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! +#define THICKMATERIAL (1<<12) //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. (NOTE: flag shared with BLOCK_GAS_SMOKE_EFFECT) -#define NOSLIP 1024 //prevents from slipping on wet floors, in space etc - -#define HEADBANGPROTECT 4096 - -#define BLOCK_GAS_SMOKE_EFFECT 8192 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! -#define THICKMATERIAL 8192 //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. (NOTE: flag shared with BLOCK_GAS_SMOKE_EFFECT) - -#define DROPDEL 16384 // When dropped, it calls qdel on itself +#define DROPDEL (1<<13) // When dropped, it calls qdel on itself ///Whether or not this atom shows screentips when hovered over -#define NO_SCREENTIPS 32768 +#define NO_SCREENTIPS (1<<14) // Update flags for [/atom/proc/update_appearance] /// Update the atom's name -#define UPDATE_NAME (1<<0) +#define UPDATE_NAME (1<<0) /// Update the atom's desc -#define UPDATE_DESC (1<<1) +#define UPDATE_DESC (1<<1) /// Update the atom's icon state -#define UPDATE_ICON_STATE (1<<2) +#define UPDATE_ICON_STATE (1<<2) /// Update the atom's overlays -#define UPDATE_OVERLAYS (1<<3) +#define UPDATE_OVERLAYS (1<<3) /// Update the atom's icon -#define UPDATE_ICON (UPDATE_ICON_STATE|UPDATE_OVERLAYS) +#define UPDATE_ICON (UPDATE_ICON_STATE|UPDATE_OVERLAYS) /* Secondary atom flags, for the flags_2 var, denoted with a _2 */ -#define SLOWS_WHILE_IN_HAND_2 1 -#define NO_EMP_WIRES_2 2 -#define HOLOGRAM_2 4 -#define FROZEN_2 8 -#define STATIONLOVING_2 16 -#define INFORM_ADMINS_ON_RELOCATE_2 32 -#define BANG_PROTECT_2 64 -#define BLOCKS_LIGHT_2 128 // Light sources placed in anything with that flag will not emit light through them. +#define SLOWS_WHILE_IN_HAND_2 (1<<0) +#define NO_EMP_WIRES_2 (1<<1) +#define HOLOGRAM_2 (1<<2) +#define FROZEN_2 (1<<3) +#define STATIONLOVING_2 (1<<4) +#define INFORM_ADMINS_ON_RELOCATE_2 (1<<5) +#define BANG_PROTECT_2 (1<<6) +#define BLOCKS_LIGHT_2 (1<<7) // Light sources placed in anything with that flag will not emit light through them. // A mob with OMNITONGUE has no restriction in the ability to speak // languages that they know. So even if they wouldn't normally be able to // through mob or tongue restrictions, this flag allows them to ignore // those restrictions. -#define OMNITONGUE_2 256 +#define OMNITONGUE_2 (1<<8) /// Prevents mobs from getting chainshocked by teslas and the supermatter -#define SHOCKED_2 512 +#define SHOCKED_2 (1<<9) // Stops you from putting things like an RCD or other items into an ORM or protolathe for materials. -#define NO_MAT_REDEMPTION_2 1024 +#define NO_MAT_REDEMPTION_2 (1<<10) // LAVA_PROTECT used on the flags_2 variable for both SUIT and HEAD items, and stops lava damage. Must be present in both to stop lava damage. -#define LAVA_PROTECT_2 2048 +#define LAVA_PROTECT_2 (1<<11) -#define OVERLAY_QUEUED_2 4096 +#define OVERLAY_QUEUED_2 (1<<12) -#define CHECK_RICOCHET_2 8192 +#define CHECK_RICOCHET_2 (1<<13) /// should the contents of this atom be acted upon -#define RAD_PROTECT_CONTENTS_2 16384 +#define RAD_PROTECT_CONTENTS_2 (1<<14) /// should this object be allowed to be contaminated -#define RAD_NO_CONTAMINATE_2 32768 +#define RAD_NO_CONTAMINATE_2 (1<<15) /// Prevents shuttles from deleting the item #define IMMUNE_TO_SHUTTLECRUSH_2 (1<<16) /// Prevents malf AI animate + overload ability @@ -88,45 +84,45 @@ #define REAGENT_NOREACT 1 //Species clothing flags -#define HAS_UNDERWEAR 1 -#define HAS_UNDERSHIRT 2 -#define HAS_SOCKS 4 +#define HAS_UNDERWEAR (1<<0) +#define HAS_UNDERSHIRT (1<<1) +#define HAS_SOCKS (1<<2) //Species Body Flags -#define HAS_HEAD_ACCESSORY 1 -#define HAS_TAIL 2 -#define TAIL_OVERLAPPED 4 -#define HAS_SKIN_TONE 8 -#define HAS_ICON_SKIN_TONE 16 -#define HAS_SKIN_COLOR 32 -#define HAS_HEAD_MARKINGS 64 -#define HAS_BODY_MARKINGS 128 -#define HAS_TAIL_MARKINGS 256 -#define TAIL_WAGGING 512 -#define NO_EYES 1024 -#define HAS_ALT_HEADS 2048 -#define HAS_WING 4096 -#define HAS_BODYACC_COLOR 8192 -#define BALD 16384 -#define ALL_RPARTS 32768 -#define SHAVED 65536 +#define HAS_HEAD_ACCESSORY (1<<0) +#define HAS_TAIL (1<<1) +#define TAIL_OVERLAPPED (1<<2) +#define HAS_SKIN_TONE (1<<3) +#define HAS_ICON_SKIN_TONE (1<<4) +#define HAS_SKIN_COLOR (1<<5) +#define HAS_HEAD_MARKINGS (1<<6) +#define HAS_BODY_MARKINGS (1<<7) +#define HAS_TAIL_MARKINGS (1<<8) +#define TAIL_WAGGING (1<<9) +#define NO_EYES (1<<10) +#define HAS_ALT_HEADS (1<<11) +#define HAS_WING (1<<12) +#define HAS_BODYACC_COLOR (1<<13) +#define BALD (1<<14) +#define ALL_RPARTS (1<<15) +#define SHAVED (1<<16) //Pre-baked combinations of the above body flags #define HAS_BODY_ACCESSORY HAS_TAIL|HAS_WING #define HAS_MARKINGS HAS_HEAD_MARKINGS|HAS_BODY_MARKINGS|HAS_TAIL_MARKINGS //Species Diet Flags -#define DIET_CARN 1 -#define DIET_OMNI 2 -#define DIET_HERB 4 +#define DIET_CARN (1<<0) +#define DIET_OMNI (1<<1) +#define DIET_HERB (1<<2) //bitflags for door switches. -#define OPEN 1 -#define IDSCAN 2 -#define BOLTS 4 -#define SHOCK 8 -#define SAFE 16 +#define OPEN (1<<0) +#define IDSCAN (1<<1) +#define BOLTS (1<<2) +#define SHOCK (1<<3) +#define SAFE (1<<4) //flags for pass_flags #define PASSTABLE (1<<0) @@ -140,20 +136,20 @@ #define PASSGIRDER (1<<8) //turf-only flags -#define NOJAUNT 1 -#define NO_LAVA_GEN 2 //Blocks lava rivers being generated on the turf -#define NO_RUINS 4 +#define NOJAUNT (1<<0) +#define NO_LAVA_GEN (1<<1) //Blocks lava rivers being generated on the turf +#define NO_RUINS (1<<2) //ITEM INVENTORY SLOT BITMASKS #define SLOT_FLAG_OCLOTHING (1<<0) #define SLOT_FLAG_ICLOTHING (1<<1) -#define SLOT_FLAG_GLOVES (1<<2) +#define SLOT_FLAG_GLOVES (1<<2) #define SLOT_FLAG_EYES (1<<3) #define SLOT_FLAG_EARS (1<<4) #define SLOT_FLAG_MASK (1<<5) #define SLOT_FLAG_HEAD (1<<6) #define SLOT_FLAG_FEET (1<<7) -#define SLOT_FLAG_ID (1<<8) +#define SLOT_FLAG_ID (1<<8) #define SLOT_FLAG_BELT (1<<9) #define SLOT_FLAG_BACK (1<<10) #define SLOT_FLAG_POCKET (1<<11) //this is to allow items with a w_class of 3 or 4 to fit in pockets. diff --git a/code/__DEFINES/genetics_defines.dm b/code/__DEFINES/genetics_defines.dm index 1b03279fb9c..63616cc12cd 100644 --- a/code/__DEFINES/genetics_defines.dm +++ b/code/__DEFINES/genetics_defines.dm @@ -8,18 +8,18 @@ // mob/var/list/mutations // Used in preferences. -#define DISABILITY_FLAG_NEARSIGHTED 1 -#define DISABILITY_FLAG_FAT 2 -#define DISABILITY_FLAG_BLIND 4 -#define DISABILITY_FLAG_MUTE 8 -#define DISABILITY_FLAG_COLOURBLIND 16 -#define DISABILITY_FLAG_WINGDINGS 32 -#define DISABILITY_FLAG_NERVOUS 64 -#define DISABILITY_FLAG_SWEDISH 128 -#define DISABILITY_FLAG_LISP 256 -#define DISABILITY_FLAG_DIZZY 512 -#define DISABILITY_FLAG_CHAV 1024 -#define DISABILITY_FLAG_DEAF 2048 +#define DISABILITY_FLAG_NEARSIGHTED (1<<0) +#define DISABILITY_FLAG_FAT (1<<1) +#define DISABILITY_FLAG_BLIND (1<<2) +#define DISABILITY_FLAG_MUTE (1<<3) +#define DISABILITY_FLAG_COLOURBLIND (1<<4) +#define DISABILITY_FLAG_WINGDINGS (1<<5) +#define DISABILITY_FLAG_NERVOUS (1<<6) +#define DISABILITY_FLAG_SWEDISH (1<<7) +#define DISABILITY_FLAG_LISP (1<<8) +#define DISABILITY_FLAG_DIZZY (1<<9) +#define DISABILITY_FLAG_CHAV (1<<10) +#define DISABILITY_FLAG_DEAF (1<<11) /////////////////////////////////////// // MUTATIONS diff --git a/code/__DEFINES/misc_defines.dm b/code/__DEFINES/misc_defines.dm index 4dd81e1afd3..c062a6a07ac 100644 --- a/code/__DEFINES/misc_defines.dm +++ b/code/__DEFINES/misc_defines.dm @@ -395,9 +395,9 @@ #define SQL_VERSION 53 // Vending machine stuff -#define CAT_NORMAL 1 -#define CAT_HIDDEN 2 -#define CAT_COIN 4 +#define CAT_NORMAL (1<<0) +#define CAT_HIDDEN (1<<1) +#define CAT_COIN (1<<2) // Jobs // used for alternate_option @@ -498,16 +498,16 @@ #define SYMPTOM_ACTIVATION_PROB 3 // Atmos stuff that fucking terrifies me -#define LINDA_SPAWN_HEAT 1 -#define LINDA_SPAWN_20C 2 -#define LINDA_SPAWN_TOXINS 4 -#define LINDA_SPAWN_OXYGEN 8 -#define LINDA_SPAWN_CO2 16 -#define LINDA_SPAWN_NITROGEN 32 -#define LINDA_SPAWN_N2O 64 -#define LINDA_SPAWN_AGENT_B 128 -#define LINDA_SPAWN_AIR 256 -#define LINDA_SPAWN_COLD 512 +#define LINDA_SPAWN_HEAT (1<<0) +#define LINDA_SPAWN_20C (1<<1) +#define LINDA_SPAWN_TOXINS (1<<2) +#define LINDA_SPAWN_OXYGEN (1<<3) +#define LINDA_SPAWN_CO2 (1<<4) +#define LINDA_SPAWN_NITROGEN (1<<5) +#define LINDA_SPAWN_N2O (1<<6) +#define LINDA_SPAWN_AGENT_B (1<<7) +#define LINDA_SPAWN_AIR (1<<8) +#define LINDA_SPAWN_COLD (1<<9) // Throwing these defines here for the TM to minimise conflicts #define MAPROTATION_MODE_NORMAL_VOTE "Vote" diff --git a/code/__DEFINES/mob_defines.dm b/code/__DEFINES/mob_defines.dm index f1514f1126f..4ba93d9d0ec 100644 --- a/code/__DEFINES/mob_defines.dm +++ b/code/__DEFINES/mob_defines.dm @@ -67,9 +67,9 @@ //feel free to add shit to lists below //Reagent Metabolization flags, defines the type of reagents that affect this mob -#define PROCESS_ORG 1 //Only processes reagents with "ORGANIC" or "ORGANIC | SYNTHETIC" -#define PROCESS_SYN 2 //Only processes reagents with "SYNTHETIC" or "ORGANIC | SYNTHETIC" -#define PROCESS_DUO 4 //Only processes reagents with "ORGANIC | SYNTHETIC" +#define PROCESS_ORG (1<<0) //Only processes reagents with "ORGANIC" or "ORGANIC | SYNTHETIC" +#define PROCESS_SYN (1<<1) //Only processes reagents with "SYNTHETIC" or "ORGANIC | SYNTHETIC" +#define PROCESS_DUO (1<<2) //Only processes reagents with "ORGANIC | SYNTHETIC" #define HUMAN_STRIP_DELAY 40 //takes 40ds = 4s to strip someone. #define ALIEN_SELECT_AFK_BUFFER 1 // How many minutes that a person can be AFK before not being allowed to be an alien. @@ -105,24 +105,24 @@ #define SYNTHETIC 2 // Appearance change flags -#define APPEARANCE_UPDATE_DNA 1 -#define APPEARANCE_RACE 2|APPEARANCE_UPDATE_DNA -#define APPEARANCE_GENDER 4|APPEARANCE_UPDATE_DNA -#define APPEARANCE_SKIN 8 -#define APPEARANCE_HAIR 16 -#define APPEARANCE_HAIR_COLOR 32 -#define APPEARANCE_SECONDARY_HAIR_COLOR 64 -#define APPEARANCE_FACIAL_HAIR 128 -#define APPEARANCE_FACIAL_HAIR_COLOR 256 -#define APPEARANCE_SECONDARY_FACIAL_HAIR_COLOR 512 -#define APPEARANCE_EYE_COLOR 1024 -#define APPEARANCE_ALL_HAIR APPEARANCE_HAIR|APPEARANCE_HAIR_COLOR|APPEARANCE_SECONDARY_HAIR_COLOR|APPEARANCE_FACIAL_HAIR|APPEARANCE_FACIAL_HAIR_COLOR|APPEARANCE_SECONDARY_FACIAL_HAIR_COLOR -#define APPEARANCE_HEAD_ACCESSORY 2048 -#define APPEARANCE_MARKINGS 4096 -#define APPEARANCE_BODY_ACCESSORY 8192 -#define APPEARANCE_ALT_HEAD 16384 -#define APPEARANCE_ALL_BODY APPEARANCE_ALL_HAIR|APPEARANCE_HEAD_ACCESSORY|APPEARANCE_MARKINGS|APPEARANCE_BODY_ACCESSORY|APPEARANCE_ALT_HEAD -#define APPEARANCE_ALL 32767 +#define APPEARANCE_UPDATE_DNA (1<<0) +#define APPEARANCE_RACE (1<<1)|APPEARANCE_UPDATE_DNA +#define APPEARANCE_GENDER (1<<2)|APPEARANCE_UPDATE_DNA +#define APPEARANCE_SKIN (1<<3) +#define APPEARANCE_HAIR (1<<4) +#define APPEARANCE_HAIR_COLOR (1<<5) +#define APPEARANCE_SECONDARY_HAIR_COLOR (1<<6) +#define APPEARANCE_FACIAL_HAIR (1<<7) +#define APPEARANCE_FACIAL_HAIR_COLOR (1<<8) +#define APPEARANCE_SECONDARY_FACIAL_HAIR_COLOR (1<<9) +#define APPEARANCE_EYE_COLOR (1<<10) +#define APPEARANCE_ALL_HAIR (APPEARANCE_HAIR|APPEARANCE_HAIR_COLOR|APPEARANCE_SECONDARY_HAIR_COLOR|APPEARANCE_FACIAL_HAIR|APPEARANCE_FACIAL_HAIR_COLOR|APPEARANCE_SECONDARY_FACIAL_HAIR_COLOR) +#define APPEARANCE_HEAD_ACCESSORY (1<<11) +#define APPEARANCE_MARKINGS (1<<12) +#define APPEARANCE_BODY_ACCESSORY (1<<13) +#define APPEARANCE_ALT_HEAD (1<<14) +#define APPEARANCE_ALL_BODY (APPEARANCE_ALL_HAIR|APPEARANCE_HEAD_ACCESSORY|APPEARANCE_MARKINGS|APPEARANCE_BODY_ACCESSORY|APPEARANCE_ALT_HEAD) +#define APPEARANCE_ALL ((1<<15)-1) // If you add or remove an appearance change flag above, make sure you update this define with the amount of the flags. #define STAMINA_REGEN_BLOCK_TIME (10 SECONDS) @@ -154,10 +154,10 @@ #define AI_CHECK_RADIO 2 //determines if a mob can smash through it -#define ENVIRONMENT_SMASH_NONE 0 -#define ENVIRONMENT_SMASH_STRUCTURES 1 //crates, lockers, ect -#define ENVIRONMENT_SMASH_WALLS 2 //walls -#define ENVIRONMENT_SMASH_RWALLS 4 //rwalls +#define ENVIRONMENT_SMASH_NONE 0 +#define ENVIRONMENT_SMASH_STRUCTURES (1<<0) //crates, lockers, ect +#define ENVIRONMENT_SMASH_WALLS (1<<1) //walls +#define ENVIRONMENT_SMASH_RWALLS (1<<2) //rwalls // Reproduction #define DEFAULT_MAX_OFFSPRING 8 @@ -165,13 +165,13 @@ ///Flags used by the flags parameter of electrocute act. ///Makes it so that the shock doesn't take gloves into account. -#define SHOCK_NOGLOVES (1 << 0) +#define SHOCK_NOGLOVES (1<<0) ///Used when the shock is from a tesla bolt. -#define SHOCK_TESLA (1 << 1) +#define SHOCK_TESLA (1<<1) ///Used when an illusion shocks something. Makes the shock deal stamina damage and not trigger certain secondary effects. -#define SHOCK_ILLUSION (1 << 2) +#define SHOCK_ILLUSION (1<<2) ///The shock doesn't stun. -#define SHOCK_NOSTUN (1 << 3) +#define SHOCK_NOSTUN (1<<3) #define POCKET_STRIP_DELAY 40 //time taken (in deciseconds) to search somebody's pockets @@ -192,11 +192,11 @@ #define TINT_BLIND 3 //Threshold of tint level to obscure vision fully #define EYE_SHINE_THRESHOLD 6 //dark_view threshold past which a humanoid's eyes will 'shine' in the dark. -#define STATUS_UPDATE_HEALTH 1 -#define STATUS_UPDATE_STAT 2 -#define STATUS_UPDATE_STAMINA 8 -#define STATUS_UPDATE_BLIND 16 -#define STATUS_UPDATE_NEARSIGHTED 64 +#define STATUS_UPDATE_HEALTH (1<<0) +#define STATUS_UPDATE_STAT (1<<1) +#define STATUS_UPDATE_STAMINA (1<<2) +#define STATUS_UPDATE_BLIND (1<<3) +#define STATUS_UPDATE_NEARSIGHTED (1<<4) #define STATUS_UPDATE_NONE 0 #define STATUS_UPDATE_ALL (~0) diff --git a/code/__DEFINES/preferences_defines.dm b/code/__DEFINES/preferences_defines.dm index 0f6692b74e7..61d0ef1652d 100644 --- a/code/__DEFINES/preferences_defines.dm +++ b/code/__DEFINES/preferences_defines.dm @@ -1,42 +1,42 @@ //Preference toggles -#define SOUND_ADMINHELP 1 -#define SOUND_MIDI 2 -#define SOUND_AMBIENCE 4 -#define SOUND_LOBBY 8 -#define SOUND_HEARTBEAT 32 -#define SOUND_BUZZ 64 -#define SOUND_INSTRUMENTS 128 -#define SOUND_MENTORHELP 256 -#define SOUND_DISCO 512 -#define SOUND_AI_VOICE 1024 -#define SOUND_PRAYERNOTIFY 2048 +#define SOUND_ADMINHELP (1<<0) +#define SOUND_MIDI (1<<1) +#define SOUND_AMBIENCE (1<<2) +#define SOUND_LOBBY (1<<3) +#define SOUND_HEARTBEAT (1<<4) +#define SOUND_BUZZ (1<<5) +#define SOUND_INSTRUMENTS (1<<6) +#define SOUND_MENTORHELP (1<<7) +#define SOUND_DISCO (1<<8) +#define SOUND_AI_VOICE (1<<9) +#define SOUND_PRAYERNOTIFY (1<<10) #define SOUND_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|SOUND_HEARTBEAT|SOUND_BUZZ|SOUND_INSTRUMENTS|SOUND_MENTORHELP|SOUND_DISCO|SOUND_AI_VOICE|SOUND_PRAYERNOTIFY) -#define PREFTOGGLE_CHAT_OOC 1 -#define PREFTOGGLE_CHAT_DEAD 2 -#define PREFTOGGLE_CHAT_GHOSTEARS 4 -#define PREFTOGGLE_CHAT_GHOSTSIGHT 8 -#define PREFTOGGLE_CHAT_PRAYER 16 -#define PREFTOGGLE_CHAT_RADIO 32 -// #define PREFTOGGLE_AZERTY 64 // obsolete -#define PREFTOGGLE_CHAT_DEBUGLOGS 128 -#define PREFTOGGLE_CHAT_LOOC 256 -#define PREFTOGGLE_CHAT_GHOSTRADIO 512 -#define PREFTOGGLE_SHOW_TYPING 1024 -#define PREFTOGGLE_DISABLE_SCOREBOARD 2048 -// #define PREFTOGGLE_DISABLE_KARMA_REMINDER 4096 // Defunct as of 2023-03-12 -#define PREFTOGGLE_MEMBER_PUBLIC 8192 -#define PREFTOGGLE_CHAT_NO_ADMINLOGS 16384 -#define PREFTOGGLE_DONATOR_PUBLIC 32768 -#define PREFTOGGLE_CHAT_NO_TICKETLOGS 65536 -// #define PREFTOGGLE_UI_DARKMODE 131072 // Defunct as of 2024-01-29 -// #define PREFTOGGLE_DISABLE_KARMA 262144 // Defunct as of 2023-03-12 -#define PREFTOGGLE_CHAT_NO_MENTORTICKETLOGS 524288 -// #define PREFTOGGLE_TYPING_ONCE 1048576 // Defunct as of 2024-01-29 -#define PREFTOGGLE_AMBIENT_OCCLUSION 2097152 -#define PREFTOGGLE_CHAT_GHOSTPDA 4194304 -// #define PREFTOGGLE_NUMPAD_TARGET 8388608 // Made obsolete with key bindings +#define PREFTOGGLE_CHAT_OOC (1<<0) +#define PREFTOGGLE_CHAT_DEAD (1<<1) +#define PREFTOGGLE_CHAT_GHOSTEARS (1<<2) +#define PREFTOGGLE_CHAT_GHOSTSIGHT (1<<3) +#define PREFTOGGLE_CHAT_PRAYER (1<<4) +#define PREFTOGGLE_CHAT_RADIO (1<<5) +// #define PREFTOGGLE_AZERTY (1<<6) // obsolete +#define PREFTOGGLE_CHAT_DEBUGLOGS (1<<7) +#define PREFTOGGLE_CHAT_LOOC (1<<8) +#define PREFTOGGLE_CHAT_GHOSTRADIO (1<<9) +#define PREFTOGGLE_SHOW_TYPING (1<<10) +#define PREFTOGGLE_DISABLE_SCOREBOARD (1<<11) +// #define PREFTOGGLE_DISABLE_KARMA_REMINDER (1<<12) // Defunct as of 2023-03-12 +#define PREFTOGGLE_MEMBER_PUBLIC (1<<13) +#define PREFTOGGLE_CHAT_NO_ADMINLOGS (1<<14) +#define PREFTOGGLE_DONATOR_PUBLIC (1<<15) +#define PREFTOGGLE_CHAT_NO_TICKETLOGS (1<<16) +// #define PREFTOGGLE_UI_DARKMODE (1<<17) // Defunct as of 2024-01-29 +// #define PREFTOGGLE_DISABLE_KARMA (1<<18) // Defunct as of 2023-03-12 +#define PREFTOGGLE_CHAT_NO_MENTORTICKETLOGS (1<<19) +// #define PREFTOGGLE_TYPING_ONCE (1<<20) // Defunct as of 2024-01-29 +#define PREFTOGGLE_AMBIENT_OCCLUSION (1<<21) +#define PREFTOGGLE_CHAT_GHOSTPDA (1<<22) +// #define PREFTOGGLE_NUMPAD_TARGET (1<<23) // Made obsolete with key bindings #define TOGGLES_TOTAL 16777215 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined. @@ -109,11 +109,11 @@ // Defines just for parallax because its levels make storing it in the regular prefs a pain in the ass // These dont need to be bitflags because there isnt going to be more than one at a time of these active // But its gonna piss off my OCD if it isnt bitflags, so deal with it, -affected -#define PARALLAX_DISABLE 1 -#define PARALLAX_LOW 2 -#define PARALLAX_MED 4 -#define PARALLAX_HIGH 8 -#define PARALLAX_INSANE 16 +#define PARALLAX_DISABLE (1<<0) +#define PARALLAX_LOW (1<<1) +#define PARALLAX_MED (1<<2) +#define PARALLAX_HIGH (1<<3) +#define PARALLAX_INSANE (1<<4) // 2FA Defines. These are the same as the schema DB enums // diff --git a/code/__DEFINES/radio_defines.dm b/code/__DEFINES/radio_defines.dm index 7b2eeec76ab..386b64ad749 100644 --- a/code/__DEFINES/radio_defines.dm +++ b/code/__DEFINES/radio_defines.dm @@ -59,8 +59,8 @@ #define RADIO_LOGIC "radio_logic" // Signal types -#define SIGNALTYPE_NORMAL 0 -#define SIGNALTYPE_INTERCOM 1 // Will only broadcast to intercoms -#define SIGNALTYPE_INTERCOM_SBR 2 // Will only broadcast to intercoms and station-bounced radios -#define SIGNALTYPE_AINOTRACK 4 // AI can't track down this person. Useful for imitation broadcasts where you can't find the actual mob +#define SIGNALTYPE_NORMAL 0 +#define SIGNALTYPE_INTERCOM (1<<0) // Will only broadcast to intercoms +#define SIGNALTYPE_INTERCOM_SBR (1<<1) // Will only broadcast to intercoms and station-bounced radios +#define SIGNALTYPE_AINOTRACK (1<<2) // AI can't track down this person. Useful for imitation broadcasts where you can't find the actual mob diff --git a/code/__DEFINES/shuttle_defines.dm b/code/__DEFINES/shuttle_defines.dm index 72ed25d1518..43470086ce2 100644 --- a/code/__DEFINES/shuttle_defines.dm +++ b/code/__DEFINES/shuttle_defines.dm @@ -7,9 +7,9 @@ #define DOCKING_NULL_SOURCE (1<<4) //Rotation params -#define ROTATE_DIR 1 -#define ROTATE_SMOOTH 2 -#define ROTATE_OFFSET 4 +#define ROTATE_DIR (1<<0) +#define ROTATE_SMOOTH (1<<1) +#define ROTATE_OFFSET (1<<2) #define SHUTTLE_DOCKER_LANDING_CLEAR 1 #define SHUTTLE_DOCKER_BLOCKED_BY_HIDDEN_PORT 2 diff --git a/code/__DEFINES/sight.dm b/code/__DEFINES/sight.dm index e6b4e9d4c84..c4de8b0c6b0 100644 --- a/code/__DEFINES/sight.dm +++ b/code/__DEFINES/sight.dm @@ -32,9 +32,9 @@ //Some mob defines below #define AI_CAMERA_LUMINOSITY 6 -#define BORGMESON 1 -#define BORGTHERM 2 -#define BORGXRAY 4 +#define BORGMESON (1<<0) +#define BORGTHERM (1<<1) +#define BORGXRAY (1<<2) #define SECHUD 1 #define MEDHUD 2 diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 06beb592cc9..1e75064d8f0 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -125,11 +125,11 @@ // SS runlevels -#define RUNLEVEL_INIT 0 -#define RUNLEVEL_LOBBY 1 -#define RUNLEVEL_SETUP 2 -#define RUNLEVEL_GAME 4 -#define RUNLEVEL_POSTGAME 8 +#define RUNLEVEL_INIT 0 +#define RUNLEVEL_LOBBY (1<<0) +#define RUNLEVEL_SETUP (1<<1) +#define RUNLEVEL_GAME (1<<2) +#define RUNLEVEL_POSTGAME (1<<3) #define RUNLEVELS_DEFAULT (RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME) diff --git a/code/controllers/subsystem/non_firing/SSatoms.dm b/code/controllers/subsystem/non_firing/SSatoms.dm index 85918ee3a61..77572c8a86e 100644 --- a/code/controllers/subsystem/non_firing/SSatoms.dm +++ b/code/controllers/subsystem/non_firing/SSatoms.dm @@ -1,7 +1,7 @@ -#define BAD_INIT_QDEL_BEFORE 1 -#define BAD_INIT_DIDNT_INIT 2 -#define BAD_INIT_SLEPT 4 -#define BAD_INIT_NO_HINT 8 +#define BAD_INIT_QDEL_BEFORE (1<<0) +#define BAD_INIT_DIDNT_INIT (1<<1) +#define BAD_INIT_SLEPT (1<<2) +#define BAD_INIT_NO_HINT (1<<3) SUBSYSTEM_DEF(atoms) name = "Atoms" diff --git a/code/datums/diseases/_disease.dm b/code/datums/diseases/_disease.dm index 6d19e603ca9..ba2a3613825 100644 --- a/code/datums/diseases/_disease.dm +++ b/code/datums/diseases/_disease.dm @@ -2,22 +2,22 @@ #define VIRUS_SYMPTOM_LIMIT 6 //Visibility Flags -#define HIDDEN_SCANNER 1 -#define HIDDEN_PANDEMIC 2 +#define HIDDEN_SCANNER (1<<0) +#define HIDDEN_PANDEMIC (1<<1) //Disease Flags -#define CURABLE 1 -#define CAN_CARRY 2 -#define CAN_RESIST 4 +#define CURABLE (1<<0) +#define CAN_CARRY (1<<1) +#define CAN_RESIST (1<<2) //Spread Flags -#define SPECIAL 1 -#define NON_CONTAGIOUS 2 -#define BLOOD 4 -#define CONTACT_FEET 8 -#define CONTACT_HANDS 16 -#define CONTACT_GENERAL 32 -#define AIRBORNE 64 +#define SPECIAL (1<<0) +#define NON_CONTAGIOUS (1<<1) +#define BLOOD (1<<2) +#define CONTACT_FEET (1<<3) +#define CONTACT_HANDS (1<<4) +#define CONTACT_GENERAL (1<<5) +#define AIRBORNE (1<<6) //Severity Defines diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 2eff528db17..7baf0906d03 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -1,9 +1,9 @@ #define DNA_BLOCK_SIZE 3 // Buffer datatype flags. -#define DNA2_BUF_UI 1 -#define DNA2_BUF_UE 2 -#define DNA2_BUF_SE 4 +#define DNA2_BUF_UI (1<<0) +#define DNA2_BUF_UE (1<<1) +#define DNA2_BUF_SE (1<<2) #define NEGATE_MUTATION_THRESHOLD 30 // Occupants with over ## percent radiation threshold will not gain mutations diff --git a/code/game/machinery/computer/atmos_controllers.dm b/code/game/machinery/computer/atmos_controllers.dm index 18b0185f72b..bddaff4ad58 100644 --- a/code/game/machinery/computer/atmos_controllers.dm +++ b/code/game/machinery/computer/atmos_controllers.dm @@ -1,12 +1,12 @@ GLOBAL_LIST_EMPTY(gas_sensors) -#define SENSOR_PRESSURE 1 -#define SENSOR_TEMPERATURE 2 -#define SENSOR_O2 4 -#define SENSOR_PLASMA 8 -#define SENSOR_N2 16 -#define SENSOR_CO2 32 -#define SENSOR_N2O 64 +#define SENSOR_PRESSURE (1<<0) +#define SENSOR_TEMPERATURE (1<<1) +#define SENSOR_O2 (1<<2) +#define SENSOR_PLASMA (1<<3) +#define SENSOR_N2 (1<<4) +#define SENSOR_CO2 (1<<5) +#define SENSOR_N2O (1<<6) /obj/machinery/atmospherics/air_sensor icon = 'icons/obj/stationobjs.dmi' diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 0f78731f5d3..e4b1f347cab 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -3,9 +3,9 @@ //Request Console Department Types. //For one console to be under multiple categories, you need to add the numbers with each other. For example, value of 6 will allow you to request supplies and relay info to that specific console. -#define RC_ASSIST 1 //Request Assistance -#define RC_SUPPLY 2 //Request Supplies -#define RC_INFO 4 //Relay Info +#define RC_ASSIST (1<<0) //Request Assistance +#define RC_SUPPLY (1<<1) //Request Supplies +#define RC_INFO (1<<2) //Relay Info //Request Console Screens #define RCS_MAINMENU 0 // Main menu diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index c3851ae086b..7680d85aa8d 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -43,14 +43,14 @@ GLOBAL_DATUM_INIT(canister_icon_container, /datum/canister_icons, new()) -#define HOLDING_TANK 1 -#define CONNECTED_PORT 2 -#define LOW_PRESSURE 4 -#define NORMAL_PRESSURE 8 -#define HIGH_PRESSURE 16 -#define EXTREME_PRESSURE 32 -#define NEW_COLOR 64 -#define RESET 68 +#define HOLDING_TANK (1<<0) +#define CONNECTED_PORT (1<<1) +#define LOW_PRESSURE (1<<2) +#define NORMAL_PRESSURE (1<<3) +#define HIGH_PRESSURE (1<<4) +#define EXTREME_PRESSURE (1<<5) +#define NEW_COLOR (1<<6) +#define RESET (LOW_PRESSURE | NEW_COLOR) /obj/machinery/atmospherics/portable/canister name = "canister" diff --git a/code/modules/awaymissions/maploader/writer.dm b/code/modules/awaymissions/maploader/writer.dm index 23b0a735714..8d9046e7b5c 100644 --- a/code/modules/awaymissions/maploader/writer.dm +++ b/code/modules/awaymissions/maploader/writer.dm @@ -1,10 +1,10 @@ -#define DMM_IGNORE_AREAS 1 -#define DMM_IGNORE_TURFS 2 -#define DMM_IGNORE_OBJS 4 -#define DMM_IGNORE_NPCS 8 -#define DMM_IGNORE_PLAYERS 16 -#define DMM_IGNORE_MOBS 24 -#define DMM_USE_JSON 32 +#define DMM_IGNORE_AREAS (1<<0) +#define DMM_IGNORE_TURFS (1<<1) +#define DMM_IGNORE_OBJS (1<<2) +#define DMM_IGNORE_NPCS (1<<3) +#define DMM_IGNORE_PLAYERS (1<<4) +#define DMM_IGNORE_MOBS (DMM_IGNORE_NPCS | DMM_IGNORE_PLAYERS) +#define DMM_USE_JSON (1<<5) /datum/dmm_suite/proc/save_map(turf/t1, turf/t2, map_name = "", flags = 0) // Check for illegal characters in file name... in a cheap way. diff --git a/code/modules/power/apc/apc_overlay.dm b/code/modules/power/apc/apc_overlay.dm index cb169c0e76f..cdd084ec056 100644 --- a/code/modules/power/apc/apc_overlay.dm +++ b/code/modules/power/apc/apc_overlay.dm @@ -1,31 +1,31 @@ //update_state -#define UPSTATE_CELL_IN 1 -#define UPSTATE_OPENED1 2 -#define UPSTATE_OPENED2 4 -#define UPSTATE_MAINT 8 -#define UPSTATE_BROKE 16 -#define UPSTATE_BLUESCREEN 32 -#define UPSTATE_WIREEXP 64 -#define UPSTATE_ALLGOOD 128 +#define UPSTATE_CELL_IN (1<<0) +#define UPSTATE_OPENED1 (1<<1) +#define UPSTATE_OPENED2 (1<<2) +#define UPSTATE_MAINT (1<<3) +#define UPSTATE_BROKE (1<<4) +#define UPSTATE_BLUESCREEN (1<<5) +#define UPSTATE_WIREEXP (1<<6) +#define UPSTATE_ALLGOOD (1<<7) //update_overlay -#define APC_UPOVERLAY_CHARGEING0 1 -#define APC_UPOVERLAY_CHARGEING1 2 -#define APC_UPOVERLAY_CHARGEING2 4 -#define APC_UPOVERLAY_EQUIPMENT0 8 -#define APC_UPOVERLAY_EQUIPMENT1 16 -#define APC_UPOVERLAY_EQUIPMENT2 32 -#define APC_UPOVERLAY_LIGHTING0 64 -#define APC_UPOVERLAY_LIGHTING1 128 -#define APC_UPOVERLAY_LIGHTING2 256 -#define APC_UPOVERLAY_ENVIRON0 512 -#define APC_UPOVERLAY_ENVIRON1 1024 -#define APC_UPOVERLAY_ENVIRON2 2048 -#define APC_UPOVERLAY_LOCKED 4096 +#define APC_UPOVERLAY_CHARGEING0 (1<<0) +#define APC_UPOVERLAY_CHARGEING1 (1<<1) +#define APC_UPOVERLAY_CHARGEING2 (1<<2) +#define APC_UPOVERLAY_EQUIPMENT0 (1<<3) +#define APC_UPOVERLAY_EQUIPMENT1 (1<<4) +#define APC_UPOVERLAY_EQUIPMENT2 (1<<5) +#define APC_UPOVERLAY_LIGHTING0 (1<<6) +#define APC_UPOVERLAY_LIGHTING1 (1<<7) +#define APC_UPOVERLAY_LIGHTING2 (1<<8) +#define APC_UPOVERLAY_ENVIRON0 (1<<9) +#define APC_UPOVERLAY_ENVIRON1 (1<<10) +#define APC_UPOVERLAY_ENVIRON2 (1<<11) +#define APC_UPOVERLAY_LOCKED (1<<12) #define APC_UPDATE_ICON_COOLDOWN 20 SECONDS // 20 seconds