From aac8f9ebc8ef3caeb8eab29f6009b7c90358e040 Mon Sep 17 00:00:00 2001 From: CIB Date: Sat, 7 Jul 2012 17:57:05 +0300 Subject: [PATCH] Fixed an issue where laws would not properly be added if they were too high of a number. --- code/datums/ai_laws.dm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index abc41257458..5bb04339ba3 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -1,4 +1,3 @@ - /datum/ai_laws var/name = "Unknown Laws" var/randomly_selectable = 0 @@ -93,9 +92,9 @@ src.inherent = list() /datum/ai_laws/proc/add_supplied_law(var/number, var/law) -// while (src.supplied.len < number + 1) -// src.supplied += "" -//Infinite loop + // This is not an infinite loop, don't be an idiot Sky + while (src.supplied.len < number + 1) + src.supplied += "" src.supplied[number + 1] = law