Pixel-Composer/scripts/ds_priority/ds_priority.gml

13 lines
276 B
Text
Raw Normal View History

2022-12-12 09:08:03 +01:00
function ds_priority_to_list(priority, asc = true) {
var l = ds_list_create();
var amo = ds_priority_size(priority);
repeat(amo) {
if(asc)
ds_list_add(l, ds_priority_delete_min(priority));
else
ds_list_add(l, ds_priority_delete_max(priority));
}
return l;
}