mirror of
https://github.com/Ellpeck/TinyLifeExampleMod.git
synced 2024-11-22 03:53:29 +01:00
0.35.0
This commit is contained in:
parent
ee6be0821a
commit
c4a68727af
2 changed files with 3 additions and 3 deletions
|
@ -105,9 +105,9 @@ public class ExampleMod : Mod {
|
|||
ActionType.Register(new ActionType.TypeSettings("ExampleMod.SitOnGrass", ObjectCategory.Ground, typeof(ExampleGrassSitAction)) {
|
||||
// we set this action to be executable only on grass tiles, not on other ground
|
||||
CanExecute = (actionInfo, _) => {
|
||||
if (!actionInfo.Map.IsInBounds(actionInfo.ActionLocation.ToPoint()))
|
||||
if (!actionInfo.GoalMap.IsInBounds(actionInfo.ActionLocation.ToPoint()))
|
||||
return CanExecuteResult.Hidden;
|
||||
var tile = actionInfo.Map.GetTile(actionInfo.ActionLocation.ToPoint());
|
||||
var tile = actionInfo.GoalMap.GetTile(actionInfo.ActionLocation.ToPoint());
|
||||
// hidden means the action won't be displayed in the ring menu, Valid means the player (or AI) is able to enqueue and execute it
|
||||
return tile.Name.StartsWith("Grass") ? CanExecuteResult.Valid : CanExecuteResult.Hidden;
|
||||
},
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="TinyLifeApi" Version="0.34.0" />
|
||||
<PackageReference Include="TinyLifeApi" Version="0.35.0" />
|
||||
|
||||
<PackageReference Include="ExtremelySimpleLogger" Version="1.3.1" />
|
||||
<PackageReference Include="Lib.Harmony" Version="2.2.2" />
|
||||
|
|
Loading…
Reference in a new issue