|
|
|
@@ -0,0 +1,157 @@ |
|
|
|
{ |
|
|
|
// Place your satiate workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and |
|
|
|
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope |
|
|
|
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is |
|
|
|
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are: |
|
|
|
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. |
|
|
|
// Placeholders with the same ids are connected. |
|
|
|
// Example: |
|
|
|
// "Print to console": { |
|
|
|
// "scope": "javascript,typescript", |
|
|
|
// "prefix": "log", |
|
|
|
// "body": [ |
|
|
|
// "console.log('$1');", |
|
|
|
// "$2" |
|
|
|
// ], |
|
|
|
// "description": "Log output to console" |
|
|
|
// } |
|
|
|
"Room": { |
|
|
|
"prefix": "room", |
|
|
|
"body": [ |
|
|
|
"\"$1\": {", |
|
|
|
" \"id\": \"$1\",", |
|
|
|
" \"name\": \"$2\",", |
|
|
|
" \"desc\": \"$3\",", |
|
|
|
" \"move\": (room, state) => {", |
|
|
|
"", |
|
|
|
" },", |
|
|
|
" \"enter\": (room, state) => {", |
|
|
|
"", |
|
|
|
" },", |
|
|
|
" \"exit\": (room, state) => {", |
|
|
|
"", |
|
|
|
" },", |
|
|
|
" \"actions\": [", |
|
|
|
"", |
|
|
|
" ],", |
|
|
|
" \"exits\": {", |
|
|
|
"", |
|
|
|
" },", |
|
|
|
" \"hooks\": [", |
|
|
|
"", |
|
|
|
" ],", |
|
|
|
" \"data\": {", |
|
|
|
" \"stats\": {", |
|
|
|
" ", |
|
|
|
" }", |
|
|
|
" }", |
|
|
|
"}," |
|
|
|
], |
|
|
|
"description": "Room" |
|
|
|
}, |
|
|
|
"Action": { |
|
|
|
"prefix": "action", |
|
|
|
"body": [ |
|
|
|
"{", |
|
|
|
" name: \"$1\",", |
|
|
|
" desc: \"$2\",", |
|
|
|
" execute: (room, state) => {", |
|
|
|
"", |
|
|
|
" },", |
|
|
|
" show: [", |
|
|
|
"", |
|
|
|
" ],", |
|
|
|
" conditions: [", |
|
|
|
"", |
|
|
|
" ]", |
|
|
|
"}," |
|
|
|
], |
|
|
|
"description": "Action" |
|
|
|
}, |
|
|
|
"Exit": { |
|
|
|
"prefix": "exit", |
|
|
|
"body": [ |
|
|
|
"\"$1\": {", |
|
|
|
" \"target\": \"$2\",", |
|
|
|
" \"desc\": \"$3\",", |
|
|
|
" \"show\": [", |
|
|
|
" ", |
|
|
|
" ],", |
|
|
|
" \"conditions\": [", |
|
|
|
"", |
|
|
|
" ],", |
|
|
|
" \"hooks\" [", |
|
|
|
" ", |
|
|
|
" ]", |
|
|
|
"}," |
|
|
|
], |
|
|
|
"description": "Exit" |
|
|
|
}, |
|
|
|
"Condition": { |
|
|
|
"prefix": "cond", |
|
|
|
"body": [ |
|
|
|
"(room, state) => {", |
|
|
|
" return ${1:true}", |
|
|
|
"}", |
|
|
|
"" |
|
|
|
], |
|
|
|
"description": "Condition" |
|
|
|
}, |
|
|
|
"Stat": { |
|
|
|
"prefix": "stat", |
|
|
|
"body": [ |
|
|
|
"{\"name\": \"$1\", \"type\": \"${2|foo,bar|}\", \"value\": $3, \"max\": $4, \"color\": \"rgb(0,0,0)\" }" |
|
|
|
], |
|
|
|
"description": "Stat" |
|
|
|
}, |
|
|
|
"Timer": { |
|
|
|
"prefix": "timer", |
|
|
|
"body": [ |
|
|
|
"startTimer({", |
|
|
|
" id: \"$1\",", |
|
|
|
" func: state => {", |
|
|
|
" return true;", |
|
|
|
" },", |
|
|
|
" delay: $2,", |
|
|
|
" loop: $3,", |
|
|
|
" classes: [", |
|
|
|
"", |
|
|
|
" ]", |
|
|
|
"}, state);", |
|
|
|
"" |
|
|
|
], |
|
|
|
"description": "Timer" |
|
|
|
}, |
|
|
|
"Story": { |
|
|
|
"prefix": "story", |
|
|
|
"body": [ |
|
|
|
"stories.push({", |
|
|
|
" \"id\": \"$1\",", |
|
|
|
" \"name\": \"$2\",", |
|
|
|
" \"tags\": [", |
|
|
|
"", |
|
|
|
" ],", |
|
|
|
" \"intro\": {", |
|
|
|
" \"start\": \"$3\",", |
|
|
|
" \"setup\": state => {", |
|
|
|
"", |
|
|
|
" },", |
|
|
|
" \"intro\": state => {", |
|
|
|
"", |
|
|
|
" }", |
|
|
|
" },", |
|
|
|
" \"sounds\": [", |
|
|
|
"", |
|
|
|
" ],", |
|
|
|
" \"preload\": [", |
|
|
|
"", |
|
|
|
" ],", |
|
|
|
" \"world\": {", |
|
|
|
" s", |
|
|
|
" }", |
|
|
|
"});", |
|
|
|
"" |
|
|
|
], |
|
|
|
"description": "Story" |
|
|
|
} |
|
|
|
} |