generated from AriasCreations/vsmodtemplate
Copy build chain from Vintage Storage
This commit is contained in:
parent
c416e6e5e1
commit
f2a23552af
14 changed files with 125 additions and 51 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -13,6 +13,8 @@
|
|||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
.game
|
||||
Releases
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
|
|
@ -5,7 +5,7 @@ VisualStudioVersion = 17.0.31903.59
|
|||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CakeBuild", "CakeBuild\CakeBuild.csproj", "{BC68EDF6-C294-4819-B7F4-9EA99B73E69D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModTemplate", "ModTemplate\ModTemplate.csproj", "{CB2100BC-F653-402A-9FBA-EA463C2BD4FC}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AriasServerUtils", "AriasServerUtils\AriasServerUtils.csproj", "{CB2100BC-F653-402A-9FBA-EA463C2BD4FC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
50
AriasServerUtils/ASUModSystem.cs
Normal file
50
AriasServerUtils/ASUModSystem.cs
Normal file
|
@ -0,0 +1,50 @@
|
|||
using Vintagestory.API.Client;
|
||||
using Vintagestory.API.Common;
|
||||
using Vintagestory.API.Config;
|
||||
using Vintagestory.API.Server;
|
||||
|
||||
namespace ServerUtilities
|
||||
{
|
||||
public class ServerUtilities : ModSystem
|
||||
{
|
||||
public static string MOD_ID = "ariasserverutils";
|
||||
|
||||
/// <summary>
|
||||
/// Method to register all mod blocks
|
||||
/// </summary>
|
||||
/// <param name="api"></param>
|
||||
private void RegisterBlocks(ICoreAPI api)
|
||||
{
|
||||
api.Logger.Notification("Begin registering block classes for Aria's Server Utils...");
|
||||
|
||||
|
||||
|
||||
|
||||
api.Logger.Notification("Block Classes have been registered for Aria's Server Utils!");
|
||||
}
|
||||
|
||||
private void RegisterBlockEntities(ICoreAPI api)
|
||||
{
|
||||
}
|
||||
|
||||
// Called on server and client
|
||||
public override void Start(ICoreAPI api)
|
||||
{
|
||||
api.Logger.Notification(Lang.Get($"{MOD_ID}:start"));
|
||||
|
||||
RegisterBlocks(api);
|
||||
RegisterBlockEntities(api);
|
||||
|
||||
}
|
||||
|
||||
public override void StartServerSide(ICoreServerAPI api)
|
||||
{
|
||||
api.Logger.Notification(Lang.Get($"{MOD_ID}:start"));
|
||||
}
|
||||
|
||||
public override void StartClientSide(ICoreClientAPI api)
|
||||
{
|
||||
api.Logger.Notification(Lang.Get($"{MOD_ID}:start"));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,23 +8,23 @@
|
|||
|
||||
<ItemGroup>
|
||||
<Reference Include="VintagestoryAPI">
|
||||
<HintPath>$(VINTAGE_STORY)/VintagestoryAPI.dll</HintPath>
|
||||
<HintPath>../.game/VintagestoryAPI.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
<Reference Include="VSSurvivalMod">
|
||||
<HintPath>$(VINTAGE_STORY)/Mods/VSSurvivalMod.dll</HintPath>
|
||||
<HintPath>../.game/Mods/VSSurvivalMod.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="VSEssentials">
|
||||
<HintPath>$(VINTAGE_STORY)/Mods/VSEssentials.dll</HintPath>
|
||||
<HintPath>../.game/Mods/VSEssentials.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="VSCreativeMod">
|
||||
<HintPath>$(VINTAGE_STORY)/Mods/VSCreativeMod.dll</HintPath>
|
||||
<HintPath>../.game/Mods/VSCreativeMod.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>$(VINTAGE_STORY)/Lib/Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath>../.game/Lib/Newtonsoft.Json.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
1
AriasServerUtils/assets/ariasserverutils/lang/en.json
Normal file
1
AriasServerUtils/assets/ariasserverutils/lang/en.json
Normal file
|
@ -0,0 +1 @@
|
|||
{}
|
11
AriasServerUtils/modinfo.json
Normal file
11
AriasServerUtils/modinfo.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"type": "code",
|
||||
"modid": "ariasserverutils",
|
||||
"name": "Aria's Server Utilities",
|
||||
"authors": ["zontreck"],
|
||||
"description": "A collection of server utilities\n\nBuild Date: 01-17-2025 @ 03:12 PM",
|
||||
"version": "1.0.0-dev.1",
|
||||
"dependencies": {
|
||||
"game": ""
|
||||
}
|
||||
}
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<Reference Include="VintagestoryAPI">
|
||||
<HintPath>$(VINTAGE_STORY)/VintagestoryAPI.dll</HintPath>
|
||||
<HintPath>../.game/VintagestoryAPI.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -24,7 +24,7 @@ public static class Program
|
|||
|
||||
public class BuildContext : FrostingContext
|
||||
{
|
||||
public const string ProjectName = "ModTemplate";
|
||||
public const string ProjectName = "AriasServerUtils";
|
||||
public string BuildConfiguration { get; set; }
|
||||
public string Version { get; }
|
||||
public string Name { get; }
|
||||
|
|
44
Jenkinsfile
vendored
Normal file
44
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
pipeline {
|
||||
agent any
|
||||
options {
|
||||
buildDiscarder (
|
||||
logRotator (
|
||||
numToKeepStr: '5'
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage ("Build & Archive") {
|
||||
agent {
|
||||
label 'linux'
|
||||
}
|
||||
|
||||
steps {
|
||||
sh '''
|
||||
#!/bin/bash
|
||||
|
||||
git submodule update --init --recursive
|
||||
|
||||
update_vs_dotgame
|
||||
chmod +x build.sh
|
||||
|
||||
./build.sh
|
||||
'''
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
archiveArtifacts artifacts: "Releases/*.zip"
|
||||
cleanWs()
|
||||
script {
|
||||
|
||||
if(env.DISCORD_URL != '') {
|
||||
discordSend customUsername: 'Jenkins', description: 'NOTICE: This is an automated development build and may not be stable. Use at your own risk.', enableArtifactsList: true, title: 'Arias Server Utils Build Results', webhookURL: env.DISCORD_URL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
using Vintagestory.API.Client;
|
||||
using Vintagestory.API.Common;
|
||||
using Vintagestory.API.Config;
|
||||
using Vintagestory.API.Server;
|
||||
|
||||
namespace ModTemplate
|
||||
{
|
||||
public class ModTemplateModSystem : ModSystem
|
||||
{
|
||||
// Called on server and client
|
||||
public override void Start(ICoreAPI api)
|
||||
{
|
||||
api.Logger.Notification("Hello from template mod: " + Lang.Get("mymodid:hello"));
|
||||
}
|
||||
|
||||
public override void StartServerSide(ICoreServerAPI api)
|
||||
{
|
||||
api.Logger.Notification("Hello from template mod server side");
|
||||
}
|
||||
|
||||
public override void StartClientSide(ICoreClientAPI api)
|
||||
{
|
||||
api.Logger.Notification("Hello from template mod client side");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"hello": "hello world!"
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"type": "code",
|
||||
"modid": "mymodid",
|
||||
"name": "My Template Mod",
|
||||
"authors": [
|
||||
"Unknown"
|
||||
],
|
||||
"description": "To be added",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"game": ""
|
||||
}
|
||||
}
|
8
runTest
Executable file
8
runTest
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
rm -rf Releases
|
||||
./build.sh
|
||||
vsleep 2
|
||||
rm -rf Releases/ariasserverutils
|
||||
.game/Vintagestory --tracelog --addModPath "$(pwd)/Releases" -o modtest
|
||||
#.game/Vintagestory --tracelog --addModPath "$(pwd)/Releases"
|
Loading…
Add table
Add a link
Reference in a new issue