Last active
June 3, 2021 17:43
-
-
Save lcanady/d5c0eb515dbeea76bfac642fe489e83b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
############################################################################# | |
### Convenient mush-format #defines ######################################### | |
This archive is my collection of shortcuts as a lazy MUSHCoder. | |
Mostly they are patterns I've run into over and over again through the | |
years that I finally got tired of typing. | |
Use anything you find here lightly. You don't want your code becoming | |
completely unreadable because it's full of #defines that noone can | |
look up a help for! | |
############################################################################# | |
*/ | |
// Object creation shortcuts | |
#define @create (.*)=([^\,]+)(.*) { | |
@@ only create $1 if it doesn't exist. | |
@if not(isdbref(tags($2)) = { | |
@create $1; | |
@tag/add $1=lastcreate(me, t); | |
@if words($2) = { | |
@set #$2=$2; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment