|
| 1 | +package zadudoder.spmhelper.tutorial; |
| 2 | + |
| 3 | +import net.minecraft.client.MinecraftClient; |
| 4 | +import net.minecraft.text.Text; |
| 5 | + |
| 6 | +import java.util.ArrayList; |
| 7 | + |
| 8 | +public class TutorialManager { |
| 9 | + public static boolean isEnabled; |
| 10 | + |
| 11 | + public static ArrayList<TutorialPoint> checkpoints; |
| 12 | + |
| 13 | + public static void startTutorial() { |
| 14 | + isEnabled = true; |
| 15 | + checkpoints = new ArrayList<>(); |
| 16 | + StartTutorial(); |
| 17 | + pullText("Включите частицы в настройках и направляйтесь в путь по ним."); |
| 18 | + } |
| 19 | + |
| 20 | + public static void stopTutorial() { |
| 21 | + isEnabled = false; |
| 22 | + } |
| 23 | + |
| 24 | + private static void pullText(String text) { |
| 25 | + MinecraftClient.getInstance().player.sendMessage(Text.literal(text)); |
| 26 | + } |
| 27 | + |
| 28 | + private static void StartTutorial(){ |
| 29 | + checkpoints.add(new TutorialPoint(18, 81, 16,null, false)); |
| 30 | + checkpoints.add(new TutorialPoint(14, 81, 22,null, false)); |
| 31 | + checkpoints.add(new TutorialPoint(11, 81, 28,null, false)); |
| 32 | + checkpoints.add(new TutorialPoint((int) 7.5, 81, 33, TutorialManager::PNAction, true)); |
| 33 | + } |
| 34 | + |
| 35 | + private static void PNAction() { |
| 36 | + pullText("Вы пришли в палатку новичков"); |
| 37 | + startBankTutorial(); |
| 38 | + } |
| 39 | + |
| 40 | + private static void startBankTutorial() { |
| 41 | + checkpoints.add(new TutorialPoint(10, 81, 30, null, false)); |
| 42 | + checkpoints.add(new TutorialPoint(6, 81, 23, null, false)); |
| 43 | + checkpoints.add(new TutorialPoint(0, 81, 19, null, false)); |
| 44 | + checkpoints.add(new TutorialPoint(-7, 81, 16, null, false)); |
| 45 | + checkpoints.add(new TutorialPoint(-16, 79, 16, null, false)); |
| 46 | + checkpoints.add(new TutorialPoint(-24, 79, 12, null, false)); |
| 47 | + checkpoints.add(new TutorialPoint(-32, 78, 8, null, false)); |
| 48 | + checkpoints.add(new TutorialPoint(-36, 79, 14, TutorialManager::BankAction, true)); |
| 49 | + } |
| 50 | + |
| 51 | + private static void BankAction() { |
| 52 | + pullText("Вы пришли в банк"); |
| 53 | + startCIKTutorial(); |
| 54 | + } |
| 55 | + |
| 56 | + private static void startCIKTutorial() { |
| 57 | + checkpoints.add(new TutorialPoint(-33, 79, 9, null, false)); |
| 58 | + checkpoints.add(new TutorialPoint(-32, 78, 2, null, false)); |
| 59 | + checkpoints.add(new TutorialPoint(-31, 78, -8, TutorialManager::CIKAction, true)); |
| 60 | + } |
| 61 | + |
| 62 | + private static void CIKAction() { |
| 63 | + pullText("Вы пришли в Центр Избирательной Комиссии (ЦИК)"); |
| 64 | + startGalleryTutorial(); |
| 65 | + } |
| 66 | + |
| 67 | + private static void startGalleryTutorial() { |
| 68 | + checkpoints.add(new TutorialPoint(-31, 78, -17,null, false)); |
| 69 | + checkpoints.add(new TutorialPoint(-30, 78, -26,null, false)); |
| 70 | + checkpoints.add(new TutorialPoint(-29, 75, -34,null, false)); |
| 71 | + checkpoints.add(new TutorialPoint(-24, 73, -41,null, false)); |
| 72 | + checkpoints.add(new TutorialPoint(-17, 72, -48,null, false)); |
| 73 | + checkpoints.add(new TutorialPoint(-10, 72, -56,null, false)); |
| 74 | + checkpoints.add(new TutorialPoint(-6, 71, -63,null, false)); |
| 75 | + checkpoints.add(new TutorialPoint(-3, 71, -75,null, false)); |
| 76 | + checkpoints.add(new TutorialPoint(2, 70, -81,null, false)); |
| 77 | + checkpoints.add(new TutorialPoint(11, 70, -88,null, false)); |
| 78 | + checkpoints.add(new TutorialPoint(20, 68, -93,null, false)); |
| 79 | + checkpoints.add(new TutorialPoint(29, 64, -97,null, false)); |
| 80 | + checkpoints.add(new TutorialPoint(37, 66, -104,null, false)); |
| 81 | + checkpoints.add(new TutorialPoint(44, 65, -111,null, false)); |
| 82 | + checkpoints.add(new TutorialPoint(54, 63, -119,null, false)); |
| 83 | + checkpoints.add(new TutorialPoint(59, 63, -126,null, false)); |
| 84 | + checkpoints.add(new TutorialPoint(59, 64, -139,null, false)); |
| 85 | + checkpoints.add(new TutorialPoint(59, 64, -147,null, false)); |
| 86 | + checkpoints.add(new TutorialPoint(59, 50, -154,null, false)); |
| 87 | + checkpoints.add(new TutorialPoint(59, 50, -166, TutorialManager::GalleryAction, true)); |
| 88 | + } |
| 89 | + |
| 90 | + private static void GalleryAction() { |
| 91 | + pullText("Вы пришли в галерею."); |
| 92 | + startLawCourtTutorial(); |
| 93 | + } |
| 94 | + |
| 95 | + private static void startLawCourtTutorial() { |
| 96 | + checkpoints.add(new TutorialPoint(-31, 78, -17, null, false)); |
| 97 | + } |
| 98 | + |
| 99 | +} |
0 commit comments