-
Notifications
You must be signed in to change notification settings - Fork 5
/
IBarterResultToken.cs
70 lines (64 loc) · 3.08 KB
/
IBarterResultToken.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
using JetBrains.Annotations;
using TaleWorlds.CampaignSystem;
namespace BannerLib.Gameplay.Dialogs
{
/// <summary>
/// Represents a barter during dialog.
/// </summary>
[PublicAPI]
public interface IBarterResultToken : IDialogToken
{
/// <summary>
/// Creates a partner's response with predefined condition if barter was accepted.
/// </summary>
/// <remarks>Never do call <see cref="IPartnerDialogToken.SetCondition"/> for returned instance of <see cref="IPartnerDialogToken"/>!</remarks>
/// <param name="tokenName"></param>
/// <param name="callback">this callback is called with newly created <see cref="IPartnerDialogToken"/></param>
/// <returns>Newly created <see cref="IBarterResultToken"/></returns>
[PublicAPI]
[NotNull]
IBarterResultToken BarterAccept([NotNull] string tokenName, [NotNull] BarterOfferTokenCallback callback);
/// <summary>
/// Creates a partner's response with predefined condition if barter was rejected.
/// </summary>
/// <remarks>Never do call <see cref="IPartnerDialogToken.SetCondition"/> for returned instance of <see cref="IPartnerDialogToken"/>!</remarks>
/// <param name="tokenName"></param>
/// <param name="callback">this callback is called with newly created <see cref="IPartnerDialogToken"/></param>
/// <returns>Newly created <see cref="IBarterResultToken"/></returns>
[PublicAPI]
[NotNull]
IBarterResultToken BarterReject([NotNull] string tokenName, [NotNull] BarterOfferTokenCallback callback);
/// <summary>
/// Creates a partner's response after barter window is closed (whether barter was accepted or rejected).
/// </summary>
/// <param name="tokenName"></param>
/// <param name="callback">this callback is called with newly created <see cref="IPartnerDialogToken"/></param>
/// <returns>Newly created <see cref="IPartnerDialogToken"/></returns>
[PublicAPI]
[NotNull]
IBarterResultToken BarterResult([NotNull] string tokenName, [NotNull] BarterOfferTokenCallback callback);
/// <summary>
/// Sets barter context initializer
/// </summary>
/// <param name="initializer"></param>
/// <returns>This <see cref="IBarterResultToken"/></returns>
[PublicAPI]
[NotNull]
IBarterResultToken ContextInitializer([NotNull] BarterManager.BarterContextInitializer initializer);
/// <summary>
/// Sets persuasion cost reduction value for BarterManager.
/// </summary>
/// <param name="callback"></param>
/// <returns>This <see cref="IBarterResultToken"/></returns>
[PublicAPI]
[NotNull]
IBarterResultToken PersuasionCostReduction([NotNull] BarterPersuasionCostReduction callback);
/// <summary>
/// Finishes this token and returns it's input <see cref="IPlayerDialogToken"/> or null.
/// </summary>
/// <returns></returns>
[PublicAPI]
[CanBeNull]
IPlayerDialogToken End();
}
}