예제 #1
0
 public static void Postfix(CareerStatus __instance, Auction auction)
 {
     if (ConfigHandler.Instance.AuctionGiveKudosBool.Value)
     {
         if (auction.m_item.GetPart().m_type == PartDesc.Type.CASE)
         {
             SoundPlayer.Get().Play2DSound(SoundPlayer.Get().m_collectSound);
             var kudos = (int)(auction.m_bid * ConfigHandler.Instance.AuctionGiveKudosValue.Value);
             SFLog.log($"Added {kudos.ToString()} Kudos!");
             __instance.AddKudos(kudos);
         }
     }
 }
예제 #2
0
        public override void Update()
        {
            if (ProgramConstants.s_max3DMarkTestDuration != 3)
            {
                ProgramConstants.s_max3DMarkTestDuration = 3;
            }
            CareerStatus status = CareerStatus.Get();

            CareerStatus.State state = CareerStatus.GetState();
            WorkshopController workshopController = WorkshopController.Get();
            ModdedJob          moddedjobs         = new ModdedJob();

            if (!moddedjobs.IsInitialized())
            {
                moddedjobs.OnInit();
            }
            if (Input.GetKeyDown(KeyCode.F))
            {
                if (state.m_cash > 999999)
                {
                    return;
                }
                status.AddCash(999999);
            }

            if (Input.GetKeyDown(KeyCode.G))
            {
                status.AddKudos(150);
            }

            if (Input.GetKeyDown(KeyCode.V))
            {
                this.AddReview(status, state, new ReviewModded());
            }

            if (Input.GetKeyDown(KeyCode.K) || Input.GetKeyDown(KeyCode.LeftShift))
            {
                GameObject obj = GameObject.Find("Player");
                if (obj)
                {
                    Walk w = obj.GetComponent <Walk>();
                    if (w.walkSpeed <= this.walkSpeed)
                    {
                        w.walkSpeed = 3.7f;
                    }
                    else
                    {
                        w.walkSpeed = this.walkSpeed;
                    }
                }
            }
            if (Input.GetKeyUp(KeyCode.LeftShift))
            {
                GameObject obj = GameObject.Find("Player");
                if (obj)
                {
                    Walk w = obj.GetComponent <Walk>();
                    if (w.walkSpeed == 3.7f)
                    {
                        w.walkSpeed = this.walkSpeed;
                    }
                }
            }

            if (Input.GetKeyDown(KeyCode.J))
            {
                if (!multipleJobs)
                {
                    multipleJobs = true;
                    return;
                }
                multipleJobs = false;
            }
            if (state.m_calendar.GetToday() != atualDay && multipleJobs)
            {
                atualDay = state.m_calendar.GetToday();
                for (int i = 0; i < UnityEngine.Random.Range(1, 9); i++)
                {
                    if (i == UnityEngine.Random.Range(0, 9))
                    {
                        moddedjobs.GeneratePreviewJob(status, state);
                        continue;
                    }
                    moddedjobs.GenerateJob(status, state);
                }
            }
        }