Skip to content

Commit

Permalink
Fix the $0 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
AutumnRivers committed Jul 9, 2020
1 parent f898cb3 commit c419164
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 28 deletions.
1 change: 0 additions & 1 deletion .vscodeignore
@@ -1,4 +1,3 @@
**/.vscode
**/.gitignore
**/hacknet-vscode-1.0.0.vsix
!**/.vscode/launch.json
12 changes: 1 addition & 11 deletions README.md
Expand Up @@ -42,17 +42,7 @@ Anything not listed here is likely not large enough to be considered a "template
If you're still not getting the hang of this, that's okay! Join the [official Hacknet Discord](https://discord.gg/hacknet) and I'll do my best to help. It'll be hard to miss me.

# Examples
## Sequencer Example
![](https://cdn.discordapp.com/attachments/453489057117372417/548239180031852554/SequencerExample.gif)

## Database Example
![](https://cdn.discordapp.com/attachments/377282421504344065/548321665785004034/DatabaseExample.gif)

## HackerScript Example
![](https://cdn.discordapp.com/attachments/377282421504344065/548355937254244371/HackerScriptExample.gif)

## Mission Example
![](https://cdn.discordapp.com/attachments/377284586326982666/548712683260608547/MissionExample.gif)
Note to self: add new examples here.

# Installing
1. [Download the latest release](https://www.github.com/SmartieCodes/hacknet-vscode/releases)
Expand Down
2 changes: 1 addition & 1 deletion examples/Node_Example.xml
Expand Up @@ -2,7 +2,7 @@
<Computer id="bitpc" name="Bitwise Test PC" type="1" icon="chip" security="0" ip="123.123.123.123" allowsDefaultBootModule="true">

<!-- Security -->
<ports>22,80,443</ports>
<ports>22,80,443,1433</ports>
<portsForCrack val="2"/>
<firewall level="6" solution="cookie" additionalTime="0.0"/>
<proxy time="1"/>
Expand Down
8 changes: 4 additions & 4 deletions src/Actions.code-snippets
Expand Up @@ -71,13 +71,13 @@
"AddAsset":{
"prefix": "<AddAsset>",
"scope": "xml",
"body": "<AddAsset FileName=\"$1\" FileContents=\"$2\" TargetComp=\"${3:playerComp}\" TargetFolderpath=\"${0|home,bin,log,sys|}\"/>",
"body": "<AddAsset FileName=\"$1\" FileContents=\"$2\" TargetComp=\"${3:playerComp}\" TargetFolderpath=\"${4|home,bin,log,sys|}\"/>$0",
"description": "Remotely add an asset to the target node."
},
"CopyAsset":{
"prefix": "<CopyAsset>",
"scope": "xml",
"body": "<CopyAsset DestFilePath=\"${1|home,bin,log,sys|}\" DestComp=\"${2:playerComp}\" SourceComp=\"${3:assetNode}\" SourceFileName=\"${4:copycat.txt}\" SourceFilePath=\"${0|home,bin,log,sys|}\"/>",
"body": "<CopyAsset DestFilePath=\"${1|home,bin,log,sys|}\" DestComp=\"${2:playerComp}\" SourceComp=\"${3:assetNode}\" SourceFileName=\"${4:copycat.txt}\" SourceFilePath=\"${5|home,bin,log,sys|}\"/>$0",
"description": "Copy a file from a remote node."
},
"AddMissionToHubServer":{
Expand Down Expand Up @@ -149,7 +149,7 @@
"LaunchHackScript":{
"prefix": "<LaunchHackScript>",
"scope": "xml",
"body": "<LaunchHackScript Filepath=\"${1:Scripts}/${2:HackerScript}.txt\" DelayHost=\"${3:delayNode}\" Delay=\"$4\" SourceComp=\"${5:enemyNode}\" TargetComp=\"${6:playerComp}\" RequireLogsOnSource=\"${7|false,true|}\" RequireSourceIntact=\"${0|true,false|}\"/>",
"body": "<LaunchHackScript Filepath=\"${1:Scripts}/${2:HackerScript}.txt\" DelayHost=\"${3:delayNode}\" Delay=\"$4\" SourceComp=\"${5:enemyNode}\" TargetComp=\"${6:playerComp}\" RequireLogsOnSource=\"${7|false,true|}\" RequireSourceIntact=\"${8|true,false|}\"/>$0",
"description": "Launch a hacker script. Oo, spooky!"
},
"SwitchToTheme":{
Expand Down Expand Up @@ -220,7 +220,7 @@
"SetLock":{
"prefix": "<SetLock>",
"scope": "xml",
"body": "<SetLock DelayHost=\"${1:delayNode}\" Delay=\"$2\" Module=\"${3|terminal,ram,netmap,display|}\" IsLocked=\"${4|true,false|}\" IsHidden=\"${0|false,true|}\"/>",
"body": "<SetLock DelayHost=\"${1:delayNode}\" Delay=\"$2\" Module=\"${3|terminal,ram,netmap,display|}\" IsLocked=\"${4|true,false|}\" IsHidden=\"${5|false,true|}\"/>$0",
"description": "Locks or hides the specified module. Choices are terminal, ram, netmap, and display."
},
"AlertIcon":{
Expand Down
10 changes: 5 additions & 5 deletions src/Missions.code-snippets
Expand Up @@ -69,25 +69,25 @@
"MissionGoalFileDeletion":{
"prefix": "<FileDeletionGoal>",
"scope": "xml",
"body": "<goal type=\"filedeletion\" target=\"${1:nodeID}\" file=\"${2:deleteme.txt}\" path=\"${0|home,bin,log,sys|}\"/>",
"body": "<goal type=\"filedeletion\" target=\"${1:nodeID}\" file=\"${2:deleteme.txt}\" path=\"${3|home,bin,log,sys|}\"/>$0",
"description": "Task to delete the file on node target, at path/file"
},
"ClearFolder":{
"prefix": "<ClearFolderGoal>",
"scope": "xml",
"body": "<goal type=\"clearfolder\" target=\"${1:nodeID}\" path=\"${0|sys,home,bin,log|}\"/>",
"body": "<goal type=\"clearfolder\" target=\"${1:nodeID}\" path=\"${2|sys,home,bin,log|}\"/>$0",
"description": "Task to delete ALL files on node target, in the folder at path"
},
"FileDownload":{
"prefix": "<FileDownloadGoal>",
"scope": "xml",
"body": "<goal type=\"filedownload\" target=\"${1:nodeID}\" file=\"${2:downloadme.txt}\" path=\"${0|home,bin,log,sys|}\"/>",
"body": "<goal type=\"filedownload\" target=\"${1:nodeID}\" file=\"${2:downloadme.txt}\" path=\"${3|home,bin,log,sys|}\"/>$0",
"description": "Task to download the file at the path"
},
"FileChange":{
"prefix": "<FileChangeGoal>",
"scope": "xml",
"body": "<goal type=\"filechange\" target=\"${1:nodeID}\" file=\"${2:changeme.txt}\" path=\"${3|home,bin,log,sys|}\" keyword=\"${4:hacknet}\" caseSensetive=\"${0|false,true|}\"/>",
"body": "<goal type=\"filechange\" target=\"${1:nodeID}\" file=\"${2:changeme.txt}\" path=\"${3|home,bin,log,sys|}\" keyword=\"${4:hacknet}\" caseSensetive=\"${5|false,true|}\"/>$0",
"description": "Task to add the text specified by keyword to the specified file. This is usually achieved by the \"replace\" command. It's possible to make the keyword a larger block and task the player to replace one file with another."
},
"FileChangeRemove":{
Expand Down Expand Up @@ -117,7 +117,7 @@
"UploadFile":{
"prefix": "<UploadFileGoal>",
"scope": "xml",
"body": "<goal type=\"fileupload\" target=\"${1:nodeID}\" file=\"${2:uploadme.txt}\" path=\"${3|home,bin,log,sys|}\" destTarget=\"${4:dropNodeID}\" destPath=\"${0|Drop/Uploads,Drop,home,bin,log,sys|}\"/>",
"body": "<goal type=\"fileupload\" target=\"${1:nodeID}\" file=\"${2:uploadme.txt}\" path=\"${3|home,bin,log,sys|}\" destTarget=\"${4:dropNodeID}\" destPath=\"${5|Drop/Uploads,Drop,home,bin,log,sys|}\"/>$0",
"description": "Task to require a string passed in via the \"Additional Info\" field in the reply email screen."
},
"UploadFileDecrypted":{
Expand Down
12 changes: 6 additions & 6 deletions src/Nodes.code-snippets
Expand Up @@ -23,7 +23,7 @@
"":{
"prefix": "HacknetNodePort",
"scope": "xml",
"body": "${0|21,22,25,80,1433,104,6881,443,192,211,9418,3724,3659|}",
"body": "${1|21,22,25,80,1433,104,6881,443,192,211,9418,3724,3659|}",
"description": "Opens a selection for node ports."
},
"Firewall":{
Expand All @@ -41,7 +41,7 @@
"Account":{
"prefix": "<NodeAccount>",
"scope": "xml",
"body": "<account username=\"${1:bitwise}\" password=\"${2:passw0rd}\" type=\"${0|0,1,2,3|}\"/>",
"body": "<account username=\"${1:bitwise}\" password=\"${2:passw0rd}\" type=\"${3|0,1,2,3|}\"/>$0",
"description": "Accounts for nodes within Hacknet."
},
"AdminPass":{
Expand All @@ -53,7 +53,7 @@
"AdminType":{
"prefix": "<AdminType>",
"scope": "xml",
"body": "<admin type=\"${1|basic,none,fast|}\" isSuper=\"${2|false,true|}\" resetPassword=\"${0|false,true|}\"/>",
"body": "<admin type=\"${1|basic,none,fast|}\" isSuper=\"${2|false,true|}\" resetPassword=\"${3|false,true|}\"/>$0",
"description": "The type of admin account on the node."
},
"TraceTimer":{
Expand Down Expand Up @@ -83,7 +83,7 @@
"PositionNear":{
"prefix": "<PositionNear>",
"scope": "xml",
"body": "<positionNear target=\"${1:closeNode}\" position=\"${2:1}\" total=\"${3:3}\" extraDistance=\"${4:0.5}\" force=\"${0|false,true|}\"/>",
"body": "<positionNear target=\"${1:closeNode}\" position=\"${2:1}\" total=\"${3:3}\" extraDistance=\"${4:0.5}\" force=\"${5|false,true|}\"/>$0",
"description": "This positions this computer near the target on the network map."
},
"TextFile":{
Expand Down Expand Up @@ -198,7 +198,7 @@
"MissionHubDaemon":{
"prefix": "<MissionHubServer>",
"scope": "xml",
"body": "<missionHubServer groupName=\"${1:CSEC}\" serviceName=\"${2:CSEC Mission Hub}\" missionFolderPath=\"Missions/${3:CSEC}\" themeColor=\"${4:200,10,10}\" lineColor=\"${5:255,80,80}\" backgroundColor=\"${6:20,20,20}\" allowAbandon=\"${0|false,true|}\"/>",
"body": "<missionHubServer groupName=\"${1:CSEC}\" serviceName=\"${2:CSEC Mission Hub}\" missionFolderPath=\"Missions/${3:CSEC}\" themeColor=\"${4:200,10,10}\" lineColor=\"${5:255,80,80}\" backgroundColor=\"${6:20,20,20}\" allowAbandon=\"${7|false,true|}\"/>$0",
"description": "Creates a CSEC-Style mission board"
},
"CreditsDaemon":{
Expand Down Expand Up @@ -240,7 +240,7 @@
"WhitelistSource":{
"prefix": "<WhitelistDaemonSource>",
"scope": "xml",
"body": "<WhitelistAuthenticatorDaemon SelfAuthenticating=\"${0|false,true|}\" />",
"body": "<WhitelistAuthenticatorDaemon SelfAuthenticating=\"${1|false,true|}\" />$0",
"description": "This is your basic whitelist server \"host\" type - it wont check incoming connection to itself against it's list. It only serves a protective function against *other* servers."
},
"WhitelistProtected":{
Expand Down

0 comments on commit c419164

Please sign in to comment.