Skip to content

Commit

Permalink
Clean up all sorts of crap, mostly defines (tgstation#36105)
Browse files Browse the repository at this point in the history
* cleanbot

* rejuv

* more crap

* more crap

* still compiles

* clean

* is_crap
  • Loading branch information
vuonojenmustaturska authored and Jordie0608 committed Mar 4, 2018
1 parent 16ecfb7 commit 440e888
Show file tree
Hide file tree
Showing 43 changed files with 87 additions and 265 deletions.
15 changes: 0 additions & 15 deletions code/__DEFINES/DNA.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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


Expand Down
6 changes: 0 additions & 6 deletions code/__DEFINES/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,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) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminmoreinfo=[REF(user)]'>?</a>)"
Expand Down
12 changes: 0 additions & 12 deletions code/__DEFINES/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 2.025 //More means less damage from hot air scalding lungs, less = more damage

// 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)
Expand Down Expand Up @@ -196,4 +185,3 @@ GLOBAL_LIST_INIT(pipe_paint_colors, list(
"Violet" = rgb(64,0,128),
"Yellow" = rgb(255,198,0)
))

2 changes: 1 addition & 1 deletion code/__DEFINES/cleaning.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions code/__DEFINES/clockcult.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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."

Expand Down
24 changes: 12 additions & 12 deletions code/__DEFINES/colors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 0 additions & 4 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion code/__DEFINES/components.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 0 additions & 11 deletions code/__DEFINES/construction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions code/__DEFINES/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down Expand Up @@ -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

Expand Down
16 changes: 0 additions & 16 deletions code/__DEFINES/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 1 addition & 16 deletions code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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))

Expand Down Expand Up @@ -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))
Expand All @@ -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))
Expand Down Expand Up @@ -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,
Expand All @@ -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))
#define isblobmonster(O) (istype(O, /mob/living/simple_animal/hostile/blob))
1 change: 0 additions & 1 deletion code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 1 addition & 22 deletions code/__DEFINES/lighting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -90,4 +69,4 @@
#define LIGHTING_NO_UPDATE 0
#define LIGHTING_VIS_UPDATE 1
#define LIGHTING_CHECK_UPDATE 2
#define LIGHTING_FORCE_UPDATE 3
#define LIGHTING_FORCE_UPDATE 3
5 changes: 1 addition & 4 deletions code/__DEFINES/machines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,4 @@
#define SUPERMATTER_WARNING 3 // Ambient temp > CRITICAL_TEMPERATURE OR integrity damaged
#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
#define SUPERMATTER_DELAMINATING 6 // Pretty obvious.
1 change: 0 additions & 1 deletion code/__DEFINES/medal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 440e888

Please sign in to comment.