mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-11 23:23:55 +01:00
up ports a bunch of TGS commands (#17961)
* up ports a bunch of TGS commands * . * needing this * ... * Update datacore.dm * fix that * at least stack that * rework all user name handling * urg * urg * . * . * . * up port this * make this clearer * . * . * . * fix that * . * add returns * player ticket chat * this * . * . * umm * adjust messages * clean smitecode up * . * ummm * . * command filter
This commit is contained in:
@@ -153,9 +153,12 @@ vorestation edit end */
|
||||
return
|
||||
|
||||
to_chat(user, span_notice("The crate is locked with a Deca-code lock."))
|
||||
var/input = tgui_input_text(user, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "")
|
||||
var/input = tgui_input_text(user, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "", codelen)
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
if(input == null)
|
||||
to_chat(user, span_notice("You leave the crate alone."))
|
||||
return
|
||||
var/list/sanitised = list()
|
||||
var/sanitycheck = 1
|
||||
for(var/i=1,i<=length(input),i++) //put the guess into a list
|
||||
@@ -165,9 +168,11 @@ vorestation edit end */
|
||||
if(sanitised[i] == sanitised[j])
|
||||
sanitycheck = null //if a digit is repeated, reject the input
|
||||
|
||||
if(input == null || sanitycheck == null || length(input) != codelen)
|
||||
to_chat(user, span_notice("You leave the crate alone."))
|
||||
else if(check_input(input))
|
||||
if(sanitycheck == null || length(input) != codelen)
|
||||
to_chat(user, span_notice("You aren't sure this input is a good idea."))
|
||||
return
|
||||
|
||||
if(check_input(input))
|
||||
to_chat(user, span_notice("The crate unlocks!"))
|
||||
playsound(src, 'sound/machines/lockreset.ogg', 50, 1)
|
||||
set_locked(0)
|
||||
|
||||
Reference in New Issue
Block a user