mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Patreon Modifications
- Adds a `donators` table for our patreon supporters.
- Intended to be half-automated, half-manual, in order to correlate
patreon accounts to ckeys. Uses the `active` field so that supporters
don't have to have their ckey associated every time they stop and
restart their donations.
- Current actions:
- Donators at tier 1 or greater get a palm tree next to their name in OOC
(toggleable)
- Donators at tier 1 or greater get +5 loadout points.
- Known issue: Loadout points will not update if the table is
modified during a round where the user has already logged in, due
to preference datum caching. There's not really any good way to fix
this, unfortunately.
This commit is contained in:
@@ -61,7 +61,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
#define MAX_SAVE_SLOTS 20 // Save slots for regular players
|
||||
#define MAX_SAVE_SLOTS_MEMBER 20 // Save slots for BYOND members
|
||||
|
||||
#define MAX_GEAR_COST config.max_loadout_points
|
||||
|
||||
#define TAB_CHAR 0
|
||||
#define TAB_GAME 1
|
||||
@@ -73,6 +72,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used
|
||||
// var/savefile_version = 0
|
||||
var/max_save_slots = MAX_SAVE_SLOTS
|
||||
var/max_gear_slots = 0
|
||||
|
||||
//non-preference stuff
|
||||
var/warns = 0
|
||||
@@ -212,11 +212,18 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
/datum/preferences/New(client/C)
|
||||
b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
|
||||
|
||||
if(istype(C))
|
||||
if(!IsGuestKey(C.key))
|
||||
unlock_content = C.IsByondMember()
|
||||
if(unlock_content)
|
||||
max_save_slots = MAX_SAVE_SLOTS_MEMBER
|
||||
|
||||
max_gear_slots = config.max_loadout_points
|
||||
if(C.donator_level >= DONATOR_LEVEL_ONE)
|
||||
max_gear_slots += 5
|
||||
log_to_dd("Added 5 gear slots to [C.ckey], now [max_gear_slots]")
|
||||
|
||||
var/loaded_preferences_successfully = load_preferences(C)
|
||||
if(loaded_preferences_successfully)
|
||||
if(load_character(C))
|
||||
@@ -428,6 +435,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += "<b>OOC notes:</b> <a href='?_src_=prefs;preference=metadata;task=input'><b>Edit</b></a><br>"
|
||||
if(unlock_content)
|
||||
dat += "<b>BYOND Membership Publicity:</b> <a href='?_src_=prefs;preference=publicity'><b>[(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]</b></a><br>"
|
||||
if(user.client.donator_level >= DONATOR_LEVEL_ONE)
|
||||
dat += "<b>Donator Publicity:</b> <a href='?_src_=prefs;preference=donor_public'><b>[(toggles & DONATOR_PUBLIC) ? "Public" : "Hidden"]</b></a><br>"
|
||||
|
||||
dat += "<b>Randomized character slot:</b> <a href='?_src_=prefs;preference=randomslot'><b>[randomslot ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Ghost ears:</b> <a href='?_src_=prefs;preference=ghost_ears'><b>[(toggles & CHAT_GHOSTEARS) ? "Nearest Creatures" : "All Speech"]</b></a><br>"
|
||||
@@ -464,10 +473,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
total_cost += G.cost
|
||||
|
||||
var/fcolor = "#3366CC"
|
||||
if(total_cost < MAX_GEAR_COST)
|
||||
if(total_cost < max_gear_slots)
|
||||
fcolor = "#E67300"
|
||||
dat += "<table align='center' width='100%'>"
|
||||
dat += "<tr><td colspan=4><center><b><font color='[fcolor]'>[total_cost]/[MAX_GEAR_COST]</font> loadout points spent.</b> \[<a href='?_src_=prefs;preference=gear;clear_loadout=1'>Clear Loadout</a>\]</center></td></tr>"
|
||||
dat += "<tr><td colspan=4><center><b><font color='[fcolor]'>[total_cost]/[max_gear_slots]</font> loadout points spent.</b> \[<a href='?_src_=prefs;preference=gear;clear_loadout=1'>Clear Loadout</a>\]</center></td></tr>"
|
||||
dat += "<tr><td colspan=4><center><b>"
|
||||
|
||||
var/firstcat = 1
|
||||
@@ -1108,7 +1117,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
type_blacklist += G.subtype_path
|
||||
total_cost += G.cost
|
||||
|
||||
if((total_cost + TG.cost) <= MAX_GEAR_COST)
|
||||
if((total_cost + TG.cost) <= max_gear_slots)
|
||||
gear += TG.display_name
|
||||
|
||||
else if(href_list["gear"] && href_list["tweak"])
|
||||
@@ -1875,6 +1884,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if(unlock_content)
|
||||
toggles ^= MEMBER_PUBLIC
|
||||
|
||||
if("donor_public")
|
||||
if(user.client.donator_level >= DONATOR_LEVEL_ONE)
|
||||
toggles ^= DONATOR_PUBLIC
|
||||
|
||||
if("gender")
|
||||
if(gender == MALE)
|
||||
gender = FEMALE
|
||||
|
||||
Reference in New Issue
Block a user