Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ActPlan.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using UnityEngine;
5using UnityEngine.UI;
6
7public class ActPlan : EClass
8{
9 public class List : List<Item>
10 {
11 public void Add(Act a, string s = "")
12 {
13 Add(new Item
14 {
15 act = a
16 });
17 }
18 }
19
20 public class Item
21 {
22 public Act act;
23
24 public Card tc;
25
26 public Point pos;
27
28 public Chara cc => EClass.pc;
29
30 public bool HideHint
31 {
32 get
33 {
34 if (!EClass.pc.isBlind)
35 {
36 if (tc != null && tc.isChara)
37 {
38 return !EClass.pc.CanSee(tc);
39 }
40 return false;
41 }
42 return true;
43 }
44 }
45
46 public string GetText(bool showName)
47 {
48 return act.GetText() + ((showName && act.GetTextSmall(tc) != null) ? ("\n<size=28>" + act.GetTextSmall(tc) + "</size>") : "");
49 }
50
51 public string GetTextContext(bool showName)
52 {
53 return act.GetText() + ((showName && tc != null && !HideHint) ? ("<size=13> (" + tc.Name + ")</size>") : "");
54 }
55
56 public bool Perform(bool repeated = false)
57 {
58 if (AM_Adv.actCount == 0 && !Dialog.warned)
59 {
60 warning = true;
61 Chara _CC = Act.CC;
62 Card _TC = Act.TC;
63 Point _TP = new Point(Act.TP);
64 if (EClass._zone.IsCrime(EClass.pc, act) && act.ID != "actContainer")
65 {
66 Dialog.TryWarnCrime(delegate
67 {
68 Act.CC = _CC;
69 Act.TC = _TC;
70 Act.TP.Set(_TP);
71 if (Perform())
72 {
74 }
75 });
76 return false;
77 }
78 if (act is TaskHarvest && (act as TaskHarvest).mode == BaseTaskHarvest.HarvestType.Disassemble)
79 {
81 {
82 Act.CC = _CC;
83 Act.TC = _TC;
84 Act.TP.Set(_TP);
85 if (Perform())
86 {
88 }
89 });
90 return false;
91 }
92 }
93 warning = false;
94 int num = cc.pos.Distance(pos);
95 bool flag = num == 1 && cc.CanInteractTo(pos);
96 AIAct aIAct = act as AIAct;
97 if (act.IsAct)
98 {
99 if (act.PerformDistance != -1 && (num > act.PerformDistance || (num == 1 && !flag)))
100 {
102 {
103 pos = pos.Copy()
104 });
105 return false;
106 }
107 bool num2 = act.Perform(cc, tc, pos);
108 if (num2 && !EClass.pc.HasNoGoal)
109 {
111 }
112 if (num2)
113 {
114 return EClass.pc.HasNoGoal;
115 }
116 return false;
117 }
118 if (repeated)
119 {
120 if (cc.ai.GetType() == act.GetType() && cc.ai.IsRunning)
121 {
122 return false;
123 }
124 aIAct.Reset();
125 if (!act.CanPerform())
126 {
128 return false;
129 }
130 if (aIAct is Task task)
131 {
132 task.isDestroyed = false;
133 TaskPoint taskPoint = task as TaskPoint;
134 if (EClass.scene.mouseTarget.isValid && taskPoint != null)
135 {
136 taskPoint.isRepeated = true;
137 taskPoint.pos = EClass.scene.mouseTarget.pos.Copy();
138 }
139 }
140 }
141 cc.SetAIImmediate(aIAct);
142 ActionMode.Adv.SetTurbo(aIAct.UseTurbo ? (-1) : 0);
143 return false;
144 }
145 }
146
147 public static bool warning;
148
149 public Point pos = new Point();
150
152
153 public bool performed;
154
155 public bool altAction;
156
158
160
161 private bool showOrder;
162
163 public List list = new List();
164
165 public int dist;
166
167 public Thing tool;
168
170
171 public Act lastAct;
172
173 public bool IsSelf => dist == 0;
174
176
178 {
179 get
180 {
182 {
183 return dist == 1;
184 }
185 return false;
186 }
187 }
188
189 public bool canRepeat
190 {
191 get
192 {
193 if (list.Count == 1)
194 {
195 return list[0].act.CanPressRepeat;
196 }
197 return false;
198 }
199 }
200
201 public Chara cc => EClass.pc;
202
204 {
205 get
206 {
207 if (list.Count != 0)
208 {
209 if (list.Count <= 1)
210 {
211 return list[0].act.GetCursorIcon(list[0].tc);
212 }
213 return CursorSystem.Notice;
214 }
215 return null;
216 }
217 }
218
219 public bool WillEndTurn
220 {
221 get
222 {
223 if (list.Count > 0)
224 {
225 return list[0].act.WillEndTurn;
226 }
227 return false;
228 }
229 }
230
231 public bool HideRightInfo
232 {
233 get
234 {
235 if (list.Count > 0)
236 {
237 return list[0].act.HideRightInfo;
238 }
239 return false;
240 }
241 }
242
243 public bool HasAct => list.Count > 0;
244
245 public bool ShowAct
246 {
247 get
248 {
249 if (HasAct)
250 {
251 if (lastAct != list[0].act)
252 {
253 return list[0].act.ShowMouseHint(list[0].tc);
254 }
255 return false;
256 }
257 return false;
258 }
259 }
260
262 {
263 get
264 {
265 if (list.Count > 1)
266 {
267 return list[0].tc != list.LastItem().tc;
268 }
269 return false;
270 }
271 }
272
273 public string GetText(bool showName)
274 {
275 if (list.Count == 0)
276 {
277 return "";
278 }
279 if (list.Count == 1)
280 {
281 return list[0].GetText(showName);
282 }
283 return "+" + list.Count + ((HasMultipleTargets || list[0].tc == null) ? ("\n<size=28>(" + "multipleTargets".lang() + ")</size>") : ("\n<size=28>" + list[0].tc.Name + list[0].tc.GetExtraName() + "</size>"));
284 }
285
286 public Func<bool> GetAction()
287 {
288 if (list.Count == 0)
289 {
290 return () => false;
291 }
292 if (list.Count > 1)
293 {
294 return delegate
295 {
297 {
298 return false;
299 }
301 return false;
302 };
303 }
304 Item item = list[0];
305 return delegate
306 {
307 if (performed && !item.act.CanPressRepeat)
308 {
309 return false;
310 }
311 performed = true;
312 lastAct = item.act;
313 return item.Perform(performed);
314 };
315 }
316
317 public void ShowContextMenu()
318 {
319 UIContextMenu uIContextMenu = EClass.ui.CreateContextMenuInteraction();
320 int num = 1;
321 _ = showOrder;
322 foreach (Item i in list)
323 {
324 string textContext = i.GetTextContext(HasMultipleTargets);
325 textContext = textContext.Replace("\n", " ").Replace(Environment.NewLine, " ");
326 uIContextMenu.AddButton(textContext, delegate
327 {
328 performed = true;
329 if (i.Perform())
330 {
331 EClass.player.EndTurn();
332 }
333 });
334 num++;
335 if (num >= 21)
336 {
337 break;
338 }
339 }
340 uIContextMenu.Show();
341 EClass.ui.hud.HideMouseInfo();
342 }
343
344 public bool TrySetAct(string lang, Func<bool> onPerform, Card tc, CursorInfo cursor = null, int dist = 1, bool isHostileAct = false, bool localAct = true, bool canRepeat = false)
345 {
346 return TrySetAct(new DynamicAct(lang, onPerform)
347 {
348 id = lang,
349 dist = dist,
350 isHostileAct = isHostileAct,
351 localAct = localAct,
352 cursor = ((cursor == CursorSystem.Arrow) ? null : cursor),
353 canRepeat = () => canRepeat
354 }, tc);
355 }
356
357 public bool TrySetAct(string lang, Func<bool> onPerform, CursorInfo cursor = null, int dist = 1)
358 {
359 return TrySetAct(new DynamicAct(lang, onPerform)
360 {
361 id = lang,
362 dist = dist,
363 cursor = ((cursor == CursorSystem.Arrow) ? null : cursor)
364 });
365 }
366
367 public bool TrySetAct(Act _act, Card _tc = null)
368 {
369 if (!ignoreAddCondition && !_act.CanPerform(cc, _tc, pos))
370 {
371 return false;
372 }
373 Item item = new Item
374 {
375 act = _act,
376 tc = _tc,
377 pos = pos.Copy()
378 };
379 if (_tc != null && _tc.isChara)
380 {
381 int num = -1;
382 for (int i = 0; i < list.Count; i++)
383 {
384 if (list[i].tc == _tc)
385 {
386 num = i;
387 }
388 }
389 if (num != -1)
390 {
391 list.Insert(num + 1, item);
392 }
393 else
394 {
395 list.Add(item);
396 }
397 }
398 else
399 {
400 list.Add(item);
401 }
402 return true;
403 }
404
405 public void Clear()
406 {
407 list.Clear();
408 pos.IsValid = false;
409 }
410
411 public void Update(PointTarget target)
412 {
413 if (warning)
414 {
415 return;
416 }
417 _Update(target);
418 if (!HasAct)
419 {
420 return;
421 }
422 Color effectColor = ((list.Count == 1) ? list[0].act.GetActPlanColor() : EClass.Colors.colorAct);
423 if (input == ActInput.LeftMouse || input == ActInput.Key)
424 {
425 EClass.ui.hud.textLeft.SetText(GetText(showName: true));
426 Outline[] components = EClass.ui.hud.textLeft.GetComponents<Outline>();
427 for (int i = 0; i < components.Length; i++)
428 {
429 components[i].effectColor = effectColor;
430 }
431 }
432 else if (input == ActInput.RightMouse)
433 {
435 EClass.ui.hud.imageRight.rectTransform.localScale = new Vector3(2f, 2f, 1f);
436 EClass.ui.hud.textRight.SetText(GetText(showName: true));
437 Outline[] components = EClass.ui.hud.textRight.GetComponents<Outline>();
438 for (int i = 0; i < components.Length; i++)
439 {
440 components[i].effectColor = effectColor;
441 }
442 }
443 }
444
445 public void _Update(PointTarget target)
446 {
447 showOrder = false;
448 performed = false;
449 list.Clear();
450 listPick.Clear();
451 if (!pos.Equals(target.pos))
452 {
453 lastAct = null;
454 }
455 pos.Set(target.pos);
457 if (!pos.IsValid || EClass.pc.isDead)
458 {
459 return;
460 }
461 Point _pos = new Point(pos);
462 _ = target.pos.cell;
463 List<Card> items = _pos.ListCards();
464 bool isKey = input == ActInput.Key;
465 altAction = (EInput.isShiftDown && !EInput.isAltDown && !isKey) || input == ActInput.AllAction;
466 _canInteractNeighbor = dist == 0 || (dist == 1 && cc.CanInteractTo(_pos));
467 if (EClass.pc.isBlind && !_pos.Equals(EClass.pc.pos) && !isKey && input != 0)
468 {
469 return;
470 }
471 if (isKey || input == ActInput.LeftMouse || input == ActInput.AllAction)
472 {
473 if (EClass.ui.IsDragging)
474 {
475 return;
476 }
477 if (_pos.cell.outOfBounds)
478 {
479 if (EClass.player.CanExitBorder(_pos))
480 {
482 }
483 return;
484 }
485 if (!isKey && _pos.Equals(cc.pos) && EClass._zone.IsRegion)
486 {
487 TrySetAct("actNewZone", delegate
488 {
490 return false;
492 if (input == ActInput.AllAction)
493 {
494 TrySetAct("LayerTravel", delegate
495 {
496 EClass.ui.AddLayer<LayerTravel>();
497 return false;
498 }, null, CursorSystem.MoveZone, 1, isHostileAct: false, localAct: false);
499 }
500 }
501 items.ForeachReverse(delegate(Card _c)
502 {
503 Chara c2 = _c.Chara;
504 if (c2 != null && !c2.IsPC && EClass.pc.CanSee(c2))
505 {
506 int num = c2.Dist(EClass.pc);
507 if (num <= 1 || !EClass.pc.isBlind)
508 {
509 if (!EClass.pc.isBlind && !c2.IsHostile() && (input == ActInput.AllAction || !(c2.IsPCParty || c2.IsMinion || isKey)) && (input == ActInput.AllAction || !c2.IsNeutral() || c2.quest != null || EClass.game.quests.IsDeliverTarget(c2)) && c2.isSynced && num <= 2)
510 {
511 bool flag5 = !c2.HasCondition<ConSuspend>() && (!c2.isRestrained || !c2.IsPCFaction);
513 {
514 flag5 = false;
515 }
516 if (flag5 || altAction)
517 {
518 if (EClass.pc.HasElement(1216) && c2.HasCondition<ConSleep>())
519 {
521 {
522 target = c2,
523 succubus = true
524 }, c2);
525 }
526 TrySetAct(ACT.Chat, c2);
527 }
528 }
529 if (c2.host != EClass.pc)
530 {
531 TraitShackle traitShackle = c2.pos.FindThing<TraitShackle>();
533 {
534 if (traitShackle != null && traitShackle.AllowTraining)
535 {
537 {
538 target = c2
539 });
540 }
541 }
542 else if ((c2.IsHostile() || altAction || c2.isRestrained) && c2.IsAliveInCurrentZone)
543 {
544 TrySetAct(ACT.Melee, c2);
545 }
546 }
547 if (c2.IsPCPartyMinion && !c2.Chara.IsEscorted() && altAction)
548 {
549 TrySetAct("ActBanishSummon", delegate
550 {
551 EClass.pc.Say("summon_vanish", c2);
552 c2.pos.PlayEffect("vanish");
553 c2.pos.PlaySound("vanish");
554 c2.pos.PlayEffect("teleport");
555 c2.Destroy();
556 return true;
557 }, c2, null, 99);
558 }
559 }
560 }
561 });
562 if (_pos.IsHidden)
563 {
564 return;
565 }
567 {
568 items.ForeachReverse(delegate(Card _c)
569 {
570 Chara c = _c.Chara;
571 if (c != null)
572 {
573 bool flag3 = EClass.pc.CanSee(c);
574 if (flag3)
575 {
576 if (input == ActInput.LeftMouse && c.IsPCFaction && !c.IsPC && pos.FindThing<TraitHitchingPost>() != null)
577 {
578 Chara ride = c;
579 List<string> list = EClass.core.pccs.sets["ride"].map["body"].map.Keys.ToList();
580 int index = list.IndexOf(ride.c_idRidePCC);
581 if (index == -1)
582 {
583 index = 0;
584 }
585 TrySetAct("ActChangeRideSkin", delegate
586 {
587 UIContextMenu uIContextMenu = EClass.ui.CreateContextMenuInteraction();
588 uIContextMenu.AddSlider("rideSkin", (float a) => list[(int)a].Split('-')[0] ?? "", index, delegate(float a)
589 {
590 ride.c_idRidePCC = list[(int)a];
591 ride._CreateRenderer();
592 }, 0f, list.Count - 1, isInt: true, hideOther: false);
593 uIContextMenu.Show();
594 return false;
595 }, c);
596 }
597 if (!c.IsPC && ((c.IsPCFaction && !c.IsDisabled) || EClass.debug.enable) && input == ActInput.AllAction)
598 {
599 TrySetAct("actTrade", delegate
600 {
602 return false;
603 }, c);
604 }
605 if (c.host != null && EClass.pc.held != null && altAction)
606 {
607 bool flag4 = true;
609 {
610 flag4 = false;
611 }
612 if (!c.IsDisabled && flag4 && c.CanAcceptGift(EClass.pc, EClass.pc.held))
613 {
614 string lang = "actGive";
615 if (c.Evalue(1232) > 0 && EClass.pc.held.trait is TraitDrinkMilkMother)
616 {
617 lang = "actMilk";
618 }
619 TrySetAct(lang, delegate
620 {
621 if (!c.IsValidGiftWeight(EClass.pc.held, 1))
622 {
623 c.Talk("tooHeavy");
624 return true;
625 }
627 {
628 Dialog.YesNo("dialogGive".lang(EClass.pc.held.GetName(NameStyle.Full, 1)), func);
629 }
630 else
631 {
632 func();
633 }
634 return true;
635 }, c);
636 }
637 }
638 }
639 if (input == ActInput.AllAction && EClass.pc.held != null && EClass.pc.held.trait is TraitDrink)
640 {
641 TrySetAct(c.IsPC ? "actPour" : "ActThrow", delegate
642 {
643 ActThrow.Throw(EClass.pc, c.pos, c, EClass.pc.held.Split(1));
644 return true;
645 }, (c.host != null) ? c : EClass.pc.held);
646 }
647 if (!c.IsPC && c.host == null && ((!EClass.pc.isBlind && flag3) || input != ActInput.AllAction))
648 {
649 if (c.isRestrained && (input == ActInput.AllAction || (!c.IsRestrainedResident && !c.IsHostile())))
650 {
651 TrySetAct("ActUnrestrain", delegate
652 {
653 c.TryUnrestrain(force: true, EClass.pc);
654 return true;
655 }, c);
656 }
657 if (!EClass.pc.isBlind && flag3 && input == ActInput.AllAction)
658 {
659 TrySetAct(ACT.Kick, c);
660 if (c.IsMofuable)
661 {
662 TrySetAct("ActCuddle", delegate
663 {
664 EClass.pc.Cuddle(c);
665 return true;
666 }, c);
667 }
669 {
670 TrySetAct("inspect", delegate
671 {
672 c.Inspect();
673 return false;
674 }, c);
675 }
676 }
677 }
678 }
679 else if (_c.isThing)
680 {
681 if (!EClass.pc.isBlind)
682 {
683 Thing t = _c.Thing;
684 if (input == ActInput.AllAction)
685 {
686 if ((EClass.debug.enable || EClass.player.HasKeyItem("license_illumination")) && t.LightData != null)
687 {
688 if (t.c_lightColor != 0)
689 {
690 TrySetAct("actClearLight", delegate
691 {
692 t.c_lightColor = 0;
693 t.RecalculateFOV();
694 t.renderer.GetTC<TCExtra>()?.RefreshColor();
695 return false;
696 }, t);
697 }
698 TrySetAct("actSetLight", delegate
699 {
700 Color lightColor = t.LightColor;
701 EClass.ui.AddLayer<LayerColorPicker>().SetColor(lightColor, lightColor, delegate(PickerState state, Color _c)
702 {
703 if (state == PickerState.Cancel)
704 {
705 t.c_lightColor = 0;
706 }
707 else
708 {
709 t.c_lightColor = (byte)Mathf.Clamp(_c.r * 32f, 1f, 31f) * 1024 + (byte)Mathf.Clamp(_c.g * 32f, 1f, 31f) * 32 + (byte)Mathf.Clamp(_c.b * 32f, 1f, 31f);
710 }
711 t.RecalculateFOV();
713 });
714 return false;
715 }, t);
716 }
718 {
719 TrySetAct("(debug) Toggle Float", delegate
720 {
721 t.isFloating = !t.isFloating;
722 return false;
723 }, t);
724 }
726 {
727 if (t.trait.CanEat(EClass.pc))
728 {
729 TrySetAct(new AI_Eat
730 {
731 target = t
732 }, t);
733 }
734 if (t.trait.CanDrink(EClass.pc))
735 {
737 {
738 target = t
739 }, t);
740 }
741 if (t.trait.CanRead(EClass.pc))
742 {
744 {
745 target = t
746 }, t);
747 }
748 if (t.trait.IsBlendBase)
749 {
750 TrySetAct("invBlend", delegate
751 {
753 return true;
754 }, t);
755 }
756 if (t.trait.CanName)
757 {
758 TrySetAct("changeName", delegate
759 {
760 Dialog.InputName("dialogChangeName", t.c_refText.IsEmpty(""), delegate(bool cancel, string text)
761 {
762 if (!cancel)
763 {
764 t.c_refText = text;
765 }
766 });
767 return false;
768 }, t);
769 }
770 }
771 }
772 if (isKey)
773 {
774 _ = t.trait.CanBeAttacked;
775 }
776 else
777 {
778 if (t.placeState == PlaceState.roaming && (_pos.cell.blocked || t.ignoreAutoPick || altAction || input == ActInput.AllAction || _pos.Equals(EClass.pc.pos)) && EClass.pc.CanPick(t))
779 {
780 listPick.Add(t);
781 }
782 if (t.IsInstalled)
783 {
784 t.trait.TrySetToggleAct(this);
785 t.trait.TrySetAct(this);
786 }
787 }
788 }
789 }
790 void func()
791 {
793 }
794 });
795 if (listPick.Count > 0)
796 {
797 if (listPick.Count == 1)
798 {
799 Thing _t = listPick[0];
801 {
802 TrySetAct("actPickOne", delegate
803 {
804 EClass.pc.Pick(_t);
805 return true;
806 }, listPick[0], CursorSystem.Hand, 1, isHostileAct: false, localAct: false);
807 }
808 }
809 else
810 {
811 IList<Card> _cards = items.Copy();
812 TrySetAct("actPickAll", delegate
813 {
814 foreach (Card item in _cards)
815 {
816 if (item.isThing && item.placeState == PlaceState.roaming)
817 {
818 EClass.pc.Pick(item.Thing);
819 }
820 }
821 return true;
822 }, null, CursorSystem.Hand, 1, isHostileAct: false, localAct: false);
823 }
824 }
825 if (input == ActInput.AllAction && pos.IsSky)
826 {
827 TrySetAct("actSkyJump", delegate
828 {
830 return false;
831 });
832 }
833 if (_pos.Equals(cc.pos))
834 {
835 if (cc.held != null && !cc.held.IsHotItem)
836 {
837 TrySetAct("actPick", delegate
838 {
839 _ = cc.held;
840 cc.PickHeld(msg: true);
841 ActionMode.AdvOrRegion.updatePlans = true;
842 return false;
843 }, cc.held, CursorSystem.Inventory, 1, isHostileAct: false, localAct: false);
844 }
845 else if (!HasAct && !cc.isRestrained)
846 {
848 }
849 if (EClass.pc.party.members.Count > 1)
850 {
851 showOrder = true;
852 }
853 if (input == ActInput.AllAction && EClass.pc.held != null && !EClass.pc.held.trait.CanOnlyCarry)
854 {
855 TrySetAct("actDrop", delegate
856 {
858 return true;
859 });
860 }
861 if (cc.isRestrained)
862 {
863 TrySetAct("ActUnrestrain", delegate
864 {
865 cc.TryUnrestrain(force: true, EClass.pc);
866 return true;
867 }, cc);
868 }
869 }
870 }
871 if (list.Count == 0 && input == ActInput.AllAction && EClass.pc.held == null && pos.cell.IsSnowTile && !pos.IsBlocked && !pos.HasObj && !pos.HasThing)
872 {
874 {
875 pos = pos.Copy()
876 });
877 }
878 }
879 else
880 {
881 if (input != ActInput.RightMouse)
882 {
883 return;
884 }
885 if (pos.cell.outOfBounds || EClass.ui.IsDragging)
886 {
887 return;
888 }
890 if (!hotItem.IsGameAction)
891 {
892 TrySetAct(hotItem.Name, delegate
893 {
894 hotItem.OnClick(hotItem.button, hotItem.hotbar);
895 return false;
896 }, null, -1);
897 }
898 else
899 {
900 hotItem.TrySetAct(this);
901 }
902 bool flag = EClass.game.config.autoCombat.enable && EClass.scene.mouseTarget.TargetChara != null;
903 if (hotItem.Thing != null && hotItem.Thing.trait.DisableAutoCombat)
904 {
905 flag = false;
906 }
907 if (flag)
908 {
910 bool flag2 = true;
911 if (targetChara.hostility >= Hostility.Friend)
912 {
913 flag2 = false;
914 }
916 {
917 flag2 = false;
918 }
919 if (list.Count >= 2)
920 {
921 flag2 = false;
922 }
923 if (list.Count == 1)
924 {
925 if (targetChara.hostility >= Hostility.Neutral)
926 {
927 flag2 = false;
928 }
929 if (!list[0].act.ShowAuto)
930 {
931 flag2 = false;
932 }
933 if (EClass.player.currentHotItem is HotItemNoItem && targetChara.hostility <= Hostility.Enemy)
934 {
935 flag2 = true;
936 }
937 }
938 if (flag2)
939 {
940 list.Clear();
941 TrySetAct(new GoalAutoCombat(targetChara));
942 }
943 }
944 if (list.Count == 0 && !EClass.core.config.test.toolNoPick)
945 {
947 }
948 if ((bool)WidgetCurrentTool.Instance)
949 {
951 }
952 }
953 }
954}
ActInput
Definition: ActInput.cs:2
Hostility
Definition: Hostility.cs:2
PickerState
Definition: PickerState.cs:2
PlaceState
Definition: PlaceState.cs:2
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
Definition: ACT.cs:6
static ActChat Chat
Definition: ACT.cs:9
static new ActWait Wait
Definition: ACT.cs:7
static ActKick Kick
Definition: ACT.cs:13
static ActMelee Melee
Definition: ACT.cs:15
Definition: AIAct.cs:6
virtual bool UseTurbo
Definition: AIAct.cs:88
virtual bool IsRunning
Definition: AIAct.cs:31
void Reset()
Definition: AIAct.cs:326
Definition: AI_Eat.cs:5
Definition: AM_Adv.cs:6
static int actCount
Definition: AM_Adv.cs:101
void SetTurbo(int mtp=-1)
Definition: AM_Adv.cs:1040
string GetText(bool showName)
Definition: ActPlan.cs:46
Card tc
Definition: ActPlan.cs:24
bool HideHint
Definition: ActPlan.cs:31
Point pos
Definition: ActPlan.cs:26
bool Perform(bool repeated=false)
Definition: ActPlan.cs:56
string GetTextContext(bool showName)
Definition: ActPlan.cs:51
Chara cc
Definition: ActPlan.cs:28
void Add(Act a, string s="")
Definition: ActPlan.cs:11
int dist
Definition: ActPlan.cs:165
bool _canInteractNeighbor
Definition: ActPlan.cs:159
bool HideRightInfo
Definition: ActPlan.cs:232
bool altAction
Definition: ActPlan.cs:155
bool showOrder
Definition: ActPlan.cs:161
bool ShowAct
Definition: ActPlan.cs:246
Thing tool
Definition: ActPlan.cs:167
Chara cc
Definition: ActPlan.cs:201
Act lastAct
Definition: ActPlan.cs:171
static bool warning
Definition: ActPlan.cs:147
bool HasMultipleTargets
Definition: ActPlan.cs:262
bool ignoreAddCondition
Definition: ActPlan.cs:157
bool IsNeighborBlocked
Definition: ActPlan.cs:178
CursorInfo CursorIcon
Definition: ActPlan.cs:204
ActInput input
Definition: ActPlan.cs:151
string GetText(bool showName)
Definition: ActPlan.cs:273
Point pos
Definition: ActPlan.cs:149
void Update(PointTarget target)
Definition: ActPlan.cs:411
Func< bool > GetAction()
Definition: ActPlan.cs:286
bool IsSelfOrNeighbor
Definition: ActPlan.cs:175
bool IsSelf
Definition: ActPlan.cs:173
bool TrySetAct(Act _act, Card _tc=null)
Definition: ActPlan.cs:367
void ShowContextMenu()
Definition: ActPlan.cs:317
List< Thing > listPick
Definition: ActPlan.cs:169
List list
Definition: ActPlan.cs:163
bool WillEndTurn
Definition: ActPlan.cs:220
void _Update(PointTarget target)
Definition: ActPlan.cs:445
void Clear()
Definition: ActPlan.cs:405
bool TrySetAct(string lang, Func< bool > onPerform, Card tc, CursorInfo cursor=null, int dist=1, bool isHostileAct=false, bool localAct=true, bool canRepeat=false)
Definition: ActPlan.cs:344
bool TrySetAct(string lang, Func< bool > onPerform, CursorInfo cursor=null, int dist=1)
Definition: ActPlan.cs:357
bool performed
Definition: ActPlan.cs:153
bool canRepeat
Definition: ActPlan.cs:190
bool HasAct
Definition: ActPlan.cs:243
static bool SearchMedal(Chara c, Point p)
Definition: ActWait.cs:20
Definition: ACT.cs:62
virtual bool Perform()
Definition: ACT.cs:264
static Card TC
Definition: ACT.cs:79
virtual bool IsAct
Definition: ACT.cs:99
static Point TP
Definition: ACT.cs:81
virtual int PerformDistance
Definition: ACT.cs:135
static Chara CC
Definition: ACT.cs:77
virtual string ID
Definition: ACT.cs:97
virtual string GetTextSmall(Card c)
Definition: ACT.cs:230
virtual string GetText(string str="")
Definition: ACT.cs:213
virtual bool CanPerform()
Definition: ACT.cs:301
static AM_Adv Adv
Definition: ActionMode.cs:15
TC GetTC(string id)
Definition: Card.cs:11
bool IsPCFactionOrMinion
Definition: Card.cs:2132
virtual bool isThing
Definition: Card.cs:1957
virtual Chara Chara
Definition: Card.cs:1946
bool isNPCProperty
Definition: Card.cs:526
bool IsRestrainedResident
Definition: Card.cs:2118
bool isFloating
Definition: Card.cs:622
bool HasElement(int ele, int req=1)
Definition: Card.cs:5214
bool isRestrained
Definition: Card.cs:538
bool ignoreAutoPick
Definition: Card.cs:478
string c_refText
Definition: Card.cs:1529
string Name
Definition: Card.cs:2013
bool IsHotItem
Definition: Card.cs:115
PlaceState placeState
Definition: Card.cs:79
void RecalculateFOV()
Definition: Card.cs:5616
Point pos
Definition: Card.cs:55
int c_lightColor
Definition: Card.cs:1056
Trait trait
Definition: Card.cs:49
string c_idRidePCC
Definition: Card.cs:1553
void Destroy()
Definition: Card.cs:4538
bool IsInstalled
Definition: Card.cs:2241
virtual bool isChara
Definition: Card.cs:1959
virtual Thing Thing
Definition: Card.cs:1934
int Evalue(int ele)
Definition: Card.cs:2431
int Dist(Card c)
Definition: Card.cs:6777
LightData LightData
Definition: Card.cs:2290
void TryUnrestrain(bool force=false, Chara c=null)
Definition: Card.cs:6297
Color LightColor
Definition: Card.cs:1068
void Inspect()
Definition: Card.cs:6962
CardRenderer renderer
Definition: Card.cs:57
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6046
bool IsSnowTile
Definition: Cell.cs:782
bool IsTopWater
Definition: Cell.cs:700
bool outOfBounds
Definition: Cell.cs:414
Definition: Chara.cs:10
override bool IsAliveInCurrentZone
Definition: Chara.cs:546
Card held
Definition: Chara.cs:67
bool CanAcceptGift(Chara c, Card t)
Definition: Chara.cs:7455
AIAct ai
Definition: Chara.cs:187
void Cuddle(Chara c, bool headpat=false)
Definition: Chara.cs:5627
bool CanPick(Card c)
Definition: Chara.cs:3882
override bool IsPC
Definition: Chara.cs:597
Chara host
Definition: Chara.cs:33
bool IsValidGiftWeight(Card t, int num=-1)
Definition: Chara.cs:7424
bool IsMofuable
Definition: Chara.cs:917
override bool IsPCParty
Definition: Chara.cs:600
Party party
Definition: Chara.cs:43
void PickHeld(bool msg=false)
Definition: Chara.cs:4136
bool HasCondition(string alias)
Definition: Chara.cs:8568
AIAct SetAI(AIAct g)
Definition: Chara.cs:8045
override bool IsDisabled
Definition: Chara.cs:570
override bool IsMinion
Definition: Chara.cs:612
override bool isSynced
Definition: Chara.cs:676
override CardRenderer _CreateRenderer()
Definition: Chara.cs:5993
override bool IsPCFaction
Definition: Chara.cs:656
override bool IsPCPartyMinion
Definition: Chara.cs:624
bool CanSee(Card c)
Definition: Chara.cs:1027
void SetAIImmediate(AIAct g)
Definition: Chara.cs:8077
bool CanInteractTo(Card c)
Definition: Chara.cs:2225
static NoGoal _NoGoalRepeat
Definition: Chara.cs:183
bool HasNoGoal
Definition: Chara.cs:821
void DropThing(Thing t, int num=-1)
Definition: Chara.cs:4233
void GiveGift(Chara c, Thing t)
Definition: Chara.cs:7480
Quest quest
Definition: Chara.cs:24
bool isBlind
Definition: Chara.cs:125
void FallFromZone()
Definition: Chara.cs:3185
Hostility hostility
Definition: Chara.cs:276
Card SplitHeld(int a)
Definition: Chara.cs:4196
bool IsHostile()
Definition: Chara.cs:5884
bool isDead
Definition: Chara.cs:374
Thing Pick(Thing t, bool msg=true, bool tryStack=true)
Definition: Chara.cs:3920
bool IsEscorted()
Definition: Chara.cs:2102
bool IsNeutral()
Definition: Chara.cs:5923
new GameConfig game
Definition: CoreConfig.cs:596
bool showExtra
Definition: CoreDebug.cs:167
bool enable
Definition: CoreDebug.cs:285
PCCManager pccs
Definition: Core.cs:41
CoreConfig config
Definition: Core.cs:70
static CursorInfo Arrow
Definition: CursorSystem.cs:46
static CursorInfo Hand
Definition: CursorSystem.cs:60
static CursorInfo Inventory
Definition: CursorSystem.cs:92
static CursorInfo Notice
Definition: CursorSystem.cs:76
static CursorInfo MoveZone
Definition: CursorSystem.cs:86
Definition: Dialog.cs:7
static bool warned
Definition: Dialog.cs:49
static Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
Definition: Dialog.cs:528
static void TryWarnDisassemble(Action action)
Definition: Dialog.cs:406
static void TryWarnCrime(Action action)
Definition: Dialog.cs:376
Definition: EClass.cs:5
static Game game
Definition: EClass.cs:8
static Scene scene
Definition: EClass.cs:30
static ColorProfile Colors
Definition: EClass.cs:38
static Core core
Definition: EClass.cs:6
static Zone _zone
Definition: EClass.cs:20
static Player player
Definition: EClass.cs:12
static Chara pc
Definition: EClass.cs:14
static CoreDebug debug
Definition: EClass.cs:48
static UI ui
Definition: EClass.cs:16
ConfigAutoCombat autoCombat
Definition: Game.cs:93
Config config
Definition: Game.cs:215
QuestManager quests
Definition: Game.cs:179
static bool disableTool
Definition: HotItemHeld.cs:11
static bool _TrySetAct(ActPlan p)
virtual void SetImage(Image icon)
Definition: HotItem.cs:91
virtual bool TrySetAct(ActPlan p)
Definition: HotItem.cs:107
virtual bool IsGameAction
Definition: HotItem.cs:46
virtual Thing Thing
Definition: HotItem.cs:38
static LayerDragGrid Create(InvOwnerDraglet owner, bool refuelFromLayerDragGrid=false)
static LayerInventory CreateContainer(Card owner)
List< Chara > members
Definition: Party.cs:18
bool CanExitBorder(Point p)
Definition: Player.cs:1679
bool HasKeyItem(string alias)
Definition: Player.cs:1941
void EndTurn(bool consume=true)
Definition: Player.cs:1866
void EnterLocalZone(bool encounter=false, Chara mob=null)
Definition: Player.cs:1736
void ExitBorder(ActPlan p=null)
Definition: Player.cs:1637
HotItem currentHotItem
Definition: Player.cs:901
bool isValid
Definition: PointTarget.cs:30
Chara TargetChara
Definition: PointTarget.cs:41
Definition: Point.cs:9
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1015
Point Copy()
Definition: Point.cs:467
bool IsSky
Definition: Point.cs:212
Point Set(int _x, int _z)
Definition: Point.cs:479
bool IsBlocked
Definition: Point.cs:339
SoundSource PlaySound(string id, bool synced=true, float v=1f, bool spatial=true)
Definition: Point.cs:1217
bool HasThing
Definition: Point.cs:239
bool Equals(int _x, int _z)
Definition: Point.cs:924
bool IsValid
Definition: Point.cs:88
Effect PlayEffect(string id)
Definition: Point.cs:1212
bool HasObj
Definition: Point.cs:137
int Distance(Point p)
Definition: Point.cs:953
bool IsHidden
Definition: Point.cs:323
Cell cell
Definition: Point.cs:51
Thing FindThing(Func< Thing, bool > func)
Definition: Point.cs:1104
bool IsDeliverTarget(Chara c)
PointTarget mouseTarget
Definition: Scene.cs:129
virtual bool IsRegion
Definition: Spatial.cs:501
void RefreshColor()
Definition: TCExtra.cs:171
Definition: Task.cs:4
Definition: Thing.cs:8
virtual bool AllowTraining
Definition: TraitShackle.cs:13
virtual bool IsBlendBase
Definition: Trait.cs:253
virtual bool CanBeAttacked
Definition: Trait.cs:159
virtual bool IsTool
Definition: Trait.cs:355
virtual void TrySetAct(ActPlan p)
Definition: Trait.cs:984
virtual bool CanRead(Chara c)
Definition: Trait.cs:919
virtual void TrySetToggleAct(ActPlan p)
Definition: Trait.cs:1198
virtual bool CanName
Definition: Trait.cs:139
virtual bool CanEat(Chara c)
Definition: Trait.cs:928
virtual bool DisableAutoCombat
Definition: Trait.cs:191
virtual bool CanDrink(Chara c)
Definition: Trait.cs:937
virtual bool CanOnlyCarry
Definition: Trait.cs:283
virtual string Name
Definition: UIButton.cs:19
void Show(UIItem i)
UIContextMenuItem AddSlider(string text, Func< float, string > textFunc, float value, Action< float > action, float min=0f, float max=1f, bool isInt=false, bool hideOther=true, bool useInput=false)
static WidgetCurrentTool Instance
UIPlaceHelper placer
virtual bool IsUserZone
Definition: Zone.cs:264
ZoneInstance instance
Definition: Zone.cs:52
bool IsCrime(Chara c, Act act)
Definition: Zone.cs:3259