branchrust_reboot/main/Caboosecancel
114 Commits over 61 Days - 0.08cph!
Another formatting edit, getting things to fit better on the widget
Play widget can now show all possible separate bets per player - base, split, and insurance. Fixed a winnings payout bug.
Fix split result showing as Loss instead of None when not used
Show winnings as a value minus the amount paid in
If the player already has a 100% optimal result, end their turn. There's no point asking if they're like to hit on 21
Adjust how the results text displays scrap won
Fixed player widget card layout issue
Split result text for the main UI
Small monitors can now display results for two hands at once (splits)
Fix compile for now, just need to sort out the round result text
Adding support for multiple results per player WIP. Who would have thought a card game would exist where each player can have more than one result per round? Yet here we are.
A couple of visual UI fixes
Better layout for the player widget UI cards when player has split
Fix playingSplitCards not clearing per round
Show both scores if the player has split
Split cards use the small card images in the 2D UI. Small screen UI now shows basic info about having a split.
Refactor, creating CardPlayerDataBlackjack as a separate subclass of CardPlayerData, with a separate ProtoBuf message as well. Allows for more Blackjack-specific per-player content. This is mainly to support Split well, but helps Insurance as well.
Originally I tried to do this in a bit of a nicer way with generics, casting PlayerData in CardGameController to the player data type of the subclass. But generics and MonoBehaviours really don't mix well. In the end there's just a bit of casting instead.
Improve how we pay out scrap after a server save/load, so that nothing gets lots (not even in-progress bets). This still isn't ideal since when we need to drop scrap, it falls through the train due to the items-fall-through-vehicles problem. I'll look for a better solution if there's time.
If the caboose is destroyed, try to pay all scrap that's in as bets or in player storage out to the players, based on the amounts they've each put in. If for whatever reason this can't be done, drop it on the ground.
Give the caboose 20% more health
Player can double down on any two cards if neither is an ace (some rules only allow DD on a card value of 9-11). They double their bet and receive one extra face up card. The bet is then dealt with normally (some rules say that if the dealer has Blackjack, the dealer only collects the amount of the original bet).
Can't double down if card count is not == 2
Added killcars, killminis, killscraphelis, killtrains, and killboats convars. Works the same as killanimals but more humane.
Fixed the card game UI freaking out (infinite NREs) if the caboose is destroyed while players are using blackjack/poker
Fixed caboose lights not working anymore
Fixed more non-dynamic culling/lod scripts on caboose
Got all the caboose colliders onto the Vehicle Detailed layer
Fixed init order when spawning caboose causing trouble with poker and blackjack. Fixed other RendererLOD scripts on the caboose that weren't Dynamic.
Fixed poker table not showing up in spawned caboose
Fixed light switches not showing in spawn caboose
Disable Blackjack Halloween mode for now
Small-screen UI now has info for insurance and split bets
Use & instead of / for bet UI
Add Insurance back as a Blackjack option
Fixed a rare animation issue (not Blackjack specific) with players getting stuck in a sitting state when their mounted pose is the standing pose, causing them to appear as sitting. The standing idle loop now plays as well.
Fixed timer not always showing up for a player's turn, with simultaneous turns