Merge pull request #34767 from AutomaticFrenzy/patch/replace-random-law
Fix replace_random_law runtime
This commit is contained in:
committed by
CitadelStationBot
parent
5e1ff26276
commit
58855df5dd
@@ -295,7 +295,7 @@
|
||||
supplied[number + 1] = law
|
||||
|
||||
/datum/ai_laws/proc/replace_random_law(law,groups)
|
||||
var/replaceable_groups = list(LAW_ZEROTH = 0,LAW_ION = 0,LAW_SUPPLIED = 0,LAW_INHERENT = 0)
|
||||
var/replaceable_groups = list()
|
||||
if(zeroth && (LAW_ZEROTH in groups))
|
||||
replaceable_groups[LAW_ZEROTH] = 1
|
||||
if(ion.len && (LAW_ION in groups))
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
if(prob(removeRandomLawChance))
|
||||
M.remove_law(rand(1, M.laws.get_law_amount(list(LAW_INHERENT, LAW_SUPPLIED))))
|
||||
|
||||
var/message = generate_ion_law(ionMessage)
|
||||
var/message = ionMessage || generate_ion_law()
|
||||
if(message)
|
||||
if(prob(removeDontImproveChance))
|
||||
M.replace_random_law(message, list(LAW_INHERENT, LAW_SUPPLIED, LAW_ION))
|
||||
@@ -59,10 +59,7 @@
|
||||
if(prob(botEmagChance))
|
||||
bot.emag_act()
|
||||
|
||||
/proc/generate_ion_law(ionMessage)
|
||||
if(ionMessage)
|
||||
return ionMessage
|
||||
|
||||
/proc/generate_ion_law()
|
||||
//Threats are generally bad things, silly or otherwise. Plural.
|
||||
var/ionthreats = pick_list(ION_FILE, "ionthreats")
|
||||
//Objects are anything that can be found on the station or elsewhere, plural.
|
||||
|
||||
Reference in New Issue
Block a user