mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Issue #1818 - Freeform Module broken again
-Think- I fixed it. It shouldn't just stop the user after they enter the law priority number now. Should work properly.
This commit is contained in:
@@ -250,7 +250,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/freeform // Slightly more dynamic freeform module -- TLE
|
||||
name = "'Freeform' AI Module"
|
||||
var/newFreeFormLaw = ""
|
||||
var/newFreeFormLaw = "freeform"
|
||||
var/lawpos = 15
|
||||
desc = "A 'freeform' AI module: '<freeform>'"
|
||||
origin_tech = "programming=4;materials=4"
|
||||
@@ -258,11 +258,11 @@ AI MODULES
|
||||
/obj/item/weapon/aiModule/freeform/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
lawpos = 0
|
||||
lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
|
||||
if(lawpos < 15) return
|
||||
while(lawpos < 15)
|
||||
lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
|
||||
lawpos = min(lawpos, 50)
|
||||
var/newlaw = ""
|
||||
var/targName = stripped_input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw, MAX_MESSAGE_LEN)
|
||||
var/targName = copytext(sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw)),1,MAX_MESSAGE_LEN)
|
||||
newFreeFormLaw = targName
|
||||
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user