Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
MeetingManager Class Reference
Inheritance diagram for MeetingManager:
EClass

Public Member Functions

void SetOwner (FactionBranch _branch)
 
void OnSimulateHour (VirtualDate date)
 
void Add (VirtualDate date)
 
void Add (Meeting m)
 
void Remove (Meeting m)
 
BaseArea SetRoom ()
 
void Start ()
 
void CallNext ()
 

Public Attributes

List< Meetinglist = new List<Meeting>()
 
FactionBranch branch
 
BaseArea room
 

Properties

bool CanStartMeeting [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from EClass
static int rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 4 of file MeetingManager.cs.

Member Function Documentation

◆ Add() [1/2]

void MeetingManager.Add ( Meeting  m)
inline

Definition at line 60 of file MeetingManager.cs.

61 {
62 list.Add(m);
63 }
List< Meeting > list

References list.

◆ Add() [2/2]

void MeetingManager.Add ( VirtualDate  date)
inline

Definition at line 49 of file MeetingManager.cs.

50 {
51 MeetingMerchant meetingMerchant = new MeetingMerchant();
52 meetingMerchant.dateExipire = date.GetRaw() + 10080;
53 list.Add(meetingMerchant);
54 if (date.IsRealTime)
55 {
56 Msg.Say("newMeeting");
57 }
58 }
int GetRaw(int offsetHours=0)
Definition: Date.cs:322
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
bool IsRealTime
Definition: VirtualDate.cs:7

References Date.GetRaw(), VirtualDate.IsRealTime, list, and Msg.Say().

◆ CallNext()

void MeetingManager.CallNext ( )
inline

Definition at line 95 of file MeetingManager.cs.

96 {
97 if (list.Count != 0)
98 {
99 Point chara = room.GetEmptySeat()?.pos ?? room.GetRandomPoint(walkable: true, allowChara: false);
100 Meeting meeting = list[0];
101 list.RemoveAt(0);
102 meeting.SetChara(chara);
103 Chara maid = EClass.Branch.GetMaid();
104 if (maid != null)
105 {
106 GameLang.refDrama1 = meeting.chara.Name;
107 LayerDrama.Activate("_chara", null, "meeting", maid).SetOnKill(meeting.Start);
108 }
109 else
110 {
111 meeting.Start();
112 }
113 }
114 }
Thing GetEmptySeat()
Definition: BaseArea.cs:73
virtual Point GetRandomPoint(bool walkable=true, bool allowChara=true)
Definition: BaseArea.cs:88
string Name
Definition: Card.cs:2013
Point pos
Definition: Card.cs:55
Definition: Chara.cs:10
Definition: EClass.cs:5
static FactionBranch Branch
Definition: EClass.cs:22
static LayerDrama Activate(string book, string idSheet, string idStep, Chara target=null, Card ref1=null, string tag="")
Definition: LayerDrama.cs:66
Layer SetOnKill(Action action)
Definition: Layer.cs:579
void Start()
Definition: Meeting.cs:46
void SetChara(Point pos)
Definition: Meeting.cs:22
Chara chara
Definition: Meeting.cs:11
Definition: Point.cs:9

References LayerDrama.Activate(), EClass.Branch, Meeting.chara, BaseArea.GetEmptySeat(), FactionBranch.GetMaid(), BaseArea.GetRandomPoint(), list, Card.Name, Card.pos, room, Meeting.SetChara(), Layer.SetOnKill(), and Meeting.Start().

Referenced by Meeting.OnEndDrama(), and Start().

◆ OnSimulateHour()

void MeetingManager.OnSimulateHour ( VirtualDate  date)
inline

Definition at line 34 of file MeetingManager.cs.

35 {
36 if (list.Count > 0)
37 {
38 for (int num = list.Count - 1; num >= 0; num--)
39 {
40 if (list[num].dateExipire != 0 && date.IsExpired(list[num].dateExipire))
41 {
42 list.RemoveAt(num);
43 }
44 }
45 }
46 _ = list.Count;
47 }
bool IsExpired(int time)
Definition: Date.cs:332

References Date.IsExpired(), and list.

◆ Remove()

void MeetingManager.Remove ( Meeting  m)
inline

Definition at line 65 of file MeetingManager.cs.

66 {
67 list.Remove(m);
68 }

References list.

◆ SetOwner()

void MeetingManager.SetOwner ( FactionBranch  _branch)
inline

Definition at line 25 of file MeetingManager.cs.

26 {
27 branch = _branch;
28 foreach (Meeting item in list)
29 {
30 item.SetOwner(branch);
31 }
32 }
FactionBranch branch

References branch, item, and list.

Referenced by FactionBranch.SetOwner().

◆ SetRoom()

BaseArea MeetingManager.SetRoom ( )
inline

Definition at line 70 of file MeetingManager.cs.

71 {
72 if (EClass._map.props.installed.Find<TraitSpotMeeting>()?.trait is TraitSpotMeeting traitSpotMeeting)
73 {
74 room = traitSpotMeeting.owner.Cell.room;
75 if (room == null)
76 {
77 room = new VirtualRoom(traitSpotMeeting.owner);
78 }
79 }
80 else
81 {
82 room = EClass._map.rooms.listRoom.RandomItem();
83 }
84 return room;
85 }
static Map _map
Definition: EClass.cs:18
PropsManager props
Definition: Map.cs:91
RoomManager rooms
Definition: Map.cs:31
PropsInstalled installed
Definition: PropsManager.cs:8
Thing Find(int uid)
Definition: Props.cs:357
List< Room > listRoom
Definition: RoomManager.cs:13

References EClass._map, Props.Find(), PropsManager.installed, RoomManager.listRoom, Map.props, room, and Map.rooms.

Referenced by Start().

◆ Start()

void MeetingManager.Start ( )
inline

Definition at line 87 of file MeetingManager.cs.

88 {
89 SetRoom();
90 Thing emptySeat = room.GetEmptySeat();
91 EClass.pc.MoveImmediate(emptySeat?.pos ?? room.GetRandomPoint(walkable: true, allowChara: false));
92 CallNext();
93 }
void MoveImmediate(Point p, bool focus=true, bool cancelAI=true)
Definition: Card.cs:5127
static Chara pc
Definition: EClass.cs:14
BaseArea SetRoom()
Definition: Thing.cs:8

References CallNext(), BaseArea.GetEmptySeat(), BaseArea.GetRandomPoint(), Card.MoveImmediate(), EClass.pc, room, and SetRoom().

Member Data Documentation

◆ branch

FactionBranch MeetingManager.branch

Definition at line 9 of file MeetingManager.cs.

Referenced by SetOwner().

◆ list

List<Meeting> MeetingManager.list = new List<Meeting>()

◆ room

BaseArea MeetingManager.room

Definition at line 11 of file MeetingManager.cs.

Referenced by CallNext(), SetRoom(), and Start().

Property Documentation

◆ CanStartMeeting

bool MeetingManager.CanStartMeeting
get

Definition at line 13 of file MeetingManager.cs.

14 {
15 get
16 {
17 if (list.Count > 0)
18 {
19 return SetRoom() != null;
20 }
21 return false;
22 }
23 }

The documentation for this class was generated from the following file: