forked from MarseyWorld/MarseyWorld
add houses to WPD
parent
69c3ee8fb4
commit
104e53c6ae
|
@ -420,7 +420,7 @@ FEATURES = {
|
||||||
'PRONOUNS': False,
|
'PRONOUNS': False,
|
||||||
'BADGES': True,
|
'BADGES': True,
|
||||||
'HATS': True,
|
'HATS': True,
|
||||||
'HOUSES': False,
|
'HOUSES': True,
|
||||||
'GAMBLING': True,
|
'GAMBLING': True,
|
||||||
'USERS_PROFILE_BANNER': True,
|
'USERS_PROFILE_BANNER': True,
|
||||||
'USERS_PROFILE_BODYTEXT': True,
|
'USERS_PROFILE_BODYTEXT': True,
|
||||||
|
@ -436,6 +436,7 @@ FEATURES = {
|
||||||
'PING_GROUPS': True,
|
'PING_GROUPS': True,
|
||||||
'BOTS': True,
|
'BOTS': True,
|
||||||
}
|
}
|
||||||
|
HOUSES = ["Furry","Femboy","Vampire","Racist","Edgy"]
|
||||||
|
|
||||||
WERKZEUG_ERROR_DESCRIPTIONS = {
|
WERKZEUG_ERROR_DESCRIPTIONS = {
|
||||||
400: "The browser (or proxy) sent a request that this server could not understand.",
|
400: "The browser (or proxy) sent a request that this server could not understand.",
|
||||||
|
@ -630,7 +631,6 @@ if SITE in {'rdrama.net', 'staging.rdrama.net'}:
|
||||||
DEFAULT_TIME_FILTER = "day"
|
DEFAULT_TIME_FILTER = "day"
|
||||||
|
|
||||||
FEATURES['PRONOUNS'] = True
|
FEATURES['PRONOUNS'] = True
|
||||||
FEATURES['HOUSES'] = True
|
|
||||||
FEATURES['USERS_PERMANENT_WORD_FILTERS'] = True
|
FEATURES['USERS_PERMANENT_WORD_FILTERS'] = True
|
||||||
|
|
||||||
BUG_THREAD = 18459
|
BUG_THREAD = 18459
|
||||||
|
@ -723,6 +723,7 @@ elif SITE == 'watchpeopledie.tv':
|
||||||
FEATURES['NSFW_MARKING'] = False
|
FEATURES['NSFW_MARKING'] = False
|
||||||
FEATURES['BOTS'] = False
|
FEATURES['BOTS'] = False
|
||||||
FEATURES['HAT_SUBMISSIONS'] = False
|
FEATURES['HAT_SUBMISSIONS'] = False
|
||||||
|
HOUSES = ["Furry","Femboy","Vampire","Edgy"]
|
||||||
|
|
||||||
PERMS['POST_COMMENT_EDITING'] = 3
|
PERMS['POST_COMMENT_EDITING'] = 3
|
||||||
PERMS['MODS_EVERY_HOLE'] = 3
|
PERMS['MODS_EVERY_HOLE'] = 3
|
||||||
|
@ -811,18 +812,14 @@ elif SITE == 'watchpeopledie.tv':
|
||||||
elif SITE == 'devrama.net':
|
elif SITE == 'devrama.net':
|
||||||
AEVANN_ID = 7
|
AEVANN_ID = 7
|
||||||
FEATURES['PRONOUNS'] = True
|
FEATURES['PRONOUNS'] = True
|
||||||
FEATURES['HOUSES'] = True
|
|
||||||
FEATURES['USERS_PERMANENT_WORD_FILTERS'] = True
|
FEATURES['USERS_PERMANENT_WORD_FILTERS'] = True
|
||||||
PERMS["SITE_SETTINGS"] = 4
|
PERMS["SITE_SETTINGS"] = 4
|
||||||
PERMS["ORGIES"] = 4
|
PERMS["ORGIES"] = 4
|
||||||
else: # localhost or testing environment implied
|
else: # localhost or testing environment implied
|
||||||
FEATURES['PRONOUNS'] = True
|
FEATURES['PRONOUNS'] = True
|
||||||
FEATURES['HOUSES'] = True
|
|
||||||
FEATURES['USERS_PERMANENT_WORD_FILTERS'] = True
|
FEATURES['USERS_PERMANENT_WORD_FILTERS'] = True
|
||||||
HOLE_BANNER_LIMIT = 69420
|
HOLE_BANNER_LIMIT = 69420
|
||||||
|
|
||||||
HOUSES = ("None","Furry","Femboy","Vampire","Racist","Edgy") if FEATURES['HOUSES'] else ("None")
|
|
||||||
|
|
||||||
BOT_IDs = {AUTOJANNY_ID, SNAPPY_ID, LONGPOSTBOT_ID, ZOZBOT_ID}
|
BOT_IDs = {AUTOJANNY_ID, SNAPPY_ID, LONGPOSTBOT_ID, ZOZBOT_ID}
|
||||||
|
|
||||||
COLORS = {'ff459a','805ad5','62ca56','38a169','80ffff','2a96f3','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58','8cdbe6', DEFAULT_COLOR}
|
COLORS = {'ff459a','805ad5','62ca56','38a169','80ffff','2a96f3','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58','8cdbe6', DEFAULT_COLOR}
|
||||||
|
|
|
@ -122,18 +122,8 @@ def stats():
|
||||||
}
|
}
|
||||||
|
|
||||||
if FEATURES['HOUSES']:
|
if FEATURES['HOUSES']:
|
||||||
stats2 = {
|
for house in HOUSES:
|
||||||
"House Furry members": "{:,}".format(g.db.query(User).filter(User.house.like('Furry%')).count()),
|
stats[f"House {house} members"] = "{:,}".format(g.db.query(User).filter(User.house.like(f'{house}%')).count())
|
||||||
"House Femboy members": "{:,}".format(g.db.query(User).filter(User.house.like('Femboy%')).count()),
|
stats[f"House {house} total truescore"] = "{:,}".format(g.db.query(func.sum(User.truescore)).filter(User.house.like(f'{house}%')).scalar() or 0)
|
||||||
"House Vampire members": "{:,}".format(g.db.query(User).filter(User.house.like('Vampire%')).count()),
|
|
||||||
"House Racist members": "{:,}".format(g.db.query(User).filter(User.house.like('Racist%')).count()),
|
|
||||||
"House Edgy members": "{:,}".format(g.db.query(User).filter(User.house.like('Edgy%')).count()),
|
|
||||||
"House Furry total truescore": "{:,}".format(g.db.query(func.sum(User.truescore)).filter(User.house.like('Furry%')).scalar() or 0),
|
|
||||||
"House Femboy total truescore": "{:,}".format(g.db.query(func.sum(User.truescore)).filter(User.house.like('Femboy%')).scalar() or 0),
|
|
||||||
"House Vampire total truescore": "{:,}".format(g.db.query(func.sum(User.truescore)).filter(User.house.like('Vampire%')).scalar() or 0),
|
|
||||||
"House Racist total truescore": "{:,}".format(g.db.query(func.sum(User.truescore)).filter(User.house.like('Racist%')).scalar() or 0),
|
|
||||||
"House Edgy total truescore": "{:,}".format(g.db.query(func.sum(User.truescore)).filter(User.house.like('Edgy%')).scalar() or 0),
|
|
||||||
}
|
|
||||||
stats.update(stats2)
|
|
||||||
|
|
||||||
return stats
|
return stats
|
||||||
|
|
|
@ -356,7 +356,7 @@ def settings_personal_post(v):
|
||||||
else: abort(400, f"{theme} is not a valid theme")
|
else: abort(400, f"{theme} is not a valid theme")
|
||||||
|
|
||||||
house = request.values.get("house")
|
house = request.values.get("house")
|
||||||
if not updated and house and house in HOUSES and FEATURES['HOUSES']:
|
if not updated and house and house in ["None"]+HOUSES and FEATURES['HOUSES']:
|
||||||
if v.bite: abort(403)
|
if v.bite: abort(403)
|
||||||
if v.house:
|
if v.house:
|
||||||
if v.house.replace(' Founder', '') == house: abort(409, f"You're already in House {house}")
|
if v.house.replace(' Founder', '') == house: abort(409, f"You're already in House {house}")
|
||||||
|
|
|
@ -101,7 +101,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<select data-cost="{{cost}}" id="changing-house"{% if cost > v.coins + v.marseybux or v.bite %}disabled{% endif %} autocomplete="off" id='house' class="form-control setting_select" form="profile-settings" name="house" data-nonce="{{g.nonce}}">
|
<select data-cost="{{cost}}" id="changing-house"{% if cost > v.coins + v.marseybux or v.bite %}disabled{% endif %} autocomplete="off" id='house' class="form-control setting_select" form="profile-settings" name="house" data-nonce="{{g.nonce}}">
|
||||||
{% for entry in HOUSES %}
|
{% for entry in ["None"]+HOUSES %}
|
||||||
<option value="{{entry}}" {% if v.house.startswith(entry) %}selected{% endif %}>
|
<option value="{{entry}}" {% if v.house.startswith(entry) %}selected{% endif %}>
|
||||||
{{entry}}
|
{{entry}}
|
||||||
</option>
|
</option>
|
||||||
|
|
Loading…
Reference in New Issue