[Manual Port] of #16707 Enable define sanity (#9651)

This commit is contained in:
Kashargul
2024-12-16 23:31:49 +01:00
committed by GitHub
parent d5b5d65fa2
commit 801238f4d2
42 changed files with 286 additions and 244 deletions

View File

@@ -193,22 +193,22 @@
return view(CEILING(light_range, 1), source_turf)
// Keep in mind. Lighting corners accept the bottom left (northwest) set of cords to them as input
//CHOMPEdit Start Dynamic light
#define GENERATE_MISSING_CORNERS(gen_for) \
/* CHOMPRemove Start, we use our own in _defines
# define GENERATE_MISSING_CORNERS(gen_for) \
if (!gen_for.lighting_corner_NE) { \
gen_for.lighting_corner_NE = new /datum/lighting_corner(gen_for.x, gen_for.y, gen_for.z, gen_for.has_dynamic_lighting()); \
gen_for.lighting_corner_NE = new /datum/lighting_corner(gen_for.x, gen_for.y, gen_for.z); \
} \
if (!gen_for.lighting_corner_SE) { \
gen_for.lighting_corner_SE = new /datum/lighting_corner(gen_for.x, gen_for.y - 1, gen_for.z, gen_for.has_dynamic_lighting()); \
gen_for.lighting_corner_SE = new /datum/lighting_corner(gen_for.x, gen_for.y - 1, gen_for.z); \
} \
if (!gen_for.lighting_corner_SW) { \
gen_for.lighting_corner_SW = new /datum/lighting_corner(gen_for.x - 1, gen_for.y - 1, gen_for.z, gen_for.has_dynamic_lighting()); \
gen_for.lighting_corner_SW = new /datum/lighting_corner(gen_for.x - 1, gen_for.y - 1, gen_for.z); \
} \
if (!gen_for.lighting_corner_NW) { \
gen_for.lighting_corner_NW = new /datum/lighting_corner(gen_for.x - 1, gen_for.y, gen_for.z, gen_for.has_dynamic_lighting()); \
gen_for.lighting_corner_NW = new /datum/lighting_corner(gen_for.x - 1, gen_for.y, gen_for.z); \
} \
gen_for.lighting_corners_initialised = TRUE;
//CHOMPEdit End
*/// CHOMPRemove End
/datum/light_source/proc/update_corners()
var/update = FALSE
@@ -320,6 +320,7 @@
(. * _lum_g) - (OLD * _applied_lum_g), \
(. * _lum_b) - (OLD * _applied_lum_b) \
);
#undef APPLY_CORNER_NEW
//CHOMPEdit End
var/list/datum/lighting_corner/gone_corners = effect_str - corners

View File

@@ -391,5 +391,3 @@
return TRUE
else
return FALSE
#undef GENERATE_MISSING_CORNERS