diff --git a/code/game/machinery/botlaunchpad.dm b/code/game/machinery/botlaunchpad.dm index f1c85a293c7..f77e11151e0 100644 --- a/code/game/machinery/botlaunchpad.dm +++ b/code/game/machinery/botlaunchpad.dm @@ -27,7 +27,7 @@ return var/obj/item/multitool/multitool = tool multitool.set_buffer(src) - to_chat(user, span_notice("You save the data in the [multitool.name]'s buffer.")) + balloon_alert(user, "saved to multitool buffer") return TOOL_ACT_TOOLTYPE_SUCCESS diff --git a/code/game/machinery/launch_pad.dm b/code/game/machinery/launch_pad.dm index f3f463bcae7..5400cccf2f2 100644 --- a/code/game/machinery/launch_pad.dm +++ b/code/game/machinery/launch_pad.dm @@ -78,7 +78,7 @@ return var/obj/item/multitool/M = I M.set_buffer(src) - to_chat(user, span_notice("You save the data in the [I.name]'s buffer.")) + balloon_alert(user, "saved to multitool buffer") return 1 if(default_deconstruction_crowbar(I)) diff --git a/code/game/machinery/mechlaunchpad.dm b/code/game/machinery/mechlaunchpad.dm index 54cda76f989..254467fc217 100644 --- a/code/game/machinery/mechlaunchpad.dm +++ b/code/game/machinery/mechlaunchpad.dm @@ -37,7 +37,7 @@ return var/obj/item/multitool/multitool = tool multitool.set_buffer(src) - to_chat(user, span_notice("You save the data in the [multitool.name]'s buffer.")) + balloon_alert(user, "saved to multitool buffer") return TRUE /obj/machinery/mechpad/wirecutter_act(mob/living/user, obj/item/tool) diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 9fae5086989..701d6222369 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -351,7 +351,7 @@ DEFINE_BITFIELD(turret_flags, list( return var/obj/item/multitool/M = I M.set_buffer(src) - to_chat(user, span_notice("You add [src] to multitool buffer.")) + balloon_alert(user, "saved to multitool buffer") else return ..() diff --git a/code/game/machinery/porta_turret/portable_turret_cover.dm b/code/game/machinery/porta_turret/portable_turret_cover.dm index 89f41386691..86b1df20e7f 100644 --- a/code/game/machinery/porta_turret/portable_turret_cover.dm +++ b/code/game/machinery/porta_turret/portable_turret_cover.dm @@ -66,7 +66,7 @@ return var/obj/item/multitool/M = I M.set_buffer(parent_turret) - to_chat(user, span_notice("You add [parent_turret] to multitool buffer.")) + balloon_alert(user, "saved to multitool buffer") return return ..() diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm index 799a37a9395..53730ffd579 100644 --- a/code/game/machinery/quantum_pad.dm +++ b/code/game/machinery/quantum_pad.dm @@ -63,6 +63,7 @@ return var/obj/item/multitool/M = I M.set_buffer(src) + balloon_alert(user, "saved to multitool buffer") to_chat(user, span_notice("You save the data in [I]'s buffer. It can now be saved to pads with closed panels.")) return TRUE else if(I.tool_behaviour == TOOL_MULTITOOL) @@ -71,14 +72,14 @@ var/obj/item/multitool/M = I if(istype(M.buffer, /obj/machinery/quantumpad)) if(M.buffer == src) - to_chat(user, span_warning("You cannot link a pad to itself!")) + balloon_alert(user, "cannot link to self!") return TRUE else linked_pad = M.buffer - to_chat(user, span_notice("You link [src] to the one in [I]'s buffer.")) + balloon_alert(user, "data uploaded from buffer") return TRUE else - to_chat(user, span_warning("There is no quantum pad data saved in [I]'s buffer!")) + balloon_alert(user, "no quantum pad data found!") return TRUE else if(istype(I, /obj/item/quantum_keycard)) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 7423102e0c5..f7300f72086 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -166,13 +166,13 @@ var/obj/item/multitool/M = W if(panel_open) M.set_buffer(src) - to_chat(user, span_notice("You download the data to the [W.name]'s buffer.")) + balloon_alert(user, "saved to multitool buffer") else if(M.buffer && istype(M.buffer, /obj/machinery/teleport/station) && M.buffer != src) if(linked_stations.len < efficiency) linked_stations.Add(M.buffer) M.set_buffer(null) - to_chat(user, span_notice("You upload the data from the [W.name]'s buffer.")) + balloon_alert(user, "data uploaded from buffer") else to_chat(user, span_alert("This station can't hold more information, try to use better parts.")) return diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 5e559c7fb4d..d53a302d608 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -41,14 +41,25 @@ user.visible_message(span_suicide("[user] puts the [src] to [user.p_their()] chest. It looks like [user.p_theyre()] trying to pulse [user.p_their()] heart off!")) return OXYLOSS//theres a reason it wasn't recommended by doctors +/** + * Sets the multitool internal object buffer + * + * Arguments: + * * buffer - the new object to assign to the multitool's buffer + */ /obj/item/multitool/proc/set_buffer(datum/buffer) if(src.buffer) UnregisterSignal(src.buffer, COMSIG_QDELETING) - if(QDELETED(buffer)) - return src.buffer = buffer - RegisterSignal(buffer, COMSIG_QDELETING, PROC_REF(on_buffer_del)) + if(!QDELETED(buffer)) + RegisterSignal(buffer, COMSIG_QDELETING, PROC_REF(on_buffer_del)) +/** + * Called when the buffer's stored object is deleted + * + * This proc does not clear the buffer of the multitool, it is here to + * handle the deletion of the object the buffer references + */ /obj/item/multitool/proc/on_buffer_del(datum/source) SIGNAL_HANDLER buffer = null diff --git a/code/modules/antagonists/pirate/pirate_shuttle_equipment.dm b/code/modules/antagonists/pirate/pirate_shuttle_equipment.dm index ff9678ad519..57eb95a978c 100644 --- a/code/modules/antagonists/pirate/pirate_shuttle_equipment.dm +++ b/code/modules/antagonists/pirate/pirate_shuttle_equipment.dm @@ -183,8 +183,8 @@ /obj/machinery/piratepad/multitool_act(mob/living/user, obj/item/multitool/I) . = ..() if (istype(I)) - to_chat(user, span_notice("You register [src] in [I]s buffer.")) I.set_buffer(src) + balloon_alert(user, "saved to multitool buffer") return TRUE /obj/machinery/piratepad/screwdriver_act_secondary(mob/living/user, obj/item/screwdriver/screw) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/bluespace_sender.dm b/code/modules/atmospherics/machinery/components/unary_devices/bluespace_sender.dm index d4977eb6454..1685a027a5f 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/bluespace_sender.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/bluespace_sender.dm @@ -123,7 +123,7 @@ GLOBAL_LIST_EMPTY_TYPED(bluespace_senders, /obj/machinery/atmospherics/component /obj/machinery/atmospherics/components/unary/bluespace_sender/multitool_act(mob/living/user, obj/item/item) var/obj/item/multitool/multitool = item multitool.set_buffer(src) - to_chat(user, span_notice("You store linkage information in [item]'s buffer.")) + balloon_alert(user, "saved to multitool buffer") return TRUE /obj/machinery/atmospherics/components/unary/bluespace_sender/wrench_act(mob/living/user, obj/item/tool) diff --git a/code/modules/food_and_drinks/machinery/monkeyrecycler.dm b/code/modules/food_and_drinks/machinery/monkeyrecycler.dm index a94f0b1f70e..6baedf3bdbe 100644 --- a/code/modules/food_and_drinks/machinery/monkeyrecycler.dm +++ b/code/modules/food_and_drinks/machinery/monkeyrecycler.dm @@ -98,6 +98,6 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) /obj/machinery/monkey_recycler/multitool_act(mob/living/user, obj/item/multitool/I) . = ..() if(istype(I)) - to_chat(user, span_notice("You log [src] in the multitool's buffer.")) I.set_buffer(src) + balloon_alert(user, "saved to multitool buffer") return TRUE diff --git a/code/modules/mining/machine_silo.dm b/code/modules/mining/machine_silo.dm index dc15e28a927..840c8e92900 100644 --- a/code/modules/mining/machine_silo.dm +++ b/code/modules/mining/machine_silo.dm @@ -165,8 +165,8 @@ GLOBAL_LIST_EMPTY(silo_access_logs) /obj/machinery/ore_silo/multitool_act(mob/living/user, obj/item/multitool/I) . = ..() if (istype(I)) - to_chat(user, span_notice("You log [src] in the multitool's buffer.")) I.set_buffer(src) + balloon_alert(user, "saved to multitool buffer") return TRUE /** diff --git a/code/modules/mining/machine_stacking.dm b/code/modules/mining/machine_stacking.dm index d7381d48e66..286317a5d74 100644 --- a/code/modules/mining/machine_stacking.dm +++ b/code/modules/mining/machine_stacking.dm @@ -27,7 +27,7 @@ return var/obj/item/multitool/M = I M.set_buffer(src) - to_chat(user, span_notice("You store linkage information in [I]'s buffer.")) + balloon_alert(user, "saved to multitool buffer") return TRUE /obj/machinery/mineral/stacking_unit_console/ui_interact(mob/user, datum/tgui/ui) diff --git a/code/modules/paperwork/ticketmachine.dm b/code/modules/paperwork/ticketmachine.dm index f41e780e4a9..a5902a9df5a 100644 --- a/code/modules/paperwork/ticketmachine.dm +++ b/code/modules/paperwork/ticketmachine.dm @@ -56,7 +56,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/ticket_machine, 32) return var/obj/item/multitool/M = I M.set_buffer(src) - to_chat(user, span_notice("You store linkage information in [I]'s buffer.")) + balloon_alert(user, "saved to multitool buffer") return TRUE /obj/machinery/ticket_machine/emag_act(mob/user, obj/item/card/emag/emag_card) //Emag the ticket machine to dispense burning tickets, as well as randomize its number to destroy the HoP's mind. diff --git a/code/modules/plumbing/plumbers/teleporter.dm b/code/modules/plumbing/plumbers/teleporter.dm index 7b3a62c9939..a8e6e7ae3ac 100644 --- a/code/modules/plumbing/plumbers/teleporter.dm +++ b/code/modules/plumbing/plumbers/teleporter.dm @@ -73,7 +73,7 @@ var/obj/item/multitool/M = I M.set_buffer(src) - to_chat(user, span_notice("You store linkage information in [I]'s buffer.")) + balloon_alert(user, "saved to multitool buffer") return TRUE /obj/machinery/plumbing/receiver/process(seconds_per_tick) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index b79bf3f8e02..45a0a520fa0 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -109,7 +109,7 @@ if(!stored_research) return tool.set_buffer(stored_research) - to_chat(user, span_notice("Stored [src]'s techweb information in [tool].")) + balloon_alert(user, "saved to multitool buffer") return TRUE /// Master R&D server. As long as this still exists and still holds the HDD for the theft objective, research points generate at normal speed. Destroy it or an antag steals the HDD? Half research speed. diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index fe469c6739c..9ffa24f3c43 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -55,7 +55,7 @@ GLOBAL_VAR_INIT(bsa_unlock, FALSE) return var/obj/item/multitool/M = I M.set_buffer(src) - to_chat(user, span_notice("You store linkage information in [I]'s buffer.")) + balloon_alert(user, "saved to multitool buffer") return TRUE /obj/machinery/bsa/front @@ -72,7 +72,7 @@ GLOBAL_VAR_INIT(bsa_unlock, FALSE) return var/obj/item/multitool/M = I M.set_buffer(src) - to_chat(user, span_notice("You store linkage information in [I]'s buffer.")) + balloon_alert(user, "saved to multitool buffer") return TRUE /obj/machinery/bsa/middle