mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
Fixes mineral turfs having weird lighting (#71219)
## About The Pull Request Pixel offsets, unlike transforms, offset overlays too. this was breaking lighting overlays for mineral walls. We did pixel offsets to save on init time, but we can acomplish the same thing using an initial matrix. It's static, so there's no additional cost. S free Damn moth ## Changelog 🆑 fix: Mining walls won't have fucked lighting anymore /🆑
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
/// Helper macro for compile time translation
|
||||
#define TRANSLATE_MATRIX(offset_x, offset_y) matrix(1, 0, (offset_x), 0, 1, (offset_y))
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
/**********************Mineral deposits**************************/
|
||||
|
||||
#define MINERAL_WALL_OFFSET -4
|
||||
|
||||
/turf/closed/mineral //wall piece
|
||||
name = "rock"
|
||||
icon = MAP_SWITCH('icons/turf/smoothrocks.dmi', 'icons/turf/mining.dmi')
|
||||
@@ -17,10 +15,10 @@
|
||||
plane = GAME_PLANE_UPPER
|
||||
base_icon_state = "smoothrocks"
|
||||
|
||||
base_pixel_x = MINERAL_WALL_OFFSET
|
||||
base_pixel_y = MINERAL_WALL_OFFSET
|
||||
pixel_x = MAP_SWITCH(MINERAL_WALL_OFFSET, 0)
|
||||
pixel_y = MAP_SWITCH(MINERAL_WALL_OFFSET, 0)
|
||||
// This is static
|
||||
// Done like this to avoid needing to make it dynamic and save cpu time
|
||||
// 4 to the left, 4 down
|
||||
transform = MAP_SWITCH(TRANSLATE_MATRIX(-4, -4), matrix())
|
||||
|
||||
temperature = TCMB
|
||||
var/turf/open/floor/plating/turf_type = /turf/open/misc/asteroid/airless
|
||||
@@ -35,7 +33,6 @@
|
||||
///How long it takes to mine this turf without tools, if it's weak.
|
||||
var/hand_mine_speed = 15 SECONDS
|
||||
|
||||
#undef MINERAL_WALL_OFFSET
|
||||
|
||||
/turf/closed/mineral/Initialize(mapload)
|
||||
var/static/list/smoothing_groups = list(SMOOTH_GROUP_CLOSED_TURFS, SMOOTH_GROUP_MINERAL_WALLS)
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
#include "code\__DEFINES\maps.dm"
|
||||
#include "code\__DEFINES\materials.dm"
|
||||
#include "code\__DEFINES\maths.dm"
|
||||
#include "code\__DEFINES\matrices.dm"
|
||||
#include "code\__DEFINES\MC.dm"
|
||||
#include "code\__DEFINES\mecha.dm"
|
||||
#include "code\__DEFINES\melee.dm"
|
||||
|
||||
Reference in New Issue
Block a user