using System.Collections; using UnityEngine; namespace GrassCutter { public partial class DemoBot { /// /// -demoshop [slot]: the upgrade matrix on a save (a fresh planet without one), every tab, with a node picked in each /// and the detail panel showing it; then the same with a pile of money, so the affordable look shows too. /// IEnumerator ShopDemo(int slot) { if (slot > 0) SaveSlots.Current = slot - 1; else TeamState.DeleteSave(); yield return new WaitForSeconds(2f); NetSession.Instance.HostLocal(); while (!Me || !Ts) yield return null; yield return new WaitForSeconds(3f); Log($"perks {Ts.Installs} / {TeamState.TotalInstalls}, money {Ts.Money.Value:0}"); for (int pass = 0; pass < 2; pass++) { if (pass == 1) Ts.ServerSetMoney(Ts.Money.Value + 250000d); UIRoot.I.OpenShop(); yield return new WaitForSeconds(1.2f); var shop = UIRoot.I.Shop; foreach (var tree in ShopScreen.TerminalTrees) { shop.SetTree(tree, false); yield return new WaitForSeconds(0.6f); yield return Shot($"shop{pass}_{(int)tree}_{tree}"); } UIRoot.I.CloseTopModal(); yield return new WaitForSeconds(0.5f); } Log("shop done"); Application.Quit(); } } }