Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Commit

Permalink
Compiling Version 0.1 of Custom Shackle
Browse files Browse the repository at this point in the history
  • Loading branch information
DatBoiTim committed Jul 16, 2021
1 parent fdcac74 commit 8c66924
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions code/datums/shackle_law_sets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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++

0 comments on commit 8c66924

Please sign in to comment.