mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Testing making a TGS command
Simple coinflip command. Throws a hissyfit if you dont guess. Only accepts lowercase Possibly adds newlines on error message. Compiles with no errors or warns- May tidy it later this is just a test
This commit is contained in:
@@ -16,4 +16,5 @@
|
||||
#include "v5\api_vgs.dm" // VOREStation Edit - Include here so it has access to v5 defines
|
||||
#include "v5\commands.dm"
|
||||
#include "v5\chat_commands.dm"
|
||||
#include "v5\chat_commands_zz_ch.dm"
|
||||
#include "v5\undefs.dm"
|
||||
|
||||
24
code/modules/tgs/v5/chat_commands_zz_ch.dm
Normal file
24
code/modules/tgs/v5/chat_commands_zz_ch.dm
Normal file
@@ -0,0 +1,24 @@
|
||||
/datum/tgs_chat_command/sharktest
|
||||
name = "flip"
|
||||
help_text = "babies first TGS command"
|
||||
admin_only = FALSE
|
||||
|
||||
/datum/tgs_chat_command/sharktest/Run(datum/tgs_chat_user/sender, params)
|
||||
var/x
|
||||
if(params != "tails" && params != "heads")
|
||||
return "```You need to guess!\n either heads or tails!```"
|
||||
if(prob(50))
|
||||
if(params == "tails")
|
||||
x = "correct"
|
||||
else
|
||||
x = "wrong"
|
||||
return "```Tails. [x]!```"
|
||||
|
||||
if(params == "tails")
|
||||
x = "wrong"
|
||||
else
|
||||
x = "correct"
|
||||
return "```Heads. [x]!```"
|
||||
|
||||
/datum/tgs_chat_command/sharktest/alias
|
||||
name = "coin"
|
||||
Reference in New Issue
Block a user