Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Empty file added .github/request.md
Empty file.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
TODO.txt
out
node_modules
client/server
Expand Down
File renamed without changes.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,51 @@
## Introduction
**ZeroHour-Server** is a language server written in TypeScript for Command and Conquor Generals Zero Hour INI. The server is intended to provide formatting, linting and code completion. Currently this is intended for Visual Studio Code only, however all functionallities will be server sided and can be utilized in other IDEs by creating an interface for communicating with the server over Json-RPC.

## How to install

1. Open Visual Studio Code
2. Open the Extensions Tab
3. Search for ZeroSyntax
4. Click Install
5. Click Reload
6. Done!

## Functionallities
ZeroSyntax language server supports the following functionallities:
- Formatting
- Diagnostics
- Code Completion


### Formatting
To format a ini file you can use the following command:

1. Access it from the Command Pallette (Ctrl+Shift+P or Cmd+Shift+P on Mac)
2. Write:
```plaintext
> Format Document
```
3. Press Enter

#### Before
TODO: Add image

#### After
TODO: Add image


### Diagnostics
Diagnostics works out of the box. Any syntax errors will be highlighted in the editor.

### Code Completion
The server supports context based code completion. This is done by analyzing the syntax tree and collecting possible completions based on the current context.

1. Write some code
2. Press Ctrl+Space

[Completions](./images/gifs/ZeroSyntax-ServerCompletionGif.gif)


## Contributing
For contributing you will need to fork the repository, create your own branch make and test any changes you feel is missing from the project and create a pull request. I will then take a look at the code changes and merge the code if everything is in order.

Expand Down
19 changes: 16 additions & 3 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@
"vscode-test": "^1.6.1"
},
"dependencies": {
"@types/vscode": "^1.94.0",
"glob": "^11.0.0",
"vscode-languageclient": "^9.0.1",
"vscode-languageserver-textdocument": "^1.0.12"
"vscode-languageserver-protocol": "^3.17.5",
"vscode-languageserver-textdocument": "^1.0.12",
"vscode-languageserver-types": "^3.17.5"
}
}
2 changes: 2 additions & 0 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ export function activate(context: vscode.ExtensionContext) {
if (languageServerRunning) {
client.start();
}

vscode.window.showWarningMessage('Zero Syntax: This is an alpha version!\nPlease report bugs to https://github.com/ViTeXFTW/ZeroSyntax-Server/issues');
}

vscode.workspace.onDidChangeConfiguration((e) => {
Expand Down
19 changes: 0 additions & 19 deletions client/src/test/clientActivation.test.ts

This file was deleted.

15 changes: 0 additions & 15 deletions client/src/test/diagnostics.test.ts

This file was deleted.

48 changes: 0 additions & 48 deletions client/src/test/helper.ts

This file was deleted.

39 changes: 0 additions & 39 deletions client/src/test/index.ts

This file was deleted.

27 changes: 0 additions & 27 deletions client/src/test/runTest.ts

This file was deleted.

17 changes: 0 additions & 17 deletions client/test/suite/vscode-test.test.ts

This file was deleted.

4 changes: 2 additions & 2 deletions client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"target": "es2020",
"lib": ["es2020"],
"outDir": "./out",
"rootDir": "./",
"rootDir": "./src",
"sourceMap": true,
"skipLibCheck": true,
"typeRoots": [
"node_modules/@types"
]
},
"include": ["src", "test"],
"include": ["src"],
"exclude": ["node_modules"]
}
9 changes: 0 additions & 9 deletions client/tsconfig.test.json

This file was deleted.

12 changes: 12 additions & 0 deletions docs/ModuleOverview/AI Mismatch List.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Things that cause the AI to mismatch in multiplayer

- Building scaffolds in the AI base within the first minute or so
- Attacking/Rushing the AI within the first 2 minutes or so

- When a unit fires a weapon that uses dumb projectiles fires too close to itself
You can make a test map containing all DumbProjectile units and test them out individually. Steps to reproduce are:
1. Select a tank
2. Force fire as close as possible to the firing point/bone
3. Look for projectile detonation FX (graphics + audio) at the bottom left corner of the map.
- If they appear in that spot (and thus disappear from the force-fired position), that means the game would mismatch in MP
- tanks in ZH have low weapon speed 300/400 so they are not affected)
Loading