Ejemplo n.º 1
0
 private static void Debug_DoStrike(int count)
 {
     if (debug_FirstPoint == null)
     {
         debug_FirstPoint = UI.MouseCell();
         Messages.Message("First point selected, select second point.", MessageTypeDefOf.NeutralEvent);
         MoteAt(debug_FirstPoint.Value);
     }
     else
     {
         var bomb = CECompat.IsCEActive ? CECompat.GetProjectile(RFDefOf.Shell_HighExplosive) : RFDefOf.Shell_HighExplosive.projectileWhenLoaded;
         DoStrike(null, bomb, debug_FirstPoint.Value, UI.MouseCell(), count);
         debug_FirstPoint = null;
     }
 }
Ejemplo n.º 2
0
        public void DoStrike()
        {
            bool isAntimatter = CurrentShellDef == ThingDefOf.Shell_AntigrainWarhead;

            if (isAntimatter)
            {
                GenericEventTracker.Fire(AchievementEvent.DroneAntimatter);

                if (LoadedShellCount >= MaxLoadedShellCount)
                {
                    GenericEventTracker.Fire(AchievementEvent.DroneAntimatterFull);
                }
            }

            GenAirstrike.DoStrike(this, CECompat.IsCEActive ? CECompat.GetProjectile(CurrentShellDef) : CurrentShellDef.projectileWhenLoaded, firstPosition.Value, secondPosition.Value, LoadedShellCount, 200, RFDefOf.RF_Sound_Drone);
            ClearLoadedShells();

            isFlying    = true;
            ticksFlying = 0;

            SoundInfo info = SoundInfo.InMap(this);

            RFDefOf.RF_Sound_DroneLaunch.PlayOneShot(info);
        }