added world saving/loading
This commit is contained in:
@@ -6,6 +6,14 @@ const SerializeHelper = {
|
||||
newobj[key] = obj[key];
|
||||
}
|
||||
return newobj;
|
||||
},
|
||||
overwriteNonObjects(copyFrom, copyTo) {
|
||||
for (let key in copyFrom) {
|
||||
if (typeof copyFrom[key] !== 'object' && typeof copyTo[key] !== 'object') {
|
||||
// only overwrite if neither are objects
|
||||
copyTo[key] = copyFrom[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user