Skip to content

Commit

Permalink
Merge pull request #1437 from stellargames/1369-have_item_clears_target
Browse files Browse the repository at this point in the history
1369 have item should not clear target
  • Loading branch information
Interkarma committed Aug 19, 2019
2 parents 7069929 + 9946f48 commit 2668247
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions Assets/Scripts/Game/Questing/Actions/HaveItem.cs
Expand Up @@ -17,7 +17,7 @@ namespace DaggerfallWorkshop.Game.Questing
{
/// <summary>
/// Starts a task when player has a particular item resource in their inventory.
/// This task continues to run and will start/clear task when item present/not present
/// This task continues to run and will start task when item present
/// </summary>
public class HaveItem : ActionTemplate
{
Expand Down Expand Up @@ -59,11 +59,9 @@ public override void Update(Task caller)
throw new Exception(string.Format("Could not find Item resource symbol {0}", targetItem));
}

// Start/Clear target task based on player carrying item
// Start target task based on player carrying item
if (GameManager.Instance.PlayerEntity.Items.Contains(item.DaggerfallUnityItem))
ParentQuest.StartTask(targetTask);
else
ParentQuest.ClearTask(targetTask);
}

#region Serialization
Expand Down
4 changes: 1 addition & 3 deletions Assets/StreamingAssets/Quests/N0B00Y16.txt
Expand Up @@ -218,9 +218,7 @@ _a6_ task:
say 1043

_S.07_ task:
start task _S.08_
-- have _crn_ set _S.08_
-- quest failed to recognize "have crn," which was crucial
have _crn_ set _S.08_

_S.08_ task:
pick one of _a3_ _a4_ _a5_ _a6_
Expand Down

0 comments on commit 2668247

Please sign in to comment.