big upgrades to upgrade system
This commit is contained in:
@@ -19,10 +19,16 @@ function update_charsheet() {
|
||||
}
|
||||
}
|
||||
|
||||
async function purchase_upgrade(tree, upgrade) {
|
||||
var upgrade_data = await fetch(`/upgrades/${tree}/${upgrade}`)
|
||||
.then(res => res.text())
|
||||
console.log(upgrade_data)
|
||||
}
|
||||
|
||||
async function display_tree(tree) {
|
||||
var upgrade_tree = await fetch(`/upgrades/${tree}`)
|
||||
.then(res => res.text())
|
||||
console.log(upgrade_tree)
|
||||
//console.log(upgrade_tree)
|
||||
|
||||
charsheet_elements["blk_tree"].innerHTML = upgrade_tree
|
||||
}
|
||||
|
13
pak/static/js/seagull-cheats.mjs
Normal file
13
pak/static/js/seagull-cheats.mjs
Normal file
@@ -0,0 +1,13 @@
|
||||
export function cheat_resources() {
|
||||
hnd_direction = document.querySelector("#dev-resource-direction");
|
||||
hnd_restype = document.querySelector("#dev-resource-type");
|
||||
hnd_amount = document.querySelector("#dev-resource-amount");
|
||||
|
||||
if (!isEmpty(hnd_amount.value)) {
|
||||
if (hnd_direction == "+") {
|
||||
gamestate[hnd_restype.value] += Number(hnd_amount.value);
|
||||
} else if (hnd_direction == "-") {
|
||||
gamestate[hnd_restype.value] -= Number(hnd_amount.value);
|
||||
}
|
||||
}
|
||||
}
|
@@ -48,6 +48,10 @@ const tickdiffs_reset = {
|
||||
}
|
||||
var tickdiffs = {}
|
||||
|
||||
globalThis.isEmpty = str => !str.trim().length
|
||||
|
||||
import {cheat_resources} from "./seagull-cheats.mjs"
|
||||
|
||||
var bool_log_alt = false
|
||||
globalThis.record_log = function (text) {
|
||||
const div_logrow = document.createElement("div");
|
||||
@@ -300,7 +304,7 @@ async function game_tick() {
|
||||
ticks_since_last_save += 1;
|
||||
page_elements["lbl_tick"].innerHTML = gamestate["tick"];
|
||||
|
||||
if (gamestate["tick"] % 5 == 0) {
|
||||
if (gamestate["tick"] % 5 == 0 && gamestate["colony"] > 1) {
|
||||
var colony_tickdata = await fetch("/tick/colony", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
|
Reference in New Issue
Block a user