Skip to content

Commit

Permalink
remove god mod function
Browse files Browse the repository at this point in the history
  • Loading branch information
orsi committed Sep 4, 2020
1 parent da51fd0 commit 371c657
Showing 1 changed file with 0 additions and 113 deletions.
113 changes: 0 additions & 113 deletions script/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -844,120 +844,7 @@

return setTimeout(callback, timeout);

},

enableGodMode: function() {
// add all remaining craftables and goods
var buildSection = $('#buildBtns');
if (buildSection.length === 0) {
buildSection = $('<div>').attr({ 'id': 'buildBtns', 'data-legend': _('build:') }).css('opacity', 0);
buildSection.appendTo('div#roomPanel').animate({ opacity: 1 }, 300, 'linear');
}
var craftSection = $('#craftBtns');
if (craftSection.length === 0) {
craftSection = $('<div>').attr({ 'id': 'craftBtns', 'data-legend': _('craft:') }).css('opacity', 0);
craftSection.appendTo('div#roomPanel').animate({ opacity: 1 }, 300, 'linear');
}

var buySection = $('#buyBtns');
if (buySection.length === 0) {
buySection = $('<div>').attr({ 'id': 'buyBtns', 'data-legend': _('buy:') }).css('opacity', 0);
buySection.appendTo('div#roomPanel').animate({ opacity: 1 }, 300, 'linear');
}

for (var k in Room.Craftables) {
craftable = Room.Craftables[k];
if (craftable.button == null) {
var loc = Room.needsWorkshop(craftable.type) ? craftSection : buildSection;
craftable.button = new Button.Button({
id: 'build_' + k,
cost: craftable.cost(),
text: _(k),
click: Room.build,
width: '80px',
ttPos: loc.children().length > 10 ? 'top right' : 'bottom right'
}).css('opacity', 0).attr('buildThing', k).appendTo(loc).animate({ opacity: 1 }, 300, 'linear');
}

var max = $SM.num(k, craftable) + 1 > craftable.maximum;
if (max) {
Button.setDisabled(craftable.button, true);
} else {
Button.setDisabled(craftable.button, false);
}
}

for (var g in Room.TradeGoods) {
good = Room.TradeGoods[g];
if (good.button == null) {
good.button = new Button.Button({
id: 'build_' + g,
cost: good.cost(),
text: _(g),
click: Room.buy,
width: '80px',
ttPos: buySection.children().length > 10 ? 'top right' : 'bottom right'
}).css('opacity', 0).attr('buildThing', g).appendTo(buySection).animate({ opacity: 1 }, 300, 'linear');
}

var goodsMax = $SM.num(g, good) + 1 > good.maximum;
if (goodsMax) {
Button.setDisabled(good.button, true);
} else {
Button.setDisabled(good.button, false);
}
}

// set water/health
Path.DEFAULT_BAG_SPACE = 1000;
World.BASE_WATER = 1000;
World.BASE_HEALTH = 1000;
World.setHp(1000);

// add all perks
for (var key in Engine.Perks) {
$SM.addPerk(key);
}

// give 100000 of all stores
for (var i = 0; i < Prestige.storesMap.length; i++) {
State.stores[Prestige.storesMap[i].store] = 100000;

}
for (var key in Room.TradeGoods) {
State.stores[key] = 100000;
}

// open up all section
if(!Outside.tab) {
Outside.init();
}

if(!Path.tab) {
Path.init();
}

if(!Ship.tab) {
Ship.init();
}

// set world map mask to reveal entire map
for(var j = 0; j <= World.RADIUS * 2; j++) {
for(var i = 0; i <= World.RADIUS * 2; i++) {
State.game.world.mask[i][j] = true;
}
}

// remove all cooldowns
$('.button').each(function (i, el) {
$(el).off('click');
$(el).click(function() {
$(this).data("handler")($(this));
})
});

}

};

function eventNullifier(e) {
Expand Down

0 comments on commit 371c657

Please sign in to comment.