Pixel-Composer/scripts/struct_functions/struct_functions.gml

12 lines
305 B
Text
Raw Normal View History

2023-02-14 02:48:33 +01:00
#macro struct_has variable_struct_exists
function struct_override(original, override) {
var args = variable_struct_get_names(override);
for( var i = 0; i < array_length(args); i++ ) {
if(!struct_has(original, args[i])) continue;
original[$ args[i]] = override[$ args[i]];
}
return original;
}