diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 6984d0f1bb8..8c069ae8c4b 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -674,46 +674,39 @@ GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list( return TRUE /obj/item/gun/ballistic/proc/guncleaning(mob/user, obj/item/A) - if(misfire_probability == 0) + if(misfire_probability == initial(misfire_probability)) balloon_alert(user, "it's already clean!") return user.changeNext_move(CLICK_CD_MELEE) - user.visible_message(span_notice("[user] begins to cleaning [src]."), span_notice("You begin to clean the internals of [src].")) + balloon_alert(user, "cleaning...") if(do_after(user, 100, target = src)) - var/original_misfire_value = initial(misfire_probability) - if(misfire_probability > original_misfire_value) - misfire_probability = original_misfire_value - user.visible_message(span_notice("[user] cleans [src] of any fouling."), span_notice("You clean [src], removing any fouling, preventing misfire.")) - return TRUE - -/obj/item/gun/ballistic/wrench_act(mob/living/user, obj/item/I) - if(!user.is_holding(src)) - to_chat(user, span_notice("You need to hold [src] to modify it.")) + misfire_probability = initial(misfire_probability) + balloon_alert(user, "fouling cleaned out") return TRUE +/obj/item/gun/ballistic/wrench_act(mob/living/user, obj/item/I) if(!can_modify_ammo) return - if(bolt_type == BOLT_TYPE_STANDARD) - if(get_ammo()) - to_chat(user, span_notice("You can't get at the internals while the gun has a bullet in it!")) - return + if(!user.is_holding(src)) + balloon_alert(user, "hold to modify!") + return TRUE - else if(!bolt_locked) - to_chat(user, span_notice("You can't get at the internals while the bolt is down!")) - return + if(get_ammo()) + balloon_alert(user, "can't modify while loaded!") + return - to_chat(user, span_notice("You begin to tinker with [src]...")) + if(!bolt_locked && bolt_type == BOLT_TYPE_LOCKING) + balloon_alert(user, "the bolt is in the way!") + return + + balloon_alert(user, "tinkering...") I.play_tool_sound(src) if(!I.use_tool(src, user, 3 SECONDS)) return TRUE - if(blow_up(user)) - user.visible_message(span_danger("[src] goes off!"), span_danger("[src] goes off in your face!")) - return - if(magazine.caliber == initial_caliber) magazine.caliber = alternative_caliber if(alternative_ammo_misfires) @@ -727,7 +720,6 @@ GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list( fire_sound = initial_fire_sound to_chat(user, span_notice("You reset [src]. Now it will fire [initial_caliber] rounds.")) - ///used for sawing guns, causes the gun to fire without the input of the user /obj/item/gun/ballistic/proc/blow_up(mob/user) return chambered && process_fire(user, user, FALSE)