Fixes custom roundstart items (#272)

This commit is contained in:
SandPoot
2022-10-28 20:30:36 -03:00
committed by GitHub
parent bc6c63dd3a
commit a21a047c3d
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -489,6 +489,8 @@ SUBSYSTEM_DEF(job)
job.after_spawn(H, M.client, joined_late) // note: this happens before the mob has a key! M will always have a client, H might not.
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)
var/list/tcg_cards
if(ishuman(H))
if(length(H.client?.prefs?.tcg_cards))
@@ -54,7 +54,7 @@
var/obj/item/loaded = loaded_atom
var/obj/item/storage/S = H.get_item_by_slot(ITEM_SLOT_BACK)
if(istype(S))
SEND_SIGNAL(S, COMSIG_TRY_STORAGE_INSERT,loaded, TRUE, H) //Force it into their backpack
SEND_SIGNAL(S, COMSIG_TRY_STORAGE_INSERT, loaded, null, TRUE, TRUE) //Force it into their backpack
continue
if(!H.put_in_hands(loaded)) //They don't have one/somehow that failed, put it in their hands
loaded.forceMove(T) //Guess we're just dumping it on the floor!