forked from MarseyWorld/MarseyWorld
dramacoin -> coin
parent
80fbc8d5a2
commit
c13a1524fa
|
@ -14,7 +14,7 @@ def get_game_feed(game):
|
|||
def format_game(game):
|
||||
user = g.db.query(User).filter(User.id == game.user_id).one()
|
||||
wonlost = 'lost' if game.winnings < 0 else 'won'
|
||||
relevant_currency = "dramacoin" if game.currency == "coins" else "marseybux"
|
||||
relevant_currency = "coin" if game.currency == "coins" else "marseybux"
|
||||
|
||||
return {
|
||||
"user": user.username,
|
||||
|
|
|
@ -78,9 +78,9 @@ def pull_slots(v):
|
|||
try:
|
||||
currency = request.values.get("currency")
|
||||
except:
|
||||
return {"error": "Invalid currency (expected 'dramacoin' or 'marseybux')."}, 400
|
||||
return {"error": "Invalid currency (expected 'coin' or 'marseybux')."}, 400
|
||||
|
||||
if (currency == "dramacoin" and wager > v.coins) or (currency == "marseybux" and wager > v.procoins):
|
||||
if (currency == "coin" and wager > v.coins) or (currency == "marseybux" and wager > v.procoins):
|
||||
return {"error": f"Not enough {currency} to make that bet."}, 400
|
||||
|
||||
success, game_state = casino_slot_pull(v, wager, currency)
|
||||
|
|
|
@ -380,10 +380,10 @@
|
|||
</div>
|
||||
<div class="btn-group" role="group" aria-label="Select a currency.">
|
||||
<input type="radio" class="btn-check" name="wagerCurrency" autocomplete="off" id="wagerCoins"
|
||||
value="dramacoin" checked />
|
||||
value="coin" checked />
|
||||
<label for="wagerCoins" class="btn btn-primary">
|
||||
<img src="/i/rDrama/coins.webp?v=3009" alt="coin" width="32" data-bs-toggle="tooltip"
|
||||
data-bs-placement="bottom" title="Dramacoin" aria-label="Dramacoin" />
|
||||
data-bs-placement="bottom" title="Coin" aria-label="Coin" />
|
||||
</label>
|
||||
<input type="radio" class="btn-check ml-2" name="wagerCurrency" autocomplete="off" id="wagerProcoins"
|
||||
value="marseybux" />
|
||||
|
|
|
@ -223,7 +223,7 @@
|
|||
const betArea = document.getElementById("roulette-bets");
|
||||
const flatBets = formatFlatBets(bets);
|
||||
const normalizedBets = formatNormalizedBets(bets);
|
||||
const dramacoinImgHtml = `
|
||||
const coinImgHtml = `
|
||||
<img
|
||||
src="/i/rDrama/coins.webp?v=3009"
|
||||
alt="coin"
|
||||
|
@ -231,8 +231,8 @@
|
|||
data-bs-toggle="tooltip"
|
||||
data-bs-placement="bottom"
|
||||
title=""
|
||||
aria-label="Dramacoin"
|
||||
data-bs-original-title="Dramacoin" />
|
||||
aria-label="Coin"
|
||||
data-bs-original-title="Coin" />
|
||||
`;
|
||||
const marseybuxImgHtml = `
|
||||
<img
|
||||
|
@ -245,23 +245,23 @@
|
|||
width="32" class="mr-1 ml-1"
|
||||
data-bs-original-title="Marseybux" />
|
||||
`;
|
||||
const { participants, dramacoin, marseybux } = flatBets.reduce((prev, next) => {
|
||||
const { participants, coin, marseybux } = flatBets.reduce((prev, next) => {
|
||||
if (!prev.participants.includes(next.gambler_username)) {
|
||||
prev.participants.push(next.gambler_username);
|
||||
}
|
||||
|
||||
if (next.wager.currency == 'coins') {
|
||||
prev.dramacoin += next.wager.amount;
|
||||
prev.coin += next.wager.amount;
|
||||
} else {
|
||||
prev.marseybux += next.wager.amount;
|
||||
}
|
||||
|
||||
return prev;
|
||||
}, { participants: [], dramacoin: 0, marseybux: 0 });
|
||||
const dramacoinText = `${dramacoin} ${dramacoinImgHtml}`;
|
||||
}, { participants: [], coin: 0, marseybux: 0 });
|
||||
const coinText = `${coin} ${coinImgHtml}`;
|
||||
const marseybuxText = `${marseybux} ${marseybuxImgHtml}`;
|
||||
const playerText = participants.length > 1 ? `${participants.length} players are` : `1 player is`;
|
||||
const totalText = dramacoin && marseybux ? `${dramacoinText} and ${marseybuxText}` : dramacoin ? dramacoinText : marseybuxText;
|
||||
const totalText = coin && marseybux ? `${coinText} and ${marseybuxText}` : coin ? coinText : marseybuxText;
|
||||
const fullTotalText = participants.length === 0 ? "No one has placed a bet" : `${playerText} betting a total of ${totalText}`;
|
||||
|
||||
let betHtml = `
|
||||
|
@ -276,7 +276,7 @@
|
|||
// Heading
|
||||
betHtml += ` <div class="roulette-bet-summary--heading">`;
|
||||
betHtml += buildPokerChip(avatar);
|
||||
const coinText = wagerTotal.coins > 0 ? `${wagerTotal.coins} ${dramacoinImgHtml}` : "";
|
||||
const coinText = wagerTotal.coins > 0 ? `${wagerTotal.coins} ${coinImgHtml}` : "";
|
||||
const procoinText = wagerTotal.procoins > 0 ? `${wagerTotal.procoins} ${marseybuxImgHtml}` : "";
|
||||
const bettingText = coinText && procoinText ? `${coinText} and ${procoinText}` : coinText || procoinText;
|
||||
betHtml += `<p>${name} is betting ${bettingText}:</p>`;
|
||||
|
@ -285,7 +285,7 @@
|
|||
// Individual bets
|
||||
betHtml += `<ul class="roulette-bet-summary--list">`;
|
||||
for (const individualBet of wagers) {
|
||||
const coinText = individualBet.amounts.coins > 0 ? `${individualBet.amounts.coins} ${dramacoinImgHtml}` : "";
|
||||
const coinText = individualBet.amounts.coins > 0 ? `${individualBet.amounts.coins} ${coinImgHtml}` : "";
|
||||
const procoinText = individualBet.amounts.procoins > 0 ? `${individualBet.amounts.procoins} ${marseybuxImgHtml}` : "";
|
||||
const details = {
|
||||
STRAIGHT_UP_BET: `that the number will be ${individualBet.which}`,
|
||||
|
@ -499,10 +499,10 @@ Bets
|
|||
</div>
|
||||
<ul class="roulette-bet-summary--list">
|
||||
<li>2 <img src="/i/rDrama/coins.webp?v=3009" alt="coin" width="32" data-bs-toggle="tooltip"
|
||||
data-bs-placement="bottom" title="" aria-label="Dramacoin" data-bs-original-title="Dramacoin"> that
|
||||
data-bs-placement="bottom" title="" aria-label="Coin" data-bs-original-title="Coin"> that
|
||||
the number will be black.</li>
|
||||
<li>2 <img src="/i/rDrama/coins.webp?v=3009" alt="coin" width="32" data-bs-toggle="tooltip"
|
||||
data-bs-placement="bottom" title="" aria-label="Dramacoin" data-bs-original-title="Dramacoin"> that
|
||||
data-bs-placement="bottom" title="" aria-label="Coin" data-bs-original-title="Coin"> that
|
||||
the number will be even.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
14
schema.sql
14
schema.sql
|
@ -2642,10 +2642,10 @@ COPY public.badge_defs (id, name, description, created_utc) FROM stdin;
|
|||
22 Renthog Contributed at least $10 \N
|
||||
23 Landchad Contributed at least $20 \N
|
||||
24 Terminally online turboautist Contributed at least $50 \N
|
||||
157 A Minor Setback Lost a 1,000 dramacoin bet. Keep going! \N
|
||||
158 Just One More Hand Lost a 10,000 dramacoin bet. But it's fine, you're due for a big win! \N
|
||||
160 Lil Goombler Won a 1,000 dramacoin bet. Nice job! \N
|
||||
162 King Goombler Won a 100,000 dramacoin bet. Wipe your sweaty palms off and bet it all again, you're on a roll! \N
|
||||
157 A Minor Setback Lost a 1,000 coin bet. Keep going! \N
|
||||
158 Just One More Hand Lost a 10,000 coin bet. But it's fine, you're due for a big win! \N
|
||||
160 Lil Goombler Won a 1,000 coin bet. Nice job! \N
|
||||
162 King Goombler Won a 100,000 coin bet. Wipe your sweaty palms off and bet it all again, you're on a roll! \N
|
||||
163 Marsey Jacobs Designed 10 hats! \N
|
||||
166 Giorgio Armarsey Designed 250 hats 😲 \N
|
||||
164 Marsey de Givenchy Designed 50 hats, holy cap. \N
|
||||
|
@ -2731,8 +2731,8 @@ COPY public.badge_defs (id, name, description, created_utc) FROM stdin;
|
|||
117 Stone Skeptic This user rejects igneous lies \N
|
||||
129 Misinformation Superspreader This poster was fact checked by real American patriots \N
|
||||
130 Columbine Enthusiast (TEMPORAL FLUX EDITION) This user is an acclaimed Reb+VoDKa slash author \N
|
||||
159 It's Over Lost a 100,000 dramacoin bet. It's fucking over. \N
|
||||
161 Pro Goombler Won a 10,000 dramacoin bet. Some would say to quit while you're ahead, but they didn't just win 10k - keep at it! \N
|
||||
159 It's Over Lost a 100,000 coin bet. It's fucking over. \N
|
||||
161 Pro Goombler Won a 10,000 coin bet. Some would say to quit while you're ahead, but they didn't just win 10k - keep at it! \N
|
||||
165 Marsey Chanel Designed 100 hats!!! \N
|
||||
28 Chud Marked as a chud \N
|
||||
171 Rainbowed This user has super cute text \N
|
||||
|
@ -4363,7 +4363,7 @@ marseygrilling2 5526 bbq boomer barbecue barbeque 435 \N \N
|
|||
marseypennyboo 3161 mrpennycoomstokids black nigger kween shaniqua thot whore female woman bleeder birthing person kfc baptist tradwife dress christian foid 44 \N \N
|
||||
marseycolombo 1817 cop detective tv smart colombo classic investigator 18 \N \N
|
||||
marseylongsurfing 6289 surf surfing water ocean long surfboard 22 \N \N
|
||||
marseycoin 5526 dramacoin money dc spinning rich payment gold dinero animated dollars 639 \N \N
|
||||
marseycoin 5526 coin money dc spinning rich payment gold dinero animated dollars 639 \N \N
|
||||
marseyglam 8979 rocker pretty glamorous beautiful 120 \N \N
|
||||
marseytrogdor 5244 burninator strongbad internet meme dragon marsdor 38 \N \N
|
||||
marseytom 7813 thatfuckingmarsey fucking marsey tom and jerry tomjerry cartoon hanna barbera vintage smug 272 \N \N
|
||||
|
|
Loading…
Reference in New Issue