From 9d8ce1bbac7b5341943b01bab98b6932e81ce404 Mon Sep 17 00:00:00 2001 From: Chris Rericha Date: Thu, 30 Jan 2025 02:33:03 -0500 Subject: [PATCH] [1837] minor shares are not sellable --- lib/engine/game/g_1837/step/buy_sell_par_shares.rb | 6 ++++++ lib/engine/step/buy_sell_par_shares.rb | 2 ++ 2 files changed, 8 insertions(+) diff --git a/lib/engine/game/g_1837/step/buy_sell_par_shares.rb b/lib/engine/game/g_1837/step/buy_sell_par_shares.rb index 751e482ba3..01b8a3b336 100644 --- a/lib/engine/game/g_1837/step/buy_sell_par_shares.rb +++ b/lib/engine/game/g_1837/step/buy_sell_par_shares.rb @@ -42,6 +42,12 @@ def process_par(action) super @game.set_par(action.corporation, action.share_price, action.slot) end + + def can_sell?(entity, bundle) + return false if bundle.corporation.type == :minor + + super + end end end end diff --git a/lib/engine/step/buy_sell_par_shares.rb b/lib/engine/step/buy_sell_par_shares.rb index 90aea2bb6a..02d459700a 100644 --- a/lib/engine/step/buy_sell_par_shares.rb +++ b/lib/engine/step/buy_sell_par_shares.rb @@ -26,6 +26,8 @@ def actions(entity) actions << 'sell_shares' if can_sell_any?(entity) actions << 'pass' unless actions.empty? + puts entity.name + puts actions.inspect actions end