Commit Graph

46 Commits (ab41db22b77a211e89e2b88a63a342f285d79868)

Author SHA1 Message Date
justcool393 ab41db22b7 [DO NOT MERGE] multiple sub banners (#59)
allows multiple sub banners

Snakes note: By request of Carp, especially for WPD.

Co-authored-by: justcool393 <justcool393@gmail.com>
Co-authored-by: Snakes <duolsm@outlook.com>
Reviewed-on: #59
Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net>
Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>
2022-12-11 23:44:34 +00:00
justcool393 0ff034b01b add typing to a bunch of routes 2022-11-26 15:00:16 -06:00
justcool393 b0ff8916a5
win loss stats to casino games (#475)
* casino: add stats to casino

* casino: stats should target the right thing
casino: properly style

* pluralize properly

* refactor casino leaderboards :marseytroublemarker:

* fsfsdsd

* fsdsdsdsd

* i'm r-slurred

* -
2022-11-22 07:11:01 -08:00
justcool393 272e2ee936
sneed (rename procoins to marseybux) (#472)
* sneed (rename procoins to marseybux)

* literally unusable

Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-21 18:08:29 -05:00
justcool393 f52aec0477 fix betting on 0 2022-11-21 09:13:14 -06:00
justcool393 4d096a5bb6 make roulette cute and valid python syntax 2022-11-21 09:10:41 -06:00
justcool393 9f51259ee6
[DO NOT MERGE] roulette 0 and 00 bets redux (#470)
* backend support for roulette betting on 0 and 00

* casino: roulette: add 0 and 00 frontend

* add spacer

* roulette: fix the thing

* don't payout where needful not to

* sanity check

* roulette: validate requests properly

* roulette actions from API make more sane
2022-11-21 06:44:16 -08:00
justcool393 eba6625b81 casino: procoins -> mbux 2022-11-16 10:14:46 -06:00
justcool393 022a81a4b9 remove unnecessary feature_required flags, moving them to the routes import 2022-11-15 05:37:53 -06:00
justcool393 8f2f48d6d1
[DO NOT MERGE] import detanglation (#442)
* move Base definition to files.classes.__init__.py

* fix ImportError

* move userpage listing to users.py

* don't import the app from classes

* consts: set default values to avoid crashes
consts: warn if the secret key is the default config value

* card view: sneed (user db schema)

* cloudflare: use DEFAULT_CONFIG_VALUE

* const: set default values

* decouple media.py from __main__

* pass database to avoid imports

* import cleanup and import request not in const, but in the requests mega import

* move asset_submissions site check to __init__

* asset submissions feature flag

* flag

* g.is_tor

* don't import request where it's not needed

* i think this is fine

* mail: move to own routes and helper

* wrappers

* required wrappers move

* unfuck wrappers a bit

* move snappy quotes and marseys to stateful consts

* marsify

* :pepodrool:

* fix missing import

* import cache

* ...and settings.py

* and static.py

* static needs cache

* route

* lmao all of the jinja shit was in feeds.py amazing

* classes should only import what they need from flask

* import Response

* hdjbjdhbhjf

* ...

* dfdfdfdf

* make get a non-required import

* isort imports (mostly)

* but actually

* configs

* reload config on import

* fgfgfgfg

* config

* config

* initialize snappy and test

* cookie of doom debug

* edfjnkf

* xikscdfd

* debug config

* set session cookie domain, i think this fixes the can't login bug

* sdfbgnhvfdsghbnjfbdvvfghnn

* hrsfxgf

* dump the entire config on a request

* kyskyskyskyskyskyskyskyskys

* duifhdskfjdfd

* dfdfdfdfdfdfdfdfdfdfdfdf

* dfdfdfdf

* imoprt all of the consts beacuse fuck it

* 😭

* dfdfdfdfdfdfsdasdf

* print the entire session

* rffdfdfjkfksj

* fgbhffh

* not the secret keys

* minor bug fixes

* be helpful in the warning

* gfgfgfg

* move warning lower

* isort main imports (i hope this doesn't fuck something up)

* test

* session cookie domain redux

* dfdfdfd

* try only importing Flask

* formkeys fix

* y

* :pepodrool:

* route helper

* remove before flight

* dfdfdfdfdf

* isort classes

* isort helpers

* move check_for_alts to routehelpers and also sort imports and get rid of unused ones

* that previous commit but actkally

* readd the cache in a dozen places they were implicitly imported

* use g.is_tor instead of request.headers. bla bla bla

* upgrade streamers to their own route file

* get rid of unused imports in __main__

* fgfgf

* don't pull in the entire ORM where we don't need it

* features

* explicit imports for the get helper

* explicit imports for the get helper redux

* testing allroutes

* remove unused import

* decouple flask from classes

* syntax fix also remember these have side fx for some reason (why?)

* move side effects out of the class

* posts

* testing on devrama

* settings

* reloading

* settingssdsdsds

* streamer features

* site settings

* testing settings on devrama

* import

* fix modlog

* remove debug stuff

* revert commit 67275b21ab6e2f2520819e84d10bfc1c746a15b6

* archiveorg to _archiveorg

* skhudkfkjfd

* fix cron for PCM

* fix bugs that snekky wants me to

* Fix call to realbody passing db, standardize kwarg

* test

* import check_for_alts from the right place

* cloudflare

* testing on devrama

* fix cron i think

* shadow properly

* tasks

* Remove print which will surely be annoying in prod.

* v and create new session

* use files.classes

* make errors import little and fix rare 500 in /allow_nsfw

* Revert "use files.classes"

This reverts commit 98c10b876cf86ce058b7fb955cf1ec0bfb9996c6.

* pass v to media functions rather than using g

* fix

* dfdfdfdfd

* cleanup, py type checking is dumb so don't use it where it causes issues

* Fix some merge bugs, add DEFAULT_RATELIMIT to main.

* Fix imports on sqlalchemy expressions.

* `from random import random` is an error.

* Fix replies db param.

* errors: fix missing import

* fix rare 500: only send to GIFT_NOTIF_ID if it exists, and send them the right text

* Fix signup formkey.

* fix 2 500s

* propagate db to submissions

* fix replies

* dfdfdfdf

* Fix verifiedcolor.

* is_manual

* can't use getters outside of an app context

* don't attempt to do gumroad on sites where it's not enabled

* don't attempt to do gumraod on sites's where it's unnecessary

* Revert "don't attempt to do gumroad on sites where it's not enabled"

This reverts commit 6f8a6331878655492dfaf1907b27f8be513c14d3.

* fix 500

* validate media type

Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-15 03:19:08 -06:00
Aevann1 41ab1f313c move feature_required wrappers up 2022-11-14 18:14:47 +02:00
Aevann1 58c4db0399 change casino ratelimit 2022-11-14 08:20:19 +02:00
justcool393 905b070437 twentyone: ratelimits: put a once per 2 seconds ratelimit to patch up race conditions 2022-11-01 00:04:55 -05:00
Aevann1 a18c2e24e9 fix bug in casino slots + change return value 2022-10-30 02:12:32 +02:00
Aevann1 47ac6e12db small grammar change 2022-10-30 01:53:09 +02:00
Aevann1 5719688178 use tabs, not spaces 2022-10-29 01:39:31 +02:00
justcool393 ee85b5577a use error handlers in cases where we can 2022-10-12 08:55:42 -07:00
justcool393 c0acb1722b abort a bunch of stuff where we manually returned JSON 2022-10-11 08:40:19 -07:00
justcool393 456dd43bba replace "if not FEATURES" with wrapper 2022-10-11 00:33:23 -07:00
justcool393 75e593da00 Revert "feature required wrapper"
This reverts commit 8700bcc5ee.
2022-10-10 02:54:47 -07:00
justcool393 8700bcc5ee feature required wrapper 2022-10-09 23:16:05 -07:00
Snakes 7ea61f423d
PCM: disable gambling; extend FEATURES['GAMBLING']. 2022-10-07 20:31:46 -04:00
Snakes 247318d67b
Sanitize /casino/<game> parameter input. 2022-10-03 16:40:33 -04:00
Snakes 11a9efb7cb
Amend f05ec93b: blackjack state implied constraint. 2022-09-29 00:36:58 -04:00
Snakes f05ec93b95
Add gambling wager badge logic.
This commit touches more files than it ought to because this change
required untangling some circular imports, notably a lingering import
of files.helpers.slots in helpers.actions (presumably from old Snappy
gambling logic) and the User.active_blackjack_game accessor. Otherwise,
the logic is fairly straightforward.
2022-09-29 00:26:50 -04:00
outruncolors a0c75ab677
Introduce user payment methods (#355)
* Add pay and charge methods into user class

* Replace casino charges/payments with new user methods

* Also refund wager on winning slots bets

* Unblock casino routes
2022-09-15 17:16:35 -05:00
Aevann1 43aeb6e1f9 sneed 2022-09-15 09:00:02 +00:00
Aevann1 8236514115 sneed 2022-09-15 08:00:03 +00:00
Aevann1 c13a1524fa dramacoin -> coin 2022-09-13 22:46:08 +02:00
outruncolors 7d8cfe5576
Add Roulette (#351)
* Add roulette file

* Rename variable to avoid name collission

* Add basic route and create new template for game

* More work on the roulette template

* Initial connection of front-end roulette to back-end roulette

* Add to cron job

* Pass bets to the front end

* Update front-end looks

* Add stackable poker chips for bets

* Minor last changes

* Handle minimum bets

* Add bet table
2022-09-12 20:07:39 -05:00
Aevann1 4abf75edc0 add error codes 2022-09-12 11:52:07 +02:00
Aevann1 0bc816328c nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger nigger 2022-09-11 04:29:22 +02:00
Aevann1 ea17fa53c9 stop the error spam 2022-09-11 04:27:27 +02:00
Aevann1 20c5ad015b relax ratelimits in casino 2022-09-11 04:05:50 +02:00
Aevann1 cefd68755d stop the print spam 2022-09-11 03:56:47 +02:00
outruncolors d57a569125
[DO NOT MERGE] Casino changes (#350)
* Merge up

* Create composable template for casino games

* Big changerinos

* Only allow double down sometimes

* Add drawing capability

* Make everything pretty

* Add leaderboard

* Update files/routes/casino.py

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>

* Update files/helpers/casino.py

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>

* Update files/helpers/twentyone.py

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>

* Update files/helpers/twentyone.py

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>

* Update files/helpers/twentyone.py

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>

* Add some stuff

* Rehab screen

* Default sets for no games

* Stupid revert

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>
2022-09-10 16:01:34 -05:00
Aevann1 6d0d3c07d0 make new casino respect rehab award 2022-09-10 01:55:13 +02:00
Aevann1 f23912bc5b cosmetic shit 2022-09-08 17:45:10 +02:00
Aevann1 ae0dd18192 fix 500 error 2022-09-05 23:58:46 +02:00
Outrun Colors 3509d6a8b1 Implement a function to fix bad blackjack games 2022-09-05 15:59:42 -05:00
Outrun Colors b1674355c0
Restructure blackjack to only use a single endpoint and better handle "game end" logic 2022-09-05 13:27:00 -05:00
Aevann1 11b391c437 fix blackjack when hitting blackjack 2022-09-05 04:34:30 +02:00
Aevann1 fb4f43d2fb increase gambling ratelimit 2022-09-05 02:01:16 +02:00
Aevann1 0c32d56cd6 casino + style shit 2022-09-05 01:15:37 +02:00
Outrun Colors cfa4231f7d
Fix issue with slots not reducing value / center casino games / update user currency without refresh 2022-09-04 16:17:44 -05:00
outruncolors 5e1d98a3bf
WIP: Add Casino (Do Not Merge) (#341)
* Add new /casino route and template

* Consolidate lottery into casino and add initial template for slots

* Change /lottery route to /casino and replace icon with usd symbol and change sitewide const to reflect change

* Hook up new slots method to casino

* Enable Marseybux spending in casino slots

* Add UI for playing blackjack in casino

* First connection of blackjack UI to backend

* Add protective clause thanks to help from carpathianflorist.

* Create new Casino_Game relation and persist inside of blackjack

* Connect new slots behavior to Casino_Game table

* Create UI action management logic

* Add blackjack game status checker which adds persistence for blackjack

* Gonna handle this better, hold on

* Reorganize blackjack helper methods

* Reorganize casino.js to account for new changes

* Connect up to frontend

* Little changes ya know

* Display a message when winning in Blackjack

* Fix some issues with double down and insure

* Revert "remove owoify-py from requirements"

This reverts commit 4454648ea2.

* A little casino styling change

* Reorganize into a casino block

* Smallenize the card'

* Remove references to old game data on comments

* Add sql migration file

* Remove logic to drop old columns

* Fix two forgotten conflicts
2022-09-04 22:53:34 +02:00