mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Scope various unscoped locate() calls (#42195)
* Scope locate calls which are immediately checked against a list * Remove silly use of locate from bible Topic * Scope various locate calls (needs testing) * More WIP * Buff up lightswitches while we're here * Tidy record browsing code * Scope a few more locates These have caused problems in the past (#41917, #39303). Continues #29349. Also cleans up lightswitch code while I was already touching it. I recommend a testmerge.
This commit is contained in:
@@ -121,7 +121,7 @@
|
||||
flick(icon_deny, src)
|
||||
if(href_list["purchase"])
|
||||
if(istype(inserted_id))
|
||||
var/datum/data/mining_equipment/prize = locate(href_list["purchase"])
|
||||
var/datum/data/mining_equipment/prize = locate(href_list["purchase"]) in prize_list
|
||||
if (!prize || !(prize in prize_list))
|
||||
to_chat(usr, "<span class='warning'>Error: Invalid choice!</span>")
|
||||
flick(icon_deny, src)
|
||||
|
||||
Reference in New Issue
Block a user