model: simplification using the new values() function
This commit is contained in:
parent
5409ff66ad
commit
2618b98b88
1 changed files with 1 additions and 3 deletions
|
@ -402,9 +402,7 @@ var model = {
|
|||
append(available ? me.available : me.unavailable, data);
|
||||
}
|
||||
|
||||
me.list = sort(keys(me.data), func(a, b) cmp(me.data[a].sort, me.data[b].sort));
|
||||
forindex (var i; me.list)
|
||||
me.list[i] = me.data[me.list[i]];
|
||||
me.list = sort(values(me.data), func(a, b) cmp(a.sort, b.sort));
|
||||
|
||||
setprop("ai/models/num-players", size(me.list));
|
||||
setprop("sim/signals/multiplayer-updated", 1);
|
||||
|
|
Loading…
Reference in a new issue