mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
cleanup _HELPERS/_lists.dm and all the necessary files (#61827)
Bring _HELPERS/_lists.dm to latest standards by: -Adding proper documentation and fixing existing one -Giving vars proper names -Procs now use snake case as per standard (many files that use those procs will be affected)
This commit is contained in:
@@ -62,9 +62,9 @@
|
||||
if(loot?.len)
|
||||
var/loot_spawned = 0
|
||||
while((spawn_loot_count-loot_spawned) && loot.len)
|
||||
var/lootspawn = pickweight(loot)
|
||||
var/lootspawn = pick_weight(loot)
|
||||
while(islist(lootspawn))
|
||||
lootspawn = pickweight(lootspawn)
|
||||
lootspawn = pick_weight(lootspawn)
|
||||
if(!spawn_loot_double)
|
||||
loot.Remove(lootspawn)
|
||||
if(lootspawn && (spawn_scatter_radius == 0 || spawn_locations.len))
|
||||
@@ -139,7 +139,7 @@
|
||||
stat_table[item] /= loot_count
|
||||
|
||||
/obj/item/loot_table_maker/proc/pick_loot(lootpool) //selects path from loot table and returns it
|
||||
var/lootspawn = pickweight(lootpool)
|
||||
var/lootspawn = pick_weight(lootpool)
|
||||
while(islist(lootspawn))
|
||||
lootspawn = pickweight(lootspawn)
|
||||
lootspawn = pick_weight(lootspawn)
|
||||
return lootspawn
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
option.image = image(icon = initial(spider.icon), icon_state = initial(spider.icon_state))
|
||||
option.info = span_boldnotice("[initial(spider.menu_description)]")
|
||||
display_spiders[initial(spider.name)] = option
|
||||
sortList(display_spiders)
|
||||
sort_list(display_spiders)
|
||||
var/chosen_spider = show_radial_menu(user, egg, display_spiders, radius = 38)
|
||||
chosen_spider = spider_list[chosen_spider]
|
||||
if(QDELETED(src) || QDELETED(user) || !chosen_spider)
|
||||
|
||||
Reference in New Issue
Block a user