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.
20 lines
475 B
Plaintext
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;
|
|
}
|