Elin Modding Docs Doc
Loading...
Searching...
No Matches
AM_Adv.cs
1using System;
2using System.Collections.Generic;
3using UnityEngine;
4
5// Token: 0x0200015B RID: 347
6public class AM_Adv : AM_BaseGameMode
7{
8 // Token: 0x17000291 RID: 657
9 // (get) Token: 0x06000A2F RID: 2607 RVA: 0x0003C56D File Offset: 0x0003A76D
10 public PointTarget mouseTarget
11 {
12 get
13 {
14 return EClass.scene.mouseTarget;
15 }
16 }
17
18 // Token: 0x17000292 RID: 658
19 // (get) Token: 0x06000A30 RID: 2608 RVA: 0x0003C579 File Offset: 0x0003A779
20 public bool autorun
21 {
22 get
23 {
24 return EClass.core.config.input.autorun;
25 }
26 }
27
28 // Token: 0x17000293 RID: 659
29 // (get) Token: 0x06000A31 RID: 2609 RVA: 0x0003C590 File Offset: 0x0003A790
30 public bool ShouldHideTile
31 {
32 get
33 {
34 return EClass.ui.layers.Count > 0 || (EClass.pc.renderer.IsMoving && !EInput.rightMouse.pressing) || EClass.pc.ai.Current is AI_Goto || this.cursorMove || EClass.ui.isPointerOverUI || EInput.axis != Vector2.zero;
35 }
36 }
37
38 // Token: 0x17000294 RID: 660
39 // (get) Token: 0x06000A32 RID: 2610 RVA: 0x0003C607 File Offset: 0x0003A807
40 public override float gameSpeed
41 {
42 get
43 {
44 if (!this.ShouldPauseGame)
45 {
46 return ActionMode.GameSpeeds[EClass.game.gameSpeedIndex] * ((AM_Adv.turbo != 0f) ? AM_Adv.turbo : 1f);
47 }
48 return 1f;
49 }
50 }
51
52 // Token: 0x17000295 RID: 661
53 // (get) Token: 0x06000A33 RID: 2611 RVA: 0x0003C640 File Offset: 0x0003A840
54 public override bool FixFocus
55 {
56 get
57 {
58 return !this.zoomOut && (EClass.core.config.test.alwaysFixCamera || EInput.leftMouse.pressing || !EInput.rightMouse.pressing || AM_Adv.actCount <= 0 || (EClass.pc.ai != Chara._NoGoalRepeat && (!(EClass.pc.ai is TaskDesignation) || !(EClass.pc.ai as TaskDesignation).isRepeated)));
59 }
60 }
61
62 // Token: 0x17000296 RID: 662
63 // (get) Token: 0x06000A34 RID: 2612 RVA: 0x0003C6CE File Offset: 0x0003A8CE
64 public override bool ShouldPauseGame
65 {
66 get
67 {
68 return EClass.core.config.game.autopause && EClass.pc.HasNoGoal;
69 }
70 }
71
72 // Token: 0x17000297 RID: 663
73 // (get) Token: 0x06000A35 RID: 2613 RVA: 0x0003C6F2 File Offset: 0x0003A8F2
74 public override bool AllowWheelZoom
75 {
76 get
77 {
78 return false;
79 }
80 }
81
82 // Token: 0x17000298 RID: 664
83 // (get) Token: 0x06000A36 RID: 2614 RVA: 0x0003C6F5 File Offset: 0x0003A8F5
84 public override float TargetZoom
85 {
86 get
87 {
88 if (!this.zoomOut2)
89 {
90 return 0.01f * (float)EClass.game.config.defaultZoom;
91 }
92 return 0.01f * (float)EClass.game.config.zoomedZoom;
93 }
94 }
95
96 // Token: 0x06000A37 RID: 2615 RVA: 0x0003C72C File Offset: 0x0003A92C
97 public override bool HighlightWall(Point p)
98 {
99 return EClass.pc.held != null && TaskMine.CanMine(p, EClass.pc.held);
100 }
101
102 // Token: 0x06000A38 RID: 2616 RVA: 0x0003C74C File Offset: 0x0003A94C
103 public unsafe override void OnActivate()
104 {
105 if (WidgetMouseover.Instance)
106 {
107 WidgetMouseover.Instance.Hide(false);
108 }
109 ActionMode.DefaultMode = this;
110 this.pressedAction.Init(null);
111 EClass.pc.ai.Cancel();
112 EClass.screen.tileMap.RefreshHeight();
113 (EClass.pc.renderer as CharaRenderer).first = true;
114 EClass.pc.renderer.SetFirst(true, *EClass.pc.pos.PositionCenter());
115 EClass.screen.FocusPC();
116 EClass.screen.RefreshPosition();
117 }
118
119 // Token: 0x06000A39 RID: 2617 RVA: 0x0003C7EE File Offset: 0x0003A9EE
120 public override void OnDeactivate()
121 {
122 this.EndTurbo();
123 }
124
125 // Token: 0x06000A3A RID: 2618 RVA: 0x0003C7F8 File Offset: 0x0003A9F8
126 public unsafe override void OnRenderTile(Point point, HitResult result, int dir)
127 {
128 if (this.ShouldHideTile)
129 {
130 return;
131 }
132 EClass.player.currentHotItem.OnRenderTile(point, result, dir);
133 base.OnRenderTile(point, result, dir);
134 if (EClass.core.config.game.highlightEnemy)
135 {
136 using (List<Chara>.Enumerator enumerator = point.ListCharas().GetEnumerator())
137 {
138 while (enumerator.MoveNext())
139 {
140 if (enumerator.Current.IsHostile(EClass.pc))
141 {
142 using (List<Chara>.Enumerator enumerator2 = EClass._map.charas.GetEnumerator())
143 {
144 while (enumerator2.MoveNext())
145 {
146 Chara chara = enumerator2.Current;
147 if (chara.isSynced && chara.IsHostile(EClass.pc) && !chara.IsMultisize)
148 {
149 Vector3 vector = *chara.pos.Position();
150 EClass.screen.guide.passGuideFloor.Add(vector.x, vector.y, vector.z - 0.01f, 23f, 0.3f);
151 }
152 }
153 break;
154 }
155 }
156 }
157 }
158 }
159 }
160
161 // Token: 0x06000A3B RID: 2619 RVA: 0x0003C938 File Offset: 0x0003AB38
162 public override int GetDefaultTile(Point p)
163 {
164 if (!p.IsSync)
165 {
166 return 30;
167 }
168 return 0;
169 }
170
171 // Token: 0x06000A3C RID: 2620 RVA: 0x0003C946 File Offset: 0x0003AB46
172 public override void OnBeforeUpdate()
173 {
174 if (EClass.pc.renderer.IsMoving)
175 {
176 this.isMoving = true;
177 return;
178 }
179 this.isMoving = false;
180 }
181
182 // Token: 0x06000A3D RID: 2621 RVA: 0x0003C968 File Offset: 0x0003AB68
183 public unsafe override void OnAfterUpdate()
184 {
185 Vector3 vector = this.mouseTarget.pos.IsValid ? (*this.mouseTarget.pos.PositionAuto()) : (*EClass.pc.pos.PositionAuto());
186 vector = Camera.main.WorldToScreenPoint(vector);
187 vector.z = 0f;
188 vector += EClass.ui.hud.transRightPos * Mathf.Min(0f, EClass.screen.Zoom - 1f);
189 EClass.ui.hud.transRight.position = vector;
190 EClass.player.MarkMapHighlights();
191 }
192
193 // Token: 0x06000A3E RID: 2622 RVA: 0x0003CA20 File Offset: 0x0003AC20
194 public override void OnUpdateCursor()
195 {
196 this.RefreshArrow();
197 CursorInfo info = (EClass.ui.layers.Count == 0 && !EClass.ui.isPointerOverUI) ? CursorSystem.Instance.arrows[this.arrowIndex] : null;
198 CursorSystem.leftIcon = null;
199 bool flag = (EClass.pc.ai.IsRunning || AM_Adv.turbo != 0f || this.pressedAction.action != null) && !EClass.pc.HasNoGoal && !(EClass.pc.ai is GoalManualMove);
200 if (flag && !EClass.ui.isPointerOverUI)
201 {
202 CursorSystem.leftIcon = CursorSystem.IconGear;
203 CursorSystem.leftIconAngle = (float)((int)(this.gearAngle / 45f) * 45);
204 }
205 if (!this.cursorMove && (this.mouseTarget.hasTargetChanged || !this.mouseTarget.pos.Equals(this.planLeft.pos) || this.planLeft.performed || this.planRight.performed))
206 {
207 this.updatePlans = true;
208 }
209 if (!this.ShouldHideTile)
210 {
211 if (this.planLeft.HasAct)
212 {
213 info = this.planLeft.CursorIcon;
214 }
215 else if (this.planRight.HasAct)
216 {
217 info = this.planRight.CursorIcon;
218 }
219 }
220 this.gearAngle += Core.gameDelta * 200f;
221 CursorSystem.SetCursor(info, 0);
222 if ((this.updatePlans && !flag) || EClass.pc.IsDisabled)
223 {
224 this.UpdatePlans();
225 }
226 if (CursorSystem.ignoreCount < 0)
227 {
228 this.UpdateLangWheel();
229 EClass.ui.hud.transRight.SetActive(true);
230 bool flag2 = !this.ShouldHideTile && !this.pressedAction.hideRightInfo && !EClass.ui.contextMenu.isActive;
231 EClass.ui.hud.textLeft.SetActive(flag2 && this.planLeft.ShowAct);
232 EClass.ui.hud.textRight.SetActive(flag2 && this.planRight.ShowAct);
233 EClass.ui.hud.textMiddle.SetActive(flag2 && this.textMiddle != null);
234 EClass.ui.hud.textWheel.SetActive(flag2 && this.textWheel != null);
235 if (EClass.ui.hud.textLeft.gameObject.activeSelf)
236 {
237 EClass.ui.hud.textLeft.rectTransform.anchoredPosition = EClass.ui.hud.leftTextPos * Mathf.Max(1f, EClass.screen.Zoom) / EClass.core.uiScale;
238 }
239 if (EClass.ui.hud.textRight.gameObject.activeSelf)
240 {
241 EClass.ui.hud.textRight.rectTransform.anchoredPosition = EClass.ui.hud.rightTextPos * Mathf.Max(1f, EClass.screen.Zoom) / EClass.core.uiScale;
242 }
243 if (EClass.ui.hud.textMiddle.gameObject.activeSelf)
244 {
245 EClass.ui.hud.textMiddle.rectTransform.anchoredPosition = EClass.ui.hud.wheelTextPos * Mathf.Max(1f, EClass.screen.Zoom) / EClass.core.uiScale;
246 }
247 if (EClass.ui.hud.textWheel.gameObject.activeSelf)
248 {
249 EClass.ui.hud.textWheel.rectTransform.anchoredPosition = (EClass.ui.hud.textMiddle.gameObject.activeSelf ? EClass.ui.hud.wheelTextPos2 : EClass.ui.hud.wheelTextPos) * Mathf.Max(1f, EClass.screen.Zoom) / EClass.core.uiScale;
250 }
251 EClass.ui.hud.imageRight.SetActive(flag2 && this.planRight.HasAct);
252 }
253 }
254
255 // Token: 0x06000A3F RID: 2623 RVA: 0x0003CE9F File Offset: 0x0003B09F
256 public void UpdatePlans()
257 {
258 this.planLeft.Update(this.mouseTarget);
259 this.planRight.Update(this.mouseTarget);
260 this.updatePlans = false;
261 }
262
263 // Token: 0x06000A40 RID: 2624 RVA: 0x0003CECC File Offset: 0x0003B0CC
264 public void UpdateLangWheel()
265 {
266 this.textWheel = null;
267 this.textMiddle = null;
268 if (this.planRight.HasAct)
269 {
270 if (EClass.scene.mouseTarget.pos.Distance(EClass.pc.pos) <= 1 && HotItemHeld.CanChangeHeightByWheel())
271 {
272 this.textWheel = "textWheel_changeHeight".lang();
273 }
274 else
275 {
276 if (ActionMode.Build.altitude != 0)
277 {
278 ActionMode.Build.SetAltitude(0);
279 WidgetCurrentTool.Instance.placer.Refresh();
280 }
281 if (HotItemHeld.CanRotate())
282 {
283 this.planAll.Update(this.mouseTarget);
284 if (!this.planAll.HasAct)
285 {
286 this.textMiddle = "textMiddle_rotate".lang(EInput.keys.mouseMiddle.key.ToString() ?? "", null, null, null, null);
287 }
288 }
289 }
290 EClass.ui.hud.textWheel.SetText(this.textWheel.IsEmpty(""));
291 EClass.ui.hud.textMiddle.SetText(this.textMiddle.IsEmpty(""));
292 }
293 }
294
295 // Token: 0x06000A41 RID: 2625 RVA: 0x0003CFFE File Offset: 0x0003B1FE
296 public void ClearPlans()
297 {
298 this.planLeft.Clear();
299 this.planRight.Clear();
300 this.updatePlans = true;
301 }
302
303 // Token: 0x06000A42 RID: 2626 RVA: 0x0003D020 File Offset: 0x0003B220
304 public void OnBecomeNoGoal()
305 {
306 EClass.player.renderThing = null;
307 if (EClass.player.hotItemToRestore != null)
308 {
309 if (EClass.player.currentHotItem != EClass.player.hotItemToRestore)
310 {
311 EClass.player.SetCurrentHotItem(null);
312 }
313 EClass.player.hotItemToRestore = null;
314 }
315 if (!EClass.core.config.game.alwaysUpdateRecipe)
316 {
317 EClass.game.updater.recipe.Build(EClass.pc.pos, RecipeUpdater.Mode.Passive);
318 }
319 if (EClass.rnd(30) == 0 && EClass.pc.HasElement(1559, 1))
320 {
321 List<Thing> list = EClass.pc.things.List((Thing a) => a.trait is TraitPotion, false);
322 if (list.Count > 0)
323 {
324 EClass.pc.Drink(list.RandomItem<Thing>());
325 EClass.player.EndTurn(true);
326 }
327 }
328 if ((int)(Time.timeSinceLevelLoad / 60f / 60f) > Player.realHour)
329 {
330 EClass.player.OnAdvanceRealHour();
331 }
332 Tutorial.TryPlayReserve();
333 }
334
335 // Token: 0x06000A43 RID: 2627 RVA: 0x0003D13C File Offset: 0x0003B33C
336 public override void _OnUpdateInput()
337 {
338 if (EClass.player.willAutoSave)
339 {
340 EClass.game.Save(true, null, false);
341 EClass.player.willAutoSave = false;
342 }
343 if (RecipeUpdater.dirty)
344 {
345 RecipeUpdater.dirty = false;
346 EClass.game.updater.recipe.Build(EClass.pc.pos, RecipeUpdater.Mode.Passive);
347 }
348 if (!EInput.rightMouse.pressing)
349 {
350 AM_Adv.actCount = 0;
351 }
352 if (EInput.rightMouse.pressing && EInput.rightMouse.pressedLong && !EInput.leftMouse.down && EClass.pc.ai is TaskDesignation && (EClass.pc.ai as TaskDesignation).isRepeated)
353 {
354 if (!EInput.rightMouse.pressing || !EInput.leftMouse.pressing)
355 {
356 this.rightMouseTimer = 2.5f;
357 }
358 }
359 else
360 {
361 this.rightMouseTimer -= Core.delta;
362 }
363 EClass.player.waitingInput = false;
364 if (EClass.pc.ai is GoalAutoCombat && EClass.pc.ai.IsRunning && !EClass.debug.godMode)
365 {
366 if (EClass.pc.IsCriticallyWounded(false) || (EClass.game.config.autoCombat.abortOnHalfHP && ((EClass.pc.Evalue(1421) > 0) ? (EClass.pc.hp + EClass.pc.mana.value) : EClass.pc.hp) < EClass.player.autoCombatStartHP / 2))
367 {
368 Msg.Say("abort_lowHP");
369 EClass.pc.ai.Cancel();
370 }
371 else if (EClass.game.config.autoCombat.abortOnAllyDying && EClass.pc.party.IsCriticallyWounded(false) && EClass.player.TryAbortAutoCombat())
372 {
373 Msg.Say("abort_allyDying");
374 EClass.pc.ai.Cancel();
375 }
376 }
377 if (EClass.pc.HasNoGoal)
378 {
379 if (EClass.pc.WillConsumeTurn())
380 {
381 EClass.player.EndTurn(true);
382 EClass.player.invlunerable = false;
383 return;
384 }
385 if (EClass.player.lastTurn != EClass.pc.turn)
386 {
387 EClass.player.lastTurn = EClass.pc.turn;
388 EClass.player.invlunerable = false;
389 this.OnBecomeNoGoal();
390 if (!EClass.pc.HasNoGoal)
391 {
392 return;
393 }
394 }
395 EClass.player.waitingInput = true;
396 if (AI_PlayMusic.keepPlaying)
397 {
398 Thing playingTool = AI_PlayMusic.playingTool;
399 if (EInput.IsAnyKeyDown(true) || (playingTool.GetRootCard() != EClass.pc && (!playingTool.ExistsOnMap || playingTool.Dist(EClass.pc) > 1)))
400 {
401 AI_PlayMusic.CancelKeepPlaying();
402 return;
403 }
404 UISong instance = UISong.Instance;
405 if (!instance || instance.ratio > 0.85f)
406 {
407 EClass.pc.SetAIImmediate(new AI_PlayMusic
408 {
409 tool = playingTool
410 });
411 return;
412 }
413 }
414 }
415 if (EClass.player.returnInfo != null && EClass.player.returnInfo.askDest)
416 {
417 EClass.player.returnInfo.askDest = false;
418 int uidDest = 0;
419 List<Zone> list = EClass.game.spatials.ListReturnLocations();
420 if (list == null || list.Count == 0)
421 {
422 EClass.player.returnInfo = null;
423 Msg.Say("returnAbort");
424 return;
425 }
426 EClass.ui.AddLayer<LayerList>().SetList2<Zone>(list, (Zone a) => a.Name, delegate(Zone a, ItemGeneral b)
427 {
428 uidDest = a.uid;
429 if (a is Zone_Dungeon)
430 {
431 uidDest = a.FindDeepestZone().uid;
432 }
433 EClass.player.returnInfo = new Player.ReturnInfo
434 {
435 turns = EClass.rnd(10) + 10,
436 uidDest = uidDest
437 };
438 if (EClass.debug.instaReturn)
439 {
440 EClass.player.returnInfo.turns = 1;
441 EClass.player.EndTurn(true);
442 }
443 }, delegate(Zone a, ItemGeneral b)
444 {
445 string lang = (a is Zone_Dungeon) ? a.TextDeepestLv : "surface".lang();
446 b.SetSubText(lang, 200, FontColor.Default, TextAnchor.MiddleRight);
447 b.Build();
448 b.button1.mainText.rectTransform.sizeDelta = new Vector2(350f, 20f);
449 }, true).SetSize(500f, -1f).SetOnKill(delegate
450 {
451 if (uidDest == 0)
452 {
453 EClass.player.returnInfo = null;
454 Msg.Say("returnAbort");
455 }
456 }).SetTitles("wReturn", null);
457 return;
458 }
459 else
460 {
461 if (EClass.player.haltMove)
462 {
463 EClass.player.haltMove = false;
464 this.TryCancelInteraction(false);
465 EInput.Consume(1);
466 return;
467 }
468 if (this.keepWalking && (EInput.leftMouse.down || EInput.rightMouse.down))
469 {
470 this.keepWalking = false;
471 EInput.Consume(1);
472 return;
473 }
474 if (EClass.player.showShippingResult && !EClass.ui.IsActive)
475 {
476 EClass.player.showShippingResult = false;
477 EClass.ui.AddLayer<LayerShippingResult>().Show();
478 }
479 if (this.pressedAction.IsPressing() || this.keepWalking)
480 {
481 this.pressedAction.timer += Core.delta;
482 if (this.pressedAction.action != null)
483 {
484 if (this.pressedAction.canTurbo && ((this.autorun && this.pressedAction.timer > 0.45f) || Input.GetKey(KeyCode.LeftShift)))
485 {
486 this.SetTurbo(-1);
487 }
488 if (!this.pressedAction.waitForTurn || this.CanAct())
489 {
490 if (this.pressedAction.count == 1 && !this.pressedAction.ignoreCount)
491 {
492 this.pressedAction.timerRepeat += Core.delta;
493 if (this.pressedAction.timerRepeat < 0.3f)
494 {
495 return;
496 }
497 }
498 this.pressedAction.count++;
499 if (this.pressedAction.action())
500 {
501 if (this.pressedAction.willEndTurn)
502 {
503 EClass.player.EndTurn(false);
504 if (!this.pressedAction.repeat)
505 {
506 this.pressedAction.action = null;
507 return;
508 }
509 }
510 }
511 else if (!this.pressedAction.repeat)
512 {
513 this.pressedAction.action = null;
514 return;
515 }
516 }
517 }
518 else if ((this.autorun && this.pressedAction.timer > 0.5f) || Input.GetKey(KeyCode.LeftShift))
519 {
520 this.SetTurbo(-1);
521 }
522 return;
523 }
524 if (this.pressedAction.button != null || EInput.hasShiftChanged)
525 {
526 this.updatePlans = true;
527 }
528 this.cursorMove = false;
529 EClass.player.nextMove = Vector2.zero;
530 if (EClass.pc.HasNoGoal)
531 {
532 this.EndTurbo();
533 }
534 this.pressedAction.button = null;
535 this.pressedAction.axis = Vector2.zero;
536 this.pressedAction.count = 0;
537 this.pressedAction.timerRepeat = 0f;
538 if (EClass.player.willEndTurn)
539 {
540 EClass.player.willEndTurn = false;
541 EClass.player.EndTurn(true);
542 return;
543 }
544 if (EInput.axis != Vector2.zero)
545 {
546 this.AxisMove();
547 return;
548 }
549 this.timerStartRunning = 0f;
550 this.startedRun = false;
551 if (this.movedByKey && EClass.pc.ai is GoalManualMove)
552 {
553 EClass.pc.ai.Cancel();
554 }
555 this.movedByKey = false;
556 CoreConfig.InputSetting input = EClass.core.config.input;
557 if (EInput.leftMouse.down)
558 {
559 if (this.TryCancelInteraction(true))
560 {
561 return;
562 }
563 CursorSystem.ignoreCount = 5;
564 this.SetPressedAction(EInput.leftMouse);
565 }
566 if (EInput.rightMouse.down)
567 {
568 if (this.TryCancelInteraction(true))
569 {
570 return;
571 }
572 CursorSystem.ignoreCount = 5;
573 this.SetPressedAction(EInput.rightMouse);
574 }
575 if (EInput.middleMouse.pressing || EInput.isShiftDown)
576 {
577 if (HotItemHeld.CanChangeHeightByWheel())
578 {
579 if (EInput.wheel != 0)
580 {
581 ActionMode.Build.ModAltitude(EInput.wheel);
582 SE.Tab();
583 WidgetCurrentTool.Instance.placer.Refresh();
584 EInput.wheel = 0;
585 }
586 if (EInput.middleMouse.pressedTimer > EInput.middleMouse.clickDuration)
587 {
588 EInput.middleMouse.pressedTimer = 100f;
589 }
590 }
591 else if (EClass.scene.mouseTarget.CanCycle())
592 {
593 if (EInput.wheel != 0)
594 {
595 EClass.scene.mouseTarget.CycleTarget(EInput.wheel);
596 EInput.wheel = 0;
597 }
598 if (EInput.middleMouse.pressedTimer > EInput.middleMouse.clickDuration)
599 {
600 EInput.middleMouse.pressedTimer = 100f;
601 }
602 }
603 }
604 if ((EInput.middleMouse.down || EInput.middleMouse.clicked || EInput.middleMouse.pressedLong) && !EClass.ui.contextMenu.isActive)
605 {
606 this.planAll.Update(this.mouseTarget);
607 bool flag = EClass.pc.held != null && HotItemHeld.taskBuild != null && (HotItemHeld.taskBuild.CanPerform() || !this.planAll.HasAct);
608 if (EInput.middleMouse.clicked)
609 {
610 if (flag)
611 {
612 HotItemHeld.taskBuild.recipe.Rotate();
613 SE.Rotate();
614 }
615 else
616 {
617 base.DoFunc(input.middleClick);
618 }
619 }
620 else if (EInput.middleMouse.pressedLong)
621 {
622 base.DoFunc(input.middlePressLong);
623 }
624 }
625 if (EInput.mouse3.clicked || (input.mouse3Click == CoreConfig.GameFunc.Fire && EInput.mouse3.pressing))
626 {
627 base.DoFunc(input.mouse3Click);
628 }
629 else if (EInput.mouse3.pressedLong)
630 {
631 base.DoFunc(input.mouse3PressLong);
632 }
633 if (EInput.mouse4.clicked || (input.mouse4Click == CoreConfig.GameFunc.Fire && EInput.mouse4.pressing))
634 {
635 if (this.zoomOut)
636 {
637 this.ToggleZoom();
638 }
639 else
640 {
641 base.DoFunc(input.mouse4Click);
642 }
643 }
644 else if (EInput.mouse4.pressedLong)
645 {
646 base.DoFunc(input.mouse4PressLong);
647 }
648 if (EInput.wheel != 0)
649 {
650 if (EClass.scene.mouseTarget.pos.Distance(EClass.pc.pos) <= 1 && HotItemHeld.CanChangeHeightByWheel())
651 {
652 if (EInput.wheel != 0)
653 {
654 ActionMode.Build.ModAltitude(EInput.wheel);
655 SE.Tab();
656 WidgetCurrentTool.Instance.placer.Refresh();
657 EInput.wheel = 0;
658 }
659 }
660 else
661 {
662 WidgetCurrentTool.Instance.ModSelected(-EInput.wheel);
663 this.UpdatePlans();
664 }
665 }
666 if (EClass.pc.HasNoGoal && EClass.player.currentHotItem.LookAtMouse)
667 {
668 EClass.pc.LookAt(this.planLeft.pos);
669 }
670 if (Input.GetKey(KeyCode.LeftControl))
671 {
672 if (Input.GetKeyDown(KeyCode.F))
673 {
674 Widget widget = EClass.ui.widgets.Toggle("Search");
675 if (widget == null)
676 {
677 return;
678 }
679 widget.SoundActivate();
680 }
681 return;
682 }
683 EAction action = EInput.action;
684 if (action != EAction.Wait)
685 {
686 if (action != EAction.Fire)
687 {
688 switch (action)
689 {
690 case EAction.Report:
691 if (!EClass.debug.enable)
692 {
693 EClass.ui.ToggleFeedback();
694 return;
695 }
696 break;
697 case EAction.QuickSave:
698 if (EClass.debug.enable || EClass.game.Difficulty.allowManualSave)
699 {
700 if (!EClass.pc.HasNoGoal)
701 {
702 SE.Beep();
703 return;
704 }
705 EClass.game.Save(false, null, false);
706 return;
707 }
708 break;
709 case EAction.QuickLoad:
710 if (EClass.debug.enable || EClass.game.Difficulty.allowManualSave)
711 {
712 EClass.core.WaitForEndOfFrame(delegate
713 {
714 string id = Game.id;
715 EClass.scene.Init(Scene.Mode.None);
716 Game.Load(id);
717 });
718 return;
719 }
720 break;
721 case EAction.AutoCombat:
722 if (EClass.scene.mouseTarget.isValid && EClass.player.CanAcceptInput())
723 {
724 List<Chara> list2 = EClass.scene.mouseTarget.pos.ListCharas();
725 list2.Sort((Chara a, Chara b) => a.hostility - b.hostility);
726 foreach (Chara chara in list2)
727 {
728 if (chara.hostility < Hostility.Friend)
729 {
730 EClass.pc.SetAIImmediate(new GoalAutoCombat(chara));
731 return;
732 }
733 }
734 Msg.Say("noTargetFound");
735 return;
736 }
737 break;
738 case EAction.EmptyHand:
739 if (WidgetCurrentTool.Instance)
740 {
741 WidgetCurrentTool.Instance.Select(-1, false);
742 return;
743 }
744 break;
745 default:
746 return;
747 }
748 }
749 else
750 {
751 if (!EClass.player.HasValidRangedTarget() || EInput.isShiftDown)
752 {
753 EClass.player.TargetRanged();
754 if (EClass.player.HasValidRangedTarget())
755 {
756 SE.Play("lock_on");
757 }
758 if (EInput.keyFire.IsRepeating)
759 {
760 EInput.keyFire.Consume();
761 return;
762 }
763 }
764 else if (EClass.pc.HasNoGoal)
765 {
766 Thing thing = EClass.player.currentHotItem.Thing;
767 bool reloading = EClass.pc.HasCondition<ConReload>();
768 if (thing == null || !thing.CanAutoFire(EClass.pc, EClass.player.target, reloading))
769 {
770 foreach (UIList.ButtonPair buttonPair in WidgetCurrentTool.Instance.list.buttons)
771 {
772 Thing thing2 = buttonPair.obj as Thing;
773 if (thing2 != null && thing2.CanAutoFire(EClass.pc, EClass.player.target, reloading))
774 {
775 thing = thing2;
776 break;
777 }
778 }
779 }
780 if (thing == null || !thing.CanAutoFire(EClass.pc, EClass.player.target, reloading))
781 {
782 thing = EClass.pc.things.Find((Thing _t) => _t.isEquipped && _t.CanAutoFire(EClass.pc, EClass.player.target, reloading), true);
783 }
784 if (thing != null && thing.CanAutoFire(EClass.pc, EClass.player.target, reloading))
785 {
786 if (thing.HasTag(CTAG.throwWeapon))
787 {
788 Point pos = EClass.player.target.pos;
789 if (ActThrow.CanThrow(EClass.pc, thing, EClass.player.target, null))
790 {
791 ACT.Throw.target = thing;
792 ACT.Throw.Perform(EClass.pc, EClass.player.target, EClass.player.target.pos);
793 EClass.player.EndTurn(false);
794 this.SetTurbo(-1);
795 return;
796 }
797 }
798 else
799 {
800 TraitAbility traitAbility = thing.trait as TraitAbility;
801 if (traitAbility != null)
802 {
803 if (traitAbility.act.CanPerform(EClass.pc, EClass.player.target, EClass.player.target.pos) && EClass.pc.UseAbility(traitAbility.act.source.alias, EClass.player.target, EClass.player.target.pos, false))
804 {
805 EClass.player.EndTurn(false);
806 return;
807 }
808 }
809 else if (thing.trait is TraitToolRange)
810 {
811 EClass.pc.ranged = thing;
812 if (ACT.Ranged.CanPerform(EClass.pc, EClass.player.target, null))
813 {
814 EClass.player.renderThing = thing;
815 ACT.Ranged.Perform(EClass.pc, EClass.player.target, null);
816 EClass.player.EndTurn(false);
817 this.SetTurbo(-1);
818 }
819 }
820 }
821 }
822 }
823 }
824 }
825 else
826 {
827 if (EClass.debug.boradcast)
828 {
829 EClass.debug.BroadcastNext();
830 return;
831 }
832 if (!EClass.pc.HasNoGoal)
833 {
834 if (EClass.pc.ai.CanManualCancel())
835 {
836 EClass.pc.ai.Cancel();
837 return;
838 }
839 }
840 else
841 {
842 if (EClass._zone.IsRegion)
843 {
844 EClass.player.EnterLocalZone(false);
845 return;
846 }
847 TraitNewZone traitNewZone = EClass.pc.pos.FindThing<TraitNewZone>();
848 if (traitNewZone != null && traitNewZone.CanAutoEnter())
849 {
850 traitNewZone.MoveZone(false);
851 return;
852 }
853 ACT.Wait.Perform(EClass.pc, null, null);
854 EClass.player.EndTurn(true);
855 return;
856 }
857 }
858 return;
859 }
860 }
861
862 // Token: 0x06000A44 RID: 2628 RVA: 0x0003E100 File Offset: 0x0003C300
863 public void ShowAllAction()
864 {
865 this.planAll.Update(this.mouseTarget);
866 if (this.planAll.HasAct)
867 {
868 this.planAll.ShowContextMenu();
869 return;
870 }
871 if (EClass._zone.IsRegion)
872 {
873 EClass.ui.ToggleLayer<LayerTravel>(null);
874 return;
875 }
876 if (EClass.debug.godBuild)
877 {
878 Thing lastThing = this.planAll.pos.LastThing;
879 if (lastThing != null && EClass.pc.pos.Distance(this.planAll.pos) > 1 && lastThing.W == lastThing.H)
880 {
881 lastThing.Rotate(false);
882 SE.Rotate();
883 return;
884 }
885 }
886 SE.BeepSmall();
887 }
888
889 // Token: 0x06000A45 RID: 2629 RVA: 0x0003E1AD File Offset: 0x0003C3AD
890 public void SetTurbo(int mtp = -1)
891 {
892 if (mtp == -1)
893 {
894 if (AM_Adv.turbo <= EClass.setting.defaultTurbo)
895 {
896 AM_Adv.turbo = EClass.setting.defaultTurbo;
897 return;
898 }
899 }
900 else
901 {
902 AM_Adv.turbo = (float)mtp;
903 }
904 }
905
906 // Token: 0x06000A46 RID: 2630 RVA: 0x0003E1DB File Offset: 0x0003C3DB
907 public void EndTurbo()
908 {
909 AM_Adv.turbo = 0f;
910 }
911
912 // Token: 0x06000A47 RID: 2631 RVA: 0x0003E1E8 File Offset: 0x0003C3E8
913 public void ToggleZoom()
914 {
915 EClass.screen.focusPos = null;
916 this.zoomOut2 = !this.zoomOut2;
917 SE.Play(this.zoomOut2 ? "zoomOut" : "zoomIn");
918 EClass.ui.widgets.OnChangeActionMode();
919 this.ClearPlans();
920 }
921
922 // Token: 0x06000A48 RID: 2632 RVA: 0x0003E244 File Offset: 0x0003C444
923 public bool TryCancelInteraction(bool sound = true)
924 {
925 if (!EClass.pc.HasNoGoal && EClass.pc.ai.IsRunning)
926 {
927 if (EClass.pc.ai.CanManualCancel())
928 {
929 EClass.pc.ai.Cancel();
930 if (sound)
931 {
932 SE.CancelAction();
933 }
934 }
935 EInput.Consume(true, 1);
936 return true;
937 }
938 return false;
939 }
940
941 // Token: 0x06000A49 RID: 2633 RVA: 0x0003E2A1 File Offset: 0x0003C4A1
942 public bool CanAct()
943 {
944 return EClass.pc.HasNoGoal;
945 }
946
947 // Token: 0x06000A4A RID: 2634 RVA: 0x0003E2B0 File Offset: 0x0003C4B0
948 public void AxisMove()
949 {
950 Vector2 vector = (EClass.core.config.input.altKeyAxis && !EClass._zone.IsRegion) ? Util.ConvertAxis(EInput.axis) : EInput.axis;
951 if (!this.startedRun)
952 {
953 if ((this.autorun && this.timerStartRunning >= 0.7f) || Input.GetKey(KeyCode.LeftShift))
954 {
955 this.SetTurbo(-1);
956 this.startedRun = true;
957 }
958 }
959 else if (Input.GetKeyDown(KeyCode.LeftShift))
960 {
961 this.SetTurbo((AM_Adv.turbo == 0f) ? -1 : 0);
962 }
963 if (EClass.core.config.test.alwaysRun)
964 {
965 this.SetTurbo(Input.GetKey(KeyCode.LeftShift) ? 0 : -1);
966 }
967 this.timerStartRunning += Core.delta;
968 EClass.player.nextMove.x = 0f;
969 EClass.player.nextMove.y = 0f;
970 Point point = EClass.pc.pos.Copy();
971 point.x += (int)vector.x;
972 point.z += (int)vector.y;
973 if (EClass.pc.HasNoGoal && !point.IsValid && EClass.player.CanExitBorder(point))
974 {
975 EClass.player.ExitBorder(null);
976 return;
977 }
978 this.axisTarget.Update(point);
979 this.pressedAction.Init(Vector3.zero);
980 this.planKeyboard.Update(this.axisTarget);
981 if (!this.planKeyboard.HasAct)
982 {
983 EClass.player.nextMove.x = vector.x;
984 EClass.player.nextMove.y = vector.y;
985 if (!(EClass.pc.ai is GoalManualMove) && EClass.pc.HasNoGoal && GoalManualMove.CanMove())
986 {
987 this.SetManualMove();
988 }
989 this.movedByKey = true;
990 return;
991 }
992 if (this.planKeyboard.list[0].act.ResetAxis && EClass.pc.ai is GoalManualMove)
993 {
994 EInput.forbidAxis = EInput.axis;
995 EClass.pc.ai.Cancel();
996 return;
997 }
998 this.pressedAction.axis = EInput.axis;
999 this.pressedAction.SetAction(this.planKeyboard.GetAction(), true, this.planKeyboard.WillEndTurn, true);
1000 }
1001
1002 // Token: 0x06000A4B RID: 2635 RVA: 0x0003E529 File Offset: 0x0003C729
1003 public void SetManualMove()
1004 {
1005 if (EClass.player.TooHeavyToMove())
1006 {
1007 return;
1008 }
1009 this.SetTurbo(EInput.isShiftDown ? -1 : 0);
1010 EClass.pc.SetAIImmediate(new GoalManualMove());
1011 this.cursorMove = true;
1012 }
1013
1014 // Token: 0x06000A4C RID: 2636 RVA: 0x0003E560 File Offset: 0x0003C760
1015 public void SetPressedAction(ButtonState button)
1016 {
1017 if (this.updatePlans)
1018 {
1019 this.UpdatePlans();
1020 }
1021 bool flag = button == EInput.leftMouse;
1022 this.pressedAction.Init(button);
1023 if (this.isMouseOnMap)
1024 {
1025 if (flag)
1026 {
1027 if (this.planLeft.HasAct)
1028 {
1029 this.pressedAction.SetPlan(this.planLeft);
1030 return;
1031 }
1032 }
1033 else
1034 {
1035 if (this.planRight.HasAct)
1036 {
1037 this.pressedAction.SetPlan(this.planRight);
1038 return;
1039 }
1040 SE.Play("noAction");
1041 return;
1042 }
1043 }
1044 if (flag)
1045 {
1046 Point pos = (!this.isMouseOnMap) ? null : base.hit.Copy();
1047 if (pos != null)
1048 {
1049 if (EClass.pc.pos.Equals(pos))
1050 {
1051 return;
1052 }
1053 if (EClass.pc.pos.Distance(pos) == 1 && pos.cell.blocked)
1054 {
1055 return;
1056 }
1057 }
1058 this.planLeft.Update(this.mouseTarget);
1059 if (this.planLeft.HasAct)
1060 {
1061 return;
1062 }
1063 this.clickPos = Input.mousePosition;
1064 this.pressedAction.SetAction(() => this.PressedActionMove(pos), false, false, false);
1065 this.pressedAction.repeat = this.zoomOut;
1066 this.pressedAction.ignoreCount = true;
1067 }
1068 }
1069
1070 // Token: 0x06000A4D RID: 2637 RVA: 0x0003E6C0 File Offset: 0x0003C8C0
1071 public bool PressedActionMove(Point pos)
1072 {
1073 if (EClass.player.TooHeavyToMove())
1074 {
1075 return false;
1076 }
1077 if (pos != null)
1078 {
1079 if (EInput.leftMouse.clicked)
1080 {
1081 if (EClass.pc.pos.Equals(pos) || !pos.IsValid)
1082 {
1083 EClass.player.nextMove = Vector2.zero;
1084 EClass.pc.ai.Cancel();
1085 }
1086 else if (PathManager.Instance.RequestPathImmediate(EClass.pc.pos, pos, EClass.pc, PathManager.MoveType.Default, -1, 0).HasPath && (this.zoomOut || (!pos.Equals(GoalManualMove.lastPoint) && !pos.Equals(GoalManualMove.lastlastPoint))))
1087 {
1088 if (!EClass.pc.IsEnemyOnPath(pos, true))
1089 {
1090 EClass.pc.SetAIImmediate(new AI_Goto(pos, 0, false, false));
1091 }
1092 }
1093 else
1094 {
1095 EClass.player.nextMove = Vector2.zero;
1096 EClass.pc.ai.Cancel();
1097 }
1098 return false;
1099 }
1100 if (EInput.rightMouse.down && EClass.core.config.input.autowalk)
1101 {
1102 this.keepWalking = true;
1103 }
1104 }
1105 if (this.autorun)
1106 {
1107 if (Vector2.Distance(this.posOrigin, this.posArrow) > EClass.core.config.game.runDistance)
1108 {
1109 this.SetTurbo(-1);
1110 }
1111 else if (AM_Adv.turbo != 0f && !Input.GetKey(KeyCode.LeftShift) && !EClass.core.config.input.keepRunning && !this.zoomOut && Vector2.Distance(this.posOrigin, this.posArrow) < 1.2f)
1112 {
1113 this.EndTurbo();
1114 }
1115 }
1116 if (pos != null && !this.cursorMove)
1117 {
1118 Vector2Int v = new Vector2Int(pos.x - EClass.pc.pos.x, pos.z - EClass.pc.pos.z);
1119 if (Mathf.Abs(v.x) > 1 || Mathf.Abs(v.y) > 1)
1120 {
1121 int num = Mathf.Max(Mathf.Abs(v.x), Mathf.Abs(v.y));
1122 v.x /= num;
1123 v.y /= num;
1124 }
1125 EClass.player.nextMove = v;
1126 Point.shared.Set(EClass.pc.pos.x + v.x, EClass.pc.pos.z + v.y);
1127 }
1128 else
1129 {
1130 EClass.player.nextMove = this.vArrow;
1131 Point.shared.Set(EClass.pc.pos.x + (int)this.vArrow.x, EClass.pc.pos.z + (int)this.vArrow.y);
1132 }
1133 if (EClass.pc.IsEnemyOnPath(Point.shared, true))
1134 {
1135 if (EClass.pc.ai is GoalManualMove)
1136 {
1137 EClass.pc.ai.Cancel();
1138 }
1139 return true;
1140 }
1141 if (Point.shared.IsInBounds)
1142 {
1143 if (!(EClass.pc.ai is GoalManualMove))
1144 {
1145 if (EClass.pc.HasNoGoal)
1146 {
1147 if (GoalManualMove.CanMove())
1148 {
1149 this.SetTurbo(EInput.isShiftDown ? -1 : 0);
1150 EClass.pc.SetAIImmediate(new GoalManualMove());
1151 }
1152 this.cursorMove = true;
1153 }
1154 }
1155 else
1156 {
1157 this.cursorMove = true;
1158 }
1159 return true;
1160 }
1161 if (EClass.pc.HasNoGoal && EClass.player.CanExitBorder(Point.shared))
1162 {
1163 EClass.player.ExitBorder(null);
1164 return false;
1165 }
1166 if (EClass.pc.ai is GoalManualMove)
1167 {
1168 EClass.pc.ai.Cancel();
1169 }
1170 return true;
1171 }
1172
1173 // Token: 0x06000A4E RID: 2638 RVA: 0x0003EAA8 File Offset: 0x0003CCA8
1174 public unsafe virtual void RefreshArrow()
1175 {
1176 bool flag = this.zoomOut || EInput.rightMouse.pressedLong;
1177 if (flag && this.mouseTarget.pos.Equals(EClass.pc.pos))
1178 {
1179 this.vArrow = Vector2.zero;
1180 EClass.player.nextMove = this.vArrow;
1181 return;
1182 }
1183 this.posOrigin = (flag ? (*EClass.pc.pos.PositionCenter()) : CursorSystem.posOrigin);
1184 this.posArrow = CursorSystem.position;
1185 float num;
1186 if (this.cursorMove || EClass.pc.pos.Distance(base.hit) > 1)
1187 {
1188 num = Util.GetAngle(this.posArrow.x - this.posOrigin.x, this.posArrow.y - this.posOrigin.y) + 90f + 22.5f;
1189 }
1190 else
1191 {
1192 num = Util.GetAngle((float)(EClass.pc.pos.x - base.hit.x), (float)(EClass.pc.pos.z - base.hit.z)) - 22.5f;
1193 if (num < 0f)
1194 {
1195 num = 360f + num;
1196 }
1197 }
1198 if (WidgetUnityChan.Instance)
1199 {
1200 WidgetUnityChan.Instance.Refresh(num);
1201 }
1202 if (this.clickPos != Vector3.zero)
1203 {
1204 if (Vector3.Distance(Input.mousePosition, this.clickPos) < EClass.core.config.game.angleMargin)
1205 {
1206 return;
1207 }
1208 this.clickPos = Vector3.zero;
1209 }
1210 this.vArrow = Vector2.zero;
1211 int _angle = 0;
1212 Action<int, int, int, int> action = delegate(int x, int y, int i, int a)
1213 {
1214 this.vArrow.x = (float)x;
1215 this.vArrow.y = (float)y;
1216 this.arrowIndex = i;
1217 _angle = -a;
1218 };
1219 if (num < 45f || num >= 360f)
1220 {
1221 action(-1, -1, 0, 0);
1222 return;
1223 }
1224 if (num < 90f)
1225 {
1226 action(-1, 0, 1, 35);
1227 return;
1228 }
1229 if (num < 135f)
1230 {
1231 action(-1, 1, 2, 90);
1232 return;
1233 }
1234 if (num < 180f)
1235 {
1236 action(0, 1, 3, 145);
1237 return;
1238 }
1239 if (num < 225f)
1240 {
1241 action(1, 1, 4, 180);
1242 return;
1243 }
1244 if (num < 270f)
1245 {
1246 action(1, 0, 5, 215);
1247 return;
1248 }
1249 if (num < 315f)
1250 {
1251 action(1, -1, 6, 270);
1252 return;
1253 }
1254 action(0, -1, 7, 325);
1255 }
1256
1257 // Token: 0x04000905 RID: 2309
1258 public static float turbo;
1259
1260 // Token: 0x04000906 RID: 2310
1261 public static int actCount;
1262
1263 // Token: 0x04000907 RID: 2311
1264 public bool zoomOut;
1265
1266 // Token: 0x04000908 RID: 2312
1267 public bool zoomOut2;
1268
1269 // Token: 0x04000909 RID: 2313
1270 public bool movedByKey;
1271
1272 // Token: 0x0400090A RID: 2314
1273 protected int arrowIndex;
1274
1275 // Token: 0x0400090B RID: 2315
1276 protected float timerStartRunning;
1277
1278 // Token: 0x0400090C RID: 2316
1279 protected bool cursorMove;
1280
1281 // Token: 0x0400090D RID: 2317
1282 protected bool keepWalking;
1283
1284 // Token: 0x0400090E RID: 2318
1285 protected Vector3 posOrigin;
1286
1287 // Token: 0x0400090F RID: 2319
1288 protected Vector3 posArrow;
1289
1290 // Token: 0x04000910 RID: 2320
1291 protected Vector2 vArrow;
1292
1293 // Token: 0x04000911 RID: 2321
1294 public AM_Adv.PressedAction pressedAction = new AM_Adv.PressedAction();
1295
1296 // Token: 0x04000912 RID: 2322
1297 public PointTarget axisTarget = new PointTarget
1298 {
1299 mouse = false
1300 };
1301
1302 // Token: 0x04000913 RID: 2323
1303 public ActPlan planLeft = new ActPlan
1304 {
1305 input = ActInput.LeftMouse
1306 };
1307
1308 // Token: 0x04000914 RID: 2324
1309 public ActPlan planRight = new ActPlan
1310 {
1311 input = ActInput.RightMouse
1312 };
1313
1314 // Token: 0x04000915 RID: 2325
1315 public ActPlan planKeyboard = new ActPlan
1316 {
1317 input = ActInput.Key
1318 };
1319
1320 // Token: 0x04000916 RID: 2326
1321 public ActPlan planAll = new ActPlan
1322 {
1323 input = ActInput.AllAction
1324 };
1325
1326 // Token: 0x04000917 RID: 2327
1327 public string textWheel;
1328
1329 // Token: 0x04000918 RID: 2328
1330 public string textMiddle;
1331
1332 // Token: 0x04000919 RID: 2329
1333 private float gearAngle;
1334
1335 // Token: 0x0400091A RID: 2330
1336 protected bool updatePlans;
1337
1338 // Token: 0x0400091B RID: 2331
1339 protected bool isMoving;
1340
1341 // Token: 0x0400091C RID: 2332
1342 private Vector3 lastCamPos;
1343
1344 // Token: 0x0400091D RID: 2333
1345 public float rightMouseTimer;
1346
1347 // Token: 0x0400091E RID: 2334
1348 private bool startedRun;
1349
1350 // Token: 0x0400091F RID: 2335
1351 protected Vector3 clickPos;
1352
1353 // Token: 0x02000872 RID: 2162
1354 public class PressedAction
1355 {
1356 // Token: 0x06003A31 RID: 14897 RVA: 0x00135598 File Offset: 0x00133798
1357 public void Init(Vector3 _axis)
1358 {
1359 this.button = null;
1360 this.action = null;
1361 this.plan = null;
1362 this.timer = 0f;
1363 this.axis = _axis;
1364 }
1365
1366 // Token: 0x06003A32 RID: 14898 RVA: 0x001355C6 File Offset: 0x001337C6
1367 public void Init(ButtonState _button = null)
1368 {
1369 this.button = _button;
1370 this.action = null;
1371 this.plan = null;
1372 this.timer = 0f;
1373 this.axis = Vector2.zero;
1374 }
1375
1376 // Token: 0x06003A33 RID: 14899 RVA: 0x001355F4 File Offset: 0x001337F4
1377 public void SetAction(Func<bool> _action = null, bool _canTurbo = true, bool _willEndTurn = true, bool _waitForTurn = true)
1378 {
1379 this.plan = null;
1380 this.action = _action;
1381 this.canTurbo = _canTurbo;
1382 this.willEndTurn = _willEndTurn;
1383 this.waitForTurn = _waitForTurn;
1384 this.hideRightInfo = false;
1385 this.repeat = false;
1386 this.ignoreCount = false;
1387 this.act = null;
1388 }
1389
1390 // Token: 0x06003A34 RID: 14900 RVA: 0x00135644 File Offset: 0x00133844
1391 public void SetPlan(ActPlan _plan)
1392 {
1393 this.plan = _plan;
1394 this.action = this.plan.GetAction();
1395 this.canTurbo = true;
1396 this.willEndTurn = this.plan.WillEndTurn;
1397 this.waitForTurn = true;
1398 this.hideRightInfo = this.plan.HideRightInfo;
1399 this.repeat = this.plan.canRepeat;
1400 this.ignoreCount = false;
1401 this.act = ((this.plan.list.Count == 1) ? this.plan.list[0].act : null);
1402 }
1403
1404 // Token: 0x06003A35 RID: 14901 RVA: 0x001356E4 File Offset: 0x001338E4
1405 public bool IsPressing()
1406 {
1407 if (this.button != null)
1408 {
1409 return this.button.down || this.button.pressing || this.button.clicked;
1410 }
1411 return this.axis != Vector2.zero && EInput.axis == this.axis;
1412 }
1413
1414 // Token: 0x04002418 RID: 9240
1415 public ButtonState button;
1416
1417 // Token: 0x04002419 RID: 9241
1418 public bool canTurbo;
1419
1420 // Token: 0x0400241A RID: 9242
1421 public bool willEndTurn;
1422
1423 // Token: 0x0400241B RID: 9243
1424 public bool waitForTurn;
1425
1426 // Token: 0x0400241C RID: 9244
1427 public bool hideRightInfo;
1428
1429 // Token: 0x0400241D RID: 9245
1430 public bool repeat;
1431
1432 // Token: 0x0400241E RID: 9246
1433 public bool ignoreCount;
1434
1435 // Token: 0x0400241F RID: 9247
1436 public Func<bool> action;
1437
1438 // Token: 0x04002420 RID: 9248
1439 public Act act;
1440
1441 // Token: 0x04002421 RID: 9249
1442 public ActPlan plan;
1443
1444 // Token: 0x04002422 RID: 9250
1445 public float timer;
1446
1447 // Token: 0x04002423 RID: 9251
1448 public float timerRepeat;
1449
1450 // Token: 0x04002424 RID: 9252
1451 public Vector2 axis;
1452
1453 // Token: 0x04002425 RID: 9253
1454 public int count;
1455 }
1456}
Definition ACT.cs:6
Definition Act.2.cs:7
Definition Chara.cs:12
Definition Game.cs:10
Definition Msg.cs:7
Definition Point.cs:11
Definition Scene.cs:10
Definition Thing.cs:10
Definition Zone.cs:14