[MIRROR] Clean up all sorts of crap, mostly defines (#5788)

* Clean up all sorts of crap, mostly defines

* fixes compile errors
This commit is contained in:
CitadelStationBot
2018-03-05 13:23:28 -06:00
committed by Poojawa
parent c6aab4b38b
commit 30a4705c01
43 changed files with 168 additions and 346 deletions
-6
View File
@@ -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
@@ -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'
@@ -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++
+1 -1
View File
@@ -74,4 +74,4 @@
return FIELD_EDGE
if(O.parent == F)
return FIELD_TURF
return NO_FIELD
return FALSE
@@ -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
@@ -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
+1 -1
View File
@@ -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)))
@@ -154,6 +154,7 @@
return 1
return 0
#undef VOX_DELAY
#endif
/mob/living/silicon/ai/could_speak_in_language(datum/language/dt)
-1
View File
@@ -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"
@@ -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."
+4 -7
View File
@@ -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
+1 -1
View File
@@ -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
+5 -5
View File
@@ -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, "<span class='warning'>\The [src] is already shortened!</span>")
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]!", "<span class='notice'>You shorten \the [src].</span>")
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
@@ -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