Skip to content

Commit

Permalink
Working Implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwDayDream committed May 12, 2024
1 parent abcb383 commit 359cc91
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<PathMap>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))=./</PathMap>

<TestGame>Rounds</TestGame>
<TestGame>Valheim</TestGame>
</PropertyGroup>

<!-- Game Specific Information -->
Expand All @@ -27,6 +27,7 @@
<Import Condition="'$(TestGame)' == 'Atomicrops'" Project="./Games/Atomicrops.targets"/>
<Import Condition="'$(TestGame)' == 'PotionCraft'" Project="./Games/PotionCraft.targets"/>
<Import Condition="'$(TestGame)' == 'Rounds'" Project="./Games/Rounds.targets"/>
<Import Condition="'$(TestGame)' == 'Valheim'" Project="./Games/Valheim.targets"/>

<ItemGroup>
<ProjectReference Include="../CessilCellsCeaChells/CessilCellsCeaChells.csproj"/>
Expand Down
8 changes: 8 additions & 0 deletions CessilCellsCeaChells.BBTester/Games/Valheim.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project>
<PropertyGroup>
<DefineConstants>Valheim</DefineConstants>
<TargetGameFiles>$(VLHM_GAMEFILES)</TargetGameFiles>
<TargetGameUnityVersion>2022.3.17</TargetGameUnityVersion>
<TargetGameDLL>assembly_valheim</TargetGameDLL>
</PropertyGroup>
</Project>
10 changes: 5 additions & 5 deletions CessilCellsCeaChells.BBTester/PluginSpecifics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
#elif Rounds
using TargetType = Player;
using TargetEnum = PickerType;
#elif Valheim
using TargetType = Player;
using TargetEnum = Player.PlacementStatus;
#endif

[assembly: RequiresField(typeof(TargetType), "BB_TestField", typeof(string))]
[assembly: RequiresProperty(typeof(TargetType), "BB_TestProp", typeof(CustomDataStruct))]
[assembly: RequiresProperty(typeof(TargetType), "BB_TestProp", typeof(string))]
[assembly: RequiresEnumInsertion(typeof(TargetEnum), "BB_TestEnum")]
[assembly: RequiresMethod(typeof(TargetType), "BB_TestMethod", typeof(void),
typeof(string), typeof(int))] // void Player::BB_TestMethod(string, int)
[assembly: RequiresMethodDefaults(typeof(TargetType), "BB_TestMethod", typeof(void),
[ typeof (bool), typeof(int) ], [ 0 ])] // void Player::BB_TestMethod(bool, int = 0)

namespace CessilCellsCeaChells.BBTester;
public struct CustomDataStruct { }
[ typeof (bool), typeof(int) ], [ 0 ])] // void Player::BB_TestMethod(bool, int = 0)
1 change: 1 addition & 0 deletions Games.targets
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
<ATMCRPS_GAMEFILES>$(STEAMAPPS)/Atomicrops/</ATMCRPS_GAMEFILES>
<PCRAFT_GAMEFILES>$(STEAMAPPS)/Potion Craft/</PCRAFT_GAMEFILES>
<ROUNDS_GAMEFILES>$(STEAMAPPS)/ROUNDS/</ROUNDS_GAMEFILES>
<VLHM_GAMEFILES>$(STEAMAPPS)/Valheim/</VLHM_GAMEFILES>
</PropertyGroup>
</Project>

0 comments on commit 359cc91

Please sign in to comment.