Merge pull request #11497 from Kyep/loadout_point_fix

Fixes $5+ donors not getting extra loadout points
This commit is contained in:
Crazy Lemon
2019-05-08 23:55:53 -07:00
committed by GitHub
2 changed files with 7 additions and 3 deletions
+7 -1
View File
@@ -74,7 +74,7 @@
//Admin PM
if(href_list["priv_msg"])
var/client/C = locate(href_list["priv_msg"])
if(!C) // Might be a stealthmin ID, so pass it in straight
C = href_list["priv_msg"]
else if(C.UID() != href_list["priv_msg"])
@@ -432,6 +432,7 @@
if(check_rights(R_ADMIN, 0, mob)) // Yes, the mob is required, regardless of other examples in this file, it won't work otherwise
donator_level = DONATOR_LEVEL_MAX
donor_loadout_points()
return
//Donator stuff.
@@ -443,8 +444,13 @@
donator_level = 0
return
donator_level = text2num(query_donor_select.item[2])
donor_loadout_points()
break
/client/proc/donor_loadout_points()
if(donator_level > 0 && prefs)
prefs.max_gear_slots = config.max_loadout_points + 5
/client/proc/log_client_to_db(connectiontopic)
if(IsGuestKey(key))
return
@@ -211,8 +211,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
unlock_content = C.IsByondMember()
if(unlock_content)
max_save_slots = MAX_SAVE_SLOTS_MEMBER
if(C.donator_level > 0)
max_gear_slots += 5
loaded_preferences_successfully = load_preferences(C) // Do not call this with no client/C, it generates a runtime / SQL error
if(loaded_preferences_successfully)