diff --git a/code/__defines/admin.dm b/code/__defines/admin.dm index 757c4347de..4783018fcb 100644 --- a/code/__defines/admin.dm +++ b/code/__defines/admin.dm @@ -1,12 +1,12 @@ // 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_ALL 31 +#define MUTE_IC 0x1 +#define MUTE_OOC 0x2 +#define MUTE_PRAY 0x4 +#define MUTE_ADMINHELP 0x8 +#define MUTE_DEADCHAT 0x16 +#define MUTE_ALL 0xFFFF // Number of identical messages required to get the spam-prevention auto-mute thing to trigger warnings and automutes. #define SPAM_TRIGGER_WARNING 5 @@ -21,22 +21,22 @@ #define ROUNDSTART_LOGOUT_REPORT_TIME 6000 // Amount of time (in deciseconds) after the rounds starts, that the player disconnect report is issued. -// Admin permissions. Please don't edit these values without speaking to Errorage first. ~Carn -#define R_BUILDMODE 1 -#define R_ADMIN 2 -#define R_BAN 4 -#define R_FUN 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_HOST 32768 +// Admin permissions. +#define R_BUILDMODE 0x1 +#define R_ADMIN 0x2 +#define R_BAN 0x4 +#define R_FUN 0x8 +#define R_SERVER 0x10 +#define R_DEBUG 0x20 +#define R_POSSESS 0x40 +#define R_PERMISSIONS 0x80 +#define R_STEALTH 0x100 +#define R_REJUVINATE 0x200 +#define R_VAREDIT 0x400 +#define R_SOUNDS 0x800 +#define R_SPAWN 0x1000 +#define R_MOD 0x2000 +#define R_MENTOR 0x4000 +#define R_HOST 0x8000 //higher than this will overflow -#define R_MAXPERMISSION 32768 // This holds the maximum value for a permission. It is used in iteration, so keep it updated. \ No newline at end of file +#define R_MAXPERMISSION 0x8000 // This holds the maximum value for a permission. It is used in iteration, so keep it updated. \ No newline at end of file diff --git a/code/__defines/atmos.dm b/code/__defines/atmos.dm index db308b16c4..ef41eb97f5 100644 --- a/code/__defines/atmos.dm +++ b/code/__defines/atmos.dm @@ -85,4 +85,4 @@ //Flags for zone sleeping #define ZONE_ACTIVE 1 -#define ZONE_SLEEPING 0 \ No newline at end of file +#define ZONE_SLEEPING 0 diff --git a/code/__defines/damage_organs.dm b/code/__defines/damage_organs.dm index 6c2590f840..27a34f10eb 100644 --- a/code/__defines/damage_organs.dm +++ b/code/__defines/damage_organs.dm @@ -21,10 +21,10 @@ #define DROWSY "drowsy" // 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 BRUTELOSS 0x1 +#define FIRELOSS 0x2 +#define TOXLOSS 0x4 +#define OXYLOSS 0x8 #define FIRE_DAMAGE_MODIFIER 0.0215 // Higher values result in more external fire damage to the skin. (default 0.0215) #define AIR_DAMAGE_MODIFIER 2.025 // More means less damage from hot air scalding lungs, less = more damage. (default 2.025) @@ -53,4 +53,4 @@ #define INFECTION_LEVEL_ONE 100 #define INFECTION_LEVEL_TWO 500 -#define INFECTION_LEVEL_THREE 1000 \ No newline at end of file +#define INFECTION_LEVEL_THREE 1000 diff --git a/code/__defines/dna.dm b/code/__defines/dna.dm index 2e1e9da0cc..cb1d2ad7e7 100644 --- a/code/__defines/dna.dm +++ b/code/__defines/dna.dm @@ -31,16 +31,16 @@ #define mSmallsize 110 // Table climbing. // disabilities -#define NEARSIGHTED 1 -#define EPILEPSY 2 -#define COUGHING 4 -#define TOURETTES 8 -#define NERVOUS 16 +#define NEARSIGHTED 0x1 +#define EPILEPSY 0x2 +#define COUGHING 0x4 +#define TOURETTES 0x8 +#define NERVOUS 0x10 // sdisabilities -#define BLIND 1 -#define MUTE 2 -#define DEAF 4 +#define BLIND 0x1 +#define MUTE 0x2 +#define DEAF 0x4 // The way blocks are handled badly needs a rewrite, this is horrible. // Too much of a project to handle at the moment, TODO for later. diff --git a/code/__defines/gamemode.dm b/code/__defines/gamemode.dm index 6e1acef8ce..db75adbbd2 100644 --- a/code/__defines/gamemode.dm +++ b/code/__defines/gamemode.dm @@ -9,21 +9,21 @@ #define SEC_LEVEL_RED 2 #define SEC_LEVEL_DELTA 3 -#define BE_TRAITOR 1 -#define BE_OPERATIVE 2 -#define BE_CHANGELING 4 -#define BE_WIZARD 8 -#define BE_MALF 16 -#define BE_REV 32 -#define BE_ALIEN 64 -#define BE_AI 128 -#define BE_CULTIST 256 -#define BE_MONKEY 512 -#define BE_NINJA 1024 -#define BE_RAIDER 2048 -#define BE_PLANT 4096 -#define BE_MUTINEER 8192 -#define BE_PAI 16384 +#define BE_TRAITOR 0x1 +#define BE_OPERATIVE 0x2 +#define BE_CHANGELING 0x4 +#define BE_WIZARD 0x8 +#define BE_MALF 0x10 +#define BE_REV 0x20 +#define BE_ALIEN 0x40 +#define BE_AI 0x80 +#define BE_CULTIST 0x100 +#define BE_MONKEY 0x200 +#define BE_NINJA 0x400 +#define BE_RAIDER 0x800 +#define BE_PLANT 0x1000 +#define BE_MUTINEER 0x2000 +#define BE_PAI 0x4000 var/list/be_special_flags = list( "Traitor" = BE_TRAITOR, @@ -47,17 +47,17 @@ var/list/be_special_flags = list( // Antagonist datum flags. -#define ANTAG_OVERRIDE_JOB 1 // Assigned job is set to MODE when spawning. -#define ANTAG_OVERRIDE_MOB 2 // Mob is recreated from datum mob_type var when spawning. -#define ANTAG_CLEAR_EQUIPMENT 4 // All preexisting equipment is purged. -#define ANTAG_CHOOSE_NAME 8 // Antagonists are prompted to enter a name. -#define ANTAG_IMPLANT_IMMUNE 16 // Cannot be loyalty implanted. -#define ANTAG_SUSPICIOUS 32 // Shows up on roundstart report. -#define ANTAG_HAS_LEADER 64 // Generates a leader antagonist. -#define ANTAG_HAS_NUKE 128 // Will spawn a nuke at supplied location. -#define ANTAG_RANDSPAWN 256 // Potentially randomly spawns due to events. -#define ANTAG_VOTABLE 512 // Can be voted as an additional antagonist before roundstart. -#define ANTAG_SET_APPEARANCE 1024 // Causes antagonists to use an appearance modifier on spawn. +#define ANTAG_OVERRIDE_JOB 0x1 // Assigned job is set to MODE when spawning. +#define ANTAG_OVERRIDE_MOB 0x2 // Mob is recreated from datum mob_type var when spawning. +#define ANTAG_CLEAR_EQUIPMENT 0x4 // All preexisting equipment is purged. +#define ANTAG_CHOOSE_NAME 0x8 // Antagonists are prompted to enter a name. +#define ANTAG_IMPLANT_IMMUNE 0x10 // Cannot be loyalty implanted. +#define ANTAG_SUSPICIOUS 0x20 // Shows up on roundstart report. +#define ANTAG_HAS_LEADER 0x40 // Generates a leader antagonist. +#define ANTAG_HAS_NUKE 0x80 // Will spawn a nuke at supplied location. +#define ANTAG_RANDSPAWN 0x100 // Potentially randomly spawns due to events. +#define ANTAG_VOTABLE 0x200 // Can be voted as an additional antagonist before roundstart. +#define ANTAG_SET_APPEARANCE 0x400 // Causes antagonists to use an appearance modifier on spawn. // Mode/antag template macros. #define MODE_BORER "borer" @@ -87,22 +87,22 @@ var/list/be_special_flags = list( ///////////////// /* WIZARD SPELL FLAGS */ -#define GHOSTCAST 1 //can a ghost cast it? -#define NEEDSCLOTHES 2 //does it need the wizard garb to cast? Nonwizard spells should not have this -#define NEEDSHUMAN 4 //does it require the caster to be human? -#define Z2NOCAST 8 //if this is added, the spell can't be cast at centcomm -#define STATALLOWED 16 //if set, the user doesn't have to be conscious to cast. Required for ghost spells -#define IGNOREPREV 32 //if set, each new target does not overlap with the previous one +#define GHOSTCAST 0x1 //can a ghost cast it? +#define NEEDSCLOTHES 0x2 //does it need the wizard garb to cast? Nonwizard spells should not have this +#define NEEDSHUMAN 0x4 //does it require the caster to be human? +#define Z2NOCAST 0x8 //if this is added, the spell can't be cast at centcomm +#define STATALLOWED 0x10 //if set, the user doesn't have to be conscious to cast. Required for ghost spells +#define IGNOREPREV 0x20 //if set, each new target does not overlap with the previous one //The following flags only affect different types of spell, and therefore overlap //Targeted spells -#define INCLUDEUSER 64 //does the spell include the caster in its target selection? -#define SELECTABLE 128 //can you select each target for the spell? +#define INCLUDEUSER 0x40 //does the spell include the caster in its target selection? +#define SELECTABLE 0x80 //can you select each target for the spell? //AOE spells -#define IGNOREDENSE 64 //are dense turfs ignored in selection? -#define IGNORESPACE 128 //are space turfs ignored in selection? +#define IGNOREDENSE 0x40 //are dense turfs ignored in selection? +#define IGNORESPACE 0x80 //are space turfs ignored in selection? //End split flags -#define CONSTRUCT_CHECK 256 //used by construct spells - checks for nullrods -#define NO_BUTTON 512 //spell won't show up in the HUD with this +#define CONSTRUCT_CHECK 0x100 //used by construct spells - checks for nullrods +#define NO_BUTTON 0x200 //spell won't show up in the HUD with this //invocation #define SpI_SHOUT "shout" diff --git a/code/__defines/items_clothing.dm b/code/__defines/items_clothing.dm index 0bffdbbbca..1fa7063905 100644 --- a/code/__defines/items_clothing.dm +++ b/code/__defines/items_clothing.dm @@ -5,72 +5,72 @@ #define CANDLE_LUM 3 // For how bright candles are. // Item inventory slot bitmasks. -#define SLOT_OCLOTHING 1 -#define SLOT_ICLOTHING 2 -#define SLOT_GLOVES 4 -#define SLOT_EYES 8 -#define SLOT_EARS 16 -#define SLOT_MASK 32 -#define SLOT_HEAD 64 -#define SLOT_FEET 128 -#define SLOT_ID 256 -#define SLOT_BELT 512 -#define SLOT_BACK 1024 -#define SLOT_POCKET 2048 // This is to allow items with a w_class of 3 or 4 to fit in pockets. -#define SLOT_DENYPOCKET 4096 // This is to deny items with a w_class of 2 or 1 from fitting in pockets. -#define SLOT_TWOEARS 8192 -#define SLOT_TIE 16384 -#define SLOT_HOLSTER 32768 //16th bit +#define SLOT_OCLOTHING 0x1 +#define SLOT_ICLOTHING 0x2 +#define SLOT_GLOVES 0x4 +#define SLOT_EYES 0x8 +#define SLOT_EARS 0x10 +#define SLOT_MASK 0x20 +#define SLOT_HEAD 0x40 +#define SLOT_FEET 0x80 +#define SLOT_ID 0x100 +#define SLOT_BELT 0x200 +#define SLOT_BACK 0x400 +#define SLOT_POCKET 0x800 // This is to allow items with a w_class of 3 or 4 to fit in pockets. +#define SLOT_DENYPOCKET 0x1000 // This is to deny items with a w_class of 2 or 1 from fitting in pockets. +#define SLOT_TWOEARS 0x2000 +#define SLOT_TIE 0x4000 +#define SLOT_HOLSTER 0x8000 //16th bit - higher than this will overflow // Flags bitmasks. -#define STOPPRESSUREDAMAGE 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_BACK) if you see it anywhere +#define STOPPRESSUREDAMAGE 0x1 // 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_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 NOBLUDGEON 2 // When an item has this it produces no "X has been hit by Y with Z" message with the default handler. -#define AIRTIGHT 4 // Functions with internals. -#define USEDELAY 8 // 1 second extra delay on use. (Can be used once every 2s) -#define NOSHIELD 16 // Weapon not affected by shield. -#define CONDUCT 32 // Conducts electricity. (metal etc.) -#define ON_BORDER 64 // Item has priority to check when entering or leaving. -#define NOBLOODY 512 // Used for items if they don't want to get a blood overlay. -#define NODELAY 8192 // 1 second attack-by delay skipped (Can be used once every 0.2s). Most objects have a 1s attack-by delay, which doesn't require a flag. -#define PROXMOVE 16384 // Does this object require proximity checking in Enter()? +#define NOBLUDGEON 0x2 // When an item has this it produces no "X has been hit by Y with Z" message with the default handler. +#define AIRTIGHT 0x4 // Functions with internals. +#define USEDELAY 0x8 // 1 second extra delay on use. (Can be used once every 2s) +#define NOSHIELD 0x10 // Weapon not affected by shield. +#define CONDUCT 0x20 // Conducts electricity. (metal etc.) +#define ON_BORDER 0x40 // Item has priority to check when entering or leaving. +#define NOBLOODY 0x80 // Used for items if they don't want to get a blood overlay. +#define NODELAY 0x100 // 1 second attack-by delay skipped (Can be used once every 0.2s). Most objects have a 1s attack-by delay, which doesn't require a flag. +#define PROXMOVE 0x200 // Does this object require proximity checking in Enter()? //Use these flags to indicate if an item obscures the specified slots from view, whereas body_parts_covered seems to be used to indicate what body parts the item protects. -#define GLASSESCOVERSEYES 256 -#define MASKCOVERSEYES 256 // Get rid of some of the other retardation in these flags. -#define HEADCOVERSEYES 256 // Feel free to reallocate these numbers for other purposes. -#define MASKCOVERSMOUTH 512 // On other items, these are just for mask/head. -#define HEADCOVERSMOUTH 512 +#define GLASSESCOVERSEYES 0x200 +#define MASKCOVERSEYES 0x200 // Get rid of some of the other retardation in these flags. +#define HEADCOVERSEYES 0x200 // Feel free to reallocate these numbers for other purposes. +#define MASKCOVERSMOUTH 0x400 // On other items, these are just for mask/head. +#define HEADCOVERSMOUTH 0x400 -#define THICKMATERIAL 256 // From /tg/station: prevents syringes, parapens and hyposprays 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 NOSLIP for shoes) -#define NOSLIP 256 // Prevents from slipping on wet floors, in space, etc. -#define OPENCONTAINER 1024 // Is an open container for chemistry purposes. -#define BLOCK_GAS_SMOKE_EFFECT 2048 // Blocks the effect that chemical clouds would have on a mob -- glasses, mask and helmets ONLY! (NOTE: flag shared with ONESIZEFITSALL) -#define ONESIZEFITSALL 2048 -#define PHORONGUARD 4096 // Does not get contaminated by phoron. -#define NOREACT 4096 // Reagents don't react inside this container. -#define BLOCKHEADHAIR 4 // Temporarily removes the user's hair overlay. Leaves facial hair. -#define BLOCKHAIR 8192 // Temporarily removes the user's hair, facial and otherwise. +#define THICKMATERIAL 0x800 // From /tg/station: prevents syringes, parapens and hyposprays 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 NOSLIP for shoes) +#define NOSLIP 0x800 // Prevents from slipping on wet floors, in space, etc. +#define OPENCONTAINER 0x1000 // Is an open container for chemistry purposes. +#define BLOCK_GAS_SMOKE_EFFECT 0x2000 // Blocks the effect that chemical clouds would have on a mob -- glasses, mask and helmets ONLY! (NOTE: flag shared with ONESIZEFITSALL) +#define ONESIZEFITSALL 0x2000 +#define PHORONGUARD 0x4000 // Does not get contaminated by phoron. +#define NOREACT 0x4000 // Reagents don't react inside this container. +#define BLOCKHEADHAIR 0x4 // Temporarily removes the user's hair overlay. Leaves facial hair. +#define BLOCKHAIR 0x8000 // Temporarily removes the user's hair, facial and otherwise. // Flags for pass_flags. -#define PASSTABLE 1 -#define PASSGLASS 2 -#define PASSGRILLE 4 -#define PASSBLOB 8 +#define PASSTABLE 0x1 +#define PASSGLASS 0x2 +#define PASSGRILLE 0x4 +#define PASSBLOB 0x8 // Bitmasks for the flags_inv variable. These determine when a piece of clothing hides another, i.e. a helmet hiding glasses. // WARNING: The following flags apply only to the external suit! -#define HIDEGLOVES 1 -#define HIDESUITSTORAGE 2 -#define HIDEJUMPSUIT 4 -#define HIDESHOES 8 -#define HIDETAIL 16 +#define HIDEGLOVES 0x1 +#define HIDESUITSTORAGE 0x2 +#define HIDEJUMPSUIT 0x4 +#define HIDESHOES 0x8 +#define HIDETAIL 0x10 // WARNING: The following flags apply only to the helmets and masks! -#define HIDEMASK 1 -#define HIDEEARS 2 // Headsets and such. -#define HIDEEYES 4 // Glasses. -#define HIDEFACE 8 // Dictates whether we appear as "Unknown". +#define HIDEMASK 0x1 +#define HIDEEARS 0x2 // Headsets and such. +#define HIDEEYES 0x4 // Glasses. +#define HIDEFACE 0x8 // Dictates whether we appear as "Unknown". // Slots. #define slot_back 1 @@ -107,24 +107,24 @@ #define slot_wear_suit_str "slot_suit" // Bitflags for clothing parts. -#define HEAD 1 -#define FACE 2 -#define EYES 4 -#define UPPER_TORSO 8 -#define LOWER_TORSO 16 -#define LEG_LEFT 32 -#define LEG_RIGHT 64 -#define LEGS 96 // LEG_LEFT | LEG_RIGHT -#define FOOT_LEFT 128 -#define FOOT_RIGHT 256 -#define FEET 384 // FOOT_LEFT | FOOT_RIGHT -#define ARM_LEFT 512 -#define ARM_RIGHT 1024 -#define ARMS 1536 // ARM_LEFT | ARM_RIGHT -#define HAND_LEFT 2048 -#define HAND_RIGHT 4096 -#define HANDS 6144 // HAND_LEFT | HAND_RIGHT -#define FULL_BODY 8191 +#define HEAD 0x1 +#define FACE 0x2 +#define EYES 0x4 +#define UPPER_TORSO 0x8 +#define LOWER_TORSO 0x10 +#define LEG_LEFT 0x20 +#define LEG_RIGHT 0x40 +#define LEGS 0x60 // LEG_LEFT | LEG_RIGHT +#define FOOT_LEFT 0x80 +#define FOOT_RIGHT 0x100 +#define FEET 0x180 // FOOT_LEFT | FOOT_RIGHT +#define ARM_LEFT 0x200 +#define ARM_RIGHT 0x400 +#define ARMS 0x600 // ARM_LEFT | ARM_RIGHT +#define HAND_LEFT 0x800 +#define HAND_RIGHT 0x1000 +#define HANDS 0x1800 // HAND_LEFT | HAND_RIGHT +#define FULL_BODY 0xFFFF // 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(). @@ -186,4 +186,4 @@ #define SUIT_SENSOR_OFF 0 #define SUIT_SENSOR_BINARY 1 #define SUIT_SENSOR_VITAL 2 -#define SUIT_SENSOR_TRACKING 3 \ No newline at end of file +#define SUIT_SENSOR_TRACKING 3 diff --git a/code/__defines/machinery.dm b/code/__defines/machinery.dm index 3f9ad5e574..7be4c8ddbb 100644 --- a/code/__defines/machinery.dm +++ b/code/__defines/machinery.dm @@ -1,8 +1,9 @@ var/global/defer_powernet_rebuild = 0 // True if net rebuild will be called manually after an event. -var/CELLRATE = 0.002 // Multiplier for watts per tick <> cell storage (e.g., 0.02 means if there is a load of 1000 watts, 20 units will be taken from a cell per second) - // It's a conversion constant. power_used*CELLRATE = charge_provided, or charge_used/CELLRATE = power_provided -var/CHARGELEVEL = 0.0005 // Cap for how fast cells charge, as a percentage-per-tick (0.01 means cellcharge is capped to 1% per second) +#define CELLRATE 0.002 // Multiplier for watts per tick <> cell storage (e.g., 0.02 means if there is a load of 1000 watts, 20 units will be taken from a cell per second) + // It's a conversion constant. power_used*CELLRATE = charge_provided, or charge_used/CELLRATE = power_provided + +#define CHARGELEVEL_DEFAULT 0.0005 // Controls APC charge rates // Doors! #define DOOR_CRUSH_DAMAGE 10 @@ -15,18 +16,15 @@ var/CHARGELEVEL = 0.0005 // Cap for how fast cells charge, as a percentage-per-t #define TOTAL 4 // For total power used only. // Bitflags for machine stat variable. -#define BROKEN 1 -#define NOPOWER 2 -#define POWEROFF 4 // TBD. -#define MAINT 8 // Under maintenance. -#define EMPED 16 // Temporary broken by EMP pulse. +#define BROKEN 0x1 +#define NOPOWER 0x2 +#define POWEROFF 0x4 // TBD. +#define MAINT 0x8 // Under maintenance. +#define EMPED 0x10 // Temporary broken by EMP pulse. -// Bitmasks for door switches. -#define OPEN 1 -#define IDSCAN 2 -#define BOLTS 4 -#define SHOCK 8 -#define SAFE 16 +// Used by firelocks +#define FIREDOOR_OPEN 1 +#define FIREDOOR_CLOSED 2 #define AI_CAMERA_LUMINOSITY 6 @@ -63,12 +61,12 @@ var/list/restricted_camera_networks = list("thunder","ERT","NUKE","Secret") #define STAGE_SUPER 11 // computer3 error codes, move lower in the file when it passes dev -Sayu -#define PROG_CRASH 1 // Generic crash. -#define MISSING_PERIPHERAL 2 // Missing hardware. -#define BUSTED_ASS_COMPUTER 4 // Self-perpetuating error. BAC will continue to crash forever. -#define MISSING_PROGRAM 8 // Some files try to automatically launch a program. This is that failing. -#define FILE_DRM 16 // Some files want to not be copied/moved. This is them complaining that you tried. -#define NETWORK_FAILURE 32 +#define PROG_CRASH 0x1 // Generic crash. +#define MISSING_PERIPHERAL 0x2 // Missing hardware. +#define BUSTED_ASS_COMPUTER 0x4 // Self-perpetuating error. BAC will continue to crash forever. +#define MISSING_PROGRAM 0x8 // Some files try to automatically launch a program. This is that failing. +#define FILE_DRM 0x10 // Some files want to not be copied/moved. This is them complaining that you tried. +#define NETWORK_FAILURE 0x20 // NanoUI flags #define STATUS_INTERACTIVE 2 // GREEN Visability @@ -97,4 +95,4 @@ var/list/restricted_camera_networks = list("thunder","ERT","NUKE","Secret") #define ATMOS_DEFAULT_VOLUME_PUMP 200 // Liters. #define ATMOS_DEFAULT_VOLUME_FILTER 200 // L. #define ATMOS_DEFAULT_VOLUME_MIXER 200 // L. -#define ATMOS_DEFAULT_VOLUME_PIPE 70 // L. \ No newline at end of file +#define ATMOS_DEFAULT_VOLUME_PIPE 70 // L. diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index fb3874b2de..29042ea8df 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -31,22 +31,22 @@ #define MAX_GEAR_COST 5 // Used in chargen for accessory loadout limit. // Preference toggles. -#define SOUND_ADMINHELP 1 -#define SOUND_MIDI 2 -#define SOUND_AMBIENCE 4 -#define SOUND_LOBBY 8 -#define CHAT_OOC 16 -#define CHAT_DEAD 32 -#define CHAT_GHOSTEARS 64 -#define CHAT_GHOSTSIGHT 128 -#define CHAT_PRAYER 256 -#define CHAT_RADIO 512 -#define CHAT_ATTACKLOGS 1024 -#define CHAT_DEBUGLOGS 2048 -#define CHAT_LOOC 4096 -#define CHAT_GHOSTRADIO 8192 -#define SHOW_TYPING 16384 -#define CHAT_NOICONS 32768 +#define SOUND_ADMINHELP 0x1 +#define SOUND_MIDI 0x2 +#define SOUND_AMBIENCE 0x4 +#define SOUND_LOBBY 0x8 +#define CHAT_OOC 0x10 +#define CHAT_DEAD 0x20 +#define CHAT_GHOSTEARS 0x40 +#define CHAT_GHOSTSIGHT 0x80 +#define CHAT_PRAYER 0x100 +#define CHAT_RADIO 0x200 +#define CHAT_ATTACKLOGS 0x400 +#define CHAT_DEBUGLOGS 0x800 +#define CHAT_LOOC 0x1000 +#define CHAT_GHOSTRADIO 0x2000 +#define SHOW_TYPING 0x4000 +#define CHAT_NOICONS 0x8000 #define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_ATTACKLOGS|CHAT_LOOC) @@ -153,9 +153,9 @@ #define SHARD_SPLINTER "splinters" #define SHARD_NONE "" -#define MATERIAL_UNMELTABLE 1 -#define MATERIAL_BRITTLE 2 -#define MATERIAL_PADDING 4 +#define MATERIAL_UNMELTABLE 0x1 +#define MATERIAL_BRITTLE 0x2 +#define MATERIAL_PADDING 0x4 #define TABLE_BRITTLE_MATERIAL_MULTIPLIER 4 // Amount table damage is multiplied by if it is made of a brittle material (e.g. glass) diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index d67bc9300c..b0858101d6 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -4,16 +4,16 @@ #define DEAD 2 // 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 LEAPING 16 -#define PASSEMOTES 32 // Mob has a cortical borer or holders inside of it that need to see emotes. -#define GODMODE 4096 -#define FAKEDEATH 8192 // Replaces stuff like changeling.changeling_fakedeath. -#define DISFIGURED 16384 // I'll probably move this elsewhere if I ever get wround to writing a bitflag mob-damage system. -#define XENO_HOST 32768 // Tracks whether we're gonna be a baby alien's mummy. +#define CANSTUN 0x1 +#define CANWEAKEN 0x2 +#define CANPARALYSE 0x4 +#define CANPUSH 0x8 +#define LEAPING 0x10 +#define PASSEMOTES 0x32 // Mob has a cortical borer or holders inside of it that need to see emotes. +#define GODMODE 0x1000 +#define FAKEDEATH 0x2000 // Replaces stuff like changeling.changeling_fakedeath. +#define DISFIGURED 0x4000 // Set but never checked. Remove this sometime and replace occurences with the appropriate organ code +#define XENO_HOST 0x8000 // Tracks whether we're gonna be a baby alien's mummy. // Grab levels. #define GRAB_PASSIVE 1 @@ -22,9 +22,9 @@ #define GRAB_UPGRADING 4 #define GRAB_KILL 5 -#define BORGMESON 1 -#define BORGTHERM 2 -#define BORGXRAY 4 +#define BORGMESON 0x1 +#define BORGTHERM 0x2 +#define BORGXRAY 0x4 #define HOSTILE_STANCE_IDLE 1 #define HOSTILE_STANCE_ALERT 2 @@ -70,17 +70,17 @@ #define ROBOT_NOTIFICATION_MODULE_RESET 4 // 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_FACIAL_HAIR 64 -#define APPEARANCE_FACIAL_HAIR_COLOR 128 -#define APPEARANCE_EYE_COLOR 256 +#define APPEARANCE_UPDATE_DNA 0x1 +#define APPEARANCE_RACE (0x2|APPEARANCE_UPDATE_DNA) +#define APPEARANCE_GENDER (0x4|APPEARANCE_UPDATE_DNA) +#define APPEARANCE_SKIN 0x8 +#define APPEARANCE_HAIR 0x10 +#define APPEARANCE_HAIR_COLOR 0x20 +#define APPEARANCE_FACIAL_HAIR 0x40 +#define APPEARANCE_FACIAL_HAIR_COLOR 0x80 +#define APPEARANCE_EYE_COLOR 0x100 #define APPEARANCE_ALL_HAIR (APPEARANCE_HAIR|APPEARANCE_HAIR_COLOR|APPEARANCE_FACIAL_HAIR|APPEARANCE_FACIAL_HAIR_COLOR) -#define APPEARANCE_ALL 511 +#define APPEARANCE_ALL 0xFFFF #define MIN_SUPPLIED_LAW_NUMBER 15 @@ -105,3 +105,4 @@ #define COMPANY_OPPOSED "Opposed" #define COMPANY_ALIGNMENTS list(COMPANY_LOYAL,COMPANY_SUPPORTATIVE,COMPANY_NEUTRAL,COMPANY_SKEPTICAL,COMPANY_OPPOSED) + diff --git a/code/__defines/research.dm b/code/__defines/research.dm index d4a78f8fda..0cfc2aded6 100644 --- a/code/__defines/research.dm +++ b/code/__defines/research.dm @@ -12,7 +12,7 @@ #define TECH_ILLEGAL "syndicate" #define TECH_ARCANE "arcane" -#define IMPRINTER 1 //For circuits. Uses glass/chemicals. -#define PROTOLATHE 2 //New stuff. Uses glass/metal/chemicals -#define MECHFAB 4 //Remember, objects utilising this flag should have construction_time and construction_cost vars. -#define CHASSIS 8 //For protolathe, but differently \ No newline at end of file +#define IMPRINTER 0x1 //For circuits. Uses glass/chemicals. +#define PROTOLATHE 0x2 //New stuff. Uses glass/metal/chemicals +#define MECHFAB 0x4 //Remember, objects utilising this flag should have construction_time and construction_cost vars. +#define CHASSIS 0x8 //For protolathe, but differently diff --git a/code/__defines/species_languages.dm b/code/__defines/species_languages.dm index 039622554a..27dae81e72 100644 --- a/code/__defines/species_languages.dm +++ b/code/__defines/species_languages.dm @@ -22,15 +22,6 @@ #define HAS_EYE_COLOR 0x10 // Eye colour selectable in chargen. (RGB) // Languages. -#define LANGUAGE_HUMAN 1 -#define LANGUAGE_ALIEN 2 -#define LANGUAGE_DOG 4 -#define LANGUAGE_CAT 8 -#define LANGUAGE_BINARY 16 -#define LANGUAGE_OTHER 32768 - -#define LANGUAGE_UNIVERSAL 65535 - #define LANGUAGE_SOL_COMMON "Sol Common" #define LANGUAGE_UNATHI "Sinta'unathi" #define LANGUAGE_SIIK_MAAS "Siik'maas" diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 3b970c7438..67fdd6bb34 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -67,7 +67,7 @@ for(var/obj/machinery/door/firedoor/E in all_doors) if(!E.blocked) if(E.operating) - E.nextstate = CLOSED + E.nextstate = FIREDOOR_CLOSED else if(!E.density) spawn(0) E.close() @@ -78,7 +78,7 @@ for(var/obj/machinery/door/firedoor/E in all_doors) if(!E.blocked) if(E.operating) - E.nextstate = OPEN + E.nextstate = FIREDOOR_OPEN else if(E.density) spawn(0) E.open() @@ -92,7 +92,7 @@ for(var/obj/machinery/door/firedoor/D in all_doors) if(!D.blocked) if(D.operating) - D.nextstate = CLOSED + D.nextstate = FIREDOOR_CLOSED else if(!D.density) spawn() D.close() @@ -105,7 +105,7 @@ for(var/obj/machinery/door/firedoor/D in all_doors) if(!D.blocked) if(D.operating) - D.nextstate = OPEN + D.nextstate = FIREDOOR_OPEN else if(D.density) spawn(0) D.open() @@ -137,7 +137,7 @@ for(var/obj/machinery/door/firedoor/D in src) if(!D.blocked) if(D.operating) - D.nextstate = OPEN + D.nextstate = FIREDOOR_OPEN else if(D.density) spawn(0) D.open() diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index 4fc7562b3a..7829897e72 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -85,6 +85,15 @@ /* Airlock remote control */ + +// Bitmasks for door switches. +#define OPEN 0x1 +#define IDSCAN 0x2 +#define BOLTS 0x4 +#define SHOCK 0x8 +#define SAFE 0x10 +#undefine + /obj/machinery/button/remote/airlock name = "remote door-control" desc = "It controls doors, remotely." diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 78e17e27e0..bc5b2f1b56 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -1,5 +1,3 @@ -/var/const/OPEN = 1 -/var/const/CLOSED = 2 #define FIREDOOR_MAX_PRESSURE_DIFF 25 // kPa #define FIREDOOR_MAX_TEMP 50 // °C @@ -183,7 +181,7 @@ if(A.fire || A.air_doors_activated) alarmed = 1 if(alarmed) - nextstate = CLOSED + nextstate = FIREDOOR_CLOSED close() /obj/machinery/door/firedoor/attackby(obj/item/weapon/C as obj, mob/user as mob) @@ -324,11 +322,11 @@ if(operating || !nextstate) return switch(nextstate) - if(OPEN) + if(FIREDOOR_OPEN) nextstate = null open() - if(CLOSED) + if(FIREDOOR_CLOSED) nextstate = null close() return diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 9f6d1e1383..8d08858246 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -104,6 +104,7 @@ var/global/list/status_overlays_equipment var/global/list/status_overlays_lighting var/global/list/status_overlays_environ + var/chargelevel = CHARGELEVEL_DEFAULT // Cap for how fast APC cells charge, as a percentage-per-tick (0.01 means cellcharge is capped to 1% per second) /obj/machinery/power/apc/updateDialog() if (stat & (BROKEN|MAINT)) @@ -1022,7 +1023,7 @@ if(src.attempt_charging()) if(excess > 0) // check to make sure we have enough to charge // Max charge is capped to % per second constant - var/ch = min(excess*CELLRATE, cell.maxcharge*CHARGELEVEL) + var/ch = min(excess*CELLRATE, cell.maxcharge*chargelevel) ch = draw_power(ch/CELLRATE) // Removes the power we're taking from the grid cell.give(ch*CELLRATE) // actually recharge the cell @@ -1039,7 +1040,7 @@ if(chargemode) if(!charging) - if(excess > cell.maxcharge*CHARGELEVEL) + if(excess > cell.maxcharge*chargelevel) chargecount++ else chargecount = 0