mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-27 07:26:33 +01:00
14 lines
290 B
Text
14 lines
290 B
Text
|
function ds_map_try_get(map, key, def) {
|
||
|
if(ds_map_exists(map, key)) return map[? key];
|
||
|
return def;
|
||
|
}
|
||
|
|
||
|
function ds_map_override(original, newmap) {
|
||
|
var k = ds_map_find_first(newmap);
|
||
|
|
||
|
repeat(ds_map_size(newmap)) {
|
||
|
original[? k] = newmap[? k];
|
||
|
k = ds_map_find_next(newmap, k);
|
||
|
}
|
||
|
}
|