You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.1 KiB
55 lines
1.1 KiB
2 years ago
|
class MapList extends FeatureConfig
|
||
2 years ago
|
perObjectConfig
|
||
|
config(AcediaMaps);
|
||
|
|
||
|
var public config array<string> map;
|
||
|
|
||
|
protected function HashTable ToData() {
|
||
|
local int i;
|
||
|
local ArrayList mapArray;
|
||
|
local HashTable result;
|
||
|
|
||
|
result = _.collections.EmptyHashTable();
|
||
|
mapArray = _.collections.EmptyArrayList();
|
||
|
|
||
|
for (i = 0; i < map.length; i += 1) {
|
||
|
mapArray.AddString(map[i]);
|
||
|
}
|
||
|
|
||
|
result.SetItem(P("maps"), mapArray);
|
||
|
_.memory.Free(mapArray);
|
||
|
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
protected function FromData(HashTable source) {
|
||
|
local int i;
|
||
|
local ArrayList mapArray;
|
||
|
|
||
|
if (source == none) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
mapArray = source.GetArrayList(P("maps"));
|
||
|
if (mapArray == none) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
map.length = 0;
|
||
|
for (i = 0; i < mapArray.GetLength(); i += 1) {
|
||
|
map[map.length] = mapArray.GetString(i);
|
||
|
}
|
||
|
_.memory.Free(mapArray);
|
||
|
}
|
||
|
|
||
|
protected function DefaultIt() {
|
||
|
map[0] = "KF-BioticsLab";
|
||
|
map[1] = "KF-Farm";
|
||
|
map[2] = "KF-Manor";
|
||
|
map[3] = "KF-Offices";
|
||
|
map[4] = "KF-WestLondon";
|
||
|
}
|
||
|
|
||
|
defaultproperties {
|
||
|
configName = "AcediaMaps"
|
||
|
}
|