diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index bb07582dae..bb8d902fae 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -60,14 +60,14 @@ #define DNA_UNIQUE_ENZYMES_LEN 32 //Transformation proc stuff -#define TR_KEEPITEMS 1 -#define TR_KEEPVIRUS 2 -#define TR_KEEPDAMAGE 4 -#define TR_HASHNAME 8 // hashing names (e.g. monkey(e34f)) (only in monkeyize) -#define TR_KEEPIMPLANTS 16 -#define TR_KEEPSE 32 // changelings shouldn't edit the DNA's SE when turning into a monkey -#define TR_DEFAULTMSG 64 -#define TR_KEEPORGANS 256 +#define TR_KEEPITEMS (1<<0) +#define TR_KEEPVIRUS (1<<1) +#define TR_KEEPDAMAGE (1<<2) +#define TR_HASHNAME (1<<3) // hashing names (e.g. monkey(e34f)) (only in monkeyize) +#define TR_KEEPIMPLANTS (1<<4) +#define TR_KEEPSE (1<<5) // changelings shouldn't edit the DNA's SE when turning into a monkey +#define TR_DEFAULTMSG (1<<6) +#define TR_KEEPORGANS (1<<8) #define CLONER_FRESH_CLONE "fresh" @@ -89,11 +89,7 @@ #define NOSTOMACH 13 #define NO_DNA_COPY 14 #define DRINKSBLOOD 15 -#define SPECIES_ORGANIC 16 -#define SPECIES_INORGANIC 17 -#define SPECIES_UNDEAD 18 -#define SPECIES_ROBOTIC 19 -#define NOEYES 20 +#define NOEYES 16 #define ORGAN_SLOT_BRAIN "brain" #define ORGAN_SLOT_APPENDIX "appendix" diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm index b5bbcd341e..94a247171c 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 (1<<0) +#define MUTE_OOC (1<<1) +#define MUTE_PRAY (1<<2) +#define MUTE_ADMINHELP (1<<3) +#define MUTE_DEADCHAT (1<<4) +#define MUTE_ALL (~0) //Some constants for DB_Ban #define BANTYPE_PERMA 1 @@ -20,21 +20,21 @@ #define BANTYPE_ANY_JOB 9 //used to remove jobbans //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_POLL 0x200 -#define R_VAREDIT 0x400 -#define R_SOUNDS 0x800 -#define R_SPAWN 0x1000 -#define R_AUTOLOGIN 0x2000 -#define R_DBRANKS 0x4000 +#define R_BUILDMODE (1<<0) +#define R_ADMIN (1<<1) +#define R_BAN (1<<2) +#define R_FUN (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_POLL (1<<9) +#define R_VAREDIT (1<<10) +#define R_SOUNDS (1<<11) +#define R_SPAWN (1<<12) +#define R_AUTOLOGIN (1<<13) +#define R_DBRANKS (1<<14) #define R_DEFAULT R_AUTOLOGIN diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index 7707eb9ab0..3c25547ce6 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -201,10 +201,10 @@ #define PIPING_LAYER_P_Y 5 #define PIPING_LAYER_LCHANGE 0.05 -#define PIPING_ALL_LAYER 1 //intended to connect with all layers, check for all instead of just one. -#define PIPING_ONE_PER_TURF 2 //can only be built if nothing else with this flag is on the tile already. -#define PIPING_DEFAULT_LAYER_ONLY 4 //can only exist at PIPING_LAYER_DEFAULT -#define PIPING_CARDINAL_AUTONORMALIZE 8 //north/south east/west doesn't matter, auto normalize on build. +#define PIPING_ALL_LAYER (1<<0) //intended to connect with all layers, check for all instead of just one. +#define PIPING_ONE_PER_TURF (1<<1) //can only be built if nothing else with this flag is on the tile already. +#define PIPING_DEFAULT_LAYER_ONLY (1<<2) //can only exist at PIPING_LAYER_DEFAULT +#define PIPING_CARDINAL_AUTONORMALIZE (1<<3) //north/south east/west doesn't matter, auto normalize on build. //HELPERS #define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity()) diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index 5937e65ac5..41383b8512 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -12,12 +12,12 @@ #define BRAIN "brain" //bitflag damage defines used for suicide_act -#define BRUTELOSS 1 -#define FIRELOSS 2 -#define TOXLOSS 4 -#define OXYLOSS 8 -#define SHAME 16 -#define MANUAL_SUICIDE 32 //suicide_act will do the actual killing. +#define BRUTELOSS (1<<0) +#define FIRELOSS (1<<1) +#define TOXLOSS (1<<2) +#define OXYLOSS (1<<3) +#define SHAME (1<<4) +#define MANUAL_SUICIDE (1<<5) //suicide_act will do the actual killing. #define EFFECT_STUN "stun" #define EFFECT_KNOCKDOWN "knockdown" @@ -30,11 +30,11 @@ #define EFFECT_JITTER "jitter" //Bitflags defining which status effects could be or are inflicted on a mob -#define CANSTUN 1 -#define CANKNOCKDOWN 2 -#define CANUNCONSCIOUS 4 -#define CANPUSH 8 -#define GODMODE 16 +#define CANSTUN (1<<0) +#define CANKNOCKDOWN (1<<1) +#define CANUNCONSCIOUS (1<<2) +#define CANPUSH (1<<3) +#define GODMODE (1<<4) //Health Defines #define HEALTH_THRESHOLD_CRIT 0 diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 4ac0d013d1..f47309dd73 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -6,10 +6,10 @@ // How multiple components of the exact same type are handled in the same datum -#define COMPONENT_DUPE_HIGHLANDER 0 //old component is deleted (default) -#define COMPONENT_DUPE_ALLOWED 1 //duplicates allowed -#define COMPONENT_DUPE_UNIQUE 2 //new component is deleted -#define COMPONENT_DUPE_UNIQUE_PASSARGS 4 //old component is given the initialization args of the new +#define COMPONENT_DUPE_HIGHLANDER 0 //old component is deleted (default) +#define COMPONENT_DUPE_ALLOWED 1 //duplicates allowed +#define COMPONENT_DUPE_UNIQUE 2 //new component is deleted +#define COMPONENT_DUPE_UNIQUE_PASSARGS 4 //old component is given the initialization args of the new // All signals. Format: // When the signal is called: (signal arguments) @@ -47,10 +47,6 @@ #define COMSIG_ATOM_SET_LIGHT "atom_set_light" //from base of atom/set_light(): (l_range, l_power, l_color) #define COMSIG_ATOM_ROTATE "atom_rotate" //from base of atom/shuttleRotate(): (rotation, params) #define COMSIG_ATOM_DIR_CHANGE "atom_dir_change" //from base of atom/setDir(): (old_dir, new_dir) - -#define COMSIG_ENTER_AREA "enter_area" //from base of area/Entered(): (/area) -#define COMSIG_EXIT_AREA "exit_area" //from base of area/Exited(): (/area) - #define COMSIG_ATOM_CONTENTS_DEL "atom_contents_del" //from base of atom/handle_atom_del(): (atom/deleted) ///////////////// #define COMSIG_ATOM_ATTACK_GHOST "atom_attack_ghost" //from base of atom/attack_ghost(): (mob/dead/observer/ghost) @@ -59,6 +55,9 @@ #define COMPONENT_NO_ATTACK_HAND 1 //works on all 3. ///////////////// +#define COMSIG_ENTER_AREA "enter_area" //from base of area/Entered(): (/area) +#define COMSIG_EXIT_AREA "exit_area" //from base of area/Exited(): (/area) + #define COMSIG_CLICK "atom_click" //from base of atom/Click(): (location, control, params) #define COMSIG_CLICK_SHIFT "shift_click" //from base of atom/ShiftClick(): (/mob) #define COMSIG_CLICK_CTRL "ctrl_click" //from base of atom/CtrlClickOn(): (/mob) @@ -72,7 +71,6 @@ #define COMSIG_AREA_ENTERED "area_entered" //from base of area/Entered(): (atom/movable/M) #define COMSIG_AREA_EXITED "area_exited" //from base of area/Exited(): (atom/movable/M) - // /atom/movable signals #define COMSIG_MOVABLE_MOVED "movable_moved" //from base of atom/movable/Moved(): (/atom, dir) #define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (/atom/movable) @@ -127,6 +125,20 @@ //NTnet #define COMSIG_COMPONENT_NTNET_RECIEVE "ntnet_recieve" //called on an object by its NTNET connection component on recieve. (sending_id(number), sending_netname(text), data(datum/netdata)) +// /datum/component/storage signals +#define COMSIG_CONTAINS_STORAGE "is_storage" //() - returns bool. +#define COMSIG_TRY_STORAGE_INSERT "storage_try_insert" //(obj/item/inserting, mob/user, silent, force) - returns bool +#define COMSIG_TRY_STORAGE_SHOW "storage_show_to" //(mob/show_to, force) - returns bool. +#define COMSIG_TRY_STORAGE_HIDE_FROM "storage_hide_from" //(mob/hide_from) - returns bool +#define COMSIG_TRY_STORAGE_HIDE_ALL "storage_hide_all" //returns bool +#define COMSIG_TRY_STORAGE_SET_LOCKSTATE "storage_lock_set_state" //(newstate) +#define COMSIG_IS_STORAGE_LOCKED "storage_get_lockstate" //() - returns bool. MUST CHECK IF STORAGE IS THERE FIRST! +#define COMSIG_TRY_STORAGE_TAKE_TYPE "storage_take_type" //(type, atom/destination, amount = INFINITY, check_adjacent, force, mob/user, list/inserted) - returns bool - type can be a list of types. +#define COMSIG_TRY_STORAGE_FILL_TYPE "storage_fill_type" //(type, amount = INFINITY, force = FALSE) //don't fuck this up. Force will ignore max_items, and amount is normally clamped to max_items. +#define COMSIG_TRY_STORAGE_TAKE "storage_take_obj" //(obj, new_loc, force = FALSE) - returns bool +#define COMSIG_TRY_STORAGE_QUICK_EMPTY "storage_quick_empty" //(loc) - returns bool - if loc is null it will dump at parent location. +#define COMSIG_TRY_STORAGE_RETURN_INVENTORY "storage_return_inventory" //(list/list_to_inject_results_into) +#define COMSIG_TRY_STORAGE_CAN_INSERT "storage_can_equip" //(obj/item/insertion_candidate, mob/user, silent) - returns bool /*******Non-Signal Component Related Defines*******/ diff --git a/code/__DEFINES/construction.dm b/code/__DEFINES/construction.dm index 0a7bc2cde4..c5c88b18f1 100644 --- a/code/__DEFINES/construction.dm +++ b/code/__DEFINES/construction.dm @@ -14,7 +14,7 @@ #define SUPPORT_LINES 1 #define COVER 2 #define CUT_COVER 3 -#define BOLTS 4 +#define ANCHOR_BOLTS 4 #define SUPPORT_RODS 5 #define SHEATH 6 diff --git a/code/__DEFINES/diseases.dm b/code/__DEFINES/diseases.dm index 9f96d0374f..8376f5c12e 100644 --- a/code/__DEFINES/diseases.dm +++ b/code/__DEFINES/diseases.dm @@ -3,21 +3,21 @@ #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 DISEASE_SPREAD_SPECIAL 1 -#define DISEASE_SPREAD_NON_CONTAGIOUS 2 -#define DISEASE_SPREAD_BLOOD 4 -#define DISEASE_SPREAD_CONTACT_FLUIDS 8 -#define DISEASE_SPREAD_CONTACT_SKIN 16 -#define DISEASE_SPREAD_AIRBORNE 32 +#define DISEASE_SPREAD_SPECIAL (1<<0) +#define DISEASE_SPREAD_NON_CONTAGIOUS (1<<1) +#define DISEASE_SPREAD_BLOOD (1<<2) +#define DISEASE_SPREAD_CONTACT_FLUIDS (1<<3) +#define DISEASE_SPREAD_CONTACT_SKIN (1<<4) +#define DISEASE_SPREAD_AIRBORNE (1<<5) //Severity Defines #define DISEASE_SEVERITY_POSITIVE "Positive" //Diseases that buff, heal, or at least do nothing at all diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 7935bbad6b..138bfbe44a 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -1,103 +1,103 @@ /* These defines are specific to the atom/flags_1 bitmask */ -#define ALL ~0 //For convenience. +#define ALL (~0) //For convenience. #define NONE 0 GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768)) // for /datum/var/datum_flags -#define DF_USE_TAG 1 -#define DF_VAR_EDITED 2 +#define DF_USE_TAG (1<<0) +#define DF_VAR_EDITED (1<<1) //FLAGS BITMASK -#define STOPSPRESSUREDMAGE_1 1 //This flag is used on the flags_1 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 STOPSPRESSUREDMAGE_1 (1<<0) //This flag is used on the flags_1 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 NODROP_1 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_1 4 // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby() -#define MASKINTERNALS_1 8 // mask allows internals -#define HEAR_1 16 // This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not. -#define CHECK_RICOCHET_1 32 // Projectiels will check ricochet on things impacted that have this. -#define CONDUCT_1 64 // conducts electricity (metal etc.) -#define ABSTRACT_1 128 // 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 NODECONSTRUCT_1 128 // For machines and structures that should not break into parts, eg, holodeck stuff -#define OVERLAY_QUEUED_1 256 // atom queued to SSoverlay -#define ON_BORDER_1 512 // item has priority to check when entering or leaving +#define NODROP_1 (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 (1<<2) // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby() +#define MASKINTERNALS_1 (1<<3) // mask allows internals +#define HEAR_1 (1<<4) // This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not. +#define CHECK_RICOCHET_1 (1<<5) // Projectiels will check ricochet on things impacted that have this. +#define CONDUCT_1 (1<<6) // conducts electricity (metal etc.) +#define ABSTRACT_1 (1<<7) // 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 NODECONSTRUCT_1 (1<<7) // For machines and structures that should not break into parts, eg, holodeck stuff +#define OVERLAY_QUEUED_1 (1<<8) // atom queued to SSoverlay +#define ON_BORDER_1 (1<<9) // item has priority to check when entering or leaving -#define NOSLIP_1 1024 //prevents from slipping on wet floors, in space etc +#define NOSLIP_1 (1<<10) //prevents from slipping on wet floors, in space etc // BLOCK_GAS_SMOKE_EFFECT_1 only used in masks at the moment. -#define BLOCK_GAS_SMOKE_EFFECT_1 4096 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! -#define THICKMATERIAL_1 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. -#define DROPDEL_1 16384 // When dropped, it calls qdel on itself -#define PREVENT_CLICK_UNDER_1 32768 //Prevent clicking things below it on the same turf eg. doors/ fulltile windows +#define BLOCK_GAS_SMOKE_EFFECT_1 (1<<12) // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! +#define THICKMATERIAL_1 (1<<13) //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. +#define DROPDEL_1 (1<<14) // When dropped, it calls qdel on itself +#define PREVENT_CLICK_UNDER_1 (1<<15) //Prevent clicking things below it on the same turf eg. doors/ fulltile windows /* 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 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) // An item worn in the ear slot with HEALS_EARS will heal your ears each // Life() tick, even if normally your ears would be too damaged to heal. -#define HEALS_EARS_2 128 +#define HEALS_EARS_2 (1<<7) // 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) // TESLA_IGNORE grants immunity from being targeted by tesla-style electricity -#define TESLA_IGNORE_2 512 +#define TESLA_IGNORE_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) //turf-only flags -#define NOJAUNT_1 1 -#define UNUSED_TRANSIT_TURF_1 2 -#define CAN_BE_DIRTY_1 4 // If a turf can be made dirty at roundstart. This is also used in areas. -#define NO_DEATHRATTLE_1 16 // Do not notify deadchat about any deaths that occur on this turf. -#define NO_RUINS_1 32 //Blocks ruins spawning on the turf -#define NO_LAVA_GEN_1 64 //Blocks lava rivers being generated on the turf -//#define CHECK_RICOCHET_1 32 //Same thing as atom flag. +#define NOJAUNT_1 (1<<0) +#define UNUSED_TRANSIT_TURF_1 (1<<1) +#define CAN_BE_DIRTY_1 (1<<2) // If a turf can be made dirty at roundstart. This is also used in areas. +#define NO_DEATHRATTLE_1 (1<<4) // Do not notify deadchat about any deaths that occur on this turf. +#define NO_RUINS_1 (1<<5) //Blocks ruins spawning on the turf +#define NO_LAVA_GEN_1 (1<<6) //Blocks lava rivers being generated on the turf +//#define CHECK_RICOCHET_1 32 //Same thing as atom flag. /* These defines are used specifically with the atom/pass_flags bitmask the atom/checkpass() proc uses them (tables will call movable atom checkpass(PASSTABLE) for example) */ //flags for pass_flags -#define PASSTABLE 1 -#define PASSGLASS 2 -#define PASSGRILLE 4 -#define PASSBLOB 8 -#define PASSMOB 16 -#define PASSCLOSEDTURF 32 -#define LETPASSTHROW 64 +#define PASSTABLE (1<<0) +#define PASSGLASS (1<<1) +#define PASSGRILLE (1<<2) +#define PASSBLOB (1<<3) +#define PASSMOB (1<<4) +#define PASSCLOSEDTURF (1<<5) +#define LETPASSTHROW (1<<6) //Movement Types -#define GROUND 1 -#define FLYING 2 +#define GROUND (1<<0) +#define FLYING (1<<1) // Flags for reagents -#define REAGENT_NOREACT 1 +#define REAGENT_NOREACT (1<<0) //Fire and Acid stuff, for resistance_flags -#define LAVA_PROOF 1 -#define FIRE_PROOF 2 //100% immune to fire damage (but not necessarily to lava or heat) -#define FLAMMABLE 4 -#define ON_FIRE 8 -#define UNACIDABLE 16 //acid can't even appear on it, let alone melt it. -#define ACID_PROOF 32 //acid stuck on it doesn't melt it. -#define INDESTRUCTIBLE 64 //doesn't take damage -#define FREEZE_PROOF 128 //can't be frozen +#define LAVA_PROOF (1<<0) +#define FIRE_PROOF (1<<1) //100% immune to fire damage (but not necessarily to lava or heat) +#define FLAMMABLE (1<<2) +#define ON_FIRE (1<<3) +#define UNACIDABLE (1<<4) //acid can't even appear on it, let alone melt it. +#define ACID_PROOF (1<<5) //acid stuck on it doesn't melt it. +#define INDESTRUCTIBLE (1<<6) //doesn't take damage +#define FREEZE_PROOF (1<<7) //can't be frozen diff --git a/code/__DEFINES/food.dm b/code/__DEFINES/food.dm index 2d6ba0d946..44df6695a2 100644 --- a/code/__DEFINES/food.dm +++ b/code/__DEFINES/food.dm @@ -1,12 +1,12 @@ -#define MEAT 1 -#define VEGETABLES 2 -#define RAW 4 -#define JUNKFOOD 8 -#define GRAIN 16 -#define FRUIT 32 -#define DAIRY 64 -#define FRIED 128 -#define ALCOHOL 256 -#define SUGAR 512 -#define GROSS 1024 -#define TOXIC 2048 +#define MEAT (1<<0) +#define VEGETABLES (1<<1) +#define RAW (1<<2) +#define JUNKFOOD (1<<3) +#define GRAIN (1<<4) +#define FRUIT (1<<5) +#define DAIRY (1<<6) +#define FRIED (1<<7) +#define ALCOHOL (1<<8) +#define SUGAR (1<<9) +#define GROSS (1<<10) +#define TOXIC (1<<11) diff --git a/code/__DEFINES/integrated_electronics.dm b/code/__DEFINES/integrated_electronics.dm index a7f732f646..3647a61d77 100644 --- a/code/__DEFINES/integrated_electronics.dm +++ b/code/__DEFINES/integrated_electronics.dm @@ -11,9 +11,9 @@ #define IC_SPAWN_RESEARCH 2 // If the circuit design will be available in the IC printer after upgrading it. // Categories that help differentiate circuits that can do different tipes of actions -#define IC_ACTION_MOVEMENT 1 // If the circuit can move the assembly -#define IC_ACTION_COMBAT 2 // If the circuit can cause harm -#define IC_ACTION_LONG_RANGE 4 // If the circuit communicate with something outside of the assembly +#define IC_ACTION_MOVEMENT (1<<0) // If the circuit can move the assembly +#define IC_ACTION_COMBAT (1<<1) // If the circuit can cause harm +#define IC_ACTION_LONG_RANGE (1<<2) // If the circuit communicate with something outside of the assembly // Displayed along with the pin name to show what type of pin it is. #define IC_FORMAT_ANY "\" diff --git a/code/__DEFINES/interaction_flags.dm b/code/__DEFINES/interaction_flags.dm index b56696c671..dc3242c910 100644 --- a/code/__DEFINES/interaction_flags.dm +++ b/code/__DEFINES/interaction_flags.dm @@ -1,22 +1,22 @@ -#define INTERACT_ATOM_REQUIRES_ANCHORED 1 //whether can_interact() checks for anchored. only works on movables. -#define INTERACT_ATOM_ATTACK_HAND 2 //calls try_interact() on attack_hand() and returns that. -#define INTERACT_ATOM_UI_INTERACT 4 //automatically calls and returns ui_interact() on interact(). -#define INTERACT_ATOM_REQUIRES_DEXTERITY 8 //user must be dextrous -#define INTERACT_ATOM_IGNORE_INCAPACITATED 16 //ignores incapacitated check -#define INTERACT_ATOM_IGNORE_RESTRAINED 32 //incapacitated check ignores restrained -#define INTERACT_ATOM_CHECK_GRAB 64 //incapacitated check checks grab -#define INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND 128//prevents leaving fingerprints automatically on attack_hand -#define INTERACT_ATOM_NO_FINGERPRINT_INTERACT 256 //adds hiddenprints instead of fingerprints on interact +#define INTERACT_ATOM_REQUIRES_ANCHORED (1<<0) //whether can_interact() checks for anchored. only works on movables. +#define INTERACT_ATOM_ATTACK_HAND (1<<1) //calls try_interact() on attack_hand() and returns that. +#define INTERACT_ATOM_UI_INTERACT (1<<2) //automatically calls and returns ui_interact() on interact(). +#define INTERACT_ATOM_REQUIRES_DEXTERITY (1<<3) //user must be dextrous +#define INTERACT_ATOM_IGNORE_INCAPACITATED (1<<4) //ignores incapacitated check +#define INTERACT_ATOM_IGNORE_RESTRAINED (1<<5) //incapacitated check ignores restrained +#define INTERACT_ATOM_CHECK_GRAB (1<<6) //incapacitated check checks grab +#define INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND (1<<7) //prevents leaving fingerprints automatically on attack_hand +#define INTERACT_ATOM_NO_FINGERPRINT_INTERACT (1<<8) //adds hiddenprints instead of fingerprints on interact -#define INTERACT_ITEM_ATTACK_HAND_PICKUP 1 //attempt pickup on attack_hand for items +#define INTERACT_ITEM_ATTACK_HAND_PICKUP (1<<0) //attempt pickup on attack_hand for items -#define INTERACT_MACHINE_OPEN 1 //can_interact() while open -#define INTERACT_MACHINE_OFFLINE 2 //can_interact() while offline -#define INTERACT_MACHINE_WIRES_IF_OPEN 4 //try to interact with wires if open -#define INTERACT_MACHINE_ALLOW_SILICON 8 //let silicons interact -#define INTERACT_MACHINE_OPEN_SILICON 16 //let silicons interact while open -#define INTERACT_MACHINE_REQUIRES_SILICON 32 //must be silicon to interact -#define INTERACT_MACHINE_SET_MACHINE 64 //MACHINES HAVE THIS BY DEFAULT, SOMEONE SHOULD RUN THROUGH MACHINES AND REMOVE IT FROM THINGS LIKE LIGHT SWITCHES WHEN POSSIBLE!!-------------------------- +#define INTERACT_MACHINE_OPEN (1<<0) //can_interact() while open +#define INTERACT_MACHINE_OFFLINE (1<<1) //can_interact() while offline +#define INTERACT_MACHINE_WIRES_IF_OPEN (1<<2) //try to interact with wires if open +#define INTERACT_MACHINE_ALLOW_SILICON (1<<3) //let silicons interact +#define INTERACT_MACHINE_OPEN_SILICON (1<<4) //let silicons interact while open +#define INTERACT_MACHINE_REQUIRES_SILICON (1<<5) //must be silicon to interact +#define INTERACT_MACHINE_SET_MACHINE (1<<6) //MACHINES HAVE THIS BY DEFAULT, SOMEONE SHOULD RUN THROUGH MACHINES AND REMOVE IT FROM THINGS LIKE LIGHT SWITCHES WHEN POSSIBLE!!-------------------------- //This flag determines if a machine set_machine's the user when the user uses it, making updateUsrDialog make the user re-call interact() on it. //THIS FLAG IS ON ALL MACHINES BY DEFAULT, NEEDS TO BE RE-EVALUATED LATER!! diff --git a/code/__DEFINES/inventory.dm b/code/__DEFINES/inventory.dm index dc3647e1f1..4e2b591ea9 100644 --- a/code/__DEFINES/inventory.dm +++ b/code/__DEFINES/inventory.dm @@ -14,20 +14,20 @@ #define STORAGE_VIEW_DEPTH 2 //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 WEIGHT_CLASS_NORMAL or WEIGHT_CLASS_BULKY to fit in pockets. -#define SLOT_DENYPOCKET 4096 // this is to deny items with a w_class of WEIGHT_CLASS_SMALL or WEIGHT_CLASS_TINY to fit in pockets. -#define SLOT_NECK 8192 +#define SLOT_OCLOTHING (1<<0) +#define SLOT_ICLOTHING (1<<1) +#define SLOT_GLOVES (1<<2) +#define SLOT_EYES (1<<3) +#define SLOT_EARS (1<<4) +#define SLOT_MASK (1<<5) +#define SLOT_HEAD (1<<6) +#define SLOT_FEET (1<<7) +#define SLOT_ID (1<<8) +#define SLOT_BELT (1<<9) +#define SLOT_BACK (1<<10) +#define SLOT_POCKET (1<<11) // this is to allow items with a w_class of WEIGHT_CLASS_NORMAL or WEIGHT_CLASS_BULKY to fit in pockets. +#define SLOT_DENYPOCKET (1<<12) // this is to deny items with a w_class of WEIGHT_CLASS_SMALL or WEIGHT_CLASS_TINY to fit in pockets. +#define SLOT_NECK (1<<13) //SLOTS #define slot_back 1 @@ -87,36 +87,36 @@ //Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses. -#define HIDEGLOVES 1 -#define HIDESUITSTORAGE 2 -#define HIDEJUMPSUIT 4 //these first four are only used in exterior suits -#define HIDESHOES 8 -#define HIDEMASK 16 //these last six are only used in masks and headgear. -#define HIDEEARS 32 // (ears means headsets and such) -#define HIDEEYES 64 // Whether eyes and glasses are hidden -#define HIDEFACE 128 // Whether we appear as unknown. -#define HIDEHAIR 256 -#define HIDEFACIALHAIR 512 -#define HIDENECK 1024 +#define HIDEGLOVES (1<<0) +#define HIDESUITSTORAGE (1<<1) +#define HIDEJUMPSUIT (1<<2) //these first four are only used in exterior suits +#define HIDESHOES (1<<3) +#define HIDEMASK (1<<4) //these last six are only used in masks and headgear. +#define HIDEEARS (1<<5) // (ears means headsets and such) +#define HIDEEYES (1<<6) // Whether eyes and glasses are hidden +#define HIDEFACE (1<<7) // Whether we appear as unknown. +#define HIDEHAIR (1<<8) +#define HIDEFACIALHAIR (1<<9) +#define HIDENECK (1<<10) //bitflags for clothing coverage - also used for limbs -#define HEAD 1 -#define CHEST 2 -#define GROIN 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 NECK 2048 -#define FULL_BODY 4095 +#define HEAD (1<<0) +#define CHEST (1<<1) +#define GROIN (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 NECK (1<<11) +#define FULL_BODY (~0) //flags for female outfits: How much the game can safely "take off" the uniform without it looking weird #define NO_FEMALE_UNIFORM 0 @@ -137,11 +137,11 @@ #define SQUISHED_DIGITIGRADE 2 //flags for covering body parts -#define GLASSESCOVERSEYES 1 -#define MASKCOVERSEYES 2 // get rid of some of the other retardation 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 retardation 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) #define TINT_DARKENED 2 //Threshold of tint level to apply weld mask overlay #define TINT_BLIND 3 //Threshold of tint level to obscure vision fully diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index dc0b6dce54..6d514d6d9b 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -182,3 +182,5 @@ GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list( #define is_glass_sheet(O) (is_type_in_typecache(O, GLOB.glass_sheet_types)) #define isblobmonster(O) (istype(O, /mob/living/simple_animal/hostile/blob)) + +#define isshuttleturf(T) (length(T.baseturfs) && (/turf/baseturf_skipover/shuttle in T.baseturfs)) diff --git a/code/__DEFINES/jobs.dm b/code/__DEFINES/jobs.dm index 51b907f846..dc4080a789 100644 --- a/code/__DEFINES/jobs.dm +++ b/code/__DEFINES/jobs.dm @@ -4,43 +4,43 @@ #define CAPTAIN (1<<0) #define HOS (1<<1) #define WARDEN (1<<2) -#define DETECTIVE (1<<3) +#define DETECTIVE (1<<3) #define OFFICER (1<<4) -#define CHIEF (1<<5) -#define ENGINEER (1<<6) -#define ATMOSTECH (1<<7) +#define CHIEF (1<<5) +#define ENGINEER (1<<6) +#define ATMOSTECH (1<<7) #define ROBOTICIST (1<<8) -#define AI_JF (1<<9) +#define AI_JF (1<<9) #define CYBORG (1<<10) #define MEDSCI (1<<1) -#define RD_JF (1<<0) -#define SCIENTIST (1<<1) +#define RD_JF (1<<0) +#define SCIENTIST (1<<1) #define CHEMIST (1<<2) -#define CMO_JF (1<<3) +#define CMO_JF (1<<3) #define DOCTOR (1<<4) #define GENETICIST (1<<5) #define VIROLOGIST (1<<6) -#define CIVILIAN (1<<2) +#define CIVILIAN (1<<2) #define HOP (1<<0) -#define BARTENDER (1<<1) -#define BOTANIST (1<<2) -#define COOK (1<<3) +#define BARTENDER (1<<1) +#define BOTANIST (1<<2) +#define COOK (1<<3) #define JANITOR (1<<4) #define CURATOR (1<<5) -#define QUARTERMASTER (1<<6) -#define CARGOTECH (1<<7) -#define MINER (1<<8) +#define QUARTERMASTER (1<<6) +#define CARGOTECH (1<<7) +#define MINER (1<<8) #define LAWYER (1<<9) -#define CHAPLAIN (1<<10) -#define CLOWN (1<<11) -#define MIME (1<<12) -#define ASSISTANT (1<<13) +#define CHAPLAIN (1<<10) +#define CLOWN (1<<11) +#define MIME (1<<12) +#define ASSISTANT (1<<13) #define JOB_AVAILABLE 0 #define JOB_UNAVAILABLE_GENERIC 1 diff --git a/code/__DEFINES/machines.dm b/code/__DEFINES/machines.dm index 2d088552bd..be76345473 100644 --- a/code/__DEFINES/machines.dm +++ b/code/__DEFINES/machines.dm @@ -14,22 +14,21 @@ //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) //used in design to specify which machine can build it -#define IMPRINTER 1 //For circuits. Uses glass/chemicals. -#define PROTOLATHE 2 //New stuff. Uses glass/metal/chemicals -#define AUTOLATHE 4 //Uses glass/metal only. -#define CRAFTLATHE 8 //Uses fuck if I know. For use eventually. -#define MECHFAB 16 //Remember, objects utilising this flag should have construction_time and construction_cost vars. -#define BIOGENERATOR 32 //Uses biomass -#define LIMBGROWER 64 //Uses synthetic flesh -#define SMELTER 128 //uses various minerals -#define AUTOYLATHE 256 //CITADEL ADDITION Uses glass/metal/Plastic CID +#define IMPRINTER (1<<0) //For circuits. Uses glass/chemicals. +#define PROTOLATHE (1<<1) //New stuff. Uses glass/metal/chemicals +#define AUTOLATHE (1<<2) //Uses glass/metal only. +#define CRAFTLATHE (1<<3) //Uses fuck if I know. For use eventually. +#define MECHFAB (1<<4) //Remember, objects utilising this flag should have construction_time and construction_cost vars. +#define BIOGENERATOR (1<<5) //Uses biomass +#define LIMBGROWER (1<<6) //Uses synthetic flesh +#define SMELTER (1<<7) //uses various minerals //Note: More then one of these can be added to a design but imprinter and lathe designs are incompatable. //Modular computer/NTNet defines @@ -62,10 +61,10 @@ #define MIN_NTNET_LOGS 10 //Program bitflags -#define PROGRAM_ALL 7 -#define PROGRAM_CONSOLE 1 -#define PROGRAM_LAPTOP 2 -#define PROGRAM_TABLET 4 +#define PROGRAM_ALL (~0) +#define PROGRAM_CONSOLE (1<<0) +#define PROGRAM_LAPTOP (1<<1) +#define PROGRAM_TABLET (1<<2) //Program states #define PROGRAM_STATE_KILLED 0 #define PROGRAM_STATE_BACKGROUND 1 diff --git a/code/__DEFINES/medal.dm b/code/__DEFINES/medal.dm index b5ff8eac20..2a545d9c64 100644 --- a/code/__DEFINES/medal.dm +++ b/code/__DEFINES/medal.dm @@ -11,6 +11,7 @@ #define BOSS_MEDAL_HIEROPHANT "Hierophant" #define BOSS_MEDAL_LEGION "Legion" #define BOSS_MEDAL_TENDRIL "Tendril" +#define BOSS_MEDAL_SWARMERS "Swarmer Beacon" // Score names #define HIEROPHANT_SCORE "Hierophants Killed" diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 804fa5a90a..15033fcf48 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -35,6 +35,18 @@ #define BLOODCRAWL 1 #define BLOODCRAWL_EAT 2 +//Mob bio-types +#define MOB_ORGANIC "organic" +#define MOB_INORGANIC "inorganic" +#define MOB_ROBOTIC "robotic" +#define MOB_UNDEAD "undead" +#define MOB_HUMANOID "humanoid" +#define MOB_BUG "bug" +#define MOB_BEAST "beast" +#define MOB_EPIC "epic" //megafauna +#define MOB_REPTILE "reptile" +#define MOB_SPIRIT "spirit" + //Organ defines for carbon mobs #define ORGAN_ORGANIC 1 #define ORGAN_ROBOTIC 2 @@ -51,6 +63,27 @@ #define DEVIL_BODYPART "devil" /*see __DEFINES/inventory.dm for bodypart bitflag defines*/ +// Health/damage defines for carbon mobs +#define HUMAN_MAX_OXYLOSS 3 +#define HUMAN_CRIT_MAX_OXYLOSS (SSmobs.wait/30) + +#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point +#define HEAT_DAMAGE_LEVEL_2 3 //Amount of damage applied when your body temperature passes the 400K point +#define HEAT_DAMAGE_LEVEL_3 8 //Amount of damage applied when your body temperature passes the 460K point and you are on fire + +#define COLD_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when your body temperature just passes the 260.15k safety point +#define COLD_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when your body temperature passes the 200K point +#define COLD_DAMAGE_LEVEL_3 3 //Amount of damage applied when your body temperature passes the 120K point + +//Note that gas heat damage is only applied once every FOUR ticks. +#define HEAT_GAS_DAMAGE_LEVEL_1 2 //Amount of damage applied when the current breath's temperature just passes the 360.15k safety point +#define HEAT_GAS_DAMAGE_LEVEL_2 4 //Amount of damage applied when the current breath's temperature passes the 400K point +#define HEAT_GAS_DAMAGE_LEVEL_3 8 //Amount of damage applied when the current breath's temperature passes the 1000K point + +#define COLD_GAS_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when the current breath's temperature just passes the 260.15k safety point +#define COLD_GAS_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when the current breath's temperature passes the 200K point +#define COLD_GAS_DAMAGE_LEVEL_3 3 //Amount of damage applied when the current breath's temperature passes the 120K point + //Brain Damage defines #define BRAIN_DAMAGE_MILD 20 #define BRAIN_DAMAGE_SEVERE 100 @@ -162,15 +195,15 @@ #define AI_Z_OFF 4 //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 -#define NO_SLIP_WHEN_WALKING 1 -#define SLIDE 2 -#define GALOSHES_DONT_HELP 4 -#define SLIDE_ICE 8 +#define NO_SLIP_WHEN_WALKING (1<<0) +#define SLIDE (1<<1) +#define GALOSHES_DONT_HELP (1<<2) +#define SLIDE_ICE (1<<3) #define MAX_CHICKENS 50 @@ -182,12 +215,12 @@ #define INCORPOREAL_MOVE_JAUNT 3 // is blocked by holy water/salt //Secbot and ED209 judgement criteria bitflag values -#define JUDGE_EMAGGED 1 -#define JUDGE_IDCHECK 2 -#define JUDGE_WEAPONCHECK 4 -#define JUDGE_RECORDCHECK 8 +#define JUDGE_EMAGGED (1<<0) +#define JUDGE_IDCHECK (1<<1) +#define JUDGE_WEAPONCHECK (1<<2) +#define JUDGE_RECORDCHECK (1<<3) //ED209's ignore monkeys -#define JUDGE_IGNOREMONKEYS 16 +#define JUDGE_IGNOREMONKEYS (1<<4) #define MEGAFAUNA_DEFAULT_RECOVERY_TIME 5 @@ -211,7 +244,7 @@ #define OFFSET_NECK "neck" //MINOR TWEAKS/MISC -#define AGE_MIN 18 //youngest a character can be +#define AGE_MIN 17 //youngest a character can be #define AGE_MAX 85 //oldest a character can be #define WIZARD_AGE_MIN 30 //youngest a wizard can be #define APPRENTICE_AGE_MIN 29 //youngest an apprentice can be diff --git a/code/__DEFINES/obj_flags.dm b/code/__DEFINES/obj_flags.dm index e491c58cbf..bfbf6f866a 100644 --- a/code/__DEFINES/obj_flags.dm +++ b/code/__DEFINES/obj_flags.dm @@ -1,20 +1,20 @@ // Flags for the obj_flags var on /obj -#define EMAGGED 1 -#define IN_USE 2 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING! -#define CAN_BE_HIT 4 //can this be bludgeoned by items? -#define BEING_SHOCKED 8 // Whether this thing is currently (already) being shocked by a tesla -#define DANGEROUS_POSSESSION 16 //Admin possession yes/no -#define ON_BLUEPRINTS 32 //Are we visible on the station blueprints at roundstart? -#define UNIQUE_RENAME 64 // can you customize the description/name of the thing? -#define USES_TGUI 128 //put on things that use tgui on ui_interact instead of custom/old UI. +#define EMAGGED (1<<0) +#define IN_USE (1<<1) // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING! +#define CAN_BE_HIT (1<<2) //can this be bludgeoned by items? +#define BEING_SHOCKED (1<<3) // Whether this thing is currently (already) being shocked by a tesla +#define DANGEROUS_POSSESSION (1<<4) //Admin possession yes/no +#define ON_BLUEPRINTS (1<<5) //Are we visible on the station blueprints at roundstart? +#define UNIQUE_RENAME (1<<6) // can you customize the description/name of the thing? +#define USES_TGUI (1<<7) //put on things that use tgui on ui_interact instead of custom/old UI. // If you add new ones, be sure to add them to /obj/Initialize as well for complete mapping support // Flags for the item_flags var on /obj/item -#define BEING_REMOVED 1 -#define IN_INVENTORY 2 //is this item equipped into an inventory slot or hand of a mob? used for tooltips -#define FORCE_STRING_OVERRIDE 4 // used for tooltips -#define NEEDS_PERMIT 8 //Used by security bots to determine if this item is safe for public use. +#define BEING_REMOVED (1<<0) +#define IN_INVENTORY (1<<1) //is this item equipped into an inventory slot or hand of a mob? used for tooltips +#define FORCE_STRING_OVERRIDE (1<<2) // used for tooltips +#define NEEDS_PERMIT (1<<3) //Used by security bots to determine if this item is safe for public use. diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index d63623496c..1eb0b75289 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -1,37 +1,36 @@ //Preference toggles -#define SOUND_ADMINHELP 1 -#define SOUND_MIDI 2 -#define SOUND_AMBIENCE 4 -#define SOUND_LOBBY 8 -#define MEMBER_PUBLIC 16 -#define INTENT_STYLE 32 -#define MIDROUND_ANTAG 64 -#define SOUND_INSTRUMENTS 128 -#define SOUND_SHIP_AMBIENCE 256 -#define SOUND_PRAYERS 512 -#define ANNOUNCE_LOGIN 1024 -#define SOUND_ANNOUNCEMENTS 2048 -#define DISABLE_DEATHRATTLE 4096 -#define DISABLE_ARRIVALRATTLE 8192 -#define COMBOHUD_LIGHTING 16384 +#define SOUND_ADMINHELP (1<<0) +#define SOUND_MIDI (1<<1) +#define SOUND_AMBIENCE (1<<2) +#define SOUND_LOBBY (1<<3) +#define MEMBER_PUBLIC (1<<4) +#define INTENT_STYLE (1<<5) +#define MIDROUND_ANTAG (1<<6) +#define SOUND_INSTRUMENTS (1<<7) +#define SOUND_SHIP_AMBIENCE (1<<8) +#define SOUND_PRAYERS (1<<9) +#define ANNOUNCE_LOGIN (1<<10) +#define SOUND_ANNOUNCEMENTS (1<<11) +#define DISABLE_DEATHRATTLE (1<<12) +#define DISABLE_ARRIVALRATTLE (1<<13) +#define COMBOHUD_LIGHTING (1<<14) #define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS) //Chat toggles -#define CHAT_OOC 1 -#define CHAT_DEAD 2 -#define CHAT_GHOSTEARS 4 -#define CHAT_GHOSTSIGHT 8 -#define CHAT_PRAYER 16 -#define CHAT_RADIO 32 -#define CHAT_PULLR 64 -#define CHAT_GHOSTWHISPER 128 -#define CHAT_GHOSTPDA 256 -#define CHAT_GHOSTRADIO 512 -#define CHAT_LOOC 1024 +#define CHAT_OOC (1<<0) +#define CHAT_DEAD (1<<1) +#define CHAT_GHOSTEARS (1<<2) +#define CHAT_GHOSTSIGHT (1<<3) +#define CHAT_PRAYER (1<<4) +#define CHAT_RADIO (1<<5) +#define CHAT_PULLR (1<<6) +#define CHAT_GHOSTWHISPER (1<<7) +#define CHAT_GHOSTPDA (1<<8) +#define CHAT_GHOSTRADIO (1<<9) -#define TOGGLES_DEFAULT_CHAT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_PULLR|CHAT_GHOSTWHISPER|CHAT_GHOSTPDA|CHAT_GHOSTRADIO|CHAT_LOOC) +#define TOGGLES_DEFAULT_CHAT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_PULLR|CHAT_GHOSTWHISPER|CHAT_GHOSTPDA|CHAT_GHOSTRADIO) #define PARALLAX_INSANE -1 //for show offs #define PARALLAX_HIGH 0 //default. diff --git a/code/__DEFINES/reagents.dm b/code/__DEFINES/reagents.dm index ed815c3393..6fca8786f5 100644 --- a/code/__DEFINES/reagents.dm +++ b/code/__DEFINES/reagents.dm @@ -4,14 +4,14 @@ // container_type defines -#define INJECTABLE 1 // Makes it possible to add reagents through droppers and syringes. -#define DRAWABLE 2 // Makes it possible to remove reagents through syringes. +#define INJECTABLE (1<<0) // Makes it possible to add reagents through droppers and syringes. +#define DRAWABLE (1<<1) // Makes it possible to remove reagents through syringes. -#define REFILLABLE 4 // Makes it possible to add reagents through any reagent container. -#define DRAINABLE 8 // Makes it possible to remove reagents through any reagent container. +#define REFILLABLE (1<<2) // Makes it possible to add reagents through any reagent container. +#define DRAINABLE (1<<3) // Makes it possible to remove reagents through any reagent container. -#define TRANSPARENT 16 // Used on containers which you want to be able to see the reagents off. -#define AMOUNT_VISIBLE 32 // For non-transparent containers that still have the general amount of reagents in them visible. +#define TRANSPARENT (1<<4) // Used on containers which you want to be able to see the reagents off. +#define AMOUNT_VISIBLE (1<<5) // For non-transparent containers that still have the general amount of reagents in them visible. // Is an open container for all intents and purposes. #define OPENCONTAINER (REFILLABLE | DRAINABLE | TRANSPARENT) diff --git a/code/__DEFINES/research.dm b/code/__DEFINES/research.dm index cc66e54208..5facee079a 100644 --- a/code/__DEFINES/research.dm +++ b/code/__DEFINES/research.dm @@ -49,14 +49,14 @@ #define RESEARCH_FABRICATOR_SCREEN_SEARCH 4 #define RESEARCH_FABRICATOR_SCREEN_CATEGORYVIEW 5 -#define DEPARTMENTAL_FLAG_SECURITY 1 -#define DEPARTMENTAL_FLAG_MEDICAL 2 -#define DEPARTMENTAL_FLAG_CARGO 4 -#define DEPARTMENTAL_FLAG_SCIENCE 8 -#define DEPARTMENTAL_FLAG_ENGINEERING 16 -#define DEPARTMENTAL_FLAG_SERVICE 32 -#define DEPARTMENTAL_FLAG_ALL 64 //NO THIS DOESN'T ALLOW YOU TO PRINT EVERYTHING, IT'S FOR ALL DEPARTMENTS! -//#define DEPARTMENTAL_FLAG_MINING 128 +#define DEPARTMENTAL_FLAG_SECURITY (1<<0) +#define DEPARTMENTAL_FLAG_MEDICAL (1<<1) +#define DEPARTMENTAL_FLAG_CARGO (1<<2) +#define DEPARTMENTAL_FLAG_SCIENCE (1<<3) +#define DEPARTMENTAL_FLAG_ENGINEERING (1<<4) +#define DEPARTMENTAL_FLAG_SERVICE (1<<5) +#define DEPARTMENTAL_FLAG_ALL (1<<6) //NO THIS DOESN'T ALLOW YOU TO PRINT EVERYTHING, IT'S FOR ALL DEPARTMENTS! +//#define DEPARTMENTAL_FLAG_MINING (1<<7) #define DESIGN_ID_IGNORE "IGNORE_THIS_DESIGN" diff --git a/code/__DEFINES/robots.dm b/code/__DEFINES/robots.dm index 913ab08be7..9c81305241 100644 --- a/code/__DEFINES/robots.dm +++ b/code/__DEFINES/robots.dm @@ -29,12 +29,12 @@ #define BOT_NO_ROUTE 17 // no destination beacon found (or no route) //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 & ED-Honks +#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 & ED-Honks //AI notification defines #define NEW_BORG 1 diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index 79c96805c0..57cdfe3880 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -24,7 +24,6 @@ #define ROLE_REVENANT "revenant" #define ROLE_DEVIL "devil" #define ROLE_SERVANT_OF_RATVAR "servant of Ratvar" -#define ROLE_BORER "borer" #define ROLE_BROTHER "blood brother" #define ROLE_BRAINWASHED "brainwashed victim" #define ROLE_MISCREANT "miscreant" @@ -49,7 +48,6 @@ GLOBAL_LIST_INIT(special_roles, list( ROLE_REVENANT, ROLE_ABDUCTOR, ROLE_DEVIL = /datum/game_mode/devil, - ROLE_BORER, ROLE_SERVANT_OF_RATVAR = /datum/game_mode/clockwork_cult, ROLE_MISCREANT )) diff --git a/code/__DEFINES/shuttles.dm b/code/__DEFINES/shuttles.dm index 306f316aa5..056c5a4565 100644 --- a/code/__DEFINES/shuttles.dm +++ b/code/__DEFINES/shuttles.dm @@ -52,12 +52,12 @@ #define ENGINE_DEFAULT_MAXSPEED_ENGINES 5 //Docking error flags -#define DOCKING_SUCCESS 0 -#define DOCKING_BLOCKED 1 -#define DOCKING_IMMOBILIZED 2 -#define DOCKING_AREA_EMPTY 4 -#define DOCKING_NULL_DESTINATION 8 -#define DOCKING_NULL_SOURCE 16 +#define DOCKING_SUCCESS 0 +#define DOCKING_BLOCKED (1<<0) +#define DOCKING_IMMOBILIZED (1<<1) +#define DOCKING_AREA_EMPTY (1<<2) +#define DOCKING_NULL_DESTINATION (1<<3) +#define DOCKING_NULL_SOURCE (1<<4) //Docking turf movements #define MOVE_TURF 1 @@ -74,7 +74,5 @@ #define SHUTTLE_DOCKER_BLOCKED 3 //Shuttle defaults -#define SHUTTLE_DEFAULT_TURF_TYPE /turf/open/space -#define SHUTTLE_DEFAULT_BASETURF_TYPE /turf/open/space #define SHUTTLE_DEFAULT_SHUTTLE_AREA_TYPE /area/shuttle #define SHUTTLE_DEFAULT_UNDERLYING_AREA /area/space diff --git a/code/__DEFINES/sight.dm b/code/__DEFINES/sight.dm index e307e8dd69..b7643fc5b1 100644 --- a/code/__DEFINES/sight.dm +++ b/code/__DEFINES/sight.dm @@ -17,14 +17,14 @@ #define INVISIBILITY_ABSTRACT 101 //only used for abstract objects (e.g. spacevine_controller), things that are not really there. -#define BORGMESON 1 -#define BORGTHERM 2 -#define BORGXRAY 4 -#define BORGMATERIAL 8 +#define BORGMESON (1<<0) +#define BORGTHERM (1<<1) +#define BORGXRAY (1<<2) +#define BORGMATERIAL (1<<3) //for clothing visor toggles, these determine which vars to toggle -#define VISOR_FLASHPROTECT 1 -#define VISOR_TINT 2 -#define VISOR_VISIONFLAGS 4 //all following flags only matter for glasses -#define VISOR_DARKNESSVIEW 8 -#define VISOR_INVISVIEW 16 +#define VISOR_FLASHPROTECT (1<<0) +#define VISOR_TINT (1<<1) +#define VISOR_VISIONFLAGS (1<<2) //all following flags only matter for glasses +#define VISOR_DARKNESSVIEW (1<<3) +#define VISOR_INVISVIEW (1<<4) diff --git a/code/__DEFINES/stat.dm b/code/__DEFINES/stat.dm index d9d98219aa..1d3ea1347a 100644 --- a/code/__DEFINES/stat.dm +++ b/code/__DEFINES/stat.dm @@ -9,10 +9,10 @@ #define DEAD 3 // bitflags for machine stat variable -#define BROKEN 1 -#define NOPOWER 2 -#define MAINT 4 // under maintaince -#define EMPED 8 // temporary broken by EMP pulse +#define BROKEN (1<<0) +#define NOPOWER (1<<1) +#define MAINT (1<<2) // under maintaince +#define EMPED (1<<3) // temporary broken by EMP pulse //ai power requirement defines #define POWER_REQ_ALL 1 diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 15459f7f71..3cec4248d2 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -6,18 +6,18 @@ //Timing subsystem //Don't run if there is an identical unique timer active //if the arguments to addtimer are the same as an existing timer, it doesn't create a new timer, and returns the id of the existing timer -#define TIMER_UNIQUE 0x1 +#define TIMER_UNIQUE (1<<0) //For unique timers: Replace the old timer rather then not start this one -#define TIMER_OVERRIDE 0x2 +#define TIMER_OVERRIDE (1<<1) //Timing should be based on how timing progresses on clients, not the sever. // tracking this is more expensive, // should only be used in conjuction with things that have to progress client side, such as animate() or sound() -#define TIMER_CLIENT_TIME 0x4 +#define TIMER_CLIENT_TIME (1<<2) //Timer can be stopped using deltimer() -#define TIMER_STOPPABLE 0x8 +#define TIMER_STOPPABLE (1<<3) //To be used with TIMER_UNIQUE //prevents distinguishing identical timers with the wait variable -#define TIMER_NO_HASH_WAIT 0x10 +#define TIMER_NO_HASH_WAIT (1<<4) #define TIMER_NO_INVOKE_WARNING 600 //number of byond ticks that are allowed to pass before the timer subsystem thinks it hung on something diff --git a/code/__HELPERS/areas.dm b/code/__HELPERS/areas.dm index 0d12a5ca58..51dd88710a 100644 --- a/code/__HELPERS/areas.dm +++ b/code/__HELPERS/areas.dm @@ -83,15 +83,10 @@ newA.contents += thing thing.change_area(old_area, newA) - var/list/related_areas = oldA.related - for(var/i in 1 to related_areas.len) - var/area/place = related_areas[i] - var/list/firedoors = place.firedoors - if(!LAZYLEN(firedoors)) - continue - for(var/k in 1 to firedoors.len) - var/obj/machinery/door/firedoor/FD = firedoors[k] - FD.CalculateAffectingAreas() + var/list/firedoors = oldA.firedoors + for(var/door in firedoors) + var/obj/machinery/door/firedoor/FD = door + FD.CalculateAffectingAreas() to_chat(creator, "You have created a new area, named [newA.name]. It is now weather proof, and constructing an APC will allow it to be powered.") return TRUE diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm index 34de5d4590..5d34df3ec5 100644 --- a/code/__HELPERS/icon_smoothing.dm +++ b/code/__HELPERS/icon_smoothing.dm @@ -24,21 +24,21 @@ */ //Redefinitions of the diagonal directions so they can be stored in one var without conflicts -#define N_NORTH 2 -#define N_SOUTH 4 -#define N_EAST 16 -#define N_WEST 256 -#define N_NORTHEAST 32 -#define N_NORTHWEST 512 -#define N_SOUTHEAST 64 -#define N_SOUTHWEST 1024 +#define N_NORTH (1<<1) +#define N_SOUTH (1<<2) +#define N_EAST (1<<4) +#define N_WEST (1<<8) +#define N_NORTHEAST (1<<5) +#define N_NORTHWEST (1<<9) +#define N_SOUTHEAST (1<<6) +#define N_SOUTHWEST (1<<10) -#define SMOOTH_FALSE 0 //not smooth -#define SMOOTH_TRUE 1 //smooths with exact specified types or just itself -#define SMOOTH_MORE 2 //smooths with all subtypes of specified types or just itself (this value can replace SMOOTH_TRUE) -#define SMOOTH_DIAGONAL 4 //if atom should smooth diagonally, this should be present in 'smooth' var -#define SMOOTH_BORDER 8 //atom will smooth with the borders of the map -#define SMOOTH_QUEUED 16 //atom is currently queued to smooth. +#define SMOOTH_FALSE 0 //not smooth +#define SMOOTH_TRUE (1<<0) //smooths with exact specified types or just itself +#define SMOOTH_MORE (1<<1) //smooths with all subtypes of specified types or just itself (this value can replace SMOOTH_TRUE) +#define SMOOTH_DIAGONAL (1<<2) //if atom should smooth diagonally, this should be present in 'smooth' var +#define SMOOTH_BORDER (1<<3) //atom will smooth with the borders of the map +#define SMOOTH_QUEUED (1<<4) //atom is currently queued to smooth. #define NULLTURF_BORDER 123456789 diff --git a/code/_onclick/hud/parallax.dm b/code/_onclick/hud/parallax.dm index 9da765745f..bc3df4de83 100755 --- a/code/_onclick/hud/parallax.dm +++ b/code/_onclick/hud/parallax.dm @@ -310,8 +310,3 @@ /obj/screen/parallax_layer/planet/update_o() return //Shit wont move - -#undef LOOP_NONE -#undef LOOP_NORMAL -#undef LOOP_REVERSE -#undef LOOP_TIME diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 18cd821399..865061eb3a 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -180,13 +180,18 @@ /obj/screen/close name = "close" + layer = ABOVE_HUD_LAYER + plane = ABOVE_HUD_PLANE + icon_state = "backpack_close" + +/obj/screen/close/Initialize(mapload, new_master) + . = ..() + master = new_master /obj/screen/close/Click() - if(istype(master, /obj/item/storage)) - var/obj/item/storage/S = master - S.close(usr) - return 1 - + var/datum/component/storage/S = master + S.hide_from(usr) + return TRUE /obj/screen/drop name = "drop" @@ -346,19 +351,27 @@ /obj/screen/storage name = "storage" + icon_state = "block" + screen_loc = "7,7 to 10,8" + layer = HUD_LAYER + plane = HUD_PLANE + +/obj/screen/storage/Initialize(mapload, new_master) + . = ..() + master = new_master /obj/screen/storage/Click(location, control, params) if(world.time <= usr.next_move) - return 1 + return TRUE if(usr.stat || usr.IsUnconscious() || usr.IsKnockdown() || usr.IsStun()) - return 1 + return TRUE if (ismecha(usr.loc)) // stops inventory actions in a mech - return 1 + return TRUE if(master) var/obj/item/I = usr.get_active_held_item() if(I) master.attackby(I, usr, params) - return 1 + return TRUE /obj/screen/throw_catch name = "throw/catch"