Fixes ore boxes picking up strange rocks

Simple name check fix. Nothing should fill up, as the rock "bounces" out
of the crate. Enjoy.
This commit is contained in:
MASMC
2019-07-06 18:40:42 -04:00
parent 9e5d6f1464
commit d682ecacfa
+6 -4
View File
@@ -12,8 +12,11 @@
/obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/ore))
user.remove_from_mob(W)
src.contents += W
if (W.name != "strange rock")
user.remove_from_mob(W)
src.contents += W
else
to_chat(user,"<span class='notice'>The [W] bounces out of the [src]!</span>")
else if (istype(W, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W
@@ -22,7 +25,7 @@
S.hide_from(usr)
for(var/obj/item/weapon/ore/O in S.contents)
S.remove_from_storage(O, src) //This will move the item to this item's contents
to_chat(user,"<span class='notice'>You empty the satchel into the box.</span>")
to_chat(user,"<span class='notice'>You empty the satchel into the [src].</span>")
update_ore_count()
@@ -33,7 +36,6 @@
stored_ore = list()
for(var/obj/item/weapon/ore/O in contents)
if(stored_ore[O.name])
stored_ore[O.name]++
else