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:
Ghilker
2021-10-12 14:48:51 +01:00
committed by GitHub
parent 56d21164d0
commit 95c8e00af7
207 changed files with 551 additions and 522 deletions
@@ -69,7 +69,7 @@ GLOBAL_LIST_EMPTY(exploration_sites)
category_weights[modifier] += distance*distance_modifiers[modifier]
var/min_events_amount = CEILING(0.4*distance+0.2,1)
for(var/i in 1 to rand(min_events_amount,min_events_amount+2))
var/chosen_category = pickweight(category_weights)
var/chosen_category = pick_weight(category_weights)
var/datum/exploration_event/event = generate_event(site_traits,chosen_category)
if(event)
add_event(event)
+2 -2
View File
@@ -29,9 +29,9 @@ GLOBAL_LIST_INIT(adventure_loot_generator_index,generate_generator_index())
/datum/adventure_loot_generator/maintenance/generate()
var/list/all_loot = list()
for(var/i in 1 to amount)
var/lootspawn = pickweight(GLOB.maintenance_loot)
var/lootspawn = pick_weight(GLOB.maintenance_loot)
while(islist(lootspawn))
lootspawn = pickweight(lootspawn)
lootspawn = pick_weight(lootspawn)
var/atom/movable/loot = new lootspawn()
all_loot += loot
return all_loot