Skip to content

Commit

Permalink
Update to 1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
DArkHekRoMaNT committed Aug 26, 2022
1 parent 7057224 commit 4b26a08
Show file tree
Hide file tree
Showing 22 changed files with 364 additions and 228 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
/obj
/mods
/releases
/.history
/.vs
/*.csproj.user
/*.sln
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

107 changes: 0 additions & 107 deletions .vscode/launch.json

This file was deleted.

3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

58 changes: 0 additions & 58 deletions .vscode/tasks.json

This file was deleted.

119 changes: 84 additions & 35 deletions HelveHammerExtensions.csproj
Original file line number Diff line number Diff line change
@@ -1,36 +1,85 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<VSVersion>1.16.0</VSVersion>
</PropertyGroup>

<ItemGroup>
<Reference Include="VintagestoryAPI">
<HintPath>$(VINTAGE_STORY)/$(VSVersion)/VintagestoryAPI.dll</HintPath>
</Reference>
<Reference Include="VSSurvivalMod">
<HintPath>$(VINTAGE_STORY)/$(VSVersion)/Mods/VSSurvivalMod.dll</HintPath>
</Reference>
<Reference Include="0Harmony">
<HintPath>$(VINTAGE_STORY)/$(VSVersion)/Lib/0Harmony.dll</HintPath>
</Reference>
<Reference Include="protobuf-net">
<HintPath>$(VINTAGE_STORY)/$(VSVersion)/Lib/protobuf-net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>$(VINTAGE_STORY)/$(VSVersion)/Lib/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="cairo-sharp">
<HintPath>$(VINTAGE_STORY)/$(VSVersion)/Lib/cairo-sharp.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
</ItemGroup>

<Target Name="Copy" AfterTargets="PostBuildEvent">
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(ProjectDir)mods/$(ProjectName)" />
<Copy SourceFiles="$(TargetDir)/$(TargetName).pdb" DestinationFolder="$(ProjectDir)mods/$(ProjectName)" />
</Target>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<Configurations>Debug;Release;Publish</Configurations>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>CS1591</NoWarn>
<WarningLevel>4</WarningLevel>
<LangVersion>5</LangVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' != 'Debug' ">
<DefaultItemExcludes>$(DefaultItemExcludes);modtools/**</DefaultItemExcludes>
</PropertyGroup>

<PropertyGroup>
<MinGameVersion>1.17.0-rc.5</MinGameVersion>
<RunGameVersion>1.17.0-rc.5</RunGameVersion>
</PropertyGroup>

<ItemGroup Label="Game Refs">
<Reference Include="VintagestoryAPI">
<HintPath>$(VINTAGE_STORY)/$(MinGameVersion)/VintagestoryAPI.dll</HintPath>
</Reference>
<Reference Include="VintagestoryLib">
<HintPath>$(VINTAGE_STORY)/$(MinGameVersion)/VintagestoryLib.dll</HintPath>
</Reference>
<Reference Include="VSEssentials">
<HintPath>$(VINTAGE_STORY)/$(MinGameVersion)/Mods/VSEssentials.dll</HintPath>
</Reference>
<Reference Include="VSCreativeMod">
<HintPath>$(VINTAGE_STORY)/$(MinGameVersion)/Mods/VSCreativeMod.dll</HintPath>
</Reference>
<Reference Include="VSSurvivalMod">
<HintPath>$(VINTAGE_STORY)/$(MinGameVersion)/Mods/VSSurvivalMod.dll</HintPath>
</Reference>
<Reference Include="0Harmony">
<HintPath>$(VINTAGE_STORY)/$(MinGameVersion)/Lib/0Harmony.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>$(VINTAGE_STORY)/$(MinGameVersion)/Lib/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="protobuf-net">
<HintPath>$(VINTAGE_STORY)/$(MinGameVersion)/Lib/protobuf-net.dll</HintPath>
</Reference>
<Reference Include="cairo-sharp">
<HintPath>$(VINTAGE_STORY)/$(MinGameVersion)/Lib/cairo-sharp.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<Compile Remove="mods/**" />
</ItemGroup>

<Target Name="CollectMod" AfterTargets="PostBuildEvent">
<RemoveDir Directories="mods/$(TargetName)" />

<Copy SourceFiles="modinfo.json" DestinationFolder="mods/$(TargetName)" />
<Copy SourceFiles="modicon.png" DestinationFolder="mods/$(TargetName)" ContinueOnError="true" />
<Copy SourceFiles="README.md" DestinationFolder="mods/$(TargetName)" />
<Copy SourceFiles="LICENSE" DestinationFolder="mods/$(TargetName)" />
</Target>

<Target Name="DllBuild" AfterTargets="CollectMod" Condition=" '$(Configuration)' == 'Debug' ">
<Copy SourceFiles="$(TargetPath)" DestinationFolder="mods/$(TargetName)" />
<Copy SourceFiles="$(TargetDir)/$(TargetName).pdb" DestinationFolder="mods/$(TargetName)" />
</Target>

<Target Name="SourceBuild" AfterTargets="CollectMod" Condition=" '$(Configuration)' != 'Debug' ">
<ItemGroup>
<Src Include="src/**" />
</ItemGroup>
<Copy SourceFiles="@(Src)" DestinationFolder="mods/$(TargetName)/src/%(RecursiveDir)" />
</Target>

<Target Name="ZipMod" AfterTargets="CollectMod" Condition=" '$(Configuration)' == 'Publish' ">
<ItemGroup>
<Res Include="assets/**" />
</ItemGroup>
<Copy SourceFiles="@(Res)" DestinationFolder="mods/$(TargetName)/assets/%(RecursiveDir)" />

<MakeDir Directories="releases" />
<ZipDirectory DestinationFile="releases/$(TargetName)_v$(RunGameVersion)_v.zip" SourceDirectory="mods/$(TargetName)" Overwrite="true" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 DArkHekRoMaNT
Copyright (c) 2022 DArkHekRoMaNT

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 15 additions & 0 deletions Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"profiles": {
"Launch Client": {
"commandName": "Executable",
"executablePath": "%VINTAGE_STORY%\\$(RunGameVersion)\\Vintagestory.exe",
"commandLineArgs": "--addModPath $(ProjectDir)mods --addOrigin $(ProjectDir)assets --tracelog"
},
"Launch Client with Test World": {
"commandName": "Executable",
"executablePath": "%VINTAGE_STORY%\\$(RunGameVersion)\\Vintagestory.exe",
"commandLineArgs": "--playStyle \"preset-surviveandbuild\" --openWorld \"$(ProjectName) Test World\" --addModPath $(ProjectDir)mods --addOrigin $(ProjectDir)assets --tracelog",
"nativeDebugging": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@
"path": "/attributes",
"value": {}
},
{
"file": "game:itemtypes/toolhead/bladehead.json",
"op": "add",
"path": "/attributes",
"value": {}
},
{
"file": "game:itemtypes/toolhead/*",
"op": "add",
Expand Down
File renamed without changes
6 changes: 3 additions & 3 deletions resources/modinfo.json → modinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"type": "code",
"modid": "helvehammerext",
"name": "Helve Hammer Extensions",
"authors": ["DArkHekRoMaNT"],
"authors": [ "DArkHekRoMaNT" ],
"description": "",
"version": "1.2.1",
"version": "1.3.0",
"dependencies": {
"game": "1.16.0"
"game": "1.17.0-rc.5"
}
}
20 changes: 16 additions & 4 deletions src/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,21 @@ namespace HelveHammerExtensions
{
public class Config
{
public static Config Current { get; set; } = new Config();
public bool AllWorkable { get; set; } = false;
public bool DefaultWorkable { get; set; } = true;
public int AnvilTier { get; set; } = 3;
public static Config Current { get; set; }
public bool AllWorkable { get; set; }
public bool DefaultWorkable { get; set; }
public int AnvilTier { get; set; }

public Config()
{
AllWorkable = false;
DefaultWorkable = true;
AnvilTier = 3;
}

static Config()
{
Current = new Config();
}
}
}
Loading

0 comments on commit 4b26a08

Please sign in to comment.