private void checkIfDepleted(IVoxelHandle handle) { if (handle.Data.DataValue >= maxDataVal && handle.Data.Inventory.ItemCount == 0) { handle.ChangeType(Hole); } }
public override void Tick(IVoxelHandle handle) { if (handle.GetInternalVoxel().GetPart <Ore>().IsDepleted()) { handle.ChangeType(Land); } }
private void checkComplete(IVoxelHandle handle) { if (neededResources.All(e => e.Amount == handle.Data.Inventory.GetAmountOfType(e.Type))) { handle.ChangeType(building); } }
public void CureInfestation(IVoxelHandle v) { if (v.Type != Infestation) { throw new InvalidOperationException(); } var data = v.Data.Infestation; v.ChangeType(data.OriginalType ?? Land); v.Data.DataValue = data.OriginalDataValue; v.Data.MagicLevel = 10; }
public void InfestVoxel(IVoxelHandle target) { if (target.Type == Monument) { return; } var data = new InfestationData() { OriginalType = target.Type, OriginalDataValue = target.Data.DataValue }; target.ChangeType(Infestation); target.Data.Infestation = data; }
public override void OnRightClick(PlayerState player, IVoxelHandle voxel) { voxel.ChangeType(land); }
public override void OnLeftClick(PlayerState player, IVoxelHandle voxel) { voxel.ChangeType(air); }