Skip to content

Commit 367f8eb

Browse files
committed
update for lc v2
1 parent 66ac661 commit 367f8eb

File tree

5 files changed

+34
-9
lines changed

5 files changed

+34
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ Debug
33
obj
44
*.exe
55
*.dll
6+
*.lcpkg

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,13 @@ However, some of it might be useful for debugging.
88

99
## How to install
1010

11-
You can install this as a plugin using
12-
[apkg](https://github.com/alexcoder04/LeoConsole-apkg).
11+
This plugin is available in the [contrib](https://github.com/alexcoder04/LeoConsole-repo-contrib) repository.
12+
Enable it and then
1313

1414
```
15-
apkg get https://github.com/alexcoder04/LeoConsole-hacks.git
15+
apkg get hacks
1616
```
1717

18-
Or compile manually with `dotnet build` and copy the resulting `.dll` file to
19-
the `plugins` folder of your LeoConsole installtion.
20-
2118
## Commands
2219

2320
- `chlcpw`: view and change user details

hacks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<ItemGroup>
1111
<Reference Include="ILeoConsole">
12-
<HintPath>/usr/include/LeoConsole/ILeoConsole.dll</HintPath>
12+
<HintPath>/usr/lib/ILeoConsole.dll</HintPath>
1313
</Reference>
1414
</ItemGroup>
1515

manifest.apkg.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"manifestVersion": 2.1,
3+
"packageName": "hacks",
4+
"packageVersion": "1.0.0",
5+
"build": {
6+
"command": "dotnet",
7+
"args": ["build", "--nologo"],
8+
"folder": ".",
9+
"dlls": ["hacks.dll"],
10+
"share": "./share"
11+
},
12+
"project": {
13+
"maintainer": "alexcoder04",
14+
"email": "alexcoder04@protonmail.com",
15+
"homepage": "https://github.com/alexcoder04/LeoConsole-hacks",
16+
"bugTracker": "https://github.com/alexcoder04/LeoConsole-hacks/issues"
17+
}
18+
}

plugin.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ public class ConsoleData : IData {
1111
public string SavePath { get { return _SavePath; } set { _SavePath = value; } }
1212
public static string _DownloadPath;
1313
public string DownloadPath { get { return _DownloadPath; } set { _DownloadPath = value; } }
14+
public static string _Version;
15+
public string Version { get { return _Version; } set { _Version = value; } }
16+
public static string _CurrentWorkingPath;
17+
public string CurrentWorkingPath { get { return _CurrentWorkingPath; } set { _CurrentWorkingPath = value; } }
1418
}
1519

1620
public class LCHacks : IPlugin {
@@ -23,13 +27,18 @@ public class LCHacks : IPlugin {
2327
private List<ICommand> _Commands;
2428
public List<ICommand> Commands { get { return _Commands; } set { _Commands = value; } }
2529

26-
public void PluginMain() {
30+
public void PluginInit() {
2731
_data = new ConsoleData();
28-
2932
_Commands = new List<ICommand>();
33+
}
34+
35+
public void RegisterCommands(){
3036
_Commands.Add(new CHLCPW());
3137
_Commands.Add(new Crash());
3238
}
39+
40+
public void PluginMain() { }
41+
public void PluginShutdown() { }
3342
}
3443
}
3544

0 commit comments

Comments
 (0)