Commit 38d03eaa authored by Rahix's avatar Rahix 🦀
Browse files

cheats: No more manually adding new cheats in index.ts

Functional programming is simply superior.
parent 032d18b7
......@@ -4,9 +4,9 @@ import "./styles.scss";
(window as any).cheats = {
set_sanity: wasm.cheat_set_sanity,
set_shifts: wasm.cheat_set_shifts,
get_player: wasm.cheat_get_player,
enable: wasm.cheat_enable,
(window as any).cheats = Object.assign(
.filter((f) => f.startsWith("cheat_"))
.map((f) => ({[f.substr(6)]: (wasm as any)[f]}))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment