From 2fd45f4eebf7e140aa8c4f4977ffbd704fefdf64 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Mon, 21 May 2018 02:31:14 -0700 Subject: [PATCH 1/5] Create dice.dm --- code/modules/admin/verbs/dice.dm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 code/modules/admin/verbs/dice.dm diff --git a/code/modules/admin/verbs/dice.dm b/code/modules/admin/verbs/dice.dm new file mode 100644 index 0000000000..8efa2e9bde --- /dev/null +++ b/code/modules/admin/verbs/dice.dm @@ -0,0 +1,24 @@ +/client/proc/roll_dices() + set category = "Fun" + set name = "Roll Dice" + if(!check_rights(R_FUN)) + return + + var/sum = input("How many times should we throw?") as num + var/side = input("Select the number of sides.") as num + if(!side) + side = 6 + if(!sum) + sum = 2 + + var/dice = num2text(sum) + "d" + num2text(side) + + if(alert("Do you want to inform the world about your game?",,"Yes", "No") == "Yes") + world << "

The dice have been rolled by Gods!

" + + var/result = roll(dice) + + if(alert("Do you want to inform the world about the result?",,"Yes", "No") == "Yes") + world << "

Gods rolled [dice], result is [result]

" + + message_admins("[key_name_admin(src)] rolled dice [dice], result is [result]", 1) From db415cb5077cb942f2847fb62401d4fe06af19c1 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Mon, 21 May 2018 02:32:14 -0700 Subject: [PATCH 2/5] Update dice.dm --- code/modules/admin/verbs/dice.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/admin/verbs/dice.dm b/code/modules/admin/verbs/dice.dm index 8efa2e9bde..5b0a15257e 100644 --- a/code/modules/admin/verbs/dice.dm +++ b/code/modules/admin/verbs/dice.dm @@ -14,11 +14,12 @@ var/dice = num2text(sum) + "d" + num2text(side) if(alert("Do you want to inform the world about your game?",,"Yes", "No") == "Yes") - world << "

The dice have been rolled by Gods!

" + to_chat(world, "

The dice have been rolled by Gods!

") var/result = roll(dice) if(alert("Do you want to inform the world about the result?",,"Yes", "No") == "Yes") - world << "

Gods rolled [dice], result is [result]

" + to_chat(world, "

Gods rolled [dice], result is [result]

") - message_admins("[key_name_admin(src)] rolled dice [dice], result is [result]", 1) + message_admins("[key_name_admin(src)] rolled dice [dice], result is [result]") + log_admin("[key_name_admin(src)] rolled dice [dice], result is [result]") From 4582ed8c11966e0b1f7184420391614008648dee Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Mon, 21 May 2018 02:34:03 -0700 Subject: [PATCH 3/5] Update admin_verbs.dm --- code/modules/admin/admin_verbs.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 77f48d18f4..84ccbe6269 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -99,7 +99,8 @@ GLOBAL_LIST_INIT(admin_verbs_fun, list( /client/proc/polymorph_all, /client/proc/show_tip, /client/proc/smite, - /client/proc/admin_away + /client/proc/admin_away, + /client/proc/roll_dices )) GLOBAL_PROTECT(admin_verbs_spawn) GLOBAL_LIST_INIT(admin_verbs_spawn, list(/datum/admins/proc/spawn_atom, /datum/admins/proc/spawn_cargo, /datum/admins/proc/spawn_objasmob, /client/proc/respawn_character)) From 54656fd082f4261c911adf742241c06f40018866 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Mon, 21 May 2018 03:41:07 -0700 Subject: [PATCH 4/5] Update tgstation.dme --- tgstation.dme | 1 + 1 file changed, 1 insertion(+) diff --git a/tgstation.dme b/tgstation.dme index 2f9498c45b..31aa95a454 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -1074,6 +1074,7 @@ #include "code\modules\admin\verbs\deadsay.dm" #include "code\modules\admin\verbs\debug.dm" #include "code\modules\admin\verbs\diagnostics.dm" +#include "code\modules\admin\verbs\dice.dm" #include "code\modules\admin\verbs\fps.dm" #include "code\modules\admin\verbs\getlogs.dm" #include "code\modules\admin\verbs\individual_logging.dm" From 15085c732fa59dbf561c246a6a32b2c2d96bc0ca Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sun, 27 May 2018 17:19:48 -0700 Subject: [PATCH 5/5] Update admin_verbs.dm --- code/modules/admin/admin_verbs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 84ccbe6269..de68300a42 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -100,7 +100,7 @@ GLOBAL_LIST_INIT(admin_verbs_fun, list( /client/proc/show_tip, /client/proc/smite, /client/proc/admin_away, - /client/proc/roll_dices + /client/proc/roll_dices //CIT CHANGE - Adds dice verb )) GLOBAL_PROTECT(admin_verbs_spawn) GLOBAL_LIST_INIT(admin_verbs_spawn, list(/datum/admins/proc/spawn_atom, /datum/admins/proc/spawn_cargo, /datum/admins/proc/spawn_objasmob, /client/proc/respawn_character))