Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit156
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
|
||||
|
||||
@@ -27,19 +27,13 @@
|
||||
var/list/speech_buffer
|
||||
|
||||
/datum/tgs_chat_command/poly/Run()
|
||||
GenerateSayList() //Has a check in here, but we're gunna sanity it after
|
||||
if(!speech_buffer)
|
||||
return "**BAWWWWWK!** LEAVE THE HEADSET! ***BAWKKKKK!!***"
|
||||
|
||||
|
||||
/datum/tgs_chat_command/poly/proc/GenerateSayList()
|
||||
LAZYINITLIST(speech_buffer) //I figure this is just safe to do for everything at this point
|
||||
if(length(speech_buffer)) //Let's not look up the whole json EVERY TIME, just the first time.
|
||||
return "[pick(speech_buffer)]"
|
||||
else
|
||||
var/json_file = file("data/npc_saves/Poly.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
return "**BAWWWWWK!** LEAVE THE HEADSET! ***BAWKKKKK!!***"
|
||||
var/list/json = json_decode(file2text(json_file))
|
||||
speech_buffer = json["phrases"]
|
||||
return "[pick(speech_buffer)]"
|
||||
return "[pick(speech_buffer)]"
|
||||
|
||||
+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