Skip to content

Commit

Permalink
Adds a check if input proc return value is null (#8362)
Browse files Browse the repository at this point in the history
  • Loading branch information
itchybones authored Nov 17, 2023
1 parent 884d013 commit e440beb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion code/game/machinery/holoposter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@
if(stat & (NOPOWER))
return
if (istype(W, /obj/item/tool/multitool))
var/selected_icon_state
playsound(user.loc, 'sound/items/multitool_pulse.ogg', 60, 1)
icon_state = input("Available Posters", "Holographic Poster") as null|anything in postertypes + "random"
selected_icon_state = input("Available Posters", "Holographic Poster") as null|anything in postertypes + "random"
if(!selected_icon_state)
return
else
icon_state = selected_icon_state
if(icon_state == "random")
stat &= ~BROKEN
icon_forced = FALSE
Expand Down

0 comments on commit e440beb

Please sign in to comment.