mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 21:34:08 -07:00
Manual fix needed, using 'noop' comment to silence warnings and convert for loop to a probably more readable while loop. eslint --no-config-lookup --rule '"no-empty": 1' Ref: #7812 Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
18 lines
415 B
JavaScript
18 lines
415 B
JavaScript
function TestScript1A() {}
|
|
|
|
TestScript1A.prototype.GetX = function() {
|
|
// Test that .entity is readonly
|
|
try {
|
|
delete this.entity;
|
|
Engine.TS_FAIL("Missed exception");
|
|
} catch (e) { /* noop */ }
|
|
try {
|
|
this.entity = -1;
|
|
Engine.TS_FAIL("Missed exception");
|
|
} catch (e) { /* noop */ }
|
|
|
|
// and return the value
|
|
return this.entity;
|
|
};
|
|
|
|
Engine.RegisterComponentType(IID_Test1, "TestScript1A", TestScript1A);
|