diff --git a/Screenshots/avatarstats.png b/Screenshots/avatarstats.png new file mode 100644 index 00000000..dda7b9b2 Binary files /dev/null and b/Screenshots/avatarstats.png differ diff --git a/Screenshots/eetest.png b/Screenshots/eetest.png new file mode 100644 index 00000000..9795d5c3 Binary files /dev/null and b/Screenshots/eetest.png differ diff --git a/Tribe2020/Assets/Data/Avatar Activities/HelpDeskWork.asset b/Tribe2020/Assets/Data/Avatar Activities/HelpDeskWork.asset index 323079de..dff30472 100644 --- a/Tribe2020/Assets/Data/Avatar Activities/HelpDeskWork.asset +++ b/Tribe2020/Assets/Data/Avatar Activities/HelpDeskWork.asset @@ -23,6 +23,7 @@ MonoBehaviour: currentRoom: 0 setActivityAppliance: 1 useActivityAppliance: 1 + testEnergyEffeciency: 0 setAvatarMood: 0 mood: 0 - title: Sit at station @@ -34,6 +35,7 @@ MonoBehaviour: currentRoom: 0 setActivityAppliance: 0 useActivityAppliance: 1 + testEnergyEffeciency: 0 setAvatarMood: 0 mood: 0 - title: Become available @@ -46,6 +48,7 @@ MonoBehaviour: currentRoom: 0 setActivityAppliance: 0 useActivityAppliance: 1 + testEnergyEffeciency: 0 setAvatarMood: 0 mood: 0 - title: Start help desk station @@ -58,6 +61,7 @@ MonoBehaviour: currentRoom: 0 setActivityAppliance: 0 useActivityAppliance: 0 + testEnergyEffeciency: 0 setAvatarMood: 0 mood: 0 - title: Do work @@ -69,9 +73,10 @@ MonoBehaviour: currentRoom: 0 setActivityAppliance: 0 useActivityAppliance: 1 + testEnergyEffeciency: 0 setAvatarMood: 2 mood: 6 - - title: Start help desk station + - title: Turn off help desk station type: 8 appliance: {fileID: 0} requiredAffordance: {fileID: 11400000, guid: 746f09dfe276fdb4eb9ca243a0f50469, @@ -81,6 +86,7 @@ MonoBehaviour: currentRoom: 0 setActivityAppliance: 0 useActivityAppliance: 0 + testEnergyEffeciency: 1 setAvatarMood: 0 mood: 0 - title: Become unavailable @@ -93,6 +99,7 @@ MonoBehaviour: currentRoom: 0 setActivityAppliance: 0 useActivityAppliance: 1 + testEnergyEffeciency: 0 setAvatarMood: 0 mood: 0 _currSession: 0 diff --git a/Tribe2020/Assets/Scripts/Avatar/AvatarActivity.cs b/Tribe2020/Assets/Scripts/Avatar/AvatarActivity.cs index 51c2b465..e23e5907 100644 --- a/Tribe2020/Assets/Scripts/Avatar/AvatarActivity.cs +++ b/Tribe2020/Assets/Scripts/Avatar/AvatarActivity.cs @@ -60,6 +60,8 @@ public class Session { public bool setActivityAppliance; public bool useActivityAppliance = true; + public bool testEnergyEffeciency; + public enum SetMoodOptions { No, Try, Force } public SetMoodOptions setAvatarMood; public AvatarMood.Mood mood; @@ -188,11 +190,9 @@ public void Start() { public void StartSession(Session session) { DebugManager.Log(_ai.name + " started session " + session.title + " of type " + session.type + ". Part of activity " + this.name, this); - //Add temporary avatar affordances - //Shouldn't it be possible to also have temporary affordances for non temporary activities? For example being available for discussion when chilling in the sofa? //Gunnar - /*if (!isTemporary) { - _ai.GetComponent().SetTemporaryAvatarAffordances(session.tempAvatarAffordances); - }*/ + if(session.testEnergyEffeciency && !_ai.GetComponent().TestEnergyEfficiency()) { + return; + } //Set mood switch (session.setAvatarMood) { diff --git a/Tribe2020/Assets/Scripts/Avatar/AvatarStats.cs b/Tribe2020/Assets/Scripts/Avatar/AvatarStats.cs index 4f083523..28bf3bae 100644 --- a/Tribe2020/Assets/Scripts/Avatar/AvatarStats.cs +++ b/Tribe2020/Assets/Scripts/Avatar/AvatarStats.cs @@ -83,7 +83,9 @@ public float GetEnergyEfficiency() } public bool RunEnergyEfficiencyTest() { - return GetEnergyEfficiency() >= Random.value; + float val = GetEnergyEfficiency(); + float r = Random.value; + return val >= r; } //TestEnergyEfficiency() diff --git a/Tribe2020/Assets/scenes/Martin/San Pablo Martin.unity b/Tribe2020/Assets/scenes/Martin/San Pablo Martin.unity index 4b64954b..718725b9 100644 --- a/Tribe2020/Assets/scenes/Martin/San Pablo Martin.unity +++ b/Tribe2020/Assets/scenes/Martin/San Pablo Martin.unity @@ -43905,7 +43905,7 @@ Prefab: - target: {fileID: 114000012038547090, guid: 346cda8097346714eaa6165fdbde0362, type: 2} propertyPath: schedule.Array.data[1].time - value: 7:30 + value: 7:10 objectReference: {fileID: 0} - target: {fileID: 114000012038547090, guid: 346cda8097346714eaa6165fdbde0362, type: 2} @@ -43916,7 +43916,7 @@ Prefab: - target: {fileID: 114000012038547090, guid: 346cda8097346714eaa6165fdbde0362, type: 2} propertyPath: schedule.Array.data[2].time - value: 8:00 + value: 7:20 objectReference: {fileID: 0} - target: {fileID: 114000012038547090, guid: 346cda8097346714eaa6165fdbde0362, type: 2} @@ -44041,12 +44041,12 @@ Prefab: - target: {fileID: 114000013719618876, guid: 346cda8097346714eaa6165fdbde0362, type: 2} propertyPath: _knowledge - value: 0.437 + value: 0 objectReference: {fileID: 0} - target: {fileID: 114000013719618876, guid: 346cda8097346714eaa6165fdbde0362, type: 2} propertyPath: _attitude - value: 0.304 + value: 0 objectReference: {fileID: 0} - target: {fileID: 114000013719618876, guid: 346cda8097346714eaa6165fdbde0362, type: 2}