From fe421bcd0d4747469020d920ce1c1756f1336cc0 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Fri, 6 Aug 2021 19:08:18 +0300 Subject: [PATCH] resources IIFE module --- modules/resources-generator.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/modules/resources-generator.js b/modules/resources-generator.js index 781e4d00..9f26d86c 100644 --- a/modules/resources-generator.js +++ b/modules/resources-generator.js @@ -1,15 +1,6 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? (module.exports = factory()) : typeof define === 'function' && define.amd ? define(factory) : (global.Resources = factory()); -})(this, function () { - 'use strict'; - - // TODO - // apply logic on heightmap edit - // apply logic on burgs regeneration - // apply logic on population recalculation - // apply logic on save - // apply logic on load +'use strict'; +window.Resources = (function () { let cells, cellId; const getDefault = function () { @@ -144,4 +135,4 @@ const get = (i) => pack.resources.find((resource) => resource.i === i); return {generate, getDefault, defaultModels, methods, getStroke, get}; -}); +})();