Initial commit.
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<OutputPath>bin\$(Configuration)\Mods\mod</OutputPath>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="VintagestoryAPI">
|
||||
<HintPath>$(VINTAGE_STORY)/VintagestoryAPI.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
<Reference Include="VSSurvivalMod">
|
||||
<HintPath>$(VINTAGE_STORY)/Mods/VSSurvivalMod.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="VSEssentials">
|
||||
<HintPath>$(VINTAGE_STORY)/Mods/VSEssentials.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="VSCreativeMod">
|
||||
<HintPath>$(VINTAGE_STORY)/Mods/VSCreativeMod.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>$(VINTAGE_STORY)/Lib/Newtonsoft.Json.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>$(VINTAGE_STORY)/Lib/0Harmony.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="VintagestoryLib">
|
||||
<HintPath>$(VINTAGE_STORY)/VintagestoryLib.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
<Reference Include="protobuf-net">
|
||||
<HintPath>$(VINTAGE_STORY)/Lib/protobuf-net.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="cairo-sharp">
|
||||
<HintPath>$(VINTAGE_STORY)/Lib/cairo-sharp.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Data.Sqlite">
|
||||
<HintPath>$(VINTAGE_STORY)/Lib/Microsoft.Data.Sqlite.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="modinfo.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="modicon.png" Condition="Exists('modicon.png')">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,28 @@
|
||||
using Vintagestory.API.Client;
|
||||
using Vintagestory.API.Server;
|
||||
using Vintagestory.API.Config;
|
||||
using Vintagestory.API.Common;
|
||||
|
||||
namespace CommandHook;
|
||||
|
||||
public class CommandHookModSystem : ModSystem
|
||||
{
|
||||
|
||||
// Called on server and client
|
||||
// Useful for registering block/entity classes on both sides
|
||||
public override void Start(ICoreAPI api)
|
||||
{
|
||||
Mod.Logger.Notification("Hello from template mod: " + api.Side);
|
||||
}
|
||||
|
||||
public override void StartServerSide(ICoreServerAPI api)
|
||||
{
|
||||
Mod.Logger.Notification("Hello from template mod server side: " + Lang.Get("commandhook:hello"));
|
||||
}
|
||||
|
||||
public override void StartClientSide(ICoreClientAPI api)
|
||||
{
|
||||
Mod.Logger.Notification("Hello from template mod client side: " + Lang.Get("commandhook:hello"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"profiles": {
|
||||
"Client": {
|
||||
"commandName": "Executable",
|
||||
"executablePath": "dotnet",
|
||||
"commandLineArgs": "\"$(VINTAGE_STORY)/Vintagestory.dll\" --tracelog --addModPath \"$(ProjectDir)/bin/$(Configuration)/Mods\" --addOrigin \"$(ProjectDir)/assets\"",
|
||||
"workingDirectory": "$(VINTAGE_STORY)"
|
||||
},
|
||||
"Server": {
|
||||
"commandName": "Executable",
|
||||
"executablePath": "dotnet",
|
||||
"commandLineArgs": "\"$(VINTAGE_STORY)/VintagestoryServer.dll\" --tracelog --addModPath \"$(ProjectDir)/bin/$(Configuration)/Mods\" --addOrigin \"$(ProjectDir)/assets\"",
|
||||
"workingDirectory": "$(VINTAGE_STORY)"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"hello": "hello world!"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"$schema": "https://moddbcdn.vintagestory.at/schema/modinfo.latest.json",
|
||||
"type": "Code",
|
||||
"modid": "commandhook",
|
||||
"name": "CommandHook",
|
||||
"authors": [
|
||||
"anth64"
|
||||
],
|
||||
"description": "A server-side API for routing and overriding vanilla commands.",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"game": "1.21.0"
|
||||
},
|
||||
"side": "Server"
|
||||
}
|
||||
Reference in New Issue
Block a user