Pixel-Composer/scripts/ds_priority/ds_priority.gml
2022-12-12 15:08:03 +07:00

13 lines
276 B
Plaintext

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;
}