mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-27 07:26:33 +01:00
13 lines
276 B
Text
13 lines
276 B
Text
|
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;
|
||
|
}
|