#undef is now required for all file defines (#24091)

* CI

* undef

* hooooly crap

* yeah

* false by default

* fixes

* alright, there we go

* oops lmao

* lol, lmao even

* proper programming

* fix

* losin my mind

* oops

* yeah coloring

* WE LOVE MULTIPLE DEFINES (ive lost my sanity)
This commit is contained in:
Contrabang
2024-03-11 14:03:30 -04:00
committed by GitHub
parent 47f3b87a9f
commit e32544e599
172 changed files with 1412 additions and 780 deletions
-8
View File
@@ -1,11 +1,3 @@
#define AB_CHECK_RESTRAINED (1<<0)
#define AB_CHECK_STUNNED (1<<1)
#define AB_CHECK_LYING (1<<2)
#define AB_CHECK_CONSCIOUS (1<<3)
#define AB_CHECK_TURF (1<<4)
#define AB_CHECK_HANDS_BLOCKED (1<<5)
#define AB_CHECK_IMMOBILE (1<<6)
/datum/action
var/name = "Generic Action"
-2
View File
@@ -1,5 +1,3 @@
#define BASE_LAW_TYPE /datum/ai_laws/nanotrasen
/datum/ai_law
var/law = ""
var/index = 0
+17
View File
@@ -325,3 +325,20 @@
*/
/atom/proc/get_runechat_color()
return chat_color
#undef CHAT_MESSAGE_SPAWN_TIME
#undef CHAT_MESSAGE_LIFESPAN
#undef CHAT_MESSAGE_EOL_FADE
#undef CHAT_MESSAGE_GRACE_PERIOD
#undef CHAT_MESSAGE_EXP_DECAY
#undef CHAT_MESSAGE_HEIGHT_DECAY
#undef CHAT_MESSAGE_APPROX_LHEIGHT
#undef CHAT_MESSAGE_WIDTH
#undef CHAT_MESSAGE_MAX_LENGTH
#undef CHAT_LAYER_Z_STEP
#undef CHAT_LAYER_MAX_Z
#undef WXH_TO_HEIGHT
#undef CM_COLOR_SAT_MIN
#undef CM_COLOR_SAT_MAX
#undef CM_COLOR_LUM_MIN
#undef CM_COLOR_LUM_MAX
@@ -1,6 +1,3 @@
#define FORWARD -1
#define BACKWARD 1
#define CONSTRUCTION_TOOL_BEHAVIOURS list(TOOL_CROWBAR, TOOL_SCREWDRIVER, TOOL_WELDER, TOOL_WRENCH)
/datum/construction
var/list/steps
@@ -147,9 +144,9 @@
/datum/construction/reversible/is_right_key(atom/used_atom) // returns index step
var/list/L = steps[index]
if(do_tool_or_atom_check(used_atom, L["key"]))
return FORWARD //to the first step -> forward
return CONSTRUCTION_PATH_FORWARDS //to the first step -> forward
else if(L["backkey"] && do_tool_or_atom_check(used_atom, L["backkey"]))
return BACKWARD //to the last step -> backwards
return CONSTRUCTION_PATH_BACKWARDS //to the last step -> backwards
return 0
/datum/construction/reversible/check_step(atom/used_atom,mob/user as mob)
@@ -194,13 +191,13 @@
if(do_tool_or_atom_check(used_atom, step["key"]))
//if(L["consume"] && !try_consume(used_atom,L["consume"]))
// return 0
return FORWARD //to the first step -> forward
return CONSTRUCTION_PATH_FORWARDS //to the first step -> forward
else if(state_prev in state)
var/list/step = state[state_prev]
if(do_tool_or_atom_check(used_atom, step["key"]))
//if(L["consume"] && !try_consume(used_atom,L["consume"]))
// return 0
return BACKWARD //to the first step -> forward
return CONSTRUCTION_PATH_BACKWARDS //to the first step -> forward
return 0
/datum/construction/reversible2/check_step(atom/used_atom,mob/user as mob)
@@ -222,7 +219,7 @@
return 0
var/list/step = steps[index]
var/list/state = step[diff==FORWARD ? state_next : state_prev]
var/list/state = step[diff==CONSTRUCTION_PATH_FORWARDS ? state_next : state_prev]
user.visible_message(fixText(state["vis_msg"],user),fixText(state["self_msg"],user))
if("delete" in state)
-2
View File
@@ -1,5 +1,3 @@
#define HOLOPAD_MAX_DIAL_TIME 200
/mob/camera/aiEye/remote/holo/setLoc()
. = ..()
var/obj/machinery/hologram/holopad/H = origin
-6
View File
@@ -3,12 +3,6 @@
//You might see places where it does - 16 - 1. This is intentionally 17 instead of 16, because of how byond's tiles work and how not doing it will result in rounding errors like things getting put on the wrong turf.
#define RETURN_PRECISE_POSITION(A) new /datum/position(A)
#define RETURN_PRECISE_POINT(A) new /datum/point_precise(A)
#define RETURN_POINT_VECTOR(ATOM, ANGLE, SPEED) (new /datum/point_precise/vector(ATOM, null, null, null, null, ANGLE, SPEED))
#define RETURN_POINT_VECTOR_INCREMENT(ATOM, ANGLE, SPEED, AMT) (new /datum/point_precise/vector(ATOM, null, null, null, null, ANGLE, SPEED, AMT))
/proc/point_midpoint_points(datum/point_precise/a, datum/point_precise/b) //Obviously will not support multiZ calculations! Same for the two below.
var/datum/point_precise/P = new
P.x = a.x + (b.x - a.x) * 0.5
+3
View File
@@ -275,3 +275,6 @@
return
var/mob/living/simple_animal/demon/shadow/S = L
S.RegisterSignal(holder, COMSIG_MOVABLE_MOVED, TYPE_PROC_REF(/mob/living/simple_animal/demon/shadow, check_darkness))
#undef BLOODCRAWL
#undef BLOODCRAWL_EAT
@@ -1,7 +1,6 @@
GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
// This define is used when we have to spawn in an uplink item in a weird way, like a Surplus crate spawning an actual crate.
// Use this define by setting `uses_special_spawn` to TRUE on the item, and then checking if the parent proc of `spawn_item` returns this define. If it does, implement your special spawn after that.
#define UPLINK_SPECIAL_SPAWNING "ONE PINK CHAINSAW PLEASE"
/proc/get_uplink_items(obj/item/uplink/U)
var/list/uplink_items = list()
+13 -13
View File
@@ -32,7 +32,7 @@
var/aesthetic = FALSE //If the weather has no purpose other than looks
var/immunity_type = "storm" //Used by mobs to prevent them from being affected by the weather
var/stage = END_STAGE //The stage of the weather, from 1-4
var/stage = WEATHER_END_STAGE //The stage of the weather, from 1-4
// These are read by the weather subsystem and used to determine when and where to run the weather.
var/probability = 0 // Weight amongst other eligible weather. If zero, will never happen randomly.
@@ -57,9 +57,9 @@
impacted_areas |= A
/datum/weather/proc/telegraph()
if(stage == STARTUP_STAGE)
if(stage == WEATHER_STARTUP_STAGE)
return
stage = STARTUP_STAGE
stage = WEATHER_STARTUP_STAGE
generate_area_list()
weather_duration = rand(weather_duration_lower, weather_duration_upper)
START_PROCESSING(SSweather, src)
@@ -74,9 +74,9 @@
addtimer(CALLBACK(src, PROC_REF(start)), telegraph_duration)
/datum/weather/proc/start()
if(stage >= MAIN_STAGE)
if(stage >= WEATHER_MAIN_STAGE)
return
stage = MAIN_STAGE
stage = WEATHER_MAIN_STAGE
update_areas()
for(var/M in GLOB.player_list)
var/turf/mob_turf = get_turf(M)
@@ -88,9 +88,9 @@
addtimer(CALLBACK(src, PROC_REF(wind_down)), weather_duration)
/datum/weather/proc/wind_down()
if(stage >= WIND_DOWN_STAGE)
if(stage >= WEATHER_WIND_DOWN_STAGE)
return
stage = WIND_DOWN_STAGE
stage = WEATHER_WIND_DOWN_STAGE
update_areas()
for(var/M in GLOB.player_list)
var/turf/mob_turf = get_turf(M)
@@ -102,9 +102,9 @@
addtimer(CALLBACK(src, PROC_REF(end)), end_duration)
/datum/weather/proc/end()
if(stage == END_STAGE)
if(stage == WEATHER_END_STAGE)
return 1
stage = END_STAGE
stage = WEATHER_END_STAGE
STOP_PROCESSING(SSweather, src)
update_areas()
@@ -132,13 +132,13 @@
N.invisibility = 0
N.color = weather_color
switch(stage)
if(STARTUP_STAGE)
if(WEATHER_STARTUP_STAGE)
N.icon_state = telegraph_overlay
if(MAIN_STAGE)
if(WEATHER_MAIN_STAGE)
N.icon_state = weather_overlay
if(WIND_DOWN_STAGE)
if(WEATHER_WIND_DOWN_STAGE)
N.icon_state = end_overlay
if(END_STAGE)
if(WEATHER_END_STAGE)
N.color = null
N.icon_state = ""
N.icon = 'icons/turf/areas.dmi'
@@ -69,25 +69,25 @@
/datum/weather/ash_storm/proc/update_audio()
switch(stage)
if(STARTUP_STAGE)
if(WEATHER_STARTUP_STAGE)
sound_wo.start()
sound_wi.start()
if(MAIN_STAGE)
if(WEATHER_MAIN_STAGE)
sound_wo.stop()
sound_wi.stop()
sound_ao.start()
sound_ai.start()
if(WIND_DOWN_STAGE)
if(WEATHER_WIND_DOWN_STAGE)
sound_ao.stop()
sound_ai.stop()
sound_wo.start()
sound_wi.start()
if(END_STAGE)
if(WEATHER_END_STAGE)
sound_wo.stop()
sound_wi.stop()