Targeted item actions (action/heal), item.add scenario action, inventory cell Decorate; mod cover
This commit is contained in:
1 parent
d560638501
commit
468e393550
9 files changed
+313
-1
No files matched your search
@@ -0,0 +1,33 @@
|
||||
namespace Cthangover.Mods.Items.Tests
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using Cthangover.Core.Actions;
|
||||
using Cthangover.Core.Items;
|
||||
using Cthangover.Core.Mods;
|
||||
|
||||
/// <summary>Action context for scenario action tests: dialog variables and an inventory, no other services.</summary>
|
||||
public class FakeActionContext : IActionContext
|
||||
{
|
||||
/// <summary>Dialog variables returned by <see cref="GetParam"/>.</summary>
|
||||
public Dictionary<string, string> Params { get; } = new();
|
||||
|
||||
/// <summary>Warnings the action logged.</summary>
|
||||
public List<string> Warnings { get; } = new();
|
||||
|
||||
public IQuestService Quests => null;
|
||||
public ICharacterService Character => null;
|
||||
public ILightingService Lighting => null;
|
||||
public ISceneNodeService Scene => null;
|
||||
public IModRegistry ModRegistry => null;
|
||||
public IInventory Inventory { get; set; }
|
||||
public IMapZoneService Map => null;
|
||||
|
||||
public string GetParam(string name) => Params.TryGetValue(name, out var value) ? value : null;
|
||||
|
||||
public void Log(string category, string message)
|
||||
{
|
||||
}
|
||||
|
||||
public void LogWarning(string category, string message) => Warnings.Add(message);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user