Merge pull request #9074 from Citadel-Station-13/donator_grouping
Donator grouping system
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
var/permitted = TRUE
|
||||
if(G.restricted_roles && G.restricted_roles.len && !(M.mind.assigned_role in G.restricted_roles))
|
||||
permitted = FALSE
|
||||
if(G.ckeywhitelist && G.ckeywhitelist.len && !(the_mob.client.ckey in G.ckeywhitelist))
|
||||
if(G.donoritem && !G.donator_ckey_check(the_mob.client.ckey))
|
||||
permitted = FALSE
|
||||
if(!equipbackpackstuff && G.category == SLOT_IN_BACKPACK)//snowflake check since plopping stuff in the backpack doesnt work for pre-job equip loadout stuffs
|
||||
permitted = FALSE
|
||||
|
||||
+21
-1
@@ -50,12 +50,32 @@ GLOBAL_LIST_EMPTY(loadout_whitelist_ids)
|
||||
var/path //item-to-spawn path
|
||||
var/cost = 1 //normally, each loadout costs a single point.
|
||||
var/geargroupID //defines the ID that the gear inherits from the config
|
||||
|
||||
//NEW DONATOR SYTSEM STUFF
|
||||
var/donoritem //autoset on new if null
|
||||
var/donator_group_id //New donator group ID system.
|
||||
//END
|
||||
|
||||
var/list/restricted_roles
|
||||
|
||||
//Old donator system/snowflake ckey whitelist, used for single ckeys/exceptions
|
||||
var/list/ckeywhitelist
|
||||
//END
|
||||
|
||||
var/restricted_desc
|
||||
|
||||
/datum/gear/New()
|
||||
..()
|
||||
if(isnull(donoritem))
|
||||
if(donator_group_id || ckeywhitelist)
|
||||
donoritem = TRUE
|
||||
if(!description && path)
|
||||
var/obj/O = path
|
||||
description = initial(O.desc)
|
||||
|
||||
//a comprehensive donator check proc is intentionally not implemented due to the fact that we (((might))) have job-whitelists for donator items in the future and I like to stay on the safe side.
|
||||
|
||||
//ckey only check
|
||||
/datum/gear/proc/donator_ckey_check(key)
|
||||
if(ckeywhitelist && ckeywhitelist.Find(key))
|
||||
return TRUE
|
||||
return IS_CKEY_DONATOR_GROUP(key, donator_group_id)
|
||||
Reference in New Issue
Block a user