From 01be3431df9727bc5d81894757281477bd3d6c03 Mon Sep 17 00:00:00 2001 From: Cyantime Date: Sun, 22 Jan 2023 23:00:42 -0500 Subject: [PATCH] Fixes #14331 --- code/modules/fireworks/firework_launcher.dm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/code/modules/fireworks/firework_launcher.dm b/code/modules/fireworks/firework_launcher.dm index 26044f24456..5f7720fa8c2 100644 --- a/code/modules/fireworks/firework_launcher.dm +++ b/code/modules/fireworks/firework_launcher.dm @@ -46,13 +46,15 @@ return if(istype(O, /obj/item/weapon/firework_star)) - loaded_star = O - user.drop_item() - O.forceMove(src) - to_chat(user, "You insert the firework star into the launcher.") - add_fingerprint(user) - update_icon() - return + if(loaded_star) + to_chat(user, SPAN_NOTICE("\The [src] already has \a [loaded_star] inside, unload it first!")) + return + if(user.unEquip(O, 0, src)) + loaded_star = O + to_chat(user, "You insert the firework star into the launcher.") + add_fingerprint(user) + update_icon() + return return ..() @@ -121,4 +123,4 @@ var/datum/planet/P = SSplanets.z_to_planet[T.z] if(!P) return - return P \ No newline at end of file + return P