mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 17:52:36 +00:00
Fixes improper static list declarations + adds grep for it (#87207)
## About The Pull Request I randomly came across a `var/list/static` in the code, which does not actually do what was intended, and thought it was silly. A ctrl+f revealed that this was a fairly common mistake, so I went and fixed all the instances of it I could find. ~~Including one in lighting code, which it looked like they were trying to create a global list to cache generated lighting sheet values for speed, but it was just a normal list that got created each time pointlessly. Now those values are actually being cached (using a global var, because a `static` list was not the right thing to use there in the first place).~~ Nevermind, it seems that this was in fact being cached even if it shouldn't have been, because byond. Just rearranged it there seeing as it works either way. ## Why It's Good For The Game Code that does what it's supposed to ## Changelog 🆑 fix: fixes a bunch of improper static list declarations /🆑
This commit is contained in:
@@ -196,7 +196,7 @@
|
||||
if(possible_victims.len)
|
||||
return pick(possible_victims)
|
||||
|
||||
var/list/static/prioritized_targets = list(/obj/structure/reagent_dispensers, /obj/item/grenade, /obj/structure/window)
|
||||
var/static/list/prioritized_targets = list(/obj/structure/reagent_dispensers, /obj/item/grenade, /obj/structure/window)
|
||||
for(var/iter_type in prioritized_targets)
|
||||
for(var/already_coined_tries in 1 to 3)
|
||||
var/atom/iter_type_check = locate(iter_type) in valid_targets
|
||||
|
||||
Reference in New Issue
Block a user