Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Object.defineProperty(OwnedStructure.prototype, "memory", {
- get: function () {
- if (!Memory.structures) {
- Memory.structures = {};
- }
- if (!Memory.structures[this.id]) {
- Memory.structures[this.id] = {};
- }
- return Memory.structures[this.id];
- },
- set: function(v) {
- return _.set(Memory, `structures.${this.id}`, v);
- },
- configurable: true,
- enumerable: false,
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement