Fixes a bug that allowed turret guns to be fired by mobs. (#20451)

* TRIGGER_GUARD_NONE works properly

* uses FALSE instead of 0
This commit is contained in:
Samman166
2023-03-13 19:43:27 -02:30
committed by GitHub
parent cdd4bcf1a8
commit 491a51ecb9
2 changed files with 4 additions and 2 deletions
+4 -1
View File
@@ -1032,7 +1032,10 @@
/mob/living/proc/can_use_guns(obj/item/gun/G)
if(G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser() && !issmall(src))
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return 0
return FALSE
if(G.trigger_guard == TRIGGER_GUARD_NONE)
to_chat(src, "<span class='warning'>This gun is only built to be fired by machines!</span>")
return FALSE
return 1
/mob/living/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE)