Throwing Firearms (#23085)

* Firearms can no longer be thrown while on harm intent, preventing
accidental throws when attempting to fire.

AI usage disclosure: The code for the tweaks here was created using GPT
5.6 Sol.
This commit is contained in:
Geeves
2026-08-28 22:52:27 +00:00
committed by GitHub
parent 2ab49be382
commit f39b7ec1a5
4 changed files with 13 additions and 0 deletions
+3
View File
@@ -413,6 +413,9 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list(
var/atom/movable/item = src.get_active_hand()
if(!item)
return FALSE
if(a_intent == I_HURT && !item.can_throw_on_harm)
balloon_alert(src, item.throw_on_harm_alert)
return TRUE
var/throw_range = item.throw_range
var/itemsize
+2
View File
@@ -55,6 +55,8 @@ ABSTRACT_TYPE(/obj/item/gun)
throwforce = 5
throw_speed = 4
throw_range = 5
can_throw_on_harm = FALSE
throw_on_harm_alert = "can't throw firearms on harm intent!"
force = 11
origin_tech = list(TECH_COMBAT = 1)
attack_verb = list("struck", "hit", "bashed")