mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
Add donator loadout category and item defines
This commit is contained in:
@@ -4,6 +4,7 @@ var/list/gear_datums = list()
|
||||
/datum/loadout_category
|
||||
var/category = ""
|
||||
var/list/gear = list()
|
||||
var/donor_only = FALSE
|
||||
|
||||
/datum/loadout_category/New(cat)
|
||||
category = cat
|
||||
@@ -33,6 +34,8 @@ var/list/gear_datums = list()
|
||||
if(!loadout_categories[use_category])
|
||||
loadout_categories[use_category] = new /datum/loadout_category(use_category)
|
||||
var/datum/loadout_category/LC = loadout_categories[use_category]
|
||||
if(initial(G.donor_only))
|
||||
LC.donor_only = TRUE
|
||||
gear_datums[use_name] = new geartype
|
||||
LC.gear[use_name] = gear_datums[use_name]
|
||||
|
||||
@@ -54,6 +57,7 @@ var/list/gear_datums = list()
|
||||
var/list/gear_tweaks = list() //List of datums which will alter the item after it has been spawned.
|
||||
var/subtype_path = /datum/gear //for skipping organizational subtypes (optional)
|
||||
var/subtype_cost_overlap = TRUE //if subtypes can take points at the same time
|
||||
var/donor_only = FALSE // if it's only available to donors
|
||||
|
||||
/datum/gear/New()
|
||||
..()
|
||||
@@ -76,4 +80,4 @@ var/list/gear_datums = list()
|
||||
var/item = new gd.path(gd.location)
|
||||
for(var/datum/gear_tweak/gt in gear_tweaks)
|
||||
gt.tweak_item(item, metadata["[gt]"])
|
||||
return item
|
||||
return item
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
/datum/gear/donor
|
||||
donor_only = TRUE
|
||||
sort_category = "Donor"
|
||||
subtype_path = /datum/gear/donor
|
||||
@@ -222,7 +222,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
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)
|
||||
@@ -481,6 +480,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
var/firstcat = 1
|
||||
for(var/category in loadout_categories)
|
||||
var/datum/loadout_category/LC = loadout_categories[category]
|
||||
if(LC.donor_only)
|
||||
if(user.client.donator_level < DONATOR_LEVEL_TWO) // level two donators get the donator loadout, so don't show it to anyone with less than that
|
||||
continue
|
||||
if(firstcat)
|
||||
firstcat = 0
|
||||
else
|
||||
@@ -1106,6 +1109,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if(TG.display_name in gear)
|
||||
gear -= TG.display_name
|
||||
else
|
||||
if(TG.donor_only)
|
||||
if(user.client.donator_level < DONATOR_LEVEL_TWO) // donator items are locked to > tier 2
|
||||
//they normally can't even get this far- but just in case of href exploits, we check them here
|
||||
return
|
||||
var/total_cost = 0
|
||||
var/list/type_blacklist = list()
|
||||
for(var/gear_name in gear)
|
||||
|
||||
Reference in New Issue
Block a user