Ticket #3611: mauryanHouse-v2.patch
File mauryanHouse-v2.patch, 1.7 KB (added by , 8 years ago) |
---|
-
binaries/data/mods/public/globalscripts/Templates.js
33 33 * @param match Either a string in the form 34 34 * "Class1 Class2+Class3" 35 35 * where spaces are handled as OR and '+'-signs as AND, 36 * and ! is handled as NOT, thus Class1+!Class2 = Class1 AND NOT Class2 36 37 * Or a list in the form 37 38 * [["Class1"], ["Class2", "Class3"]] 38 39 * where the outer list is combined as OR, and the inner lists are AND-ed … … 56 57 // if the elements are still strings, split them by space or by '+' 57 58 if (typeof sublist == "string") 58 59 sublist = sublist.split(/[+\s]+/); 59 if (sublist.every(function(c) { return classes.indexOf(c) != -1; })) 60 if (sublist.every(function(c) { 61 if (c.charAt(0) == "!") 62 return classes.indexOf(c.substr(1)) == -1; 63 return classes.indexOf(c) != -1; 64 })) 60 65 return true; 61 66 } 62 67 -
binaries/data/mods/public/simulation/templates/template_structure_civic_house.xml
22 22 <BuffHeal>0</BuffHeal> 23 23 <EjectHealth>0.1</EjectHealth> 24 24 <EjectClassesOnDestroy datatype="tokens">Unit</EjectClassesOnDestroy> 25 <List datatype="tokens">Support </List>25 <List datatype="tokens">Support+!Elephant</List> 26 26 <LoadingRange>1</LoadingRange> 27 27 </GarrisonHolder> 28 28 <Health>