Some mods target the Mono version of the game, which is available by opting into the Steam beta branch "alternate"
Decompiled source of Hyland Interiors PART 1 v0.8.4
HylandInteriors.Il2Cpp.dll
Decompiled 15 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text; using System.Threading; using HylandInteriors; using Il2CppInterop.Runtime; using Il2CppInterop.Runtime.InteropTypes; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppRootMotion; using Il2CppRootMotion.FinalIK; using Il2CppScheduleOne; using Il2CppScheduleOne.Avatar.Impostors; using Il2CppScheduleOne.AvatarFramework; using Il2CppScheduleOne.AvatarFramework.Animation; using Il2CppScheduleOne.AvatarFramework.Emotions; using Il2CppScheduleOne.AvatarFramework.Equipping; using Il2CppScheduleOne.Clothing; using Il2CppScheduleOne.Core.Avatar; using Il2CppScheduleOne.Core.Items.Framework; using Il2CppScheduleOne.Core.Weather; using Il2CppScheduleOne.DevUtilities; using Il2CppScheduleOne.Doors; using Il2CppScheduleOne.Economy; using Il2CppScheduleOne.Effects; using Il2CppScheduleOne.GameTime; using Il2CppScheduleOne.Interaction; using Il2CppScheduleOne.ItemFramework; using Il2CppScheduleOne.Map; using Il2CppScheduleOne.Money; using Il2CppScheduleOne.NPCs; using Il2CppScheduleOne.NPCs.Behaviour; using Il2CppScheduleOne.NPCs.Schedules; using Il2CppScheduleOne.ObjectScripts; using Il2CppScheduleOne.Persistence; using Il2CppScheduleOne.PlayerScripts; using Il2CppScheduleOne.Police; using Il2CppScheduleOne.Product; using Il2CppScheduleOne.Skating; using Il2CppScheduleOne.Tools; using Il2CppScheduleOne.UI; using Il2CppScheduleOne.UI.Compass; using Il2CppScheduleOne.UI.Handover; using Il2CppScheduleOne.VoiceOver; using Il2CppScheduleOne.Weather; using Il2CppSystem; using Il2CppSystem.Collections.Generic; using Il2CppTMPro; using MelonLoader; using MelonLoader.Utils; using Microsoft.CodeAnalysis; using UnityEngine; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.Rendering; using UnityEngine.SceneManagement; using UnityEngine.UI; using UnityEngine.VFX; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: MelonInfo(typeof(Core), "Hyland Interiors", "0.8.4", "JulesLazarus", null)] [assembly: MelonGame("TVGS", "Schedule I")] [assembly: MelonPlatformDomain(/*Could not decode attribute arguments.*/)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("HylandInteriors.Il2Cpp")] [assembly: AssemblyConfiguration("Il2Cpp")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("HylandInteriors.Il2Cpp")] [assembly: AssemblyTitle("HylandInteriors.Il2Cpp")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace HylandInteriors { public class Core : MelonMod { private class QaIssue { public int count; public string example; public float first; public float last; } private class QaPerson { public ClubPerson p; public readonly Dictionary<string, QaIssue> issues = new Dictionary<string, QaIssue>(); public Vector3 lastPos; public float stillSince = -1f; public bool hasLast; } private struct BottleDeal { public string itemId; public string name; public string model; public float price; public float height; } private class JukeTrack { public AudioClip clip; public string name; } private class PlayerDrink { public GameObject go; public DrinkDef def; public Transform level; public GameObject garnish; public int sipsLeft; public int sipsTotal; public bool tall; } private class Flush { public AvatarEffects fx; public ColorSmoother skin; public float level; public float startAt; public float applied = -1f; } private enum DartsPhase { Bet, Player, Flying, Opponent, Result } private class PoolBallState { public Vector2 p; public Vector2 v; public Transform t; public bool potted; public bool cue; } private enum PoolPhase { Bet, Aim, Rolling, Result } private class KaraokeSong { public string title; public string parodyOf; public string[] lines; } private class BudQuest { public string title; public string ask; public string done; public string need; public float reward; } private class RequestDef { public string item; public string itemName; public string story; public int qty; public float unitPrice; } private enum Prep { Tap, Shaker, Bottle } private enum GlassType { Mug, Martini, Coupe, Rocks, Highball, SakeCup, Shot } private class DrinkDef { public string name; public string line; public float price; public Prep prep; public GlassType glass; public Color liquid; public float alpha = 0.85f; public int bottle = -1; public bool ice; public bool lime; public bool straw; public bool olive; public bool cherry; public bool passionFruit; public bool coffeeLayer; public float alcohol = 1f; } private class ArmIK { public Transform upper; public Transform lower; public Transform hand; public Vector3 target; public float weight; public float side; public Quaternion restUpper; public Quaternion restLower; public Quaternion restHand; public Quaternion lastUpper; public Quaternion lastLower; public bool written; } private class SmokeBlob { public Transform t; public Material m; public Vector3 vel; public float born; public float life; public float size0; public float size1; public float alpha; } private class ClubBuyer { public ClubPerson p; public Customer customer; public EDrugType want; public float until; public float nextAsk; public GameObject zone; } private class PendingArrival { public NPC src; public string style; public float weight; } private class FollowSample { public float t; public float dt; public int frame; public bool cap; public Vector3 pos; public Vector3 hipsLocal; public float yaw; public float speed; public float footSlide; public float hipsH; public string state; public string clip; public string role; public int ts; public int path; public float stateT; public bool walking; } private class ClubPerson { public string role; public string sourceName; public float leaveAt = -1f; public Transform holder; public Transform look; public Transform speech; public Animator an; public Transform hips; public Transform spine; public Transform chest; public Transform head; public Transform lUp; public Transform lLow; public Transform lHand; public Transform rUp; public Transform rLow; public Transform rHand; public Transform handPoint; public Transform lThigh; public Transform lCalf; public Transform lFoot; public Transform rThigh; public Transform rCalf; public Transform rFoot; public Transform[] bones; public Quaternion[] rest; public Quaternion[] written; public Vector3 lookRest; public int move; public float phase; public float minLevel; public float nextLine; public float talkUntil; public Vector3 basePos; public bool outside; public bool gone; public bool arrival; public NPC source; public string style; public string dest; public float weight; public float destYaw; public Vector3 homePos; public float homeYaw; public string homeRole; public int homeMove; public int male = -1; public int urinal; public Transform lookAt; public AnimationClip clip; public AnimationClip alt; public float speed = 1f; public float altEvery; public Vector3 hipsTarget; public bool anchorHips; public bool seatChecked; public float checkAt; public int ts; public float tsUntil; public float yawNow; public ClubStall stall; public int spot = -1; public int sink = -1; public readonly List<Vector3> path = new List<Vector3>(); public AnimationClip overrideClip; public float overrideStart; public float overrideUntil; public HumanPoseHandler poseHandler; public HumanPose poseA = new HumanPose(); public HumanPose poseB = new HumanPose(); public HumanPose poseC = new HumanPose(); public float walkV; public float walkTime; public float faceYaw = float.NaN; public AnimationClip lastClip; public float[] blendFrom; public Vector3 blendBodyPos; public Quaternion blendBodyRot; public float blendStart = -10f; public float blendDur = 0.35f; public float anchorAt = -10f; public bool anchorWas; public Vector3 anRestPos; public Quaternion anRestRot; public Quaternion lookRestRot; public bool lookRotKnown; public bool problemLogged; public bool broken; public Transform rag; public Transform glass; public Transform lHandPoint; public bool tripping; public bool shroomEyes; public float shroomTryAt; public int casualMiss; public bool sitForced; public bool smokeDesynced; public bool stoned; public bool faza; public float lastTalkUntil; public float talkStart = -10f; public Vector3 lookSmooth; public int lookSmoothFrame = -1; public float glanceUntil; public int glance; public bool waitPlayer; public float excuseAt; public float waitSince; public float passUntil; public float seatTop = float.NaN; public float seatEdgeTop = float.NaN; public float seatFitAt; public int seatFit; public Transform drink; public Transform rFinger; public float drinkH; public float sipStart = -1f; public float sipNext; public Vector3 mouthLocal; public bool mouthOk; public float landMax; public float landMiss = 9f; public bool sipLogged; public MxBinding mxBind; public bool mxBound; public bool mxHold; public bool mxLogged; public Transform propLip; public Transform jointTip; public float jointWisp; public bool lateHigh; public string highOn; public float highAt = -1f; public int highDrug; public Transform[] djTipsL; public Transform[] djTipsR; public bool waitingDrink; public bool impatient; public float waitDrinkAt; public float deepW; public bool deepPeak; public float deepExhaleUntil; public float deepNextPuff; public bool quietNow; public int qMove; public AnimationClip qClip; public AnimationClip qAlt; public string pmCurFile; public float pmSwitch; public int pmKind; public string pmFile; public MxClip pm; public MxBinding pmBind; public bool pmBound; public float pmT0; public float pmNext; public float pmStart; public int drinkKind; public float drinkR; public bool gripLooked; public Transform rLittle; public Transform rMiddle; public Transform[] gripBones; public Quaternion[] gripRest; public Vector3[] gripAxis; public bool useAnim; public bool animStarted; public bool animHold; public bool casualSit; public string lastAltName; public string lastOvName; public string animBody; } private class ClubGarment { public string path; public float chance; public bool recolor; public bool head; } private class ClubDoor { public Transform hinge; public Collider leaf; public float open; public float closed; public float cur; public float target; public object user; } private class ClubStall { public ClubDoor door; public Vector3 front; public Vector3 entry; public Vector3 inside; public Vector3 seat; public bool women; public object user; } private class GameWear { public string name; public string slot; public string path; public GameObject prefab; public Texture layerTex; public bool blockHair; public bool colorable; } private struct FrameStep { public string name; public Action run; } private class Faucet { public Transform root; public GameObject stream; public Transform water; public Transform splash; public AudioSource sound; public float activeUntil; public float len; } private class FlagJob { public Vector3 pos; public Quaternion rot; public float fov; public Action<byte[]> done; public Action<byte[]> rawDone; public bool followPlayer; } private class GlbModel { public Mesh mesh; public Material mat; public Bounds bounds; } private class LaunderFront { public string id; public string name; public string partner; public float capacity; public float cut; } private struct LaunderBatch { public float amount; public int start; } private class MeshStat { public string mesh; public string obj; public int tris; public int verts; public int uses; public Vector3 size; public int tex; } private class LiveMirror { public Transform quad; public Camera cam; public RenderTexture rt; } private class MxClip { public float fps; public int frames; public string[] names; public Quaternion[][] d; public Vector3[] dir; public bool[] hasDir; public Vector3[] hipsP; public bool local; public float Length => (float)(frames - 1) / fps; } private class MxBinding { public Transform root; public Transform[] bones; public Quaternion[] targetRest; public int hips = -1; public Vector3 hipsRest; public Transform[] ground; public float[] groundOff; } private class RenderGroup { public string name; public List<Renderer> renderers = new List<Renderer>(); public List<Light> lights = new List<Light>(); public List<Behaviour> comps = new List<Behaviour>(); public Action<bool> toggle; } private class CloneLids { public List<Transform> top = new List<Transform>(); public List<Transform> bottom = new List<Transform>(); public float topOpen; public float bottomOpen; public float nextBlink; public float blinkEnd; public bool asleep; public List<Renderer> eyeballs = new List<Renderer>(); public List<SkinnedMeshRenderer> pupils = new List<SkinnedMeshRenderer>(); public List<Transform> pupilC = new List<Transform>(); public List<Transform> origins = new List<Transform>(); public List<Quaternion> pupilRest = new List<Quaternion>(); public List<Vector3> fwdLocal = new List<Vector3>(); public Vector3 lookAt; public float lookUntil; public float nextSaccade; public Vector2 saccade; public List<MeshRenderer> fixBall = new List<MeshRenderer>(); public List<SkinnedMeshRenderer> fixPupil = new List<SkinnedMeshRenderer>(); public bool restFixed; public bool stoned; public Transform root; public int restMode = -1; public List<Quaternion> capturedRest; public List<Vector3> capturedFwd; } private class Bubble { public Transform anchor; public string text; public float until; public float checkedAt = -1f; public bool visible = true; } private class SeatSpot { public Transform seat; public float range; public readonly List<Collider> colliders = new List<Collider>(); public Vector3[] exits; public float hipHeight; public float surfaceUp = float.NaN; public float edgeUp = float.NaN; } private class SprayCanvas { public string id; public string file; public int w; public int h; public Transform quad; public Texture2D tex; public Color32[] pix; public float maxCameraDistance; public Action onStart; public Action onEnd; public bool IsEmpty { get { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) Color32[] array = pix; foreach (Color32 val in array) { if (val.a > 0) { return false; } } return true; } } } private class TourShot { public string name; public Vector3 pos; public Vector3 look; public Transform follow; public bool clip; public bool aimOnly; public bool big; public bool audio; public int frames = 48; public float gap = 1f / 12f; } private enum VisitorState { Entering, Sitting, GoingToKneel, Kneeling, Returning, Leaving } private class Visitor { public NPC npc; public Building b; public AvatarSeat seat; public Vector3 localPos; public Quaternion rotation; public float savedVisibility; public VisitorState state; public List<Vector3> route = new List<Vector3>(); public int step; public Vector3 point; public Quaternion facing; public NPCAnimation npcAnimation; public float nextPrayer; public float lastTalk = -100f; public float speed; public float holdUntil; public string kneelSpot; public Vector3 knees; public Vector3 forward; public PrayerPose pose; public float prayerEnd; public string[] words; public Behaviour lookController; public Behaviour aim; public bool lookWasOn; public bool aimWasOn; public bool umbrellaWasAllowed; public Transform savedTalkPoint; public Transform talkPoint; } private readonly Dictionary<ClubPerson, QaPerson> qa = new Dictionary<ClubPerson, QaPerson>(); private float qaUntil = -1f; private float qaNextSample; private float qaStartedAt; private int qaSamples; private List<TourShot> tourQaShots; private const float QaSeconds = 60f; private const float QaGap = 0.5f; private const float BarWidth = 5.9f; private const float BarDepth = 8.3f; private const float BarHeight = 3.6f; private static readonly float[] StoolZ = new float[4] { 2.35f, 3.15f, 3.95f, 4.75f }; private readonly Transform[] barDrinks = (Transform[])(object)new Transform[4]; private readonly Dictionary<int, int> stoolSlotBySeat = new Dictionary<int, int>(); private const float StarZ = 3.9f; private const float StoolHips = 0.8f; private const float ChairHips = 0.58f; private Material bWall; private Material bWainscot; private Material bFloor; private Material bCeiling; private Material bWood; private Material bDarkWood; private Material bCounterTop; private Material bBrass; private Material bChrome; private Material bBlack; private Material bLeather; private Material bFelt; private Material bMirror; private Material bGlassDark; private Material bNeonRed; private Material bNeonYellow; private Material bWarmBulb; private static readonly BottleDeal[] BottleDeals = new BottleDeal[3] { new BottleDeal { itemId = "oldmanjimmys", name = "Ol' Man Jimmy's", model = "decoration/oldmanjimmys/oldmanjimmys_", price = 700f, height = 0.29f }, new BottleDeal { itemId = "chateaulapeepee", name = "Chateau La Peepee", model = "decoration/chateaulapeepee/chateaulapeepee_", price = 1050f, height = 0.31f }, new BottleDeal { itemId = "brutdugloop", name = "Brut du Gloop", model = "decoration/brutdugloop/brutdugloop_stored", price = 1750f, height = 0.32f } }; private static readonly string[] BudAfterSale = new string[5] { "Pleasure doing business. Don't tell the liquor store.", "Good choice. It fell off a truck. A nice truck.", "That's the good stuff. Well, the stuff.", "Cheapest in town. Don't ask why.", "Enjoy. And if anyone asks, you paid full price." }; private static readonly string[] GameBottles = new string[4] { "decoration/oldmanjimmys/oldmanjimmys_", "decoration/chateaulapeepee/chateaulapeepee_", "equippables/drinks/beer bottle/beerbottle_tp", "decoration/brutdugloop/brutdugloop_stored" }; private static readonly float[] GameBottleHeights = new float[4] { 0.29f, 0.31f, 0.23f, 0.32f }; private Transform photoGuest; private Transform photoEmployee; private Renderer happyHourSign; private Material happyHourOn; private Material happyHourOff; private static readonly string[] BudToCustomer = new string[12] { "{0}, I'm a bartender, not your therapist.", "{0}, you've told me that story three times. It got worse every time.", "That's your fourth 'last one', {0}.", "{0}, if you're gonna cry, tip first.", "Sure, {0}, put it on your tab. Your tab has its own tab now.", "{0}, the jukebox plays one song. It's not broken, it's a vibe.", "No, {0}, the star doesn't mean anything. It's a star.", "{0}, whatever you're selling in the bathroom - stop.", "{0}, your wife called. I said you're at church.", "Water? In MY bar, {0}? Get out. ...Fine, here.", "{0}, I'm cutting you off. From peanuts. You ate them all.", "{0}, that's not a business plan, that's a crime." }; private static readonly string[] BudToPlayer = new string[6] { "What'll it be? Don't say 'the usual', you don't have one.", "You look like someone who sells... vitamins.", "Cash only. Clean cash, preferably.", "If the cops ask, you were never here. Nobody is ever here.", "Rough day at the 'office'? I can smell the office from here.", "First drink's on the house. Joking. Nothing is on the house." }; private static readonly string[] BudAlone = new string[6] { "Another slow night at Bud's...", "Who keeps stealing the 8 ball?!", "I should've opened a car wash.", "If anyone asks, I didn't see anything. I never see anything.", "This glass is clean. Probably.", "One day I'll fix that sign outside. One day." }; private readonly List<JukeTrack> jukeTracks = new List<JukeTrack>(); private AudioSource jukeboxSource; private Transform jukeboxSpeech; private int jukeTrack; private static readonly string[] BudAboutMusic = new string[3] { "Finally, something new. Twenty years of the same song.", "Best dollar you spent all week.", "If you play this one again, I'm charging two." }; private const float JukeboxYaw = 180f; private static readonly string[] BartenderLooks = new string[7] { "Hank", "Bruce", "Frank", "Jack", "Ray", "Keith", "Harold" }; private static readonly string[] GuestLooks = new string[7] { "Ray", "Jack", "Frank", "Keith", "Harold", "Bruce", "Hank" }; private Transform bartender; private Transform bartenderSpeech; private float bartenderNextLine; private readonly HashSet<int> barStoolSeats = new HashSet<int>(); private Transform fpHand; private readonly List<PlayerDrink> playerDrinks = new List<PlayerDrink>(); private PlayerDrink held; private float sipStart = -1f; private bool sipApplied; private DrinkArmPose drinkArm; private const float SipSeconds = 2.2f; private float sipLen = 2.2f; private MxBinding playerMx; private Animator playerMxAn; private bool playerHoldOn; private Vector3 playerMouthLocal; private bool playerMouthOk; private bool drinkLeft; private bool cigLeft; private static readonly string[] BudEmptyGlass = new string[4] { "Another one? I'm not your mother.", "Empty already? Respect.", "Glass goes back on the bar. Ha. Kidding, I'll get it.", "That's the spirit. Literally." }; private readonly List<Flush> flushes = new List<Flush>(); private const string FlushLabel = "hylandinteriors_drunk"; private static readonly float[] Bets = new float[3] { 10f, 50f, 100f }; private float gameBet; private string opponent; private Vector3 dartCenter; private const float DartboardRadius = 0.225f; private static readonly int[] DartNumbers = new int[20] { 20, 1, 18, 4, 13, 6, 10, 15, 2, 17, 3, 19, 7, 16, 8, 11, 14, 9, 12, 5 }; private DartsPhase dartsPhase; private int dartsThrown; private int playerDarts; private int oppDarts; private readonly List<string> playerHits = new List<string>(); private readonly List<string> oppHits = new List<string>(); private readonly List<GameObject> thrownDarts = new List<GameObject>(); private float dartsTimer; private Vector2 aimNoise; private GameObject flyingDart; private Vector3 flyFrom; private Vector3 flyTo; private int flyScore; private string flyLabel; private bool flyByPlayer; private float dartsWon; private Vector3 poolCenter; private const float PoolFeltY = 0.848f; private const float BallR = 0.0285f; private const float PoolHalfX = 0.935f; private const float PoolHalfZ = 0.46f; private static readonly Vector2[] PocketMouths = (Vector2[])(object)new Vector2[6] { new Vector2(-0.905f, -0.43f), new Vector2(0f, -0.435f), new Vector2(0.905f, -0.43f), new Vector2(-0.905f, 0.43f), new Vector2(0f, 0.435f), new Vector2(0.905f, 0.43f) }; private Transform poolRack; private readonly List<PoolBallState> poolBalls = new List<PoolBallState>(); private Transform poolGroup; private Transform poolCueStick; private Transform poolAimLine; private PoolPhase poolPhase; private int poolShots; private int poolPotted; private float poolPower; private float poolPowerStart = -1f; private Vector2 poolAimDir = Vector2.right; private float poolWon; private static readonly KaraokeSong[] Songs = new KaraokeSong[8] { new KaraokeSong { title = "Like a Rolling Joint", parodyOf = "\"Like a Rolling Stone\" - Bob Dylan (1965)", lines = new string[8] { "I had a job, a car, a tie, a boss who yelled all day,", "now I sell green in Northtown and the cops just look away,", "my mama calls, I don't pick up, she thinks I'm selling cars,", "I'm selling something greener, mama, out behind Bud's Bar!", "Well how 'bout that? (how 'bout that?)", "No tie at all, no boss to call,", "just a rolling joint...", "rolling on and on and ON!" } }, new KaraokeSong { title = "Imagine (No Cops in Hyland)", parodyOf = "\"Imagine\" - John Lennon (1971)", lines = new string[8] { "Close your eyes and picture Westville on a Sunday,", "no sirens and no checkpoints, just a lazy getaway,", "every dealer smiling, every customer is kind,", "every baggie weighed out honest, every bill the proper kind...", "Bud says I'm just drunk, man,", "but I swear that I can see", "a Hyland Point where nobody", "is chasing after meeee..." } }, new KaraokeSong { title = "Lucy in the Sky with Dealers", parodyOf = "\"Lucy in the Sky with Diamonds\" - The Beatles (1967)", lines = new string[8] { "Lucy bought a sample down at the docks,", "now she's talking to the seagulls and a pair of socks,", "the streetlights are singing in pink and in green,", "she swears the mailbox is the queen...", "Lucy in the sky with dealers!", "Lucy in the sky with dealers!", "Lucy in the sky with dealers!", "Ahhhhh... somebody call her mom." } }, new KaraokeSong { title = "Cuke-aine", parodyOf = "\"Cocaine\" - Eric Clapton (1977)", lines = new string[8] { "Woke up at noon with nothing to do,", "grabbed me a can of that sweet green brew,", "heart's going fast like a runaway train...", "CUKE-AINE! (it's just an energy drink, officer)", "Two cans for breakfast, three cans for lunch,", "my hands are shaking and I've got a hunch,", "the doctor said stop or you'll pop a vein...", "CUKE-AINE!" } }, new KaraokeSong { title = "Purple Haze over Westville", parodyOf = "\"Purple Haze\" - The Jimi Hendrix Experience (1967)", lines = new string[8] { "Purple smoke all over Westville,", "the neighbors call the HOA,", "grandma's dancing on the mailbox,", "the cat's been staring at me all day...", "Is it Tuesday? Is it Christmas?", "Whoa, what did Benji put in this?", "Purple haaaze...", "...over Westville!" } }, new KaraokeSong { title = "Can't Feel My Legs", parodyOf = "\"Can't Feel My Face\" - The Weeknd (2015)", lines = new string[8] { "Sat down at Bud's around a quarter past nine,", "had one Puszczalska, said I'm doing fine,", "had another and another, now the floor is my friend,", "I can't feel my legs and I don't know where they end!", "Bud, call me a taxi! Bud, call my mom!", "Bud, call anyone, I think my feet are gone!", "I can't feel my legs... (ooh)", "...but the bar stool loves me back!" } }, new KaraokeSong { title = "Heroine of Hyland Point", parodyOf = "\"Heroin\" - The Velvet Underground (1967)", lines = new string[8] { "She runs the corner by the laundromat,", "she never misses and she never got caught,", "the cops all know her and they tip their hat,", "she knows the price of everything you bought...", "Oh, she's my heroine,", "the heroine of Hyland Point,", "she sold my uncle his very first... sandwich,", "oh, she's my heroine!" } }, new KaraokeSong { title = "Sweet Leaf (Bud's Version)", parodyOf = "\"Sweet Leaf\" - Black Sabbath (1971)", lines = new string[8] { "Bud found a plant growing out by the bins,", "he waters it daily, forgives all its sins,", "now it's six feet tall and it talks in its sleep,", "Bud calls it Gary, says Gary's a keep...", "Oh, sweet leaf! (GARY!)", "Grow for me, sweet leaf,", "Bud's not a farmer, he's just a believer,", "sweet leaf... don't tell the cops!" } } }; private Transform micOnStand; private Transform karaokeScreen; private GameObject heldMic; private bool micHeld; private bool singing; private int songIndex; private int songLine; private float songLineStart; private float nextVoice; private float nextCheer; private TextMeshPro screenTitle; private readonly TextMeshPro[] screenLines = (TextMeshPro[])(object)new TextMeshPro[4]; private float singBlend; private Renderer projectorLens; private Material lensOn; private Material lensOff; private AudioSource singVoice; private VODatabase singDatabase; private Transform micSpeech; private const float SongLineSeconds = 3.8f; private static readonly EVOLineType[] SingSounds; private static readonly string[] Cheers; private const float TitleSize = 0.011f; private const float LineSize = 0.0075f; private Transform micHand; private bool micBonesLogged; private int micSingAnim; private MxBinding playerSingBind; private Animator playerSingAn; private float singHyT0 = -1f; private float singHyW; private Vector3 micMouthLocal; private bool micMouthOk; private static readonly BudQuest[] BudQuests; private const int QuestDone = 6; private const int LaunderUnlocked = 7; private static readonly RequestDef[] RequestDefs; private static readonly string[] RegularNames; private readonly HashSet<string> dealHooked = new HashSet<string>(); private float nextDealHook; private bool wasInBar; private bool wasHappyHour; private int barCallStage = -1; private static readonly string[] SongLikes; private static readonly string[] SongHates; private static readonly DrinkDef[] Drinks; private static readonly Vector3 BudHome; private const float BudHomeYaw = -90f; private static readonly Vector3 MixSpot; private static readonly Vector3 MixGlass; private static readonly Vector3 BottleShelf; private readonly List<Transform> tapHandles = new List<Transform>(); private Transform shaker; private Vector3 shakerHome; private Animator budAnimator; private ArmIK budRight; private ArmIK budLeft; private Transform budRoot; private bool budBusy; private int budJob; private readonly List<GameObject> budTemp = new List<GameObject>(); private GameObject servedDrink; private float nextNpcOrder; private static readonly string[] BudChat; private Transform madeDrink; private const float ToiletWallX = 1.05f; private const float ToiletWallZ = 1.78f; private const float WallT = 0.08f; private const float DoorOpenYaw = -95f; private Transform toiletDoor; private Collider toiletDoorLeaf; private float toiletDoorAngle = -95f; private float toiletDoorTarget = -95f; private string openUi; private Vector3 uiAnchor; private Vector2 songScroll; private GUIStyle uiTitle; private GUIStyle uiRow; private GUIStyle uiSmall; private Texture2D[] drinkIcons; private const string UiName = "HylandInteriors"; private const float SprayUiHeight = 110f; private const int VomitAfterShots = 3; private const float NpcShotChance = 0.1f; private readonly Dictionary<string, int> npcShots = new Dictionary<string, int>(); private readonly Dictionary<string, float> vomitDue = new Dictionary<string, float>(); private static readonly string[] VomitWords; private static readonly string[] BudVomitLines; private bool playerThrowingUp; private static readonly string[] PlayerVomitTexts; private string playerVomitSpot; private Building church; private static readonly Vector3 KneelAltar; private static readonly Vector3 KneelChapel; private const float SeatPointHeight = 0.6f; private const float HipsOnPew = 0.58f; private Material mWall; private Material mWall2; private Material mCeiling; private Material mFloor; private Material mWood; private Material mDarkWood; private Material mGold; private Material mGlowingGold; private Material mRed; private Material mVelvet; private Material mWhite; private Material mMarble; private Material mStone; private Material mWater; private Material mWax; private Material mFlame; private Material mBrass; private Material mIron; private static readonly string[] VisitorPrayers; private GameObject chapelPicture; private static readonly string[] ImpatientLines; private static readonly string[] WaitingLines; private static readonly string[] FinallyLines; private static readonly string[] BegLines; private ClubPerson beggar; private float nextBegAt = -1f; private float begUntil; private int begStep; private bool coatHidden; private static readonly string[] CloakCoatIn; private ParticleSystem[] fogLow; private ParticleSystem[] fogJet; private float nextFogBurst = -1f; private Material fogMat; private const float JointLen = 0.088f; private static readonly string[] HyDanceClips; private static readonly string[] HyBboyClips; private const string HipHopClip = "anim_hiphop_mx.txt"; private const string HySmokeClip = "anim_smoke_hy.txt"; private static readonly string[] HyTechnoBeatClips; private const float TechnoBeatSec = 0.5f; private const float TechnoBeatBlend = 0.2f; private float djHandsUpUntil; private float priestPauseUntil; private bool priestStopped; private bool priestBackLine; public const string ClubName = "KONTROLLVERLUST"; private const float CW = 13f; private const float CD = 20f; private const float CH = 5f; private const float FrontZ = 5f; private const float LowCeil = 3.2f; private Material cWall; private Material cFloor; private Material cCeil; private Material cBlack; private Material cSteel; private Material cChrome; private Material cVelvet; private Material cLeather; private Material cWoodDark; private Material cNeonPink; private Material cNeonCyan; private Material cTileWall; private Material cGlass; private Transform clubRoot; private readonly Material[] ledFloor = (Material[])(object)new Material[4]; private readonly Material[] ledWall = (Material[])(object)new Material[4]; private Material djWallMat; private int djWallHard = -1; private readonly List<Transform> beamPivots = new List<Transform>(); private readonly List<Transform> laserPivots = new List<Transform>(); private readonly List<Light> danceLights = new List<Light>(); private Transform laserGroup; private bool coatChecked; private int coatTicket; private static readonly string[] CloakIn; private static readonly string[] CloakOut; private static readonly float[] ClubStoolZ; private const float ClubStoolHips = 0.8f; private static DrinkDef[] clubMenu; private static readonly DrinkDef[] ClubSpecials; private static readonly string[] ClubNoCashLines; private Transform clubBarRoot; private DrinkDef clubOrder; private float clubOrderAt; private Vector3 clubOrderSpot; private static readonly Color[] ClubLiquids; private static readonly Color[] ClubGlass; private static readonly Color[] ClubPalette; private GameObject cig; private Transform cigModel; private Transform cigAlign; private bool cigTp; private float cigTpMinDist; private Transform cigPaper; private Transform cigEmber; private Transform cigAsh; private Material cigEmberMat; private int cigPuffsLeft; private readonly Dictionary<Transform, int> cigLayers = new Dictionary<Transform, int>(); private float cigPuffStart = -1f; private float cigGiveAt = -1f; private float cigNextWisp; private bool cigExhaled; private const int CigPuffs = 4; private const float CigPuffSeconds = 3.6f; private const float CigPaperLen = 0.07f; private const float CigFilterLen = 0.022f; private const float CigRadius = 0.0048f; private readonly List<SmokeBlob> smokeBlobs = new List<SmokeBlob>(); private static readonly string[] SmokeGive; private float cigExhaleUntil; private float cigNextExhale; private static Material smokeMat; private MxBinding playerSmokeBind; private Animator playerSmokeAn; private ClubBuyer clubBuyer; private bool clubOfferOpen; private float clubOfferWarnAt; private const float ClubEasyMultiplier = 2f; private const float ClubMaxMultiplier = 3f; private const float ClubNoMultiplier = 3.6f; private const int ClubMaxBaggies = 3; private const int ClubMaxSoftUnits = 5; private static readonly EDrugType[] BuyerDrugs; private static readonly float[] BuyerWeights; private static readonly string[] BuyerAsks; private static readonly string[] BuyerWaits; private static readonly string[] BuyerThanks; private static readonly string[] BuyerGivesUp; private static readonly string[] BuyerTooPricey; private static readonly string[] BuyerCancel; private readonly List<ClubBuyer> clubBuyers = new List<ClubBuyer>(); private readonly Dictionary<ClubPerson, float> clubBuyerRest = new Dictionary<ClubPerson, float>(); private float nextBuyerTopUp; private float nextBuyerLine; private const float NpcSipSeconds = 2.2f; private static readonly HumanBodyBones[] RightGripBones; private readonly HashSet<NPC> clubUsedSources = new HashSet<NPC>(); private readonly HashSet<string> clubEntered = new HashSet<string>(); private bool priestInside; private readonly List<PendingArrival> clubPending = new List<PendingArrival>(); private readonly List<Vector3> queueSlots = new List<Vector3>(); private Vector3 queueDoorPoint; private Building queueOutsideBuilding; private Transform clubInsideRoot; private float nextQueueAdvance = -1f; private float nextArrivalSpawn; private const float QueueEvery = 60f; private const int MaxArrivalsInside = 5; private static readonly float[] BarStandZ; private static readonly string[] ArrivalCloakLines; private float nextMensVisit = -1f; private ClubPerson mensVisitor; private static readonly Vector3 MenOutside; private static readonly Vector3 MenInside; private static readonly Vector3 MenSink; private static readonly float[] UrinalZ; private ClubPerson followP; private string followMode; private string followDir; private string followWho; private float followStart; private float followUntil; private float followNextShot; private float followSettledAt = -1f; private float followAbortAt; private int followFrame; private int followTsMax; private bool followActive; private bool followWaitArrival; private bool followLeftLine; private Camera followCam; private RenderTexture followRt; private Texture2D followTex; private Vector3 followCamPos; private bool followCamInit; private readonly List<FollowSample> followSamples = new List<FollowSample>(); private readonly StringBuilder followEvents = new StringBuilder(); private readonly Dictionary<string, float> followLastEvent = new Dictionary<string, float>(); private readonly Dictionary<string, int> followEventCount = new Dictionary<string, int>(); private Vector3 followLastPos; private Vector3 followLastL; private Vector3 followLastR; private Vector3 followLastHips; private bool followHasLast; private float followStillSince = -1f; private float followLastStateT; private string followLastState; private int followStateChanges; private int followRestarts; private static readonly CultureInfo Inv; private Transform mirrorBall; private Material laptopWave; private Transform mirrorDisc; private float mirrorRadius; private Camera mirrorCam; private static RenderTexture mirrorRt; private int mirrorFrame; private bool lastDressNoname; private static readonly string[] GameHairNames; private static readonly Color[] NeonHair; private int nonameLogged; private static readonly Vector3 ClubWorldCenter; private static AudioClip[] technoClips; private AudioSource clubMusic; private AudioSource clubBass; private AudioLowPassFilter clubMusicFilter; private int clubTrack = 0; private int lastClubSamples; private bool clubOutsideBuilt; private float nextOutsideCheck; private readonly List<ClubPerson> clubQueue = new List<ClubPerson>(); private readonly List<AudioSource> mutedGameMusic = new List<AudioSource>(); private const float DropBuildSeconds = 8f; private float nextDropAt; private bool dropBuilding; private static AudioClip riserClip; private static AudioClip impactClip; private float nextVoxAt; private int lastVoxBar = -1; private static readonly Dictionary<int, AudioClip> voxClips; private static readonly Dictionary<int, AudioClip> voxClipsDe; private static readonly bool ClubAlwaysFull; private static int clubSampleState; private static int dressLogged; private static readonly Dictionary<string, bool[]> clipMasks; private static bool poseMixBroken; private static readonly Dictionary<string, AnimationClip> clubClips; private readonly List<ClubPerson> clubPeople = new List<ClubPerson>(); private readonly List<ClubPerson> assignQueue = new List<ClubPerson>(); private Transform clubQueueRoot; private Building clubBuilding; private float nextClubCrowdCheck; private float nextClubChatter; private float clubEnteredAt = -1f; private readonly List<NPC> clubLookSources = new List<NPC>(); private int clubLookNext; private int sitterCount; private static readonly Color[] AltColors; private static readonly Color[] ElegantColors; private static readonly Color[] RaveColors; private static readonly Color[] BouncerColors; private static readonly Dictionary<string, ClubGarment[]> ClubWardrobe; private int garmentMissLogged; private Transform skaterBoard; private ClubPerson skater; private static readonly Dictionary<string, string> GestureTriggers; private static float[] restMuscles; private static readonly Dictionary<int, bool> paintedCache; private readonly List<ClubPerson> toiletLine = new List<ClubPerson>(); private static readonly Vector3[] HangoutSpots; private static readonly Vector3 WomenDoorway; private static readonly Vector3 LineJoin; private static readonly Vector3 WomenDoorIn; private static readonly Vector3 WomenDoorOut; private static readonly Vector3 WomenDoorOutside; private static readonly Vector3 WomenExitStep; private static readonly Vector3[] WomenSinks; private static readonly string[] ToiletInLines; private static readonly string[] ToiletOutLines; private AnimationClip walkClip; private bool walkClipLooked; private static readonly string[] ExcuseLines; private const float ClubWalkSpeed = 1.2f; private float walkRate = -1f; private const float SkatePeriod = 3.3f; private int skState = 6; private int skTrick; private float skTheta; private float skA; private float skNextA; private float skT; private float skNextAsk = -1f; private float skTrickAt = -1f; private float skBoardV; private float skStallSide = 1f; private float skCrouch; private float skStepT = 1f; private float skNextShove = -1f; private bool skLands; private bool skGoDeck; private float skNextDeck = 25f; private static readonly string[] SkaterDeckLines; private Vector3 skBoardFrom; private float skZc = 8.5f; private float skD; private float skDA = 1f; private float skYaw; private float skZTop = 8.5f; private const float SkLaneLo = 7.1f; private const float SkLaneHi = 9f; private const float SkClear = 0.6f; private static readonly string[] SkaterReady; private static readonly string[] SkaterLanded; private static readonly string[] SkaterFell; private static readonly string[] WatcherLanded; private static readonly string[] WatcherFell; private int skAttempts; private float skLookSide; private static readonly string[] CheerLines; private const float RampCopingTop = 1.3619999f; private static readonly Vector3[] RampTableSpots; private static readonly float[] RampTableYaw; private const float RampLift = 0.012f; private static readonly Quaternion SkaterStance; private static Mesh hangingTowelMesh; private static readonly string[] BouncerGreet; private static readonly string[] BouncerIdle; private static readonly string[] WallLines; private static readonly string[] TripLines; private static readonly string[] DancerLines; private readonly List<KeyValuePair<ClubPerson, KeyValuePair<float, string>>> smokeConvo = new List<KeyValuePair<ClubPerson, KeyValuePair<float, string>>>(); private static readonly string[][] SmokePhilosophy; private int wallStory; private int wallLine; private static readonly string[][] WallStories; private static readonly string[] FazaLines; private readonly Dictionary<string, List<int>> smokeDecks = new Dictionary<string, List<int>>(); private readonly Dictionary<string, int> smokeLastPlayed = new Dictionary<string, int>(); private readonly Dictionary<string, int> smokeOpener = new Dictionary<string, int>(); private string smokeLastGroup = ""; private float smokeConvoQuietUntil; private static readonly string[][] SmokeGossip; private static readonly string[] SmokeTalk; private ClubPerson smokeReplyBy; private float smokeReplyAt; private static readonly string[] SmokeReplies; private static readonly string[] QueueLines; private static readonly string[] RampLines; private static readonly string[] RampSitLines; private static readonly string[] SleeperLines; private static readonly string[] HuggerLines; private static readonly string[] DjLines; private static readonly string[] DrinkerLines; private float clubClosingSince = -1f; private static readonly string[] ClosingLines; private bool clubQuiet; private int townLooksLeft; private const float WcWomenX0 = 3.075f; private const float WcWall1 = 7f; private const float WcWall2 = 10.95f; private const float WcT = 0.1f; private readonly List<ClubDoor> clubDoors = new List<ClubDoor>(); private readonly List<ClubStall> clubStalls = new List<ClubStall>(); private static readonly string[] ClubVomitTexts; private static Mesh urinalOuter; private static Mesh urinalInner; private const float RampX = 9.1f; private const float RampZ = 8.5f; private const float RampDepth = 3.4f; private const float RampFlat = 1.4f; private const float RampR = 1.3f; private const float RampDeck = 0.8f; private Transform rampRoot; private static readonly float[,] RampStickerSpots; private const float SmokeX0 = 5.4f; private const float SmokeZ0 = 14f; private Transform smokeFan; private static Mesh fanMesh; private float smokeNextAt; private float smokeLastEnded = -100f; private float smokeRoomBubbleUntil; private bool smokeTopicPhilo = true; private readonly List<KeyValuePair<ClubPerson, string>> lineTalk = new List<KeyValuePair<ClubPerson, string>>(); private float lineTalkNextAt; private float lineTalkNextConvo; private static readonly string[][] LineTalkConvos; private static List<GameWear> wearCatalog; private static readonly HashSet<string> plainTops; private static readonly HashSet<Texture> topTextures; private int shadesInside; private int shadesQueue; private string dressingRole; private int wearLogged; private static int wearDumps; private static List<Texture> exprTex; private static List<Texture> smileTex; private readonly List<string> clipFrameLog = new List<string>(); private readonly List<Building> buildings = new List<Building>(); private Building current; private bool doorsFound; private float nextDoorSearch; private Vector3 savedPosition; private Quaternion savedRotation; internal static bool DevMode; private FrameStep[] updateSteps; private FrameStep[] lateSteps; private FrameStep[] guiSteps; private readonly Dictionary<string, float> stepErrorAt = new Dictionary<string, float>(); private Camera rangeChangedCamera; private float savedCameraRange; private GUIStyle prayerStyle; private GUIStyle visitorStyle; private readonly List<Faucet> faucets = new List<Faucet>(); private static AudioClip waterClip; private const int FlagW = 640; private const int FlagH = 360; private const int FlagFps = 2; private const int FlagSeconds = 5; private Camera flagCam; private RenderTexture flagRt; private Texture2D flagTex; private readonly Queue<byte[]> flagBefore = new Queue<byte[]>(); private readonly Queue<FlagJob> flagJobs = new Queue<FlagJob>(); private FlagJob flagRendering; private float flagNextGrab; private int flagCount; private bool flagRequested; private string flagDir; private int flagAfterLeft; private int flagAfterIndex; private readonly List<string> flagCandidates = new List<string>(); private static readonly Dictionary<string, GlbModel> glbModels; private Shader shader; private int floorLayer; private int interactLayer; private readonly Dictionary<string, Material> materials = new Dictionary<string, Material>(); private static readonly Dictionary<string, Texture2D> textures; private Building building; private static readonly LaunderFront BudsFront; private static readonly LaunderFront[] Fronts; private LaunderFront uiFront; private float launderPick; private float nextLaunderCheck; private static readonly Dictionary<string, float> tune; private static readonly Dictionary<string, float> tuneDefaults; private float nextTuneCheck; private DateTime tuneStamp; private bool tuneDirty; private float tuneErrorAt; private static bool tuneMissing; private static readonly Dictionary<string, float> tuneWrittenDefaults; private static bool tuneWrittenLoaded; private static bool tuneReconcile; private readonly List<LiveMirror> mirrors = new List<LiveMirror>(); private static readonly Dictionary<string, MxClip> mxClips; private static readonly Dictionary<string, Vector2> mouthUvs; private static readonly HashSet<string> mouthDumped; private static readonly Vector3 FaceMouthHead; private static readonly Vector3 FaceMouthNormal; private static readonly Dictionary<Transform, Vector3> exactMouths; private static readonly HashSet<Transform> exactMouthFailed; private readonly Stopwatch stopwatch = new Stopwatch(); private readonly Stopwatch stepWatch = new Stopwatch(); private readonly Dictionary<string, double> stepMs = new Dictionary<string, double>(); private double msUpdate; private double msLate; private double msGui; private int measuredFrames; private int perfGcStart; private int timedFrames; private double cpuMs; private double gpuMs; private readonly FrameTiming[] frameTimings = (FrameTiming[])(object)new FrameTiming[1]; private float perfUntil = -1f; private float perfFrom; private readonly List<RenderGroup> renderGroups = new List<RenderGroup>(); private int renderPhase = -1; private int renderFrames; private float renderPhaseStart; private readonly List<string> renderResults = new List<string>(); private const float RenderPhaseSeconds = 3f; private const float RenderWarmup = 0.6f; private bool flagPaused; private float lastBaselineFps; private string abName; private int abStep = -1; private int abFrames; private float abStart; private readonly double[] abFps = new double[2]; private Action<bool> abToggle; private const float AbWindow = 4f; private const float AbWarmup = 0.6f; private const int AbRounds = 4; private static readonly string[] PlayerDanceClips; private bool playerDancing; private int playerDanceIdx; private float playerDanceT0; private float playerDanceKeyAt; private float playerDanceFloorY; private Vector3 danceOrbitCenter; private MxClip playerDanceClip; private MxBinding playerDanceBind; private Animator playerDanceAn; private GUIStyle danceHintStyle; private bool playerWashing; private float washStart; private float washEnd; private Vector3 washBasin; private Vector3 washOrbitCenter; private static readonly string[] AltarPrayers; private static readonly string[] ChapelPrayers; private bool kneeling; private float prayerEnd; private Vector3 kneelPoint; private Vector3 kneelForward; private PrayerPose playerPose; private string message; private float messageUntil; private float camYaw; private float camPitch; private float camDistance = 2.2f; private float orbitFrom = -1f; private readonly Dictionary<string, string> prog = new Dictionary<string, string>(); private string progFile; private int saveHookedTo; private static readonly Dictionary<string, Mesh> latheMeshes; private readonly List<CloneLids> cloneLids = new List<CloneLids>(); private static int eyeFixLogged; private bool lastDressPupils; private static Material shroomEyeMat; private readonly Dictionary<Transform, CloneLids> lidsByRoot = new Dictionary<Transform, CloneLids>(); private int eyeRestMode; private readonly List<Bubble> bubbles = new List<Bubble>(); private GUIStyle bubbleStyle; private bool recordingMode; private static Mesh seatFitMesh; private static StringBuilder seatFitDebug; private static bool restarting; private int autoStage; private float autoAt; private float autoCheckAt; private int sitFitStage; private float sitFitAt; private bool sitting; private float sitInputFrom; private SeatSpot currentSeat; private float seatHipY; private Vector3 seatPoint; private Quaternion seatRotation; private Vector3 savedAvatarPos; private Quaternion savedAvatarRot; private float enableLookAt = -1f; private Vector3 sitOrbitCenter; private float lastSitHover = -10f; private const float SeatedEyeAboveHips = 0.57f; private static readonly Vector3 SittingOffset; private bool sitFirstPerson; private float fpYaw; private float fpPitch; private static readonly Dictionary<string, Mesh> softMeshes; private static readonly Dictionary<string, Mesh> lowPolyMeshes; private static readonly Dictionary<string, SprayCanvas> sprayStore; private SprayCanvas spray; private Transform sprayCanvas; private bool sprayDirty; private bool sprayPainted; private bool sprayLastValid; private Vector2 sprayLast; private int sprayColor; private float sprayBrush = 14f; private static readonly Color32[] SprayPalette; private static readonly float[] SprayBrushes; private RenderTexture clipRtBig; private Texture2D clipTexBig; private const int ClipFrames = 48; private const float ClipFrameGap = 1f / 12f; private RenderTexture clipRt; private Texture2D clipTex; private float clipNextFrameAt; private string clipDir; private readonly List<TourShot> tourShots = new List<TourShot>(); private int tourIndex = -1; private int tourFrame; private float tourNextAt; private Camera tourCam; private RenderTexture tourRt; private Texture2D tourTex; private string tourDir; private readonly StringBuilder tourReport = new StringBuilder(); private float tourFpsSum; private int tourFpsCount; private const int TourFrames = 3; private const float TourFrameGap = 0.35f; private Vector3 aimFixedPos; private Vector3 aimFixedC; private Transform aimFixedFor; private int aimFixedIndex = -1; private float aimBlockedSince = -1f; private float tourStartedAt; private int tourLastPct; private bool tourFocusOnly; private string filmRole; private readonly Dictionary<int, Visitor> visitors = new Dictionary<int, Visitor>(); private readonly HashSet<string> takenKneelSpots = new HashSet<string>(); private float nextCheck; private bool firstCheck = true; private const float WalkSpeed = 1.3f; private const string BeerEquippable = "Avatar/Equippables/Beer"; private int motionFramesLeft; private readonly StringBuilder motionLog = new StringBuilder(); private static volatile string crumb; private static volatile string crumbPrev; private static volatile string crumbPerson; private static volatile int frameTick; private static Thread watchdog; private readonly List<Renderer> hiddenRain = new List<Renderer>(); private readonly List<Renderer> rainRenderers = new List<Renderer>(); private bool rainHidden; private float nextRainCheck; private float nextRainSearch; private PoolBallState CueBall { get { foreach (PoolBallState poolBall in poolBalls) { if (poolBall.cue) { return poolBall; } } return null; } } private bool IsHappyHour => ClockTime >= 1800 && ClockTime < 2000; private bool IsKaraokeNight => (int)WeekDay == 4 && ClockTime >= 2000; private bool IsDartsTournament => (int)WeekDay == 5; private bool IsRegular => PInt("loyal.days") >= 5; private int DailyDealIndex => (GameDay % BottleDeals.Length + BottleDeals.Length) % BottleDeals.Length; private int BudStage => PInt("bud.quest"); private static PlayerInventory Inventory => PlayerSingleton<PlayerInventory>.InstanceExists ? PlayerSingleton<PlayerInventory>.Instance : null; private RequestDef TodaysRequest => RequestDefs[Mathf.Clamp(PInt("req.idx"), 0, RequestDefs.Length - 1)]; private float Cash => NetworkSingleton<MoneyManager>.InstanceExists ? NetworkSingleton<MoneyManager>.Instance.cashBalance : 0f; private static DrinkDef[] ClubDrinks { get { if (clubMenu == null) { List<DrinkDef> list = new List<DrinkDef>(ClubSpecials); list.AddRange(Drinks); clubMenu = list.ToArray(); } return clubMenu; } } private static float SkateNormA => 2.466f; private static float SkateTopA => 2.6849997f; private static float SkateDeckA => 2.5180001f; private static string CustomArtFolder => Path.Combine(MelonEnvironment.UserDataDirectory, "HylandInteriors", "CustomArt"); private static string FlagsFolder => Path.Combine(MelonEnvironment.UserDataDirectory, "HylandInteriors", "Flags"); private static string TuneFile => Path.Combine(MelonEnvironment.UserDataDirectory, "HylandInteriors", "live_tune.cfg"); private static string TourRequestFile => Path.Combine(MelonEnvironment.UserDataDirectory, "HylandInteriors", "Tour", "request.txt"); private static string TuneDefaultsFile => Path.Combine(MelonEnvironment.UserDataDirectory, "HylandInteriors", "live_tune.defaults"); private static string ProgressFolder => Path.Combine(MelonEnvironment.UserDataDirectory, "HylandInteriors"); private bool HasProgress => progFile != null; private static TimeManager Time_ => NetworkSingleton<TimeManager>.InstanceExists ? NetworkSingleton<TimeManager>.Instance : null; private static int GameMinutes => ((Object)(object)Time_ != (Object)null) ? Time_.GetTotalMinSum() : 0; private static int GameDay => ((Object)(object)Time_ != (Object)null) ? Time_.ElapsedDays : 0; private static int ClockTime => ((Object)(object)Time_ != (Object)null) ? Time_.CurrentTime : 1200; private static EDay WeekDay => (EDay)(((Object)(object)Time_ != (Object)null) ? ((int)Time_.CurrentDay) : 0); private static string AutoStartFile => Path.Combine(MelonEnvironment.UserDataDirectory, "HylandInteriors", "autostart.txt"); private void StartQa() { if (current == null || current.GameName != "Nightclub") { ((MelonBase)this).LoggerInstance.Msg("QA: go into the nightclub first."); return; } qa.Clear(); qaSamples = 0; qaStartedAt = Time.time; qaUntil = Time.time + 60f; qaNextSample = Time.time; ((MelonBase)this).LoggerInstance.Msg($"QA: inspecting every person for {60f:0} s, then recording the worst ones..."); } private void UpdateQa() { if (DevMode && Input.GetKeyDown((KeyCode)292) && qaUntil < 0f && tourIndex < 0) { StartQa(); } if (qaUntil < 0f) { return; } if (current == null || current.GameName != "Nightclub") { qaUntil = -1f; ((MelonBase)this).LoggerInstance.Msg("QA: stopped (left the club)."); return; } if (Time.time >= qaNextSample) { qaNextSample = Time.time + 0.5f; try { QaSample(); } catch (Exception ex) { ((MelonBase)this).LoggerInstance.Warning("QA: " + ex.Message); } int num = Mathf.Clamp(Mathf.FloorToInt(100f * (Time.time - qaStartedAt) / 60f), 0, 100); if (qaSamples % 20 == 0) { ((MelonBase)this).LoggerInstance.Msg($"QA: [{new string('#', num / 5)}{new string('.', 20 - num / 5)}] {num,3}% inspecting"); } } if (Time.time >= qaUntil) { qaUntil = -1f; FinishQa(); } } private void QaFlag(ClubPerson p, string key, string example) { if (!qa.TryGetValue(p, out var value)) { value = new QaPerson { p = p }; qa[p] = value; } if (!value.issues.TryGetValue(key, out var value2)) { value2 = new QaIssue { first = Time.time - qaStartedAt }; value.issues[key] = value2; } value2.count++; value2.example = example; value2.last = Time.time - qaStartedAt; } private static string Where(ClubPerson p) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) Vector3 val = (((Object)(object)p.holder.parent != (Object)null) ? p.holder.parent.InverseTransformPoint(p.holder.position) : p.holder.position); return $"({val.x:F1}, {val.z:F1})"; } private static bool QaIgnore(Collider c) { if ((Object)(object)c == (Object)null) { return true; } string name = ((Object)c).name; if (name.EndsWith("Zone") || name == "OrderDrink" || name.StartsWith("Click")) { return true; } Transform root = ((Component)c).transform.root; if ((Object)(object)root != (Object)null && (((Object)root).name.Contains("Player") || ((Object)root).name.StartsWith("Local") || ((Object)root).name.Contains("(7656"))) { return true; } try { if ((Object)(object)Player.Local != (Object)null && ((Component)c).transform.IsChildOf(((Component)Player.Local).transform)) { return true; } } catch { } return false; } private static string Inside(Vector3 at, float r) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) Collider[] array = Il2CppArrayBase<Collider>.op_Implicit((Il2CppArrayBase<Collider>)(object)Physics.OverlapSphere(at, r, -1, (QueryTriggerInteraction)1)); Collider[] array2 = array; foreach (Collider val in array2) { if (!QaIgnore(val)) { Transform transform = ((Component)val).transform; return ((Object)(object)transform.parent != (Object)null) ? (((Object)transform.parent).name + "/" + ((Object)transform).name) : ((Object)transform).name; } } return null; } private static Collider QaLinecast(Vector3 a, Vector3 b) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) Vector3 val = b - a; Vector3 normalized = ((Vector3)(ref val)).normalized; val = b - a; foreach (RaycastHit item in (Il2CppArrayBase<RaycastHit>)(object)Physics.RaycastAll(a, normalized, ((Vector3)(ref val)).magnitude, -1, (QueryTriggerInteraction)1)) { RaycastHit val2 = item; if (!QaIgnore(((RaycastHit)(ref val2)).collider)) { return ((RaycastHit)(ref val2)).collider; } } return null; } private void QaSample() { //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_06fc: Unknown result type (might be due to invalid IL or missing references) //IL_0706: Unknown result type (might be due to invalid IL or missing references) //IL_070b: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_0661: Unknown result type (might be due to invalid IL or missing references) //IL_0666: Unknown result type (might be due to invalid IL or missing references) //IL_066b: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_074f: Unknown result type (might be due to invalid IL or missing references) //IL_06ae: Unknown result type (might be due to invalid IL or missing references) //IL_0db4: Unknown result type (might be due to invalid IL or missing references) //IL_0dc0: Unknown result type (might be due to invalid IL or missing references) //IL_0dc5: Unknown result type (might be due to invalid IL or missing references) //IL_0dca: Unknown result type (might be due to invalid IL or missing references) //IL_0dcc: Unknown result type (might be due to invalid IL or missing references) //IL_0ddf: Unknown result type (might be due to invalid IL or missing references) //IL_0de6: Unknown result type (might be due to invalid IL or missing references) //IL_0ded: Unknown result type (might be due to invalid IL or missing references) //IL_0df2: Unknown result type (might be due to invalid IL or missing references) //IL_0788: Unknown result type (might be due to invalid IL or missing references) //IL_07ee: Unknown result type (might be due to invalid IL or missing references) //IL_0b02: Unknown result type (might be due to invalid IL or missing references) //IL_0b07: Unknown result type (might be due to invalid IL or missing references) //IL_0ac0: Unknown result type (might be due to invalid IL or missing references) //IL_0acc: Unknown result type (might be due to invalid IL or missing references) //IL_0a6c: Unknown result type (might be due to invalid IL or missing references) //IL_0a71: Unknown result type (might be due to invalid IL or missing references) //IL_0a7b: Unknown result type (might be due to invalid IL or missing references) //IL_0a80: Unknown result type (might be due to invalid IL or missing references) //IL_0a8c: Unknown result type (might be due to invalid IL or missing references) //IL_0c60: Unknown result type (might be due to invalid IL or missing references) //IL_0c62: Unknown result type (might be due to invalid IL or missing references) //IL_0b1c: Unknown result type (might be due to invalid IL or missing references) //IL_0b21: Unknown result type (might be due to invalid IL or missing references) //IL_0b2b: Unknown result type (might be due to invalid IL or missing references) //IL_0b30: Unknown result type (might be due to invalid IL or missing references) //IL_0b35: Unknown result type (might be due to invalid IL or missing references) //IL_0b37: Unknown result type (might be due to invalid IL or missing references) //IL_0b39: Unknown result type (might be due to invalid IL or missing references) //IL_0b43: Unknown result type (might be due to invalid IL or missing references) //IL_0b48: Unknown result type (might be due to invalid IL or missing references) //IL_0b4d: Unknown result type (might be due to invalid IL or missing references) //IL_0b4f: Unknown result type (might be due to invalid IL or missing references) //IL_0b51: Unknown result type (might be due to invalid IL or missing references) //IL_0b53: Unknown result type (might be due to invalid IL or missing references) //IL_0b58: Unknown result type (might be due to invalid IL or missing references) //IL_0b6b: Unknown result type (might be due to invalid IL or missing references) //IL_0b6d: Unknown result type (might be due to invalid IL or missing references) //IL_0954: Unknown result type (might be due to invalid IL or missing references) //IL_095d: Unknown result type (might be due to invalid IL or missing references) //IL_0962: Unknown result type (might be due to invalid IL or missing references) //IL_0967: Unknown result type (might be due to invalid IL or missing references) //IL_096b: Unknown result type (might be due to invalid IL or missing references) //IL_0970: Unknown result type (might be due to invalid IL or missing references) //IL_0972: Unknown result type (might be due to invalid IL or missing references) //IL_0974: Unknown result type (might be due to invalid IL or missing references) //IL_09ba: Unknown result type (might be due to invalid IL or missing references) //IL_09c3: Unknown result type (might be due to invalid IL or missing references) //IL_0bcb: Unknown result type (might be due to invalid IL or missing references) //IL_0bcf: Unknown result type (might be due to invalid IL or missing references) //IL_0bd4: Unknown result type (might be due to invalid IL or missing references) //IL_0bd9: Unknown result type (might be due to invalid IL or missing references) qaSamples++; List<ClubPerson> list = new List<ClubPerson>(); foreach (ClubPerson clubPerson5 in clubPeople) { if ((Object)(object)clubPerson5.holder != (Object)null && ((Component)clubPerson5.holder).gameObject.activeInHierarchy && !clubPerson5.broken && (Object)(object)clubPerson5.an != (Object)null && (Object)(object)clubPerson5.hips != (Object)null) { list.Add(clubPerson5); } } RaycastHit val = default(RaycastHit); foreach (ClubPerson item in list) { if (!qa.TryGetValue(item, out var value)) { value = new QaPerson { p = item }; qa[item] = value; } float y = item.holder.position.y; bool flag = item.anchorHips || item.role == "sitter" || item.role == "barsitter" || item.role == "rampsitter" || item.role == "sleeper"; bool flag2 = item.role == "skater" || item.role == "sleeper" || item.role == "dj" || ((Object)(object)item.overrideClip != (Object)null && ((Object)item.overrideClip).name.StartsWith("Stand up")); string text = "?"; try { AnimatorStateInfo currentAnimatorStateInfo = item.an.GetCurrentAnimatorStateInfo(0); string[] array = new string[11] { "Standing", "Sitting", "Sitting Idle", "Dancing", "Shuffling", "House Dancing", "Pissing", "FreeHandPissing", "Vomiting", "Skate Idle", "Get Up (Back)" }; foreach (string text2 in array) { if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName(text2)) { text = text2; break; } } } catch { } if (!flag && !flag2 && (Object)(object)item.lFoot != (Object)null && (Object)(object)item.rFoot != (Object)null) { float num = Mathf.Min(item.lFoot.position.y, item.rFoot.position.y) - y; if (num > ((item.role == "dancer") ? 0.3f : 0.18f)) { QaFlag(item, "feet floating above the floor", $"{num:F2} m up, state {text}"); } if (num < -0.07f) { QaFlag(item, "feet in the floor", $"{0f - num:F2} m down, state {text}"); } } if (!flag && !flag2) { float num2 = item.hips.position.y - y; if (num2 < 0.6f && text != "Pissing" && text != "Vomiting") { float value2 = (((Object)(object)item.lFoot != (Object)null) ? (item.lFoot.position.y - y) : (-9f)); QaFlag(item, "hips too low for standing (sunk / crouched)", $"hips {num2:F2} m ({((Object)item.hips).name}, head {(((Object)(object)item.head != (Object)null) ? (item.head.position.y - y) : (-9f)):F2}, foot {value2:F2}, holder y {y:F2}, anchor {item.anchorHips}, clip {(((Object)(object)item.clip != (Object)null) ? ((Object)item.clip).name : "-")}), state {text}"); } if (num2 > 1.3f) { QaFlag(item, "hips too high (floating body)", $"hips {num2:F2} m, state {text}"); } } if (item.anchorHips && item.role != "waiter" && item.ts == 0) { if (text != "Sitting" && text != "Sitting Idle" && text != "?" && item.role != "sleeper") { QaFlag(item, "should sit but the animator isn't sitting", "state " + text); } if (!Physics.Raycast(item.hips.position + Vector3.up * 0.05f, Vector3.down, ref val, 0.5f, -1, (QueryTriggerInteraction)1)) { QaFlag(item, "sits on nothing (no seat under the hips)", $"hips {item.hips.position.y - y:F2} m"); } } string example; if ((Object)(object)item.head != (Object)null && (example = Inside(item.head.position + Vector3.up * 0.06f, 0.09f)) != null) { QaFlag(item, "head inside an object", example); } if ((Object)(object)item.chest != (Object)null && (example = Inside(item.chest.position, 0.1f)) != null) { QaFlag(item, "chest inside an object", example); } if (!flag && (example = Inside(item.hips.position, 0.1f)) != null) { QaFlag(item, "hips inside an object", example); } Transform[] array2 = (Transform[])(object)new Transform[2] { item.lHand, item.rHand }; foreach (Transform val2 in array2) { if ((Object)(object)val2 != (Object)null && (example = Inside(val2.position, 0.035f)) != null && (!(item.role == "sleeper") || !example.Contains("Sofa"))) { QaFlag(item, "hand inside an object", example + (((Object)(object)val2 == (Object)(object)item.lHand) ? " (left)" : " (right)")); } } Vector3 val3; if (item.role != "dancer" && item.role != "skater" && item.role != "sleeper" && item.role != "hugger" && item.role != "dj") { Transform[][] array3 = new Transform[2][] { (Transform[])(object)new Transform[2] { item.lUp, item.lLow }, (Transform[])(object)new Transform[2] { item.rUp, item.rLow } }; foreach (Transform[] array4 in array3) { if ((Object)(object)array4[0] != (Object)null && (Object)(object)array4[1] != (Object)null) { val3 = array4[1].position - array4[0].position; Vector3 normalized = ((Vector3)(ref val3)).normalized; float num3 = Vector3.Angle(normalized, Vector3.down); if (!text.Contains("Vomit") && num3 > ((item.role == "bar") ? 88f : 80f) && Vector3.Dot(normalized, item.holder.forward) < 0.5f) { QaFlag(item, "arm sticks out sideways", $"{num3:F0} deg from down, state {text}"); } } } } if ((Object)(object)item.glass != (Object)null && ((Component)item.glass).gameObject.activeSelf && (Object)(object)item.lHandPoint != (Object)null && Vector3.Distance(item.glass.position + Vector3.up * 0.05f, item.lHandPoint.position) > 0.1f) { QaFlag(item, "the glass is away from the hand", $"{Vector3.Distance(item.glass.position, item.lHandPoint.position):F2} m"); } Vector3 position = item.holder.position; if (value.hasLast) { Vector3 val4 = value.lastPos + Vector3.up * 0.5f; Vector3 val5 = position + Vector3.up * 0.5f; val3 = val5 - val4; Collider val6 = ((((Vector3)(ref val3)).sqrMagnitude > 0.0025f) ? QaLinecast(val4, val5) : null); if ((Object)(object)val6 != (Object)null) { QaFlag(item, "walked through an object / wall", ((Object)val6).name + " at " + Where(item)); } if (item.path != null && item.path.Count > 0) { val3 = position - value.lastPos; if (((Vector3)(ref val3)).sqrMagnitude < 0.0004f) { if (value.stillSince < 0f) { value.stillSince = Time.time; } else if (Time.time - value.stillSince > 6f) { QaFlag(item, "stuck while walking (6 s without moving)", "at " + Where(item)); } goto IL_0c5e; } } value.stillSince = -1f; } goto IL_0c5e; IL_0c5e: value.lastPos = position; value.hasLast = true; if (item.useAnim && item.animBody != null && text != "?") { string text3 = ((item.animBody == "Silly Dancing") ? "Dancing" : ((item.animBody == "Shuffling") ? "Shuffling" : ((item.animBody == "House Dancing") ? "House Dancing" : null))); if (text3 != null && text != text3 && !item.an.IsInTransition(0)) { QaFlag(item, "animator not in the expected state", "wants " + text3 + ", is in " + text); } } } for (int l = 0; l < list.Count; l++) { for (int m = l + 1; m < list.Count; m++) { ClubPerson clubPerson3 = list[l]; ClubPerson clubPerson4 = list[m]; if (clubPerson3.role == "skater" || clubPerson4.role == "skater") { continue; } Vector3 val7 = clubPerson3.hips.position - clubPerson4.hips.position; if (Mathf.Abs(val7.y) < 0.5f) { Vector2 val8 = new Vector2(val7.x, val7.z); if (((Vector2)(ref val8)).sqrMagnitude < 0.09f) { QaFlag(clubPerson3, "inside another person", clubPerson4.sourceName + " (" + clubPerson4.role + ")"); QaFlag(clubPerson4, "inside another person", clubPerson3.sourceName + " (" + clubPerson3.role + ")"); } } } } } private void FinishQa() { StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder2 = stringBuilder; StringBuilder stringBuilder3 = stringBuilder2; StringBuilder.AppendInterpolatedStringHandler handler = new StringBuilder.AppendInterpolatedStringHandler(64, 4, stringBuilder2); handler.AppendLiteral("Hyland Interiors "); handler.AppendFormatted("0.8.4"); handler.AppendLiteral(" - AUTO QA of the nightclub, "); handler.AppendFormatted(DateTime.Now); handler.AppendLiteral(", "); handler.AppendFormatted(qaSamples); handler.AppendLiteral(" samples over "); handler.AppendFormatted(60f, "0"); handler.AppendLiteral(" s"); stringBuilder3.AppendLine(ref handler); stringBuilder.AppendLine("Every line: how often the problem was seen (% of the samples), who, role, where (x, z in the club), an example."); stringBuilder.AppendLine(); List<QaPerson> list = (from q in qa.Values where q.issues.Count > 0 orderby q.issues.Values.Sum((QaIssue i) => i.count) descending select q).ToList(); int num = 0; foreach (QaPerson item in list) { ClubPerson p = item.p; if ((Object)(object)p.holder == (Object)null) { continue; } stringBuilder2 = stringBuilder; StringBuilder stringBuilder4 = stringBuilder2; handler = new StringBuilder.AppendInterpolatedStringHandler(7, 5, stringBuilder2); handler.AppendFormatted(p.sourceName); handler.AppendLiteral(" - "); handler.AppendFormatted(p.role); handler.AppendFormatted((p.role == "dancer") ? (" move " + p.move) : ""); handler.AppendFormatted((p.role == "waiter") ? (" ts " + p.ts) : ""); handler.AppendLiteral(" at "); handler.AppendFormatted(Where(p)); stringBuilder4.AppendLine(ref handler); foreach (KeyValuePair<string, QaIssue> item2 in item.issues.OrderByDescending((KeyValuePair<string, QaIssue> k) => k.Value.count)) { num++; stringBuilder2 = stringBuilder; StringBuilder stringBuilder5 = stringBuilder2; handler = new StringBuilder.AppendInterpolatedStringHandler(28, 5, stringBuilder2); handler.AppendLiteral(" "); handler.AppendFormatted(100f * (float)item2.Value.count / (float)Mathf.Max(1, qaSamples), 5, "0"); handler.AppendLiteral("% "); handler.AppendFormatted(item2.Key); handler.AppendLiteral(" - e.g. "); handler.AppendFormatted(item2.Value.example); handler.AppendLiteral(" (seen "); handler.AppendFormatted(item2.Value.first, "0"); handler.AppendLiteral("-"); handler.AppendFormatted(item2.Value.last, "0"); handler.AppendLiteral(" s)"); stringBuilder5.AppendLine(ref handler); } } if (num == 0) { stringBuilder.AppendLine("No problems found."); } stringBuilder.AppendLine(); stringBuilder.AppendLine("By problem (how many people):"); foreach (IGrouping<string, string> item3 in from k in qa.Values.SelectMany((QaPerson q) => q.issues.Keys) group k by k into g orderby g.Count() descending select g) { stringBuilder2 = stringBuilder; StringBuilder stringBuilder6 = stringBuilder2; handler = new StringBuilder.AppendInterpolatedStringHandler(8, 2, stringBuilder2); handler.AppendLiteral(" "); handler.AppendFormatted(item3.Count(), 3); handler.AppendLiteral(" x "); handler.AppendFormatted(item3.Key); stringBuilder6.AppendLine(ref handler); } string text = Path.Combine(MelonEnvironment.UserDataDirectory, "HylandInteriors", "Tour"); Directory.CreateDirectory(text); string text2 = Path.Combine(text, "qa_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".txt"); File.WriteAllText(text2, stringBuilder.ToString()); File.WriteAllText(Path.Combine(text, "qa_latest.txt"), stringBuilder.ToString()); ((MelonBase)this).LoggerInstance.Msg($"QA: {num} problems on {list.Count} people -> {text2}"); tourQaShots = new List<TourShot>(); foreach (QaPerson item4 in list.Take(10)) { if ((Object)(object)item4.p.holder != (Object)null && ((Component)item4.p.holder).gameObject.activeInHierarchy) { string key = item4.issues.OrderByDescending((KeyValuePair<string, QaIssue> k) => k.Value.count).First().Key; string text3 = new string(key.Where(char.IsLetterOrDigit).Take(24).ToArray()); tourQaShots.Add(new TourShot { name = "qa_" + item4.p.role + "_" + new string((item4.p.sourceName ?? "x").Where(char.IsLetterOrDigit).ToArray()) + "_" + text3, follow = item4.p.holder, clip = true, big = true, frames = 80, gap = 0.1f }); } } if (current != null && (Object)(object)current.Interior != (Object)null && tourIndex < 0) { tourFocusOnly = true; StartTour(current); } } private Building CreateBudsBar(Vector3 origin) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) return new Building { GameName = "Bud's Bar", EnterText = "Enter Bud's Bar", OpenFrom = 1200, OpenTo = 200, ExitText = "Leave the bar", Origin = origin, Entrance = new Vector3(0f, 1.1f, 1.1f), EntranceYaw = 0f, InsideDoor = new Vector3(0f, 0f, 0.3f), SeatHipHeight = 0.58f, EnclosureCenter = new Vector3(0f, 1.8f, 4.15f), EnclosureSize = new Vector3(6.2f, 3.8f, 8.7f), Build = BuildBudsBar, ServesDrinks = true, Route = delegate(Building b, AvatarSeat seat) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)seat).transform.position - ((Component)seat).transform.forward * 0.55f; val.y = b.Origin.y; return new List<Vector3> { val, new Vector3(b.Origin.x, b.Origin.y, val.z), b.L(0f, 0.9f), b.L(0f, 0.3f) }; } }; } private void BuildBudsBar(Building b, Transform r) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) Texture2D texture = BrickTexture("bricks_grey_green", Rgb(118, 126, 116), Rgb(64, 66, 62)); bWall = MatTex("budsWall", Color.white, texture, 3f, 1.6f, 0.08f); bWainscot = Mat(Rgb(78, 50, 34), "wood.png", 2f, 1f, 0f, null, 0.35f); bFloor = Mat(Rgb(120, 86, 60), "wood.png", 3f, 4f, 0f, null, 0.4f); bCeiling = Mat(Rgb(38, 36, 34), null, 1f, 1f, 0f, null, 0.05f); bWood = Mat(Rgb(150, 100, 65), "wood.png", 1f, 1f, 0f, null, 0.35f); bDarkWood = Mat(Rgb(85, 52, 34), "wood.png", 1f, 1f, 0f, null, 0.4f); bCounterTop = Mat(Rgb(70, 40, 26), "wood.png", 4f, 1f, 0f, null, 0.8f); bBrass = Mat(Rgb(200, 160, 70), null, 1f, 1f, 0f, null, 0.85f); bChrome = Mat(Rgb(160, 165, 172), null, 1f, 1f, 0f, null, 0.93f); bBlack = Mat(Rgb(22, 22, 24), null, 1f, 1f, 0f, null, 0.3f); bLeather = Mat(Rgb(125, 22, 28), null, 1f, 1f, 0f, null, 0.45f); bFelt = Mat(Rgb(28, 105, 55), null, 1f, 1f, 0f, null, 0.05f); bMirror = Mat(Rgb(52, 58, 62), null, 1f, 1f, 0f, null, 0.98f); bGlassDark = Mat(Rgb(25, 35, 50), null, 1f, 1f, 0.25f, null, 0.95f); bNeonRed = Mat(Rgb(255, 40, 40), null, 1f, 1f, 4f); bNeonYellow = Mat(Rgb(255, 210, 60), null, 1f, 1f, 3f); bWarmBulb = Mat(Rgb(255, 200, 120), null, 1f, 1f, 3f); barStoolSeats.Clear(); stoolSlotBySeat.Clear(); tapHandles.Clear(); servedDrink = null; playerDrinks.Clear(); BuildBarShell(r); BuildBarFront(r); BuildToilet(r); Material sharedMaterial = MatTex("budsWallMeters", Color.white, texture, 1f, 1f, 0.08f); foreach (MeshRenderer componentsInChild in ((Component)r).GetComponentsInChildren<MeshRenderer>(true)) { if ((Object)(object)((Renderer)componentsInChild).sharedMaterial == (Object)(object)bWall) { MeterUV(((Component)componentsInChild).gameObject, r, 2.9f, 2.25f); ((Renderer)componentsInChild).sharedMaterial = sharedMaterial; } } BuildBarCounter(r); BuildBackBar(r); BuildBarTables(r); BuildPoolCorner(r); BuildJukebox(b, r); BuildBarLights(r); BuildBartender(r); } private void BuildBarShell(Transform r) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) float num = 2.95f; Block(r, "Floor", new Vector3(0f, -0.1f, 4.15f), new Vector3(6.3f, 0.2f, 8.7f), bFloor, (PrimitiveType)3); Block(r, "Ceiling", new Vector3(0f, 3.6999998f, 4.15f), new Vector3(6.3f, 0.2f, 8.7f), bCeiling, (PrimitiveType)3); Block(r, "WallLeft", new Vector3(0f - num - 0.1f, 1.8f, 4.15f), new Vector3(0.2f, 3.6f, 8.7f), bWall, (PrimitiveType)3); Block(r, "WallRight", new Vector3(num + 0.1f, 1.8f, 4.15f), new Vector3(0.2f, 3.6f, 8.7f), bWall, (PrimitiveType)3); Block(r, "WallBack", new Vector3(0f, 1.8f, 8.400001f), new Vector3(6.3f, 3.6f, 0.2f), bWall, (PrimitiveType)3); float[] array = new float[2] { -1f, 1f }; foreach (float num2 in array) { Decor(r, "Wainscot", new Vector3(num2 * (num - 0.02f), 0.5f, 4.15f), new Vector3(0.04f, 1f, 8.3f), bWainscot, (PrimitiveType)3); Decor(r, "WainscotCap", new Vector3(num2 * (num - 0.04f), 1.02f, 4.15f), new Vector3(0.08f, 0.05f, 8.3f), bDarkWood, (PrimitiveType)3); if (num2 < 0f) { Decor(r, "PictureRail", new Vector3(num2 * (num - 0.03f), 2.75f, 4.15f), new Vector3(0.05f, 0.04f, 8.3f), bDarkWood, (PrimitiveType)3); continue; } float num3 = 3.3500001f; float num4 = 4.4500003f; Decor(r, "PictureRail", new Vector3(num2 * (num - 0.03f), 2.75f, num3 / 2f), new Vector3(0.05f, 0.04f, num3), bDarkWood, (PrimitiveType)3); Decor(r, "PictureRail", new Vector3(num2 * (num - 0.03f), 2.75f, (num4 + 8.3f) / 2f), new Vector3(0.05f, 0.04f, 8.3f - num4), bDarkWood, (PrimitiveType)3); } Decor(r, "WainscotBack", new Vector3(0f, 0.5f, 8.28f), new Vector3(5.9f, 1f, 0.04f), bWainscot, (PrimitiveType)3); Decor(r, "WainscotBackCap", new Vector3(0f, 1.02f, 8.26f), new Vector3(5.9f, 0.05f, 0.08f), bDarkWood, (PrimitiveType)3); for (int j = 0; j < 4; j++) { Decor(r, "Beam", new Vector3(0f, 3.48f, 1.2f + (float)j * 2f), new Vector3(5.9f, 0.24f, 0.22f), bDarkWood, (PrimitiveType)3); } } private void BuildBarFront(Transform r) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) float num = 2.95f; float num2 = -0.1f; float num3 = 0f - num - 0.2f; float[] obj = new float[8] { 0f, -2.3f, -1f, -0.5f, 0.5f, 1f, 2.3f, 0f }; obj[0] = num3; obj[7] = num + 0.2f; float[] array = obj; for (int i = 0; i < array.Length - 1; i += 2) { float num4 = array[i]; float num5 = array[i + 1]; Block(r, "FrontWall", new Vector3((num4 + num5) / 2f, 1.8f, num2), new Vector3(num5 - num4, 3.6f, 0.2f), bWall, (PrimitiveType)3); } float[] array2 = new float[2] { -1f, 1f }; foreach (float num6 in array2) { Block(r, "UnderWindow", new Vector3(num6 * 1.65f, 0.45f, num2), new Vector3(1.3f, 0.9f, 0.2f), bWall, (PrimitiveType)3); Block(r, "OverWindow", new Vector3(num6 * 1.65f, 2.9499998f, num2), new Vector3(1.3f, 1.3f, 0.2f), bWall, (PrimitiveType)3); BarWindow(r, new Vector3(num6 * 1.65f, 1.5999999f, 0f), 1.3f, 1.4f); } Block(r, "OverDoor", new Vector3(0f, 2.9f, num2), new Vector3(1f, 1.3999999f, 0.2f), bWall, (PrimitiveType)3); Decor(r, "WainscotFrontL", new Vector3((0f - (num + 1.65f + 0.65f)) / 2f - 0f, 0.5f, 0.02f), new Vector3(num - 1.65f - 0.65f, 1f, 0.04f), bWainscot, (PrimitiveType)3); Decor(r, "WainscotFrontR", new Vector3((num + 1.65f + 0.65f) / 2f, 0.5f, 0.02f), new Vector3(num - 1.65f - 0.65f, 1f, 0.04f), bWainscot, (PrimitiveType)3); Decor(r, "DoorDark", new Vector3(0f, 1.1f, -0.02f), new Vector3(1f, 2.2f, 0.02f), bGlassDark, (PrimitiveType)3); float[] array3 = new float[2] { -1f, 1f }; foreach (float num7 in array3) { Decor(r, "DoorFrameSide", new Vector3(num7 * 0.46f, 1.1f, 0.01f), new Vector3(0.08f, 2.2f, 0.06f), bBlack, (PrimitiveType)3); } float[] array4 = new float[4] { 0.04f, 0.95f, 1.45f, 2.16f }; foreach (float num8 in array4) { Decor(r, "DoorFrameBar", new Vector3(0f, num8, 0.01f), new Vector3(1f, 0.08f, 0.06f), bBlack, (PrimitiveType)3); } Decor(r, "DoorMullion", new Vector3(0f, 1.1f, 0.01f), new Vector3(0.05f, 2.2f, 0.05f), bBlack, (PrimitiveType)3); Decor(r, "DoorHandle", new Vector3(0.38f, 1.05f, 0.06f), new Vector3(0.03f, 0.3f, 0.03f), bChrome, (PrimitiveType)3); Zone(r, "ExitZone", new Vector3(0f, 1.2f, 0.2f), new Vector3(1.2f, 2.3f, 0.3f), building.ExitText, Exit); Decor(r, "Doormat", new Vector3(0f, 0.005f, 0.55f), new Vector3(1.1f, 0.01f, 0.7f), Mat(Rgb(70, 25, 25), null, 1f, 1f, 0f, null, 0f), (PrimitiveType)3); } private void BarWindow(Transform r, Vector3 center, float w, float h) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unkno