Skip to content

Commit

Permalink
runtime removal
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoe2013 committed Jul 26, 2023
1 parent 9e241b9 commit 083e854
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions code/modules/projectiles/gun_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,9 @@ DEFINES in setup.dm, referenced here.
CRASH("add_firemode called with a resulting gun_firemode_list length of [length(gun_firemode_list)].")

/obj/item/weapon/gun/proc/remove_firemode(removed_firemode, mob/user)
if(!(removed_firemode in gun_firemode_list))
return

if(!length(gun_firemode_list) || (length(gun_firemode_list) == 1))
CRASH("remove_firemode called with gun_firemode_list length [length(gun_firemode_list)].")

Expand Down
4 changes: 2 additions & 2 deletions code/modules/projectiles/guns/specialist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,15 @@
if(toggling_action)
toggling_action.update_button_icon()

/obj/item/weapon/gun/rifle/sniper/verb/toggle_laser()
/obj/item/weapon/gun/rifle/sniper/verb/toggle_gun_laser()
set category = "Weapons"
set name = "Toggle Laser"
set desc = "Toggles your laser on or off."
set src = usr.contents

var/obj/item/weapon/gun/rifle/sniper/sniper = get_active_firearm(usr)
if((sniper == src) && has_aimed_shot)
toggle_laser(user)
toggle_laser(usr)

//Pow! Headshot.
/obj/item/weapon/gun/rifle/sniper/M42A
Expand Down

0 comments on commit 083e854

Please sign in to comment.