Merge pull request #3014 from Citadel-Station-13/upstream-merge-31140
[MIRROR] Fixes AI law weights infinite loop
This commit is contained in:
@@ -238,7 +238,7 @@
|
||||
/datum/ai_laws/proc/pick_weighted_lawset()
|
||||
var/datum/ai_laws/lawtype
|
||||
var/list/law_weights = CONFIG_GET(keyed_number_list/law_weight)
|
||||
while(!lawtype && law_weights)
|
||||
while(!lawtype && law_weights.len)
|
||||
var/possible_id = pickweight(law_weights)
|
||||
lawtype = lawid_to_type(possible_id)
|
||||
if(!lawtype)
|
||||
|
||||
Reference in New Issue
Block a user