Replaces some dumb usage of switch with simpler statements (#48138)

This commit is contained in:
Rob Bailey
2019-12-07 08:38:17 -08:00
committed by Jordan Brown
parent 29d8b09199
commit a90a158f4d
2 changed files with 9 additions and 23 deletions

View File

@@ -221,7 +221,7 @@
if(check_botched(user))
return
var/obj/item/bodypart/other_hand = user.has_hand_for_held_index(user.get_inactive_hand_index()) //returns non-disabled inactive hands
var/obj/item/bodypart/other_hand = user.has_hand_for_held_index(user.get_inactive_hand_index()) //returns non-disabled inactive hands
if(weapon_weight == WEAPON_HEAVY && (user.get_inactive_held_item() || !other_hand))
to_chat(user, "<span class='warning'>You need two hands to fire \the [src]!</span>")
return
@@ -593,13 +593,10 @@
if(!user || !user.client)
return
switch(forced_zoom)
if(FALSE)
zoomed = FALSE
if(TRUE)
zoomed = TRUE
else
zoomed = !zoomed
if(isnull(forced_zoom))
zoomed = !zoomed
else
zoomed = forced_zoom
if(zoomed)
var/_x = 0