From bf98e0d4178eeb9184ccd1190e8a796343ffa8ee Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 18 Jul 2017 19:25:10 -0500 Subject: [PATCH] Picking up ores by crossing them no longer spams your chat box --- code/modules/mining/ores_coins.dm | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index 5cdf91ee62..58e6320397 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -23,9 +23,13 @@ ..() /obj/item/weapon/ore/Crossed(atom/movable/AM) + var/show_message = TRUE + for(var/obj/item/weapon/ore/O in loc) + if(O != src) + show_message = FALSE + break var/obj/item/weapon/storage/bag/ore/OB if(istype(loc, /turf/open/floor/plating/asteroid)) - var/turf/open/floor/plating/asteroid/F = loc if(ishuman(AM)) var/mob/living/carbon/human/H = AM for(var/thing in H.get_storage_slots()) @@ -43,13 +47,23 @@ OB = thing break if(OB) - F.attackby(OB, AM) + var/obj/structure/ore_box/box + OB.handle_item_insertion(src, TRUE, AM) // Then, if the user is dragging an ore box, empty the satchel // into the box. var/mob/living/L = AM if(istype(L.pulling, /obj/structure/ore_box)) - var/obj/structure/ore_box/box = L.pulling - box.attackby(OB, AM) + box = L.pulling + for(var/obj/item/weapon/ore/O in OB) + OB.remove_from_storage(src, box) + if(show_message) + playsound(L, "rustle", 50, TRUE) + if(box) + L.visible_message("[L] offloads the ores into [box].", \ + "You offload the ores beneath you into your [box.name].") + else + L.visible_message("[L] scoops up the ores beneath them.", \ + "You scoop up the ores beneath you with your [OB.name].") return ..() /obj/item/weapon/ore/uranium @@ -269,7 +283,7 @@ user.visible_message("[user] strikes \the [src], causing a chain reaction!", "You strike \the [src], causing a chain reaction.") log_game("[key_name(user)] has primed a [name] for detonation at [A][COORD(bombturf)]") det_timer = addtimer(CALLBACK(src, .proc/detonate, notify_admins), det_time, TIMER_STOPPABLE) - + /obj/item/weapon/twohanded/required/gibtonite/proc/detonate(notify_admins) if(primed) switch(quality)