Kill Ancient Goto Statements (#21781)

I had a brief discussion about Goto statements, then on a whim checked
to see if we had any. We had some Gotos that are legally old enough to
apply for a learner's permit in my state. I was bored so I decided to
put them out of their misery.
This commit is contained in:
VMSolidus
2026-02-05 10:24:00 +00:00
committed by GitHub
parent 77378d9883
commit 69648b4a67
6 changed files with 23 additions and 33 deletions
@@ -556,7 +556,6 @@ var/global/list/default_interrogation_channels = list(
else
user.show_message(SPAN_NOTICE("\The [src] can no longer be modified or attached!"))
updateDialog()
//Foreach goto(83)
add_fingerprint(user)
return
else return
@@ -609,18 +609,16 @@
if(use_check_and_message(usr))
return
set_rate:
var/amount = tgui_input_number(usr, "Set the IV drip's transfer rate.", "IV Drip", iv_transfer_rate, iv_transfer_rate_upperlimit, iv_transfer_rate_lowerlimit, round_value = FALSE)
if(!amount)
return
if ((0.001 > amount || amount > 4) && amount != 0)
to_chat(usr, SPAN_WARNING("Entered value must be between 0.001 and 4."))
goto set_rate
if (iv_transfer_rate == 0)
iv_transfer_rate = REM
return
iv_transfer_rate = amount
to_chat(usr, SPAN_NOTICE("Transfer rate set to [src.iv_transfer_rate] u/sec."))
iv_transfer_rate = tgui_input_number( \
usr, \
"Set the IV drip's transfer rate between [iv_transfer_rate_lowerlimit] and [iv_transfer_rate_upperlimit].", \
"IV Drip", \
iv_transfer_rate, \
iv_transfer_rate_upperlimit, \
iv_transfer_rate_lowerlimit, \
round_value = FALSE)
to_chat(usr, SPAN_NOTICE("Transfer rate set to [src.iv_transfer_rate] u/sec."))
/obj/structure/bed/roller/Move()
. = ..()