diff --git a/.gitignore b/.gitignore index 8e4f89c..1956a6c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,8 @@ *.user *.userosscache *.sln.docstates +.game +Releases # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs diff --git a/ModTemplate.sln b/AriasServerUtils.sln similarity index 89% rename from ModTemplate.sln rename to AriasServerUtils.sln index dfdae49..869449a 100644 --- a/ModTemplate.sln +++ b/AriasServerUtils.sln @@ -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 diff --git a/AriasServerUtils/ASUModSystem.cs b/AriasServerUtils/ASUModSystem.cs new file mode 100644 index 0000000..0bd3fb5 --- /dev/null +++ b/AriasServerUtils/ASUModSystem.cs @@ -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"; + + /// + /// Method to register all mod blocks + /// + /// + 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")); + } + } +} diff --git a/ModTemplate/ModTemplate.csproj b/AriasServerUtils/AriasServerUtils.csproj similarity index 75% rename from ModTemplate/ModTemplate.csproj rename to AriasServerUtils/AriasServerUtils.csproj index 8c27333..a3b5a98 100644 --- a/ModTemplate/ModTemplate.csproj +++ b/AriasServerUtils/AriasServerUtils.csproj @@ -8,23 +8,23 @@ - $(VINTAGE_STORY)/VintagestoryAPI.dll + ../.game/VintagestoryAPI.dll false - $(VINTAGE_STORY)/Mods/VSSurvivalMod.dll + ../.game/Mods/VSSurvivalMod.dll False - $(VINTAGE_STORY)/Mods/VSEssentials.dll + ../.game/Mods/VSEssentials.dll False - $(VINTAGE_STORY)/Mods/VSCreativeMod.dll + ../.game/Mods/VSCreativeMod.dll False - $(VINTAGE_STORY)/Lib/Newtonsoft.Json.dll + ../.game/Lib/Newtonsoft.Json.dll False diff --git a/ModTemplate/Properties/launchSettings.json b/AriasServerUtils/Properties/launchSettings.json similarity index 100% rename from ModTemplate/Properties/launchSettings.json rename to AriasServerUtils/Properties/launchSettings.json diff --git a/AriasServerUtils/assets/ariasserverutils/lang/en.json b/AriasServerUtils/assets/ariasserverutils/lang/en.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/AriasServerUtils/assets/ariasserverutils/lang/en.json @@ -0,0 +1 @@ +{} diff --git a/AriasServerUtils/modinfo.json b/AriasServerUtils/modinfo.json new file mode 100644 index 0000000..074c663 --- /dev/null +++ b/AriasServerUtils/modinfo.json @@ -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": "" + } +} diff --git a/CakeBuild/CakeBuild.csproj b/CakeBuild/CakeBuild.csproj index 8a41edf..5346f21 100644 --- a/CakeBuild/CakeBuild.csproj +++ b/CakeBuild/CakeBuild.csproj @@ -13,7 +13,7 @@ - $(VINTAGE_STORY)/VintagestoryAPI.dll + ../.game/VintagestoryAPI.dll - \ No newline at end of file + diff --git a/CakeBuild/Program.cs b/CakeBuild/Program.cs index 5deae76..af570aa 100644 --- a/CakeBuild/Program.cs +++ b/CakeBuild/Program.cs @@ -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; } diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..78eee23 --- /dev/null +++ b/Jenkinsfile @@ -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 + } + } + } + } + } + } +} \ No newline at end of file diff --git a/ModTemplate/ModTemplateModSystem.cs b/ModTemplate/ModTemplateModSystem.cs deleted file mode 100644 index 9a5789a..0000000 --- a/ModTemplate/ModTemplateModSystem.cs +++ /dev/null @@ -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"); - } - } -} diff --git a/ModTemplate/assets/mymodid/lang/en.json b/ModTemplate/assets/mymodid/lang/en.json deleted file mode 100644 index ed900d8..0000000 --- a/ModTemplate/assets/mymodid/lang/en.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "hello": "hello world!" -} \ No newline at end of file diff --git a/ModTemplate/modinfo.json b/ModTemplate/modinfo.json deleted file mode 100644 index 5976256..0000000 --- a/ModTemplate/modinfo.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "code", - "modid": "mymodid", - "name": "My Template Mod", - "authors": [ - "Unknown" - ], - "description": "To be added", - "version": "1.0.0", - "dependencies": { - "game": "" - } -} \ No newline at end of file diff --git a/runTest b/runTest new file mode 100755 index 0000000..605caf5 --- /dev/null +++ b/runTest @@ -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"