Skip to content

Commit 306aae4

Browse files
committed
automatically copy assets to dependent mod (wip #3)
1 parent 84defbb commit 306aae4

6 files changed

Lines changed: 92 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
**:sparkles: Features**
66
- Added `System.RegisterClasses` virtual method ([#5](https://git.omni.ms/vintage-story-mods/common-mod/issues/5))
77
- Added registry helper methods ([#2](https://git.omni.ms/vintage-story-mods/common-mod/issues/2))
8+
- Added custom `BlockMultiblock` implementation that respects particle collision boxes ([#3](https://git.omni.ms/vintage-story-mods/common-mod/issues/3))
89

910
**:hammer: Refactors**
1011
- Cleanup pass ([#1](https://git.omni.ms/vintage-story-mods/common-mod/issues/1))

Common.Mod.Example/Common.Mod.Example.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<Nullable>enable</Nullable>
88
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
99
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
10+
<ModId>example</ModId>
1011
</PropertyGroup>
1112

1213
<ItemGroup>
@@ -35,6 +36,7 @@
3536
</ItemGroup>
3637

3738
<ItemGroup>
39+
<!--<PackageReference Include="Common.Mod" Version="12.34.56"/>-->
3840
<PackageReference Include="JetBrains.Annotations" Version="2025.2.2">
3941
<ExcludeAssets>runtime</ExcludeAssets>
4042
</PackageReference>

Common.Mod/Common.Mod.csproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,17 @@
5151
<ItemGroup>
5252
<ProjectReference Include="../Common.Mod.Common/Common.Mod.Common.csproj"/>
5353
</ItemGroup>
54+
55+
<ItemGroup>
56+
<Content Include="build/Common.Mod.targets">
57+
<PackagePath>build/Common.Mod.targets</PackagePath>
58+
</Content>
59+
<Content Include="assets/**/*">
60+
<PackagePath>assets</PackagePath>
61+
<Pack>true</Pack>
62+
<PackageCopyToOutput>true</PackageCopyToOutput>
63+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
64+
</Content>
65+
</ItemGroup>
5466

5567
</Project>
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"code": "multiblock",
3+
"class": "VFBlockMultiblock",
4+
"handbook": {
5+
"exclude": true
6+
},
7+
"variantgroups": [
8+
{
9+
"code": "type",
10+
"states": [
11+
"monolithic"
12+
]
13+
},
14+
{
15+
"code": "dx",
16+
"states": [
17+
"n2",
18+
"n1",
19+
"0",
20+
"p1",
21+
"p2"
22+
]
23+
},
24+
{
25+
"code": "dy",
26+
"states": [
27+
"n2",
28+
"n1",
29+
"0",
30+
"p1",
31+
"p2",
32+
"p3"
33+
]
34+
},
35+
{
36+
"code": "dz",
37+
"states": [
38+
"n2",
39+
"n1",
40+
"0",
41+
"p1",
42+
"p2"
43+
]
44+
}
45+
],
46+
"shape": {
47+
"base": "game:block/basic/nothing"
48+
},
49+
"drawtype": "json",
50+
"sidesolid": {
51+
"all": false
52+
},
53+
"sideopaque": {
54+
"all": false
55+
},
56+
"blockmaterial": "Wood",
57+
"replaceable": 160,
58+
"resistance": 4,
59+
"lightAbsorption": 0,
60+
"drops": []
61+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
<ItemGroup>
3+
<Assets Include="$(MSBuildThisFileDirectory)/../assets/**/*"/>
4+
</ItemGroup>
5+
<Target Name="CopyAssets" BeforeTargets="Build">
6+
<Copy SourceFiles="@(Assets)" DestinationFolder="$(TargetDir)assets/$(ModId)/%(RecursiveDir)"/>
7+
</Target>
8+
</Project>

nuget.config

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
3-
<configuration>
4-
<packageSources>
5-
<add key="forgejo" value="https://git.omni.ms/api/packages/vintage-story-mods/nuget/index.json" />
6-
</packageSources>
7-
</configuration>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<configuration>
4+
<packageSources>
5+
<add key="forgejo" value="https://git.omni.ms/api/packages/vintage-story-mods/nuget/index.json" />
6+
<add key="local" value="out/" />
7+
</packageSources>
8+
</configuration>

0 commit comments

Comments
 (0)