Merge pull request #13252 from timothyteakettle/loadout-loading

qol: looking at loadout equips your loadout items on you instead of job items
This commit is contained in:
silicons
2020-10-06 16:50:08 -07:00
committed by GitHub
3 changed files with 19 additions and 8 deletions
+9 -3
View File
@@ -665,7 +665,7 @@ SUBSYSTEM_DEF(job)
message_admins(msg)
CRASH(msg)
/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, equipbackpackstuff, bypass_prereqs = FALSE)
/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, equipbackpackstuff, bypass_prereqs = FALSE, can_drop = TRUE)
var/mob/the_mob = N
if(!the_mob)
the_mob = M // cause this doesn't get assigned if player is a latejoiner
@@ -694,9 +694,15 @@ SUBSYSTEM_DEF(job)
var/mob/living/carbon/C = M
var/obj/item/storage/backpack/B = C.back
if(!B || !SEND_SIGNAL(B, COMSIG_TRY_STORAGE_INSERT, I, null, TRUE, TRUE)) // Otherwise, try to put it in the backpack, for carbons.
I.forceMove(get_turf(C))
if(can_drop)
I.forceMove(get_turf(C))
else
qdel(I)
else 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.
if(can_drop)
I.forceMove(get_turf(M)) // If everything fails, just put it on the floor under the mob.
else
qdel(I)
/datum/controller/subsystem/job/proc/FreeRole(rank)
if(!rank)