Skip to content

Commit

Permalink
Merge pull request #11490 from tobymao/1837-minor-share-on-merge
Browse files Browse the repository at this point in the history
[1837] Remove minor shares on merge and UG train limit
  • Loading branch information
crericha authored Jan 29, 2025
2 parents 6ae5822 + 1fe291d commit c90c43d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/engine/game/g_1837/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ def merge_minor!(minor, corporation, allow_president_change: true)
@log << "#{corporation.name} receives token (#{new_token.used ? new_token.city.hex.id : 'charter'})"
end

close_minor!(minor)
coal_company_exchange ? close_minor!(minor) : close_corporation(minor, quiet: true)
graph.clear_graph_for(corporation)
end

Expand Down Expand Up @@ -693,6 +693,12 @@ def remove_reservations!(entity, coordinates)
coordinates.each { |coord| hex_by_id(coord).tile.remove_reservation!(entity) }
end

def train_limit(entity)
return 2 if ug_minors.include?(entity)

super
end

def must_buy_train?(entity)
%i[major national].include?(entity.type) && super
end
Expand Down

0 comments on commit c90c43d

Please sign in to comment.