Added (SETCODE) button for nuclear code request

🆑
add: When a player uses a communication console to ask for the codes to
the self destruct, for better or for worse, the admins can set them with
a single click. Whether the admins a) click the button b) actually give
the random person the codes, is another thing entirely.
/🆑

- Also tidied up prayer code to use some new admin defines
- Adds the random_nukecode() proc, which returns a random numeric string
between "00000" and "99999". No more requiring it to be at least 10000,
we have the power of ZERO PADDING.
This commit is contained in:
Jack Edge
2016-07-08 09:10:33 +01:00
parent 7b77def821
commit 4fbc1475fe
8 changed files with 59 additions and 14 deletions
+9
View File
@@ -2239,3 +2239,12 @@
custom_outfits.Add(O)
message_admins("[key_name(usr)] created \"[O.name]\" outfit!")
else if(href_list["set_selfdestruct_code"])
if(!check_rights(R_ADMIN))
return
var/code = random_nukecode()
for(var/obj/machinery/nuclearbomb/selfdestruct/SD in nuke_list)
SD.r_code = code
message_admins("[key_name_admin(usr)] has set the self-destruct \
code to \"[code]\".")