コード例 #1
0
        private void InvalidateAchievement(On.EntityStates.Captain.Weapon.CallSupplyDropBase.orig_OnEnter orig, CallSupplyDropBase self)
        {
            orig(self);
            SupportAchievementHandler component = self.characterBody.master.gameObject.GetComponent <SupportAchievementHandler>();

            if (component)
            {
                component.Invalidate();
            }
        }
コード例 #2
0
 private void ResetCaptainComponent(Stage stage)
 {
     if (base.meetsBodyRequirement)
     {
         SupportAchievementHandler component = base.localUser.cachedMasterController.master.gameObject.GetComponent <SupportAchievementHandler>();
         if (!component)
         {
             component = base.localUser.cachedMasterController.master.gameObject.AddComponent <SupportAchievementHandler>();
         }
         component.Revalidate();
     }
 }
コード例 #3
0
 private void CheckCaptainComponent(TeleporterInteraction interaction)
 {
     if (base.isUserAlive && base.meetsBodyRequirement)
     {
         SupportAchievementHandler component = base.localUser.cachedMasterController.master.gameObject.GetComponent <SupportAchievementHandler>();
         if (!component)
         {
             component = base.localUser.cachedMasterController.master.gameObject.AddComponent <SupportAchievementHandler>();
         }
         if (component.IsValid())
         {
             PlayerStatsComponent statsComponent = base.localUser.cachedStatsComponent;
             if (statsComponent && statsComponent.currentStats.GetStatValueULong(StatDef.highestStagesCompleted) >= 2UL)
             {
                 base.Grant();
             }
         }
     }
 }