From 30a4705c01ecd12072071cde4a2c1fedeb67421a Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Mon, 5 Mar 2018 13:23:28 -0600 Subject: [PATCH 1/2] [MIRROR] Clean up all sorts of crap, mostly defines (#5788) * Clean up all sorts of crap, mostly defines * fixes compile errors --- code/__DEFINES/DNA.dm | 15 --- code/__DEFINES/admin.dm | 6 - code/__DEFINES/atmospherics.dm | 14 +-- code/__DEFINES/cleaning.dm | 2 +- code/__DEFINES/clockcult.dm | 2 - code/__DEFINES/colors.dm | 24 ++-- code/__DEFINES/combat.dm | 4 - code/__DEFINES/components.dm | 1 - code/__DEFINES/construction.dm | 11 -- code/__DEFINES/flags.dm | 2 - code/__DEFINES/inventory.dm | 16 --- code/__DEFINES/is_helpers.dm | 17 +-- code/__DEFINES/layers.dm | 1 - code/__DEFINES/lighting.dm | 23 +--- code/__DEFINES/machines.dm | 3 - code/__DEFINES/medal.dm | 1 - code/__DEFINES/misc.dm | 76 +----------- code/__DEFINES/mobs.dm | 25 +--- code/__DEFINES/radio.dm | 111 +++++++++--------- code/__DEFINES/shuttles.dm | 4 +- code/__DEFINES/sight.dm | 60 +++++----- code/__DEFINES/stat.dm | 1 - code/__DEFINES/status_effects.dm | 2 - code/__HELPERS/unsorted.dm | 2 +- code/_globalvars/lists/poll_ignore.dm | 2 - code/_onclick/hud/_defines.dm | 2 +- code/_onclick/telekinesis.dm | 5 + code/game/machinery/hologram.dm | 1 - code/game/turfs/open.dm | 3 - code/modules/admin/admin_ranks.dm | 6 - code/modules/antagonists/cult/cult_comms.dm | 1 - code/modules/error_handler/error_handler.dm | 3 + code/modules/fields/turf_objects.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 27 +++++ .../mob/living/carbon/monkey/combat.dm | 3 + code/modules/mob/living/silicon/ai/life.dm | 2 +- code/modules/mob/living/silicon/ai/say.dm | 1 + code/modules/ninja/__ninjaDefines.dm | 1 - .../power/singularity/field_generator.dm | 5 + code/modules/power/turbine.dm | 11 +- code/modules/projectiles/gun.dm | 2 +- code/modules/projectiles/guns/ballistic.dm | 10 +- .../projectiles/guns/ballistic/revolver.dm | 4 +- 43 files changed, 168 insertions(+), 346 deletions(-) diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index de3b90eb1c..44fcce6253 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -44,20 +44,6 @@ //Mutations that cant be taken from genetics and are not in SE #define NON_SCANNABLE -1 - // Extra powers: -#define LASER 9 // harm intent - click anywhere to shoot lasers from eyes -#define HEAL 10 // healing people with hands -#define SHADOW 11 // shadow teleportation (create in/out portals anywhere) (25%) -#define SCREAM 12 // supersonic screaming (25%) -#define EXPLOSIVE 13 // exploding on-demand (15%) -#define REGENERATION 14 // superhuman regeneration (30%) -#define REPROCESSOR 15 // eat anything (50%) -#define SHAPESHIFTING 16 // take on the appearance of anything (40%) -#define PHASING 17 // ability to phase through walls (40%) -#define SHIELD 18 // shielding from all projectile attacks (30%) -#define SHOCKWAVE 19 // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) -#define ELECTRICITY 20 // ability to shoot electric attacks (15%) - //DNA - Because fuck you and your magic numbers being all over the codebase. #define DNA_BLOCK_SIZE 3 @@ -81,7 +67,6 @@ #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_KEEPSRC 128 #define TR_KEEPORGANS 256 diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm index 62d4b94528..e8b744ce5b 100644 --- a/code/__DEFINES/admin.dm +++ b/code/__DEFINES/admin.dm @@ -37,12 +37,6 @@ #define R_DEFAULT R_AUTOLOGIN -#if DM_VERSION > 512 -#error Remove the flag below , its been long enough -#endif -//legacy , remove post 512, it was replaced by R_POLL -#define R_REJUVINATE 2 - #define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated. #define ADMIN_QUE(user) "(?)" diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index 73f2661ed5..bc95a9ddff 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -28,7 +28,6 @@ #define CELL_VOLUME 2500 //liters in a cell #define BREATH_VOLUME 0.5 //liters in a normal breath #define BREATH_PERCENTAGE (BREATH_VOLUME/CELL_VOLUME) //Amount of air to take a from a tile -#define HUMAN_NEEDED_OXYGEN (MOLES_CELLSTANDARD*BREATH_PERCENTAGE*0.16) //Amount of air needed before pass out/suffocation commences //EXCITED GROUPS #define EXCITED_GROUP_BREAKDOWN_CYCLES 4 //number of FULL air controller ticks before an excited group breaks down (averages gas contents across turfs) @@ -46,10 +45,7 @@ //HEAT TRANSFER COEFFICIENTS //Must be between 0 and 1. Values closer to 1 equalize temperature faster //Should not exceed 0.4 else strange heat flow occur -#define FLOOR_HEAT_TRANSFER_COEFFICIENT 0.4 #define WALL_HEAT_TRANSFER_COEFFICIENT 0.0 -#define DOOR_HEAT_TRANSFER_COEFFICIENT 0.0 -#define SPACE_HEAT_TRANSFER_COEFFICIENT 0.2 //a hack to partly simulate radiative heat #define OPEN_HEAT_TRANSFER_COEFFICIENT 0.4 #define WINDOW_HEAT_TRANSFER_COEFFICIENT 0.1 //a hack for now #define HEAT_CAPACITY_VACUUM 7000 //a hack to help make vacuums "cold", sacrificing realism for gameplay @@ -59,8 +55,6 @@ #define FIRE_MINIMUM_TEMPERATURE_TO_EXIST 100+T0C #define FIRE_SPREAD_RADIOSITY_SCALE 0.85 #define FIRE_GROWTH_RATE 40000 //For small fires -#define CARBON_LIFEFORM_FIRE_RESISTANCE 200+T0C //Resistance to fire damage -#define CARBON_LIFEFORM_FIRE_DAMAGE 4 //Fire damage #define PLASMA_MINIMUM_BURN_TEMPERATURE 100+T0C //GASES @@ -74,11 +68,6 @@ #define REACTING 1 #define STOP_REACTIONS 2 -//HUMANS -//Hurty numbers -#define FIRE_DAMAGE_MODIFIER 0.0215 //Higher values result in more external fire damage to the skin -#define AIR_DAMAGE_MODIFIER 1.025 //More means less damage from hot air scalding lungs, less = more damage //CITADEL EDIT 1.025 - // Pressure limits. #define HAZARD_HIGH_PRESSURE 550 //This determins at what pressure the ultra-high pressure red icon is displayed. (This one is set as a constant) #define WARNING_HIGH_PRESSURE 325 //This determins when the orange pressure icon is displayed (it is 0.7 * HAZARD_HIGH_PRESSURE) @@ -123,7 +112,7 @@ #define SHOES_MAX_TEMP_PROTECT 1500 //For gloves #define PRESSURE_DAMAGE_COEFFICIENT 4 //The amount of pressure damage someone takes is equal to (pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE -#define MAX_HIGH_PRESSURE_DAMAGE 16 // CITADEL CHANGES Max to 16, low to 8. +#define MAX_HIGH_PRESSURE_DAMAGE 16 // CITADEL CHANGES Max to 16, low to 8. #define LOW_PRESSURE_DAMAGE 8 //The amount of damage someone takes when in a low pressure area (The pressure threshold is so low that it doesn't make sense to do any calculations, so it just applies this flat value). #define COLD_SLOWDOWN_FACTOR 20 //Humans are slowed by the difference between bodytemp and BODYTEMP_COLD_DAMAGE_LIMIT divided by this @@ -196,4 +185,3 @@ GLOBAL_LIST_INIT(pipe_paint_colors, list( "Violet" = rgb(64,0,128), "Yellow" = rgb(255,198,0) )) - diff --git a/code/__DEFINES/cleaning.dm b/code/__DEFINES/cleaning.dm index eed0ee5f54..c4db590e90 100644 --- a/code/__DEFINES/cleaning.dm +++ b/code/__DEFINES/cleaning.dm @@ -1,5 +1,5 @@ //Cleaning tool strength -#define CLEAN_VERY_WEAK 1 // What are you scrubbing the ground with a toothpick? +// 1 is also a valid cleaning strength but completely unused so left undefined #define CLEAN_WEAK 2 #define CLEAN_MEDIUM 3 // Acceptable tools #define CLEAN_STRONG 4 // Industrial strength diff --git a/code/__DEFINES/clockcult.dm b/code/__DEFINES/clockcult.dm index 9f23ba2d38..070b92acc7 100644 --- a/code/__DEFINES/clockcult.dm +++ b/code/__DEFINES/clockcult.dm @@ -64,8 +64,6 @@ GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not us #define GATEWAY_RATVAR_ARRIVAL 600 //when progress is at or above this, game over ratvar's here everybody go home -#define ARK_SUMMON_COST 5 //how many of each component an Ark costs to summon - //Objective text define #define CLOCKCULT_OBJECTIVE "Construct the Ark of the Clockwork Justicar and free Ratvar." diff --git a/code/__DEFINES/colors.dm b/code/__DEFINES/colors.dm index 10d4182b28..824f5b3e61 100644 --- a/code/__DEFINES/colors.dm +++ b/code/__DEFINES/colors.dm @@ -3,26 +3,26 @@ #define COLOR_INPUT_DISABLED "#F0F0F0" #define COLOR_INPUT_ENABLED "#D3B5B5" -#define COLOR_WHITE "#EEEEEE" -#define COLOR_SILVER "#C0C0C0" -#define COLOR_GRAY "#808080" +//#define COLOR_WHITE "#EEEEEE" +//#define COLOR_SILVER "#C0C0C0" +//#define COLOR_GRAY "#808080" #define COLOR_FLOORTILE_GRAY "#8D8B8B" #define COLOR_ALMOST_BLACK "#333333" -#define COLOR_BLACK "#000000" +//#define COLOR_BLACK "#000000" #define COLOR_RED "#FF0000" -#define COLOR_RED_LIGHT "#FF3333" -#define COLOR_MAROON "#800000" +//#define COLOR_RED_LIGHT "#FF3333" +//#define COLOR_MAROON "#800000" #define COLOR_YELLOW "#FFFF00" -#define COLOR_OLIVE "#808000" -#define COLOR_LIME "#32CD32" +//#define COLOR_OLIVE "#808000" +//#define COLOR_LIME "#32CD32" #define COLOR_GREEN "#008000" #define COLOR_CYAN "#00FFFF" -#define COLOR_TEAL "#008080" +//#define COLOR_TEAL "#008080" #define COLOR_BLUE "#0000FF" -#define COLOR_BLUE_LIGHT "#33CCFF" -#define COLOR_NAVY "#000080" +//#define COLOR_BLUE_LIGHT "#33CCFF" +//#define COLOR_NAVY "#000080" #define COLOR_PINK "#FFC0CB" -#define COLOR_MAGENTA "#FF00FF" +//#define COLOR_MAGENTA "#FF00FF" #define COLOR_PURPLE "#800080" #define COLOR_ORANGE "#FF9900" #define COLOR_BEIGE "#CEB689" diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index 8e791cfffd..b67c084e10 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -110,11 +110,7 @@ #define EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER 8 //Coefficient of multiplication for the damage the item does when removed without a surgery (this*item.w_class) #define EMBEDDED_UNSAFE_REMOVAL_TIME 30 //A Time in ticks, total removal time = (this*item.w_class) -//Gun Stuff -#define SAWN_INTACT 0 -#define SAWN_OFF 1 //Gun weapon weight -#define WEAPON_DUAL_WIELD 0 #define WEAPON_LIGHT 1 #define WEAPON_MEDIUM 2 #define WEAPON_HEAVY 3 diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 40701947b9..5b4ff7e378 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -31,7 +31,6 @@ //Positions for overrides list #define EXAMINE_POSITION_ARTICLE 1 #define EXAMINE_POSITION_BEFORE 2 - #define EXAMINE_POSITION_NAME 3 //End positions #define COMPONENT_EXNAME_CHANGED 1 #define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (/atom/movable, /atom) diff --git a/code/__DEFINES/construction.dm b/code/__DEFINES/construction.dm index 8d77c39740..e03db1964d 100644 --- a/code/__DEFINES/construction.dm +++ b/code/__DEFINES/construction.dm @@ -37,12 +37,6 @@ #define FAILED_UNFASTEN 1 #define SUCCESSFUL_UNFASTEN 2 -//disposal unit mode defines, which do double time as the construction defines -#define PRESSURE_OFF 0 -#define PRESSURE_ON 1 -#define PRESSURE_MAXED 2 -#define SCREWS_OUT -1 - //ai core defines #define EMPTY_CORE 0 #define CIRCUIT_CORE 1 @@ -51,11 +45,6 @@ #define GLASS_CORE 4 #define AI_READY_CORE 5 -//field generator construction defines -#define FG_UNSECURED 0 -#define FG_SECURED 1 -#define FG_WELDED 2 - //emitter construction defines #define EM_UNSECURED 0 #define EM_SECURED 1 diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index d2c88a0c1b..814120c229 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -26,7 +26,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define ON_BORDER_1 512 // item has priority to check when entering or leaving #define NOSLIP_1 1024 //prevents from slipping on wet floors, in space etc -#define _UNUSED_1 2048 // 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! @@ -84,7 +83,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 //Movement Types -#define IMMOBILE 0 #define GROUND 1 #define FLYING 2 diff --git a/code/__DEFINES/inventory.dm b/code/__DEFINES/inventory.dm index d2de6f9100..dc3647e1f1 100644 --- a/code/__DEFINES/inventory.dm +++ b/code/__DEFINES/inventory.dm @@ -118,22 +118,6 @@ #define NECK 2048 #define FULL_BODY 4095 -// 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() -// The values here should add up to 1. -// Hands and feet have 2.5%, arms and legs 7.5%, each of the torso parts has 15% and the head has 30% -#define THERMAL_PROTECTION_HEAD 0.3 -#define THERMAL_PROTECTION_CHEST 0.15 -#define THERMAL_PROTECTION_GROIN 0.15 -#define THERMAL_PROTECTION_LEG_LEFT 0.075 -#define THERMAL_PROTECTION_LEG_RIGHT 0.075 -#define THERMAL_PROTECTION_FOOT_LEFT 0.025 -#define THERMAL_PROTECTION_FOOT_RIGHT 0.025 -#define THERMAL_PROTECTION_ARM_LEFT 0.075 -#define THERMAL_PROTECTION_ARM_RIGHT 0.075 -#define THERMAL_PROTECTION_HAND_LEFT 0.025 -#define THERMAL_PROTECTION_HAND_RIGHT 0.025 - //flags for female outfits: How much the game can safely "take off" the uniform without it looking weird #define NO_FEMALE_UNIFORM 0 #define FEMALE_UNIFORM_FULL 1 diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 9a43607709..b1a065822d 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -1,7 +1,5 @@ // simple is_type and similar inline helpers -#define isdatum(D) (istype(D, /datum)) - #define islist(L) (istype(L, /list)) #if DM_VERSION >= 512 @@ -64,7 +62,6 @@ #define isjellyperson(A) (is_species(A, /datum/species/jelly)) #define isslimeperson(A) (is_species(A, /datum/species/jelly/slime)) #define isluminescent(A) (is_species(A, /datum/species/jelly/luminescent)) -#define isshadowperson(A) (is_species(A, /datum/species/shadow)) #define iszombie(A) (is_species(A, /datum/species/zombie)) #define ishumanbasic(A) (is_species(A, /datum/species/human)) @@ -106,8 +103,6 @@ #define isbot(A) (istype(A, /mob/living/simple_animal/bot)) -#define iscrab(A) (istype(A, /mob/living/simple_animal/crab)) - #define isshade(A) (istype(A, /mob/living/simple_animal/shade)) #define ismouse(A) (istype(A, /mob/living/simple_animal/mouse)) @@ -118,16 +113,10 @@ #define iscat(A) (istype(A, /mob/living/simple_animal/pet/cat)) -#define isdog(A) (istype(A, /mob/living/simple_animal/pet/dog)) - #define iscorgi(A) (istype(A, /mob/living/simple_animal/pet/dog/corgi)) #define ishostile(A) (istype(A, /mob/living/simple_animal/hostile)) -#define isbear(A) (istype(A, /mob/living/simple_animal/hostile/bear)) - -#define iscarp(A) (istype(A, /mob/living/simple_animal/hostile/carp)) - #define isswarmer(A) (istype(A, /mob/living/simple_animal/hostile/swarmer)) #define isguardian(A) (istype(A, /mob/living/simple_animal/hostile/guardian)) @@ -183,14 +172,10 @@ GLOBAL_LIST_INIT(pointed_types, typecacheof(list( #define isigniter(O) (istype(O, /obj/item/device/assembly/igniter)) -#define isinfared(O) (istype(O, /obj/item/device/assembly/infra)) - #define isprox(O) (istype(O, /obj/item/device/assembly/prox_sensor)) #define issignaler(O) (istype(O, /obj/item/device/assembly/signaler)) -#define istimer(O) (istype(O, /obj/item/device/assembly/timer)) - GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list( /obj/item/stack/sheet/glass, /obj/item/stack/sheet/rglass, @@ -201,4 +186,4 @@ 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)) \ No newline at end of file +#define isblobmonster(O) (istype(O, /mob/living/simple_animal/hostile/blob)) diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index 9bf44a7fbd..614383931c 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -9,7 +9,6 @@ #define GAME_PLANE -1 #define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals #define SPACE_LAYER 1.8 -#define ABOVE_SPACE_LAYER 1.9 //#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define #define MID_TURF_LAYER 2.02 #define HIGH_TURF_LAYER 2.03 diff --git a/code/__DEFINES/lighting.dm b/code/__DEFINES/lighting.dm index 96197f578e..f68657c3e9 100644 --- a/code/__DEFINES/lighting.dm +++ b/code/__DEFINES/lighting.dm @@ -23,27 +23,6 @@ 0, 0, 0, 1 \ ) \ -// Helpers so we can (more easily) control the colour matrices. -#define CL_MATRIX_RR 1 -#define CL_MATRIX_RG 2 -#define CL_MATRIX_RB 3 -#define CL_MATRIX_RA 4 -#define CL_MATRIX_GR 5 -#define CL_MATRIX_GG 6 -#define CL_MATRIX_GB 7 -#define CL_MATRIX_GA 8 -#define CL_MATRIX_BR 9 -#define CL_MATRIX_BG 10 -#define CL_MATRIX_BB 11 -#define CL_MATRIX_BA 12 -#define CL_MATRIX_AR 13 -#define CL_MATRIX_AG 14 -#define CL_MATRIX_AB 15 -#define CL_MATRIX_AA 16 -#define CL_MATRIX_CR 17 -#define CL_MATRIX_CG 18 -#define CL_MATRIX_CB 19 -#define CL_MATRIX_CA 20 //Some defines to generalise colours used in lighting. //Important note on colors. Colors can end up significantly different from the basic html picture, especially when saturated @@ -90,4 +69,4 @@ #define LIGHTING_NO_UPDATE 0 #define LIGHTING_VIS_UPDATE 1 #define LIGHTING_CHECK_UPDATE 2 -#define LIGHTING_FORCE_UPDATE 3 \ No newline at end of file +#define LIGHTING_FORCE_UPDATE 3 diff --git a/code/__DEFINES/machines.dm b/code/__DEFINES/machines.dm index 4665bd3b1e..ad9fcdb2dd 100644 --- a/code/__DEFINES/machines.dm +++ b/code/__DEFINES/machines.dm @@ -85,6 +85,3 @@ #define SUPERMATTER_DANGER 4 // Integrity < 50% #define SUPERMATTER_EMERGENCY 5 // Integrity < 25% #define SUPERMATTER_DELAMINATING 6 // Pretty obvious. - -//R&D Snowflakes -#define RD_CONSOLE_LOCKED_SCREEN 0.2 diff --git a/code/__DEFINES/medal.dm b/code/__DEFINES/medal.dm index 5781e14f57..b5ff8eac20 100644 --- a/code/__DEFINES/medal.dm +++ b/code/__DEFINES/medal.dm @@ -10,7 +10,6 @@ #define BOSS_MEDAL_DRAKE "Drake" #define BOSS_MEDAL_HIEROPHANT "Hierophant" #define BOSS_MEDAL_LEGION "Legion" -#define BOSS_MEDAL_SWARMER "Swarmer Beacon" #define BOSS_MEDAL_TENDRIL "Tendril" // Score names diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index bee1e19a5b..cd0a7ce97c 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -20,8 +20,8 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s #define THIS_PROC_TYPE_STR "[THIS_PROC_TYPE]" //Because you can only obtain a string of THIS_PROC_TYPE using "[]", and it's nice to just +/+= strings #define THIS_PROC_TYPE_STR_WITH_ARGS "[THIS_PROC_TYPE]([args.Join(",")])" #define THIS_PROC_TYPE_WEIRD ...... //This one is WEIRD, in some cases (When used in certain defines? (eg: ASSERT)) THIS_PROC_TYPE will fail to work, but THIS_PROC_TYPE_WEIRD will work instead -#define THIS_PROC_TYPE_WEIRD_STR "[THIS_PROC_TYPE_WEIRD]" //Included for completeness -#define THIS_PROC_TYPE_WEIRD_STR_WITH_ARGS "[THIS_PROC_TYPE_WEIRD]([args.Join(",")])" //Ditto +//define THIS_PROC_TYPE_WEIRD_STR "[THIS_PROC_TYPE_WEIRD]" //Included for completeness +//define THIS_PROC_TYPE_WEIRD_STR_WITH_ARGS "[THIS_PROC_TYPE_WEIRD]([args.Join(",")])" //Ditto #define MIDNIGHT_ROLLOVER 864000 //number of deciseconds in a day @@ -46,7 +46,6 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s #define HALLOWEEN "Halloween" #define CHRISTMAS "Christmas" #define FESTIVE_SEASON "Festive Season" -#define FRIDAY_13TH "Friday the 13th" //Human Overlays Indexes///////// //LOTS OF CIT CHANGES HERE. BE CAREFUL WHEN UPSTREAM ADDS MORE LAYERS @@ -86,58 +85,11 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s //Human Overlay Index Shortcuts for alternate_worn_layer, layers //Because I *KNOW* somebody will think layer+1 means "above" //IT DOESN'T OK, IT MEANS "UNDER" -#define UNDER_BODY_BEHIND_LAYER BODY_BEHIND_LAYER+1 -#define UNDER_BODY_LAYER BODY_LAYER+1 -#define UNDER_BODY_ADJ_LAYER BODY_ADJ_LAYER+1 -#define UNDER_MUTATIONS_LAYER MUTATIONS_LAYER+1 -#define UNDER_BODYPARTS_LAYER BODYPARTS_LAYER+1 -#define UNDER_DAMAGE_LAYER DAMAGE_LAYER+1 -#define UNDER_UNIFORM_LAYER UNIFORM_LAYER+1 -#define UNDER_ID_LAYER ID_LAYER+1 -#define UNDER_HANDS_PART_LAYER HANDS_PART_LAYER+1 -#define UNDER_GLOVES_LAYER GLOVES_LAYER+1 -#define UNDER_SHOES_LAYER SHOES_LAYER+1 -#define UNDER_EARS_LAYER EARS_LAYER+1 #define UNDER_SUIT_LAYER SUIT_LAYER+1 -#define UNDER_GLASSES_LAYER GLASSES_LAYER+1 -#define UNDER_BELT_LAYER BELT_LAYER+1 -#define UNDER_SUIT_STORE_LAYER SUIT_STORE_LAYER+1 -#define UNDER_BACK_LAYER BACK_LAYER+1 -#define UNDER_HAIR_LAYER HAIR_LAYER+1 -#define UNDER_FACEMASK_LAYER FACEMASK_LAYER+1 -#define UNDER_HEAD_LAYER HEAD_LAYER+1 -#define UNDER_HANDCUFF_LAYER HANDCUFF_LAYER+1 -#define UNDER_LEGCUFF_LAYER LEGCUFF_LAYER+1 -#define UNDER_HANDS_LAYER HANDS_LAYER+1 -#define UNDER_BODY_FRONT_LAYER BODY_FRONT_LAYER+1 -#define UNDER_FIRE_LAYER FIRE_LAYER+1 //AND -1 MEANS "ABOVE", OK?, OK!?! -#define ABOVE_BODY_BEHIND_LAYER BODY_BEHIND_LAYER-1 -#define ABOVE_BODY_LAYER BODY_LAYER-1 -#define ABOVE_BODY_ADJ_LAYER BODY_ADJ_LAYER-1 -#define ABOVE_MUTATIONS_LAYER MUTATIONS_LAYER-1 -#define ABOVE_BODYPARTS_LAYER BODYPARTS_LAYER-1 -#define ABOVE_DAMAGE_LAYER DAMAGE_LAYER-1 -#define ABOVE_UNIFORM_LAYER UNIFORM_LAYER-1 -#define ABOVE_ID_LAYER ID_LAYER-1 -#define ABOVE_HANDS_PART_LAYER HANDS_PART_LAYER-1 -#define ABOVE_GLOVES_LAYER GLOVES_LAYER-1 #define ABOVE_SHOES_LAYER SHOES_LAYER-1 -#define ABOVE_EARS_LAYER EARS_LAYER-1 -#define ABOVE_SUIT_LAYER SUIT_LAYER-1 -#define ABOVE_GLASSES_LAYER GLASSES_LAYER-1 -#define ABOVE_BELT_LAYER BELT_LAYER-1 -#define ABOVE_SUIT_STORE_LAYER SUIT_STORE_LAYER-1 -#define ABOVE_BACK_LAYER BACK_LAYER-1 -#define ABOVE_HAIR_LAYER HAIR_LAYER-1 -#define ABOVE_FACEMASK_LAYER FACEMASK_LAYER-1 -#define ABOVE_HEAD_LAYER HEAD_LAYER-1 -#define ABOVE_HANDCUFF_LAYER HANDCUFF_LAYER-1 -#define ABOVE_LEGCUFF_LAYER LEGCUFF_LAYER-1 -#define ABOVE_HANDS_LAYER HANDS_LAYER-1 #define ABOVE_BODY_FRONT_LAYER BODY_FRONT_LAYER-1 -#define ABOVE_FIRE_LAYER FIRE_LAYER-1 //Security levels @@ -195,7 +147,6 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s #define AI_MECH_HACK 3 //Malfunctioning AI hijacking mecha //check_target_facings() return defines -#define FACING_FAILED 0 #define FACING_SAME_DIR 1 #define FACING_EACHOTHER 2 #define FACING_INIT_FACING_TARGET_TARGET_FACING_PERPENDICULAR 3 //Do I win the most informative but also most stupid define award? @@ -213,7 +164,6 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache) #define BLOOD_GAIN_PER_STEP 100 #define BLOOD_LOSS_PER_STEP 5 #define BLOOD_LOSS_IN_SPREAD 20 -#define BLOOD_FADEOUT_TIME 2 //Bloody shoe blood states #define BLOOD_STATE_HUMAN "blood" @@ -241,7 +191,6 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache) #define TURF_WET_LUBE 2 #define TURF_WET_ICE 3 #define TURF_WET_PERMAFROST 4 -#define TURF_WET_SLIDE 5 //Maximum amount of time, (in approx. seconds.) a tile can be wet for. #define MAXIMUM_WET_TIME 300 @@ -309,10 +258,8 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE ///////////////////////////////////// // atom.appearence_flags shortcuts // ///////////////////////////////////// -//this was added midway thru 510, so it might not exist in some versions, but we can't check by minor verison -#ifndef TILE_BOUND -#error this version of 510 is too old, You must use byond 510.1332 or later. (TILE_BOUND is not defined) -#endif + +/* // Disabling certain features #define APPEARANCE_IGNORE_TRANSFORM RESET_TRANSFORM @@ -330,12 +277,7 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE #define APPEARANCE_CONSIDER_ALPHA ~RESET_ALPHA #define APPEARANCE_LONG_GLIDE LONG_GLIDE -#ifndef PIXEL_SCALE -#define PIXEL_SCALE 0 -#if DM_VERSION >= 512 -#error HEY, PIXEL_SCALE probably exists now, remove this gross ass shim. -#endif -#endif +*/ // Consider these images/atoms as part of the UI/HUD #define APPEARANCE_UI_IGNORE_ALPHA RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|RESET_ALPHA|PIXEL_SCALE @@ -417,14 +359,6 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE #define CLOCK_PROSELYTIZATION 23 #define SHUTTLE_HIJACK 24 -#define TURF_DECAL_PAINT "paint" -#define TURF_DECAL_DAMAGE "damage" -#define TURF_DECAL_DIRT "dirt" - -//Error handler defines -#define ERROR_USEFUL_LEN 2 - -#define NO_FIELD 0 #define FIELD_TURF 1 #define FIELD_EDGE 2 diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 867d2a264c..7af6fecce2 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -118,7 +118,7 @@ //Sentience types, to prevent things like sentience potions from giving bosses sentience #define SENTIENCE_ORGANIC 1 #define SENTIENCE_ARTIFICIAL 2 -#define SENTIENCE_OTHER 3 +// #define SENTIENCE_OTHER 3 unused #define SENTIENCE_MINEBOT 4 #define SENTIENCE_BOSS 5 @@ -137,29 +137,6 @@ #define ENVIRONMENT_SMASH_WALLS 2 //walls #define ENVIRONMENT_SMASH_RWALLS 4 //rwalls - -//SNPCs -//AI defines -#define INTERACTING 2 -#define TRAVEL 4 -#define FIGHTING 8 -//Trait defines -#define TRAIT_ROBUST 2 -#define TRAIT_UNROBUST 4 -#define TRAIT_SMART 8 -#define TRAIT_DUMB 16 -#define TRAIT_MEAN 32 -#define TRAIT_FRIENDLY 64 -#define TRAIT_THIEVING 128 -//Range/chance defines -#define MAX_RANGE_FIND 32 -#define MIN_RANGE_FIND 16 -#define FUZZY_CHANCE_HIGH 85 -#define FUZZY_CHANCE_LOW 50 -#define CHANCE_TALK 1 - -#define TK_MAXRANGE 15 - #define NO_SLIP_WHEN_WALKING 1 #define SLIDE 2 #define GALOSHES_DONT_HELP 4 diff --git a/code/__DEFINES/radio.dm b/code/__DEFINES/radio.dm index e38fe9954b..97935d58b7 100644 --- a/code/__DEFINES/radio.dm +++ b/code/__DEFINES/radio.dm @@ -1,56 +1,55 @@ -// Radios use a large variety of predefined frequencies. - -#define MIN_FREE_FREQ 1201 // ------------------------------------------------- -// Frequencies are always odd numbers and range from 1201 to 1599. - -#define FREQ_SYNDICATE 1213 // Nuke op comms frequency, dark brown -#define FREQ_CTF_RED 1215 // CTF red team comms frequency, red -#define FREQ_CTF_BLUE 1217 // CTF blue team comms frequency, blue -#define FREQ_CENTCOM 1337 // CentCom comms frequency, gray -#define FREQ_SUPPLY 1347 // Supply comms frequency, light brown -#define FREQ_SERVICE 1349 // Service comms frequency, green -#define FREQ_SCIENCE 1351 // Science comms frequency, plum -#define FREQ_COMMAND 1353 // Command comms frequency, gold -#define FREQ_MEDICAL 1355 // Medical comms frequency, soft blue -#define FREQ_ENGINEERING 1357 // Engineering comms frequency, orange -#define FREQ_SECURITY 1359 // Security comms frequency, red - -#define FREQ_STATUS_DISPLAYS 1435 -#define FREQ_ATMOS_ALARMS 1437 // air alarms <-> alert computers -#define FREQ_ATMOS_CONTROL 1439 // air alarms <-> vents and scrubbers - -#define MIN_FREQ 1441 // ------------------------------------------------------ -// Only the 1441 to 1489 range is freely available for general conversation. -// This represents 1/8th of the available spectrum. - -#define FREQ_ATMOS_STORAGE 1441 -#define FREQ_NAV_BEACON 1445 -#define FREQ_AI_PRIVATE 1447 // AI private comms frequency, magenta -#define FREQ_PRESSURE_PLATE 1447 -#define FREQ_AIRLOCK_CONTROL 1449 -#define FREQ_ELECTROPACK 1449 -#define FREQ_MAGNETS 1449 -#define FREQ_LOCATOR_IMPLANT 1451 -#define FREQ_SIGNALER 1457 // the default for new signalers -#define FREQ_COMMON 1459 // Common comms frequency, dark green - -#define MAX_FREQ 1489 // ------------------------------------------------------ - -#define MAX_FREE_FREQ 1599 // ------------------------------------------------- - -// Transmission types. -#define TRANSMISSION_WIRE 0 // some sort of wired connection, not used -#define TRANSMISSION_RADIO 1 // electromagnetic radiation (default) -#define TRANSMISSION_SUBSPACE 2 // subspace transmission (headsets only) -#define TRANSMISSION_SUPERSPACE 3 // reaches independent (CentCom) radios only - -// Filter types, used as an optimization to avoid unnecessary proc calls. -#define RADIO_TO_AIRALARM "to_airalarm" -#define RADIO_FROM_AIRALARM "from_airalarm" -#define RADIO_SIGNALER "signaler" -#define RADIO_ATMOSIA "atmosia" -#define RADIO_NAVBEACONS "navbeacons" -#define RADIO_AIRLOCK "airlock" -#define RADIO_MAGNETS "magnets" - -#define DEFAULT_SIGNALER_CODE 30 +// Radios use a large variety of predefined frequencies. + +#define MIN_FREE_FREQ 1201 // ------------------------------------------------- +// Frequencies are always odd numbers and range from 1201 to 1599. + +#define FREQ_SYNDICATE 1213 // Nuke op comms frequency, dark brown +#define FREQ_CTF_RED 1215 // CTF red team comms frequency, red +#define FREQ_CTF_BLUE 1217 // CTF blue team comms frequency, blue +#define FREQ_CENTCOM 1337 // CentCom comms frequency, gray +#define FREQ_SUPPLY 1347 // Supply comms frequency, light brown +#define FREQ_SERVICE 1349 // Service comms frequency, green +#define FREQ_SCIENCE 1351 // Science comms frequency, plum +#define FREQ_COMMAND 1353 // Command comms frequency, gold +#define FREQ_MEDICAL 1355 // Medical comms frequency, soft blue +#define FREQ_ENGINEERING 1357 // Engineering comms frequency, orange +#define FREQ_SECURITY 1359 // Security comms frequency, red + +#define FREQ_STATUS_DISPLAYS 1435 +#define FREQ_ATMOS_ALARMS 1437 // air alarms <-> alert computers +#define FREQ_ATMOS_CONTROL 1439 // air alarms <-> vents and scrubbers + +#define MIN_FREQ 1441 // ------------------------------------------------------ +// Only the 1441 to 1489 range is freely available for general conversation. +// This represents 1/8th of the available spectrum. + +#define FREQ_ATMOS_STORAGE 1441 +#define FREQ_NAV_BEACON 1445 +#define FREQ_AI_PRIVATE 1447 // AI private comms frequency, magenta +#define FREQ_PRESSURE_PLATE 1447 +#define FREQ_AIRLOCK_CONTROL 1449 +#define FREQ_ELECTROPACK 1449 +#define FREQ_MAGNETS 1449 +#define FREQ_LOCATOR_IMPLANT 1451 +#define FREQ_SIGNALER 1457 // the default for new signalers +#define FREQ_COMMON 1459 // Common comms frequency, dark green + +#define MAX_FREQ 1489 // ------------------------------------------------------ + +#define MAX_FREE_FREQ 1599 // ------------------------------------------------- + +// Transmission types. +#define TRANSMISSION_WIRE 0 // some sort of wired connection, not used +#define TRANSMISSION_RADIO 1 // electromagnetic radiation (default) +#define TRANSMISSION_SUBSPACE 2 // subspace transmission (headsets only) +#define TRANSMISSION_SUPERSPACE 3 // reaches independent (CentCom) radios only + +// Filter types, used as an optimization to avoid unnecessary proc calls. +#define RADIO_TO_AIRALARM "to_airalarm" +#define RADIO_FROM_AIRALARM "from_airalarm" +#define RADIO_SIGNALER "signaler" +#define RADIO_ATMOSIA "atmosia" +#define RADIO_AIRLOCK "airlock" +#define RADIO_MAGNETS "magnets" + +#define DEFAULT_SIGNALER_CODE 30 diff --git a/code/__DEFINES/shuttles.dm b/code/__DEFINES/shuttles.dm index e3f1731a13..306f316aa5 100644 --- a/code/__DEFINES/shuttles.dm +++ b/code/__DEFINES/shuttles.dm @@ -31,11 +31,9 @@ // Ripples, effects that signal a shuttle's arrival #define SHUTTLE_RIPPLE_TIME 100 -#define SHUTTLE_RIPPLE_FADEIN 50 #define TRANSIT_REQUEST 1 #define TRANSIT_READY 2 -#define TRANSIT_FULL 3 #define SHUTTLE_TRANSIT_BORDER 8 @@ -79,4 +77,4 @@ #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 \ No newline at end of file +#define SHUTTLE_DEFAULT_UNDERLYING_AREA /area/space diff --git a/code/__DEFINES/sight.dm b/code/__DEFINES/sight.dm index d756cbaf1b..cfce95a65f 100644 --- a/code/__DEFINES/sight.dm +++ b/code/__DEFINES/sight.dm @@ -1,30 +1,30 @@ -#define SEE_INVISIBLE_MINIMUM 5 - -#define INVISIBILITY_LIGHTING 20 - -#define SEE_INVISIBLE_LIVING 25 - -#define SEE_INVISIBLE_LEVEL_ONE 35 //currently unused -#define INVISIBILITY_LEVEL_ONE 35 //currently unused - -#define SEE_INVISIBLE_LEVEL_TWO 45 //currently unused -#define INVISIBILITY_LEVEL_TWO 45 //currently unused - -#define INVISIBILITY_OBSERVER 60 -#define SEE_INVISIBLE_OBSERVER 60 - -#define INVISIBILITY_MAXIMUM 100 //the maximum allowed for "real" objects - -#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 - -//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 SEE_INVISIBLE_MINIMUM 5 + +#define INVISIBILITY_LIGHTING 20 + +#define SEE_INVISIBLE_LIVING 25 + +//#define SEE_INVISIBLE_LEVEL_ONE 35 //currently unused +//#define INVISIBILITY_LEVEL_ONE 35 //currently unused + +//#define SEE_INVISIBLE_LEVEL_TWO 45 //currently unused +//#define INVISIBILITY_LEVEL_TWO 45 //currently unused + +#define INVISIBILITY_OBSERVER 60 +#define SEE_INVISIBLE_OBSERVER 60 + +#define INVISIBILITY_MAXIMUM 100 //the maximum allowed for "real" objects + +#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 + +//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 diff --git a/code/__DEFINES/stat.dm b/code/__DEFINES/stat.dm index 96c72bcab2..d9d98219aa 100644 --- a/code/__DEFINES/stat.dm +++ b/code/__DEFINES/stat.dm @@ -15,6 +15,5 @@ #define EMPED 8 // temporary broken by EMP pulse //ai power requirement defines -#define POWER_REQ_NONE 0 #define POWER_REQ_ALL 1 #define POWER_REQ_CLOCKCULT 2 diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index ea29e956b6..dc321bf63d 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -7,8 +7,6 @@ #define STATUS_EFFECT_REPLACE 2 //if it allows only one, but new instances replace -#define BASIC_STATUS_EFFECT /datum/status_effect //Has no effect. - /////////// // BUFFS // /////////// diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 3484389a65..a31ec4f037 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -920,7 +920,7 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list( That said, this proc should not be used if the change facing proc of the click code is overriden at the same time*/ if(!ismob(target) || target.lying) //Make sure we are not doing this for things that can't have a logical direction to the players given that the target would be on their side - return FACING_FAILED + return FALSE if(initator.dir == target.dir) //mobs are facing the same direction return FACING_SAME_DIR if(is_A_facing_B(initator,target) && is_A_facing_B(target,initator)) //mobs are facing each other diff --git a/code/_globalvars/lists/poll_ignore.dm b/code/_globalvars/lists/poll_ignore.dm index f88c4aab85..a2cba4e08f 100644 --- a/code/_globalvars/lists/poll_ignore.dm +++ b/code/_globalvars/lists/poll_ignore.dm @@ -1,10 +1,8 @@ //Each lists stores ckeys for "Never for this round" option category -#define POLL_IGNORE_PAI "pai" #define POLL_IGNORE_SENTIENCE_POTION "sentience_potion" #define POLL_IGNORE_POSSESSED_BLADE "possessed_blade" #define POLL_IGNORE_ALIEN_LARVA "alien_larva" -#define POLL_IGNORE_CLOCKWORK_MARAUDER "clockwork_marauder" #define POLL_IGNORE_SYNDICATE "syndicate" #define POLL_IGNORE_HOLOPARASITE "holoparasite" diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index 6d941589d3..4ce615dd01 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -66,7 +66,7 @@ #define ui_monkey_neck "CENTER-3:15,SOUTH:5" //monkey #define ui_monkey_back "CENTER-2:16,SOUTH:5" //monkey -#define ui_alien_storage_l "CENTER-2:14,SOUTH:5"//alien +//#define ui_alien_storage_l "CENTER-2:14,SOUTH:5"//alien #define ui_alien_storage_r "CENTER+1:18,SOUTH:5"//alien #define ui_alien_language_menu "EAST-3:26,SOUTH:5" //alien diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 87354d6f0b..ce07b7ebb2 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -10,6 +10,8 @@ By default, emulate the user's unarmed attack */ +#define TK_MAXRANGE 15 + /atom/proc/attack_tk(mob/user) if(user.stat || !tkMaxRangeCheck(user, src)) return @@ -188,3 +190,6 @@ /obj/item/tk_grab/suicide_act(mob/user) user.visible_message("[user] is using [user.p_their()] telekinesis to choke [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide!") return (OXYLOSS) + + +#undef TK_MAXRANGE diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 264f773b89..bce12597ab 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -26,7 +26,6 @@ Possible to do for anyone motivated enough: #define HOLOPAD_PASSIVE_POWER_USAGE 1 #define HOLOGRAM_POWER_USAGE 2 -#define HOLOPAD_MODE RANGE_BASED /obj/machinery/holopad name = "holopad" diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm index da1f941ccc..bcd597424d 100644 --- a/code/game/turfs/open.dm +++ b/code/game/turfs/open.dm @@ -269,9 +269,6 @@ if(TURF_WET_PERMAFROST) intensity = 120 lube_flags = SLIDE_ICE | GALOSHES_DONT_HELP - if(TURF_WET_SLIDE) - intensity = 80 - lube_flags = SLIDE | GALOSHES_DONT_HELP else qdel(GetComponent(/datum/component/slippery)) return diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index 2414c55528..c915816ed0 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -42,9 +42,6 @@ GLOBAL_PROTECT(admin_ranks) /datum/admin_rank/vv_edit_var(var_name, var_value) return FALSE -#if DM_VERSION > 512 -#error remove the rejuv keyword from this proc -#endif /proc/admin_keyword_to_flag(word, previous_rights=0) var/flag = 0 switch(ckey(word)) @@ -80,9 +77,6 @@ GLOBAL_PROTECT(admin_ranks) flag = R_AUTOLOGIN if("@","prev") flag = previous_rights - if("rejuv","rejuvinate") - stack_trace("Legacy keyword rejuvinate used defaulting to R_ADMIN") - flag = R_ADMIN return flag /proc/admin_keyword_to_path(word) //use this with verb keywords eg +/client/proc/blah diff --git a/code/modules/antagonists/cult/cult_comms.dm b/code/modules/antagonists/cult/cult_comms.dm index 961f071b02..308cd38c80 100644 --- a/code/modules/antagonists/cult/cult_comms.dm +++ b/code/modules/antagonists/cult/cult_comms.dm @@ -1,5 +1,4 @@ // Contains cult communion, guide, and cult master abilities -#define MARK_COOLDOWN /datum/action/innate/cult icon_icon = 'icons/mob/actions/actions_cult.dmi' diff --git a/code/modules/error_handler/error_handler.dm b/code/modules/error_handler/error_handler.dm index 91b004e0e0..304ddce7eb 100644 --- a/code/modules/error_handler/error_handler.dm +++ b/code/modules/error_handler/error_handler.dm @@ -2,6 +2,9 @@ GLOBAL_VAR_INIT(total_runtimes, GLOB.total_runtimes || 0) GLOBAL_VAR_INIT(total_runtimes_skipped, 0) #ifdef DEBUG + +#define ERROR_USEFUL_LEN 2 + /world/Error(exception/E, datum/e_src) GLOB.total_runtimes++ diff --git a/code/modules/fields/turf_objects.dm b/code/modules/fields/turf_objects.dm index edb1a6ce6b..7d7454f46a 100644 --- a/code/modules/fields/turf_objects.dm +++ b/code/modules/fields/turf_objects.dm @@ -74,4 +74,4 @@ return FIELD_EDGE if(O.parent == F) return FIELD_TURF - return NO_FIELD + return FALSE diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index d47d68bf8b..5e4db79e89 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -20,6 +20,22 @@ #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 +// 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() +// The values here should add up to 1. +// Hands and feet have 2.5%, arms and legs 7.5%, each of the torso parts has 15% and the head has 30% +#define THERMAL_PROTECTION_HEAD 0.3 +#define THERMAL_PROTECTION_CHEST 0.15 +#define THERMAL_PROTECTION_GROIN 0.15 +#define THERMAL_PROTECTION_LEG_LEFT 0.075 +#define THERMAL_PROTECTION_LEG_RIGHT 0.075 +#define THERMAL_PROTECTION_FOOT_LEFT 0.025 +#define THERMAL_PROTECTION_FOOT_RIGHT 0.025 +#define THERMAL_PROTECTION_ARM_LEFT 0.075 +#define THERMAL_PROTECTION_ARM_RIGHT 0.075 +#define THERMAL_PROTECTION_HAND_LEFT 0.025 +#define THERMAL_PROTECTION_HAND_RIGHT 0.025 + /mob/living/carbon/human/Life() set invisibility = 0 if (notransform) @@ -424,3 +440,14 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put adjustToxLoss(4) //Let's be honest you shouldn't be alive by now #undef HUMAN_MAX_OXYLOSS +#undef THERMAL_PROTECTION_HEAD +#undef THERMAL_PROTECTION_CHEST +#undef THERMAL_PROTECTION_GROIN +#undef THERMAL_PROTECTION_LEG_LEFT +#undef THERMAL_PROTECTION_LEG_RIGHT +#undef THERMAL_PROTECTION_FOOT_LEFT +#undef THERMAL_PROTECTION_FOOT_RIGHT +#undef THERMAL_PROTECTION_ARM_LEFT +#undef THERMAL_PROTECTION_ARM_RIGHT +#undef THERMAL_PROTECTION_HAND_LEFT +#undef THERMAL_PROTECTION_HAND_RIGHT \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm index 32b368db4f..79c9613906 100644 --- a/code/modules/mob/living/carbon/monkey/combat.dm +++ b/code/modules/mob/living/carbon/monkey/combat.dm @@ -1,3 +1,4 @@ +#define MAX_RANGE_FIND 32 /mob/living/carbon/monkey var/aggressive=0 // set to 1 using VV for an angry monkey @@ -475,3 +476,5 @@ if(A) dropItemToGround(A, TRUE) update_icons() + +#undef MAX_RANGE_FIND diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 97034d389c..ae95a317a3 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -50,7 +50,7 @@ var/turf/T = get_turf(src) var/area/A = get_area(src) switch(requires_power) - if(POWER_REQ_NONE) + if(NONE) return FALSE if(POWER_REQ_ALL) return !T || !A || ((!A.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha))) diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm index b55fa2a663..75f0fb5e81 100644 --- a/code/modules/mob/living/silicon/ai/say.dm +++ b/code/modules/mob/living/silicon/ai/say.dm @@ -154,6 +154,7 @@ return 1 return 0 +#undef VOX_DELAY #endif /mob/living/silicon/ai/could_speak_in_language(datum/language/dt) diff --git a/code/modules/ninja/__ninjaDefines.dm b/code/modules/ninja/__ninjaDefines.dm index 352087f4e8..1a3e9dce63 100644 --- a/code/modules/ninja/__ninjaDefines.dm +++ b/code/modules/ninja/__ninjaDefines.dm @@ -18,7 +18,6 @@ Contents: #define INVALID_DRAIN "INVALID" //This one is if the drain proc needs to cancel, eg missing variables, etc, it's important. -#define DRAIN_RD_HACKED "RDHACK" #define DRAIN_RD_HACK_FAILED "RDHACKFAIL" #define DRAIN_MOB_SHOCK "MOBSHOCK" #define DRAIN_MOB_SHOCK_FAILED "MOBSHOCKFAIL" \ No newline at end of file diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index 45149d1346..d160209e0c 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -18,6 +18,11 @@ field_generator power level display #define FG_CHARGING 1 #define FG_ONLINE 2 +//field generator construction defines +#define FG_UNSECURED 0 +#define FG_SECURED 1 +#define FG_WELDED 2 + /obj/machinery/field/generator name = "field generator" desc = "A large thermal battery that projects a high amount of energy when powered." diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index 5c463b4ee9..d01a331364 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -81,14 +81,8 @@ #define COMPFRICTION 5e5 -#define COMPSTARTERLOAD 2800 -// Crucial to make things work!!!! -// OLD FIX - explanation given down below. -// /obj/machinery/power/compressor/CanPass(atom/movable/mover, turf/target) -// return !density - /obj/machinery/power/compressor/locate_machinery() if(turbine) return @@ -169,7 +163,6 @@ // These are crucial to working of a turbine - the stats modify the power output. TurbGenQ modifies how much raw energy can you get from // rpms, TurbGenG modifies the shape of the curve - the lower the value the less straight the curve is. -#define TURBPRES 9000000 #define TURBGENQ 100000 #define TURBGENG 0.5 @@ -370,3 +363,7 @@ if("reconnect") locate_machinery() . = TRUE + +#undef COMPFRICTION +#undef TURBGENQ +#undef TURBGENG \ No newline at end of file diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index a1de4db477..0a2503fd5d 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -27,7 +27,7 @@ var/obj/item/ammo_casing/chambered = null trigger_guard = TRIGGER_GUARD_NORMAL //trigger guard on the weapon, hulks can't fire them with their big meaty fingers var/sawn_desc = null //description change if weapon is sawn-off - var/sawn_state = SAWN_INTACT + var/sawn_off = FALSE var/burst_size = 1 //how large a burst is var/fire_delay = 0 //rate of fire for burst firing and semi auto var/firing_burst = 0 //Prevent the weapon from firing again while already firing diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index c16c5f0fc0..f7cb05486f 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -21,9 +21,9 @@ /obj/item/gun/ballistic/update_icon() ..() if(current_skin) - icon_state = "[unique_reskin[current_skin]][suppressed ? "-suppressed" : ""][sawn_state ? "-sawn" : ""]" + icon_state = "[unique_reskin[current_skin]][suppressed ? "-suppressed" : ""][sawn_off ? "-sawn" : ""]" else - icon_state = "[initial(icon_state)][suppressed ? "-suppressed" : ""][sawn_state ? "-sawn" : ""]" + icon_state = "[initial(icon_state)][suppressed ? "-suppressed" : ""][sawn_off ? "-sawn" : ""]" /obj/item/gun/ballistic/process_chamber(empty_chamber = 1) @@ -185,7 +185,7 @@ /obj/item/gun/ballistic/proc/sawoff(mob/user) - if(sawn_state == SAWN_OFF) + if(sawn_off) to_chat(user, "\The [src] is already shortened!") return user.changeNext_move(CLICK_CD_MELEE) @@ -197,7 +197,7 @@ return if(do_after(user, 30, target = src)) - if(sawn_state == SAWN_OFF) + if(sawn_off) return user.visible_message("[user] shortens \the [src]!", "You shorten \the [src].") name = "sawn-off [src.name]" @@ -206,7 +206,7 @@ item_state = "gun" slot_flags &= ~SLOT_BACK //you can't sling it on your back slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) - sawn_state = SAWN_OFF + sawn_off = TRUE update_icon() return 1 diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index 14e529ba23..489f88ffad 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -311,7 +311,7 @@ /obj/item/gun/ballistic/revolver/doublebarrel/improvised/attackby(obj/item/A, mob/user, params) ..() - if(istype(A, /obj/item/stack/cable_coil) && !sawn_state) + if(istype(A, /obj/item/stack/cable_coil) && !sawn_off) var/obj/item/stack/cable_coil/C = A if(C.use(10)) slot_flags = SLOT_BACK @@ -339,7 +339,7 @@ icon_state = "ishotgun" item_state = "gun" w_class = WEIGHT_CLASS_NORMAL - sawn_state = SAWN_OFF + sawn_off = TRUE slot_flags = SLOT_BELT From df11e970f7aec3d1d485655bc4b48e61354cf85a Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Mon, 5 Mar 2018 13:23:30 -0600 Subject: [PATCH 2/2] Automatic changelog generation for PR #5788 [ci skip] --- html/changelogs/AutoChangeLog-pr-5788.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-5788.yml diff --git a/html/changelogs/AutoChangeLog-pr-5788.yml b/html/changelogs/AutoChangeLog-pr-5788.yml new file mode 100644 index 0000000000..2f5d1bdd2d --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-5788.yml @@ -0,0 +1,4 @@ +author: "Naksu" +delete-after: True +changes: + - code_imp: "First pass on cleaning up junk defines and unused code"