summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.js2
-rw-r--r--rules.js1
-rw-r--r--rules.ts1
-rw-r--r--types.d.ts1
4 files changed, 4 insertions, 1 deletions
diff --git a/play.js b/play.js
index a7d8ce7..751170a 100644
--- a/play.js
+++ b/play.js
@@ -496,7 +496,7 @@ function on_update() { // eslint-disable-line no-unused-vars
ui.trash.replaceChildren()
place_cards(ui.trash, view.trash)
- if (view.actions && view.actions.trash)
+ if (view.show_trash)
ui.trash_panel.classList.remove("hide")
else
ui.trash_panel.classList.toggle("hide", trash_toggle)
diff --git a/rules.js b/rules.js
index a3cdfb2..046a003 100644
--- a/rules.js
+++ b/rules.js
@@ -1818,6 +1818,7 @@ states.return_card = {
const faction = get_active_faction();
gen_spend_hero_points();
view.prompt = 'Return a card to your hand.';
+ view.show_trash = true;
let possible = false;
for (let c of game.trash[faction]) {
if (c !== game.played_card) {
diff --git a/rules.ts b/rules.ts
index 17f8a46..2727d4b 100644
--- a/rules.ts
+++ b/rules.ts
@@ -2214,6 +2214,7 @@ states.return_card = {
const faction = get_active_faction();
gen_spend_hero_points();
view.prompt = 'Return a card to your hand.';
+ view.show_trash = true;
let possible = false;
for (let c of game.trash[faction]) {
if (c !== game.played_card) {
diff --git a/types.d.ts b/types.d.ts
index 0b901d5..6740ba8 100644
--- a/types.d.ts
+++ b/types.d.ts
@@ -121,6 +121,7 @@ export interface View {
used_medallions: Game['used_medallions'];
year: number;
fascist?: number;
+ show_trash?: boolean;
}
export type States = {