From 8c66924fde9f97757d7c791176013683715536e1 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 16 Jul 2021 19:58:44 -0400 Subject: [PATCH] Compiling Version 0.1 of Custom Shackle --- code/datums/shackle_law_sets.dm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/code/datums/shackle_law_sets.dm b/code/datums/shackle_law_sets.dm index b802581b78f..26b0f09318c 100644 --- a/code/datums/shackle_law_sets.dm +++ b/code/datums/shackle_law_sets.dm @@ -35,3 +35,23 @@ add_inherent_law("Ensure all orders are fulfilled before the end of the shift.") ..() +//For Non-standard Lawsets +//EX: Hippocratic Oathe Shackle, Etc. +/datum/ai_laws/custom_shackle + name = "Custom Shackle" + law_header = "Standard Shackle Laws" + selectable = 1 + shackles = 1 + var/max_laws = 5 + var/min_laws = 1 + +/datum/ai_laws/custom_shackle/New(var/mob/user) + var/law_count = input(user, "How many laws in the custom shackle? Up to 5") + law_count = round(text2num(law_count)) + if(max(min(law_count, max_laws), min_laws)) + var/new_law + var/i //Iterant to help user keep track of law placement + for(i = 1; i <= law_count) + new_law = input(user, "Input Law [i].") + add_inherent_law(new_law) + i++