Extension init, syntax highlighting, autocompletion, install script
This commit is contained in:
176
vscode-extension-ashes/snippets/ashes.json
Normal file
176
vscode-extension-ashes/snippets/ashes.json
Normal file
@@ -0,0 +1,176 @@
|
||||
{
|
||||
"Event": {
|
||||
"prefix": "event",
|
||||
"body": [
|
||||
":${1:event_name}",
|
||||
"\t${2:// Event code here}"
|
||||
],
|
||||
"description": "Create a new ASHES event"
|
||||
},
|
||||
"Event with target": {
|
||||
"prefix": "eventtarget",
|
||||
"body": [
|
||||
":${1:event_name} \"${2:target_id}\"",
|
||||
"\t${3:// Event code here}"
|
||||
],
|
||||
"description": "Create a new ASHES event with target"
|
||||
},
|
||||
"Event with flags": {
|
||||
"prefix": "eventflags",
|
||||
"body": [
|
||||
":${1:event_name} | ${2:NO_UI} | ${3:NO_TT}",
|
||||
"\t${4:// Event code here}"
|
||||
],
|
||||
"description": "Create a new ASHES event with flags"
|
||||
},
|
||||
"Event with flags and target": {
|
||||
"prefix": "eventflagstarget",
|
||||
"body": [
|
||||
":${1:event_name} | ${2:NO_UI} | ${3:NO_TT} \"${4:target_id}\"",
|
||||
"\t${5:// Event code here}"
|
||||
],
|
||||
"description": "Create a new ASHES event with flags and target"
|
||||
},
|
||||
"Say command": {
|
||||
"prefix": "say",
|
||||
"body": [
|
||||
"say(${1:player}, \"${2:text}\"${3:, \"${4:translation_key}\"})"
|
||||
],
|
||||
"description": "Say command for dialog"
|
||||
},
|
||||
"Set global variable": {
|
||||
"prefix": "setglobal",
|
||||
"body": [
|
||||
"set_global(\"${1:variable_name}\", ${2:value})"
|
||||
],
|
||||
"description": "Set a global variable"
|
||||
},
|
||||
"Global variable declaration": {
|
||||
"prefix": "global",
|
||||
"body": [
|
||||
"global ${1:variable_name}${2: = ${3:value}}"
|
||||
],
|
||||
"description": "Declare a global variable"
|
||||
},
|
||||
"Local variable declaration": {
|
||||
"prefix": "var",
|
||||
"body": [
|
||||
"var ${1:variable_name}${2: = ${3:value}}"
|
||||
],
|
||||
"description": "Declare a local variable"
|
||||
},
|
||||
"If statement": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if ${1:condition}:",
|
||||
"\t${2:// Code here}"
|
||||
],
|
||||
"description": "If statement"
|
||||
},
|
||||
"If-else statement": {
|
||||
"prefix": "ifelse",
|
||||
"body": [
|
||||
"if ${1:condition}:",
|
||||
"\t${2:// Code here}",
|
||||
"else:",
|
||||
"\t${3:// Code here}"
|
||||
],
|
||||
"description": "If-else statement"
|
||||
},
|
||||
"While loop": {
|
||||
"prefix": "while",
|
||||
"body": [
|
||||
"while ${1:condition}:",
|
||||
"\t${2:// Code here}"
|
||||
],
|
||||
"description": "While loop"
|
||||
},
|
||||
"Dialog block": {
|
||||
"prefix": "dialog",
|
||||
"body": [
|
||||
"?!",
|
||||
"\t- \"${1:choice_text}\"",
|
||||
"\t\t${2:// Code here}"
|
||||
],
|
||||
"description": "Dialog block with choice"
|
||||
},
|
||||
"Dialog choice with condition": {
|
||||
"prefix": "dialogif",
|
||||
"body": [
|
||||
"?!",
|
||||
"\t- \"${1:choice_text}\" [${2:condition}]",
|
||||
"\t\t${3:// Code here}"
|
||||
],
|
||||
"description": "Dialog choice with condition"
|
||||
},
|
||||
"Change scene": {
|
||||
"prefix": "changescene",
|
||||
"body": [
|
||||
"change_scene(\"${1:scene_path}\"${2:, ${3:true}})"
|
||||
],
|
||||
"description": "Change to a different scene"
|
||||
},
|
||||
"Set active": {
|
||||
"prefix": "setactive",
|
||||
"body": [
|
||||
"set_active($${1:object_id}, ${2:true})"
|
||||
],
|
||||
"description": "Set object active/inactive"
|
||||
},
|
||||
"Teleport": {
|
||||
"prefix": "teleport",
|
||||
"body": [
|
||||
"teleport($${1:object_id}, $${2:target_id})"
|
||||
],
|
||||
"description": "Teleport object to target"
|
||||
},
|
||||
"Walk to": {
|
||||
"prefix": "walk",
|
||||
"body": [
|
||||
"walk($${1:object_id}, $${2:target_id})"
|
||||
],
|
||||
"description": "Walk object to target"
|
||||
},
|
||||
"Play sound": {
|
||||
"prefix": "playsnd",
|
||||
"body": [
|
||||
"play_snd(\"${1:sound_path}\"${2:, ${3:_music}})"
|
||||
],
|
||||
"description": "Play a sound file"
|
||||
},
|
||||
"Play video": {
|
||||
"prefix": "playvideo",
|
||||
"body": [
|
||||
"play_video(\"${1:video_path}\")"
|
||||
],
|
||||
"description": "Play a video file"
|
||||
},
|
||||
"Inventory add": {
|
||||
"prefix": "inventoryadd",
|
||||
"body": [
|
||||
"inventory_add($${1:item_id})"
|
||||
],
|
||||
"description": "Add item to inventory"
|
||||
},
|
||||
"Inventory remove": {
|
||||
"prefix": "inventoryremove",
|
||||
"body": [
|
||||
"inventory_remove($${1:item_id})"
|
||||
],
|
||||
"description": "Remove item from inventory"
|
||||
},
|
||||
"Comment": {
|
||||
"prefix": "comment",
|
||||
"body": [
|
||||
"# ${1:comment}"
|
||||
],
|
||||
"description": "Add a comment"
|
||||
},
|
||||
"Print": {
|
||||
"prefix": "print",
|
||||
"body": [
|
||||
"print(\"${1:message}\")"
|
||||
],
|
||||
"description": "Print debug message"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user