Skip to content

Commit

Permalink
add another couple
Browse files Browse the repository at this point in the history
save 10 bytes in config
fix redeems re-enabling on config refresh
  • Loading branch information
Govorunb committed Jun 12, 2024
1 parent 1e58c49 commit 4cc6b25
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
30 changes: 21 additions & 9 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"description": "Beacon name"
}
],
"announce": true,
"image": "https://vedalai.github.io/swarm-control/Erm.png",
"price": 1,
"sku": "bits1"
Expand All @@ -78,6 +77,7 @@
"title": "The message to display"
}
],
"announce": false,
"image": "https://vedalai.github.io/swarm-control/Erm.png",
"price": 1,
"sku": "bits1"
Expand All @@ -95,6 +95,16 @@
"description": "The message to display"
}
],
"announce": false,
"image": "https://vedalai.github.io/swarm-control/Erm.png",
"price": 1,
"sku": "bits1"
},
"redeem_bigerm": {
"id": "redeem_bigerm",
"title": "Big Erm",
"description": "It's time to Get Big",
"args": [],
"image": "https://vedalai.github.io/swarm-control/Erm.png",
"price": 1,
"sku": "bits1"
Expand All @@ -118,7 +128,6 @@
"title": "Range"
}
],
"announce": true,
"image": "https://vedalai.github.io/swarm-control/Erm.png",
"price": 1,
"sku": "bits1"
Expand All @@ -144,7 +153,6 @@
"description": "Spawn the creature behind the player"
}
],
"announce": true,
"image": "https://vedalai.github.io/swarm-control/Erm.png",
"price": 1,
"sku": "bits1"
Expand All @@ -169,7 +177,6 @@
"description": "Spawn the creature behind the player"
}
],
"announce": true,
"image": "https://vedalai.github.io/swarm-control/Erm.png",
"price": 1,
"sku": "bits1"
Expand All @@ -195,7 +202,6 @@
"description": "Spawn the creature behind the player"
}
],
"announce": true,
"image": "https://vedalai.github.io/swarm-control/Erm.png",
"price": 1,
"sku": "bits1"
Expand All @@ -204,7 +210,15 @@
"id": "redeem_o2plants",
"title": "Deplete O2 Plants",
"args": [],
"announce": true,
"image": "https://vedalai.github.io/swarm-control/Erm.png",
"price": 1,
"sku": "bits1"
},
"redeem_flippda": {
"id": "redeem_flippda",
"title": "Flip PDA",
"description": "Oops I forgot how to hold things",
"args": [],
"image": "https://vedalai.github.io/swarm-control/Erm.png",
"price": 1,
"sku": "bits1"
Expand All @@ -213,7 +227,6 @@
"id": "redeem_floodbase",
"title": "Flood Base",
"args": [],
"announce": true,
"image": "https://vedalai.github.io/swarm-control/Erm.png",
"price": 1,
"sku": "bits1"
Expand All @@ -223,10 +236,9 @@
"title": "Hide Vehicle Signals",
"description": "Hides vehicle and base signals for 30 seconds.",
"args": [],
"announce": true,
"image": "https://vedalai.github.io/swarm-control/Erm.png",
"price": 1,
"sku": "bits1"
}
}
}
}
6 changes: 3 additions & 3 deletions ebs/src/modules/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ async function refreshConfig() {
}

app.get("/private/refresh", async (_, res) => {
activeConfig = await fetchConfig();
console.log("Refreshed config, new config version is ", activeConfig.version);
await broadcastConfigRefresh(activeConfig);
await refreshConfig();
console.log("Refreshed config, new config version is ", activeConfig!.version);
await broadcastConfigRefresh(activeConfig!);
res.sendStatus(200);
});

Expand Down
2 changes: 1 addition & 1 deletion ebs/src/modules/game/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class GameConnection {
source: CommandInvocationSource.Swarm,
command: redeem.id,
title: redeem.title,
announce: redeem.announce,
announce: redeem.announce ?? true,
args: cart.args,
user
} as RedeemMessage;
Expand Down

0 comments on commit 4cc6b25

Please sign in to comment.