mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-17 13:53:57 -07:00
eslint --no-config-lookup --fix --rule '"prefer-const": 1' \
binaries/data/mods/public/globalscripts
Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
31 lines
525 B
JavaScript
31 lines
525 B
JavaScript
const effects = {
|
|
"eff_A": {
|
|
"code": "a",
|
|
"name": "A",
|
|
"order": "2",
|
|
"IID": "IID_A",
|
|
"method": "doA"
|
|
},
|
|
"eff_B": {
|
|
"code": "b",
|
|
"name": "B",
|
|
"order": "1",
|
|
"IID": "IID_B",
|
|
"method": "doB"
|
|
}
|
|
};
|
|
|
|
Engine.ListDirectoryFiles = () => Object.keys(effects);
|
|
Engine.ReadJSONFile = (file) => effects[file];
|
|
|
|
const attackEffects = new AttackEffects();
|
|
|
|
TS_ASSERT_UNEVAL_EQUALS(attackEffects.Receivers(), [{
|
|
"type": "b",
|
|
"IID": "IID_B",
|
|
"method": "doB"
|
|
}, {
|
|
"type": "a",
|
|
"IID": "IID_A",
|
|
"method": "doA"
|
|
}]);
|