migrates donor items to loadout system, comments out handle_roundstart_items, plus fixes

This commit is contained in:
deathride58
2018-01-17 17:19:54 -05:00
parent b74518a24a
commit 5fd8606a3f
6 changed files with 176 additions and 20 deletions
+1 -1
View File
@@ -418,7 +418,7 @@ SUBSYSTEM_DEF(job)
job.after_spawn(H, M)
equip_loadout(N, H, TRUE)//CIT CHANGE - makes players spawn with in-backpack loadout items properly. A little hacky but it works
handle_roundstart_items(H, M.ckey, H.mind.assigned_role, H.mind.special_role) //CIT CHANGE - makes donators spawn with their items. This can safely be commented out when all of the donator items are migrated to the loadout system
//handle_roundstart_items(H, M.ckey, H.mind.assigned_role, H.mind.special_role) //CIT CHANGE - makes donators spawn with their items. This can safely be commented out when all of the donator items are migrated to the loadout system
return H
@@ -11,17 +11,17 @@
if(!G)
continue
var/permitted = TRUE
if(G.restricted_roles && G.restricted_roles.len && !(M.job in G.restricted_roles))
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))
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
if(equipbackpackstuff && G.category != slot_in_backpack)//snowflake check since plopping stuff in the backpack doesnt work for pre-job equip loadout stuffs
if(equipbackpackstuff && G.category != slot_in_backpack)//ditto
permitted = FALSE
if(!permitted)
continue
var/obj/item/I = new G.path
if(!M.equip_to_slot_if_possible(I, G.category, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // If the job's dresscode compliant, try to put it in its slot, first
if(!M.equip_to_slot_if_possible(I, slot_in_backpack, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // Otherwise, try to put it in the backpack
I.forceMove(get_turf(M)) // If everything fails, just put it on the floor under the mob.
I.forceMove(get_turf(the_mob)) // If everything fails, just put it on the floor under the mob.
@@ -0,0 +1,169 @@
//This is the file that handles donator loadout items.
/datum/gear/pingcoderfailsafe
name = "IF YOU SEE THIS, PING A CODER RIGHT NOW!"
category = slot_in_backpack
path = /obj/item/bikehorn/golden
ckeywhitelist = list("This entry should never appear with this variable set.") //If it does, then that means somebody fucked up the whitelist system pretty hard
/datum/gear/donortestingbikehorn
name = "Donor item testing bikehorn"
category = slot_in_backpack
path = /obj/item/bikehorn
ckeywhitelist = list("jayehh","deathride58")
/datum/gear/kevhorn
name = "Airhorn"
category = slot_in_backpack
path = /obj/item/bikehorn/airhorn
ckeywhitelist = list("kevinz000")
/datum/gear/cebusoap
name = "Cebutris' soap"
category = slot_in_backpack
path = /obj/item/custom/ceb_soap
ckeywhitelist = list("cebutris")
/datum/gear/kiaracloak
name = "Kiara's cloak"
category = slot_neck
path = /obj/item/clothing/neck/cloak/inferno
ckeywhitelist = list("inferno707")
/datum/gear/kiaracollar
name = "Kiara's collar"
category = slot_neck
path = /obj/item/clothing/neck/petcollar/inferno
ckeywhitelist = list("inferno707")
/datum/gear/kiaramedal
name = "Insignia of Steele"
category = slot_in_backpack
path = /obj/item/clothing/accessory/medal/steele
ckeywhitelist = list("inferno707")
/datum/gear/sexymimemask
name = "The hollow heart"
category = slot_wear_mask
path = /obj/item/clothing/mask/sexymime
ckeywhitelist = list("inferno707")
/datum/gear/engravedzippo
name = "Engraved zippo"
category = slot_hands
path = /obj/item/lighter/gold
ckeywhitelist = list("dirtyoldharry")
/datum/gear/geisha
name = "Geisha suit"
category = slot_w_uniform
path = /obj/item/clothing/under/geisha
ckeywhitelist = list("atiefling")
/datum/gear/specialscarf
name = "Special scarf"
category = slot_neck
path = /obj/item/clothing/neck/scarf/zomb
ckeywhitelist = list("zombierobin")
/datum/gear/redmadcoat
name = "The Mad's labcoat"
category = slot_wear_suit
path = /obj/item/clothing/suit/toggle/labcoat/mad/red
ckeywhitelist = list("zombierobin")
/datum/gear/santahat
name = "Santa hat"
category = slot_head
path = /obj/item/clothing/head/santa/fluff
ckeywhitelist = list("illotafv")
/datum/gear/reindeerhat
name = "Reindeer hat"
category = slot_head
path = /obj/item/clothing/head/hardhat/reindeer/fluff
ckeywhitelist = list("illotafv")
/datum/gear/treeplushie
name = "Christmas tree plushie"
category = slot_in_backpack
path = /obj/item/toy/plush/tree
ckeywhitelist = list("illotafv")
/datum/gear/santaoutfit
name = "Santa costume"
category = slot_wear_suit
path = /obj/item/clothing/suit/space/santa/fluff
ckeywhitelist = list("illotafv")
/datum/gear/treecloak
name = "Christmas tree cloak"
category = slot_neck
path = /obj/item/clothing/neck/cloak/festive
ckeywhitelist = list("illotafv")
/datum/gear/carrotplush
name = "Carrot plushie"
category = slot_in_backpack
path = /obj/item/toy/plush/carrot
ckeywhitelist = list("improvedname")
/datum/gear/carrotcloak
name = "Carrot cloak"
category = slot_neck
path = /obj/item/clothing/neck/cloak/carrot
ckeywhitelist = list("improvedname")
/datum/gear/albortorosamask
name = "Alborto Rosa mask"
category = slot_wear_mask
path = /obj/item/clothing/mask/luchador/zigfie
ckeywhitelist = list("zigfie")
/datum/gear/mankini
name = "Mankini"
category = slot_w_uniform
path = /obj/item/clothing/under/mankini
ckeywhitelist = list("zigfie")
/datum/gear/pinkshoes
name = "Pink shoes"
category = slot_shoes
path = /obj/item/clothing/shoes/sneakers/pink
ckeywhitelist = list("zigfie")
/datum/gear/reecesgreatcoat
name = "Reece's Great Coat"
category = slot_wear_suit
path = /obj/item/clothing/suit/trenchcoat/green
ckeywhitelist = list("geemiesif")
/datum/gear/russianflask
name = "Russian flask"
category = slot_in_backpack
path = /obj/item/reagent_containers/food/drinks/flask/russian
ckeywhitelist = list("slomka")
/datum/gear/stalkermask
name = "S.T.A.L.K.E.R. mask"
category = slot_wear_mask
path = /obj/item/clothing/mask/gas/stalker
ckeywhitelist = list("slomka")
/datum/gear/stripedcollar
name = "Striped collar"
category = slot_neck
path = /obj/item/clothing/neck/petcollar/stripe
ckeywhitelist = list("jademanique")
/datum/gear/performersoutfit
name = "Bluish performer's outfit"
category = slot_w_uniform
path = /obj/item/clothing/under/singery/custom
ckeywhitelist = list("killer402402")
/datum/gear/vermillion
name = "Vermillion clothing"
category = slot_w_uniform
path = /obj/item/clothing/suit/vermillion
ckeywhitelist = list("fractious")
@@ -1,13 +0,0 @@
//This is the file that handles donator loadout items.
/datum/gear/aaapingcoderfailsafe
name = "IF YOU SEE THIS, PING A CODER RIGHT NOW!"
category = slot_in_backpack
path = /obj/item/bikehorn/golden
ckeywhitelist = list("This entry should never appear with this variable set. If it does, then that means somebody fucked up the whitelist system hardcore")
/datum/gear/donortestingbikehorn
name = "Only coders should see this"
category = slot_in_backpack
path = /obj/item/bikehorn
ckeywhitelist = list("deathride58")
@@ -1,6 +1,6 @@
#define DEFAULT_SLOT_AMT 1
#define DEFAULT_SLOT_AMT 2
#define HANDS_SLOT_AMT 2
#define BACKPACK_SLOT_AMT 3
#define BACKPACK_SLOT_AMT 4
/datum/preferences
var/gear_points = 10
+1 -1
View File
@@ -2499,8 +2499,8 @@
#include "modular_citadel\code\game\objects\items\melee\eutactic_blades.dm"
#include "modular_citadel\code\modules\client\preferences.dm"
#include "modular_citadel\code\modules\client\preferences_savefile.dm"
#include "modular_citadel\code\modules\client\loadout\_donator.dm"
#include "modular_citadel\code\modules\client\loadout\backpack.dm"
#include "modular_citadel\code\modules\client\loadout\donator.dm"
#include "modular_citadel\code\modules\client\loadout\glasses.dm"
#include "modular_citadel\code\modules\client\loadout\hands.dm"
#include "modular_citadel\code\modules\client\loadout\head.dm"