-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConversationDelegates.cs
More file actions
39 lines (34 loc) · 1.04 KB
/
Copy pathConversationDelegates.cs
File metadata and controls
39 lines (34 loc) · 1.04 KB
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
using System;
using System.Collections.Generic;
using System.Reflection;
using XRL;
using XRL.UI;
using XRL.World.AI;
using XRL.World.Conversations;
using XRL.World.Effects;
using XRL.World.Parts;
namespace Mods.Wormingdead.EasyRecruit
{
[HasConversationDelegate]
public static class DelegateContainer
{
[ConversationDelegate(Speaker = true)]
public static bool IfHavexTagWormingdeadEasyRecruit(DelegateContext Context)
{
string[] xTagKV = Context.Value.Split(',');
string key = xTagKV[0];
string val = xTagKV[1];
return Context.Target.GetxTag(key, val) == "true";
}
[ConversationDelegate]
public static void RecruitWormingdeadEasyRecruit(DelegateContext Context)
{
// Copied from WaterRitualJoinParty.cs (beta:Spring Molting)
The.Speaker.SetAlliedLeader<AllyProselytize>(The.Player);
Lovesick Effect;
if (The.Speaker.TryGetEffect<Lovesick>(out Effect))
Effect.PreviousLeader = The.Player;
Popup.Show(The.Speaker.Does("join", Stripped: true) + " you!");
}
}
}