Cleaning up defines

This commit is contained in:
Selis
2024-02-10 16:44:44 +01:00
parent 93f076a120
commit d99321bfdf
27 changed files with 196 additions and 89 deletions
+24
View File
@@ -327,6 +327,11 @@ var/list/runechat_image_cache = list()
if(5)
return rgb(c,m,x)
#undef CM_COLOR_SAT_MIN
#undef CM_COLOR_SAT_MAX
#undef CM_COLOR_LUM_MIN
#undef CM_COLOR_LUM_MAX
/atom/proc/runechat_message(message, range = world.view, italics, list/classes = list(), audible = TRUE, list/specific_viewers)
var/hearing_mobs
if(islist(specific_viewers))
@@ -369,3 +374,22 @@ var/list/runechat_image_cache = list()
if(istype(loc, /obj/item/weapon/holder))
return loc
return ..()
#undef CHAT_MESSAGE_SPAWN_TIME
#undef CHAT_MESSAGE_LIFESPAN
#undef CHAT_MESSAGE_EOL_FADE
#undef CHAT_MESSAGE_EXP_DECAY
#undef CHAT_MESSAGE_HEIGHT_DECAY
#undef CHAT_MESSAGE_APPROX_LHEIGHT
#undef CHAT_MESSAGE_WIDTH
#undef CHAT_MESSAGE_EXT_WIDTH
#undef CHAT_MESSAGE_LENGTH
#undef CHAT_MESSAGE_EXT_LENGTH
#undef CHAT_MESSAGE_MOB
#undef CHAT_MESSAGE_OBJ
#undef WXH_TO_HEIGHT
#undef CHAT_RUNE_EMOTE
#undef CHAT_RUNE_RADIO
+1 -12
View File
@@ -1,14 +1,3 @@
//Designed for things that need precision trajectories like projectiles.
//Don't use this for anything that you don't absolutely have to use this with (like projectiles!) because it isn't worth using a datum unless you need accuracy down to decimal places in pixels.
//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(A)
#define RETURN_POINT_VECTOR(ATOM, ANGLE, SPEED) (new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED))
#define RETURN_POINT_VECTOR_INCREMENT(ATOM, ANGLE, SPEED, AMT) (new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED, AMT))
/datum/position //For positions with map x/y/z and pixel x/y so you don't have to return lists. Could use addition/subtraction in the future I guess.
var/x = 0
var/y = 0
@@ -224,4 +213,4 @@
var/needed_time = world.time - last_move
last_process = world.time
last_move = world.time
increment(needed_time / SSprojectiles.wait)
increment(needed_time / SSprojectiles.wait)