mirror of
https://github.com/Ellpeck/TinyLifeExampleMod.git
synced 2024-11-25 21:28:33 +01:00
lovely code cleanup
This commit is contained in:
parent
d6cd9bd6e0
commit
d9a47dd846
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ public class ExampleMod : Mod {
|
||||||
// adding a simple action: sitting down in the grass, which also gives us a nice emotion modifier
|
// adding a simple action: sitting down in the grass, which also gives us a nice emotion modifier
|
||||||
ActionType.Register(new ActionType.TypeSettings("ExampleMod.SitOnGrass", ObjectCategory.Ground, typeof(SitDownOnGrassAction)) {
|
ActionType.Register(new ActionType.TypeSettings("ExampleMod.SitOnGrass", ObjectCategory.Ground, typeof(SitDownOnGrassAction)) {
|
||||||
// we set this action to be executable only on grass tiles, not on other ground
|
// we set this action to be executable only on grass tiles, not on other ground
|
||||||
CanExecute = (actionInfo, automatic) => {
|
CanExecute = (actionInfo, _) => {
|
||||||
if (!actionInfo.Map.IsInBounds(actionInfo.ActionLocation.ToPoint()))
|
if (!actionInfo.Map.IsInBounds(actionInfo.ActionLocation.ToPoint()))
|
||||||
return CanExecuteResult.Hidden;
|
return CanExecuteResult.Hidden;
|
||||||
var tile = actionInfo.Map.GetTile(actionInfo.ActionLocation.ToPoint());
|
var tile = actionInfo.Map.GetTile(actionInfo.ActionLocation.ToPoint());
|
||||||
|
|
Loading…
Reference in a new issue