Fixes issues with raider equipping

Fixes raiders not being able to ever spawn with guns that cannot be equipped to the belt, despite those gun types being in the raider_guns list.
Fixes raiders spawning with guns for which they have no ammo.
Fixes taj/unathi raiders having a 2/3 chance of spawning without any shoes.
This commit is contained in:
mwerezak
2015-07-04 13:48:44 -04:00
parent fad0a712d8
commit c1bbc5c3a6
3 changed files with 95 additions and 14 deletions

View File

@@ -174,16 +174,8 @@
if(M.equip_to_appropriate_slot(newitem))
return newitem
if(istype(M.back,/obj/item/weapon/storage))
var/obj/item/weapon/storage/backpack = M.back
if(backpack.contents.len < backpack.storage_slots)
newitem.loc = M.back
return newitem
if(M.equip_to_storage(newitem))
return newitem
// Try to place it in any item that can store stuff, on the mob.
for(var/obj/item/weapon/storage/S in M.contents)
if (S.contents.len < S.storage_slots)
newitem.loc = S
return newitem
newitem.loc = get_turf(M.loc)
return newitem