public void OpenConsole(Pawn pawn) { float chance = (DarkNet == null ? DarkNet.BaseDangerous : DarkNet.Dangerous) / 100; if (Rand.Chance(chance)) { DarkNet.SendGssRaid(pawn.Map); } Find.WindowStack.Add(new DarkNETWindow(pawn)); }
public DarkNETWindow(Pawn speaker) { this.speaker = speaker; forcePause = true; doCloseX = true; darkNet = Current.Game.GetComponent <DarkNet>(); foreach (var trader in darkNet.Traders) { trader.WindowOpen(); } }