Files
EVEngine/test/decal.nut
T
西风逍遥游 0b8ff14a2b feat(decal): P2 IDecalQuery capability + script test
Adds the common-layer IDecalQuery capability (spawn/remove/clear/count/setLimit with an opaque texture handle) provided by the decal module at construction, so editor/devtools can drive decals without linking the module; adds a Squirrel script test (decal.nut + DecalScriptTest) covering eve.Decal() getName/clearAll/setLimit/update, and a C++ capability consumer test.
2026-08-23 00:57:15 +08:00

20 lines
475 B
Plaintext

function basic() {
if (eve.Decal == null) {
print("decal module not built\n");
return false;
}
local decal = eve.Decal();
if (decal.getName() != "Decal") {
print("Decal name mismatch\n");
return false;
}
decal.clearAll();
if (decal.count() != 0) {
print("decal.clearAll did not clear\n");
return false;
}
decal.setLimit("blood", 2);
decal.update(0.016);
return decal.count() == 0;
}