mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Test on-lighting node param1 in lighting test
This commit is contained in:
parent
b3503e7853
commit
f073e37d2f
@ -133,6 +133,7 @@ void TestVoxelAlgorithms::testLighting(IGameDef *gamedef)
|
||||
map.addNodeAndUpdate(v3s16(-10, 0, 0), MapNode(CONTENT_AIR), modified_blocks);
|
||||
map.addNodeAndUpdate(v3s16(9, 10, -9), MapNode(t_CONTENT_WATER), modified_blocks);
|
||||
map.addNodeAndUpdate(v3s16(0, 0, 0), MapNode(t_CONTENT_TORCH), modified_blocks);
|
||||
map.addNodeAndUpdate(v3s16(-10, 1, 0), MapNode(t_CONTENT_STONE, 153), modified_blocks);
|
||||
}
|
||||
|
||||
const NodeDefManager *ndef = gamedef->ndef();
|
||||
@ -161,4 +162,9 @@ void TestVoxelAlgorithms::testLighting(IGameDef *gamedef)
|
||||
UASSERTEQ(int, n.getLight(LIGHTBANK_NIGHT, ndef->getLightingFlags(n)), 2);
|
||||
UASSERTEQ(int, n.getLight(LIGHTBANK_DAY, ndef->getLightingFlags(n)), 15);
|
||||
}
|
||||
{
|
||||
// Test that irrelevant param1 values are not clobbered.
|
||||
MapNode n = map.getNode(v3s16(-10, 1, 0));
|
||||
UASSERTEQ(int, n.getParam1(), 153);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user