From 415f104bd8f4fc067713b0eea2b1773ec8feed35 Mon Sep 17 00:00:00 2001 From: bruno-f-cruz <7049351+bruno-f-cruz@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:06:18 -0700 Subject: [PATCH] Ensure null RewardSpecification is handled --- src/Extensions/InstantiateSite.bonsai | 6 +- src/vr-foraging.bonsai | 186 +++++++++++++++++++++++++- 2 files changed, 187 insertions(+), 5 deletions(-) diff --git a/src/Extensions/InstantiateSite.bonsai b/src/Extensions/InstantiateSite.bonsai index 018b383..7c0f746 100644 --- a/src/Extensions/InstantiateSite.bonsai +++ b/src/Extensions/InstantiateSite.bonsai @@ -1099,10 +1099,10 @@ it.Item2 as EntryPosition) TreadmillSpecification + Friction - RngSeed @@ -1112,7 +1112,9 @@ it.Item2 as EntryPosition) - + + + TreadmillFriction diff --git a/src/vr-foraging.bonsai b/src/vr-foraging.bonsai index fcc9c15..66467e5 100644 --- a/src/vr-foraging.bonsai +++ b/src/vr-foraging.bonsai @@ -5212,8 +5212,16 @@ Value as IsStopped) ThisPatch - - ActivePatch + + it != null + + + + 1 + + + + HasRewardSpec DetermineDepletionRule @@ -5523,6 +5531,70 @@ Value as IsStopped) + + HasRewardSpec + + + + + + Source1 + + + + + + + + + + + + + DefaultTo0 + + + + HasRewardSpec + + + + + + + Source1 + + + + + + + + + + + 0 + + + + DepletionVariable + + + + + + + + + + + + + + + + + DetermineRewardSpecs @@ -5622,6 +5694,84 @@ Value as IsStopped) + + HasRewardSpec + + + + + + Source1 + + + + + + + + + + + + + DefaultTo0 + + + + HasRewardSpec + + + + + + + Source1 + + + + + + + + + + + 0 + + + + PatchRewardAvailable + + + PatchRewardAmount + + + PatchRewardProbability + + + + + + + + + + + + + + + + + + + + + ThisPatch + + + ActivePatch + DepletionVariable @@ -5645,8 +5795,21 @@ Value as IsStopped) - + + + + + + + + + + + + + + @@ -6084,6 +6247,22 @@ Value as IsStopped) HarpOlfactometerCommands + + DO1Sync + None + + + + false + 0 + 0 + 0 + 0 + false + 100 + 1000 + + @@ -6104,6 +6283,7 @@ Value as IsStopped) +