Example #1
0
 public void Start(ModManager manager)
 {
     m = manager;
     m.RegisterOnSpecialKey(OnTabKey);
     m.RegisterOnDialogClick(OnTabResponse);
     m.RegisterTimer(UpdateTab, 1);
 }
Example #2
0
 public void Start(ModManager manager)
 {
     m = manager;
     SoundSet solidSounds = new SoundSet()
     {
         Walk = new string[] { "walk1", "walk2", "walk3", "walk4" },
         Break = new string[] { "destruct" },
         Build = new string[] { "build" },
         Clone = new string[] { "clone" },
     };
     m.SetBlockType(46, "TNT", new BlockType()
                    {
                    	TextureIdTop = "TNTTop",
                    	TextureIdBottom = "TNTBottom",
                    	TextureIdBack = "TNT",
                    	TextureIdFront = "TNT",
                    	TextureIdLeft = "TNT",
                    	TextureIdRight = "TNT",
                    	TextureIdForInventory = "TNT",
                    	DrawType = DrawType.Solid,
                    	WalkableType = WalkableType.Solid,
                    	Sounds = solidSounds,
                    	IsUsable = true,
                    });
     tnt = m.GetBlockId("TNT");
     adminium = m.GetBlockId("Adminium");
     m.AddToCreativeInventory("TNT");
     m.AddCraftingRecipe("TNT", 1, "GoldBlock", 1);
     m.RegisterOnBlockUse(UseTnt);
     m.RegisterPrivilege("use_tnt");
     m.RegisterTimer(UpdateTnt, 5);
 }
        public void Start(ModManager manager)
        {
            m = manager;
            DirtForFarming = m.GetBlockId("DirtForFarming");
            OakSapling = m.GetBlockId("OakSapling");
            BirchSapling = m.GetBlockId("BirchSapling");
            SpruceSapling = m.GetBlockId("SpruceSapling");
            BrownMushroom = m.GetBlockId("BrownMushroom");
            RedMushroom = m.GetBlockId("RedMushroom");
            YellowFlowerDecorations = m.GetBlockId("YellowFlowerDecorations");
            RedRoseDecorations = m.GetBlockId("RedRoseDecorations");
            Dirt = m.GetBlockId("Dirt");
            Grass = m.GetBlockId("Grass");
            Crops1 = m.GetBlockId("Crops1");
            Crops2 = m.GetBlockId("Crops2");
            Crops3 = m.GetBlockId("Crops3");
            Crops4 = m.GetBlockId("Crops4");
            OakLeaves = m.GetBlockId("OakLeaves");
            BirchLeaves = m.GetBlockId("BirchLeaves");
            SpruceLeaves = m.GetBlockId("SpruceLeaves");
            Apples = m.GetBlockId("Apples");
            OakTreeTrunk = m.GetBlockId("OakTreeTrunk");
            BirchTreeTrunk = m.GetBlockId("BirchTreeTrunk");
            SpruceTreeTrunk = m.GetBlockId("SpruceTreeTrunk");

            m.RegisterOnBlockUpdate(BlockTickGrowCropsCycle);
            m.RegisterOnBlockUpdate(BlockTickGrowSapling);
            m.RegisterOnBlockUpdate(BlockTickMushroomDeath);
            m.RegisterOnBlockUpdate(BlockTickFlowerDeath);
            m.RegisterOnBlockUpdate(BlockTickGrowGrassOrMushroomsOnDirt);
            m.RegisterOnBlockUpdate(BlockTickGrassDeathInDarkness);
        }
Example #4
0
        public void Start(ModManager manager)
        {
            m = manager;

            m.RegisterOnBlockUse(OnUse);

            Cake = m.GetBlockId("Cake");
        }
Example #5
0
 public void Start(ModManager manager)
 {
     m = manager;
     m.RegisterPrivilege("revert");
     m.RegisterCommandHelp("revert", "/revert [playername] [number of changes]");
     lines = (List<object[]>)m.GetGlobalDataNotSaved("LogLines");
     m.RegisterOnCommand(OnCommand);
 }
Example #6
0
 public void Start(ModManager manager)
 {
     m = manager;
     if (enabled)
     {
         m.RegisterOnLoadWorld(OnLoad);
     }
 }
Example #7
0
 public void Start(ModManager manager)
 {
     m = manager;
     if (enabled)
     {
         m.RegisterTimer(f, 0.1);
         ghost = m.AddBot("Ghost");
     }
 }
Example #8
0
 public void Start(ModManager manager)
 {
     m = manager;
     m.RegisterTimer(Update, 1);
     m.RegisterOnBlockBuild(BlockBuild);
     m.RegisterOnBlockDelete(BlockDelete);
     Water = m.GetBlockId("Water");
     Sponge = m.GetBlockId("Sponge");
 }
Example #9
0
 public void Start(ModManager manager)
 {
     m = manager;
     m.RegisterOnBlockBuild(OnBuild);
     m.RegisterOnBlockDelete(OnDelete);
     m.RegisterOnLoad(OnLoad);
     m.RegisterOnSave(OnSave);
     m.SetGlobalDataNotSaved("LogLines", lines);
 }
        /// <summary>Creates a new preset view model.</summary>
        public PresetViewModel(Preset preset, ModManager modManager, PresetManager presetManager)
        {
            this.modManager = modManager;
            this.presetManager = presetManager;

            Preset = preset;

            RenameCommand = new Command(Rename);
            DisbandCommand = new Command(Disband);
        }
Example #11
0
 public void Start(ModManager m)
 {
     this.m = m;
     m.RegisterOnBlockUpdate(CheckNeighbors);
     m.RegisterOnBlockBuild(Build);
     m.RegisterTimer(UpdateFluids, 1);
     m.RegisterOnBlockDelete(Delete);
     Water = m.GetBlockId("Water");
     Lava = m.GetBlockId("Lava");
 }
        /// <summary>Creates a new view model wrapper for a mod.</summary>
        public ModViewModel(Mod mod, ModManager modManager, PresetManager presetManager)
            : base()
        {
            this.modManager = modManager;
            this.presetManager = presetManager;

            Mod = mod;

            DeleteModCommand = new Command(DeleteMod);
            AddModToPresetCommand = new Command<Preset>(AddToPreset);
            NewPresetForModCommand = new Command(AddToNewPreset);
        }
Example #13
0
        public void Start(ModManager manager)
        {
            m = manager;

            //Register Commands
            m.RegisterOnCommand(OnCommandSetModel);

            //Register special events
            m.RegisterOnSpecialKey(OnRespawnKey);
            m.RegisterOnSpecialKey(OnSetSpawnKey);
            m.RegisterOnPlayerDeath(OnPlayerDeath);
        }
Example #14
0
 public void Start(ModManager manager)
 {
     m = manager;
     BLOCK_GRASS = m.GetBlockId("Grass");
     BLOCK_OAKTRUNK = m.GetBlockId("OakTreeTrunk");
     BLOCK_OAKLEAVES = m.GetBlockId("OakLeaves");
     BLOCK_APPLES = m.GetBlockId("Apples");
     BLOCK_SPRUCETRUNK = m.GetBlockId("SpruceTreeTrunk");
     BLOCK_SPRUCELEAVES = m.GetBlockId("SpruceLeaves");
     BLOCK_BIRCHTRUNK = m.GetBlockId("BirchTreeTrunk");
     BLOCK_BIRCHLEAVES = m.GetBlockId("BirchLeaves");
     m.RegisterPopulateChunk(PopulateChunk);
 }
Example #15
0
 public void Start(ModManager manager)
 {
     m = manager;
     TileIdStone = m.GetBlockId("Stone");
     TileIdGravel = m.GetBlockId("Gravel");
     TileIdDirt = m.GetBlockId("Dirt");
     TileIdGrass = m.GetBlockId("Grass");
     TileIdGoldOre = m.GetBlockId("GoldOre");
     TileIdIronOre = m.GetBlockId("IronOre");
     TileIdSilverOre = m.GetBlockId("SilverOre");
     TileIdSand = m.GetBlockId("Sand");
     TileIdCoalOre = m.GetBlockId("CoalOre");
     m.RegisterPopulateChunk(PopulateChunk);
 }
Example #16
0
 public void Start(ModManager manager)
 {
     m = manager;
     m.SetBlockType("VandalFinder", new BlockType()
         {
             AllTextures = "VandalFinder",
             DrawType = DrawType.Solid,
             WalkableType = WalkableType.Solid,
             IsUsable = true,
             IsTool = true,
         });
     m.AddToCreativeInventory("VandalFinder");
     m.RegisterOnBlockUseWithTool(OnUseWithTool);
     lines = (List<object[]>)m.GetGlobalDataNotSaved("LogLines");
 }
        public void Start(ModManager manager)
        {
            m = manager;
            m.RegisterWorldGenerator (GetChunk);

            this.emtpy = m.GetBlockId ("Empty");
            this.stone = m.GetBlockId ("Stone");
            this.dirt = m.GetBlockId ("Dirt");
            this.grass = m.GetBlockId ("Grass");
            this.sand = m.GetBlockId ("Sand");
            this.water = m.GetBlockId ("Water");
            this.hay = m.GetBlockId ("Hay");
            this.lava = m.GetBlockId ("Lava");

            this.chunksize = m.GetChunkSize ();
            _rnd = new Random ();
            this.seed = m.GetSeed ();
        }
        public void Start(ModManager manager)
        {
            m = manager;

            for (int i = 0; i < PermissionLevelsCount; i++)
            {
                m.SetBlockType(241 + i, "BuildPermission" + i, new BlockType()
                    {
                        AllTextures = "BuildPermission" + i,
                        DrawType = DrawType.Solid,
                        WalkableType = WalkableType.Solid,
                        IsBuildable = true,
                    });
                m.AddToCreativeInventory("BuildPermission" + i);
            }

            m.RegisterOnBlockBuild(OnBuild);
            m.RegisterOnBlockDelete(OnDelete);
        }
        public ModsTabViewModel(CCMMInitialization initialization)
        {
            EnableAllModsCommand = new Command(EnableAllMods);
            DisableAllModsCommand = new Command(DisableAllMods);
            RefreshListCommand = new Command(LoadAllMods);
            InstallModCommand = new Command(InstallModsFromDialog);

            UpdateFiltersCommand = new Command(RefreshView);

            Icons = new ModsTabIcons();

            ShowEnabledMods = true;
            ShowDisabledMods = true;

            InitModsCollectionSource();

            this.initialization = initialization;
            this.modManager = initialization.ModManager;
            this.presetManager = initialization.PresetManager;
        }
Example #20
0
        internal override void InitializeSprites()
        {
            if (GameBase.GameField.CorrectionOffsetActive)
            {
                spinnerTopOffset -= 16;
            }

            //this is madness, but works.
            posTopLeftCentre = new Vector2(GameBase.WindowManager.WidthScaled / Math.Max(1, GameBase.WindowManager.WidthWidescreenRatio) / 2f, spinnerTopOffset + 219);

            Color fade = (GameBase.Mode == OsuModes.Play &&
                          (ModManager.CheckActive(hitObjectManager.ActiveMods, Mods.SpunOut) || Player.Relaxing2)
                              ? Color.Gray
                              : Color.White);

            SpriteCircleTop =
                new pSprite(TextureManager.Load(@"spinner-circle", SkinSource.Osu | SkinSource.Skin), Fields.TopLeft,
                            Origins.Centre,
                            Clocks.Audio, posTopLeftCentre, SpriteManager.drawOrderBwd(EndTime), false,
                            fade);
            SpriteCollection.Add(SpriteCircleTop);

            if (!ModManager.CheckActive(hitObjectManager.ActiveMods, Mods.Hidden))
            {
                pTexture highRes = TextureManager.Load(@"spinner-approachcircle", SkinSource.Skin);

                SpriteApproachCircle =
                    new pSprite(TextureManager.Load(@"spinner-approachcircle", SkinSource.Osu | SkinSource.Skin), Fields.TopLeft, Origins.Centre,
                                Clocks.Audio, posTopLeftCentre, SpriteManager.drawOrderBwd(EndTime - 2), false, fade);
                SpriteCollection.Add(SpriteApproachCircle);
            }

            SpriteBonusCounter = new pSpriteText("", SkinManager.Current.FontScore, SkinManager.Current.FontScoreOverlap,
                                                 Fields.TopLeft, Origins.Centre,
                                                 Clocks.Audio, new Vector2(posTopLeftCentre.X, posTopLeftCentre.Y + 80),
                                                 SpriteManager.drawOrderBwd(EndTime - 3), false,
                                                 fade);
            SpriteCollection.Add(SpriteBonusCounter);

            SpriteCircleTop.Scale *= 0.8f;
        }
Example #21
0
        public static void CollectModCollectionMenuItemsDictionary(ref ModManager Instance)
        {
            Instance.LoadModCollectionMenuItem.RecentItemsSource            = null;
            Instance.RenameModCollectionMenuItem.RecentItemsSource          = null;
            Instance.DeleteModCollectionMenuItem.RecentItemsSource          = null;
            Instance.SaveModCollectonAsMenuItem.RecentItemsSource           = null;
            Instance.AddFromExistingModCollectionMenuItem.RecentItemsSource = null;

            if (Management.MainDataModel.ModCollectionMenuItems.ContainsKey(0))
            {
                Management.MainDataModel.ModCollectionMenuItems[0].Clear();
            }
            if (Management.MainDataModel.ModCollectionMenuItems.ContainsKey(1))
            {
                Management.MainDataModel.ModCollectionMenuItems[1].Clear();
            }
            if (Management.MainDataModel.ModCollectionMenuItems.ContainsKey(2))
            {
                Management.MainDataModel.ModCollectionMenuItems[2].Clear();
            }
            if (Management.MainDataModel.ModCollectionMenuItems.ContainsKey(3))
            {
                Management.MainDataModel.ModCollectionMenuItems[3].Clear();
            }
            if (Management.MainDataModel.ModCollectionMenuItems.ContainsKey(4))
            {
                Management.MainDataModel.ModCollectionMenuItems[4].Clear();
            }

            Management.MainDataModel.ModCollectionMenuItems.Clear();
            for (int i = 0; i < 5; i++)
            {
                Management.MainDataModel.ModCollectionMenuItems.Add(i, CollectModCollectionsMenuItems());
            }

            Instance.LoadModCollectionMenuItem.RecentItemsSource            = Management.MainDataModel.ModCollectionMenuItems[0];
            Instance.RenameModCollectionMenuItem.RecentItemsSource          = Management.MainDataModel.ModCollectionMenuItems[1];
            Instance.DeleteModCollectionMenuItem.RecentItemsSource          = Management.MainDataModel.ModCollectionMenuItems[2];
            Instance.SaveModCollectonAsMenuItem.RecentItemsSource           = Management.MainDataModel.ModCollectionMenuItems[3];
            Instance.AddFromExistingModCollectionMenuItem.RecentItemsSource = Management.MainDataModel.ModCollectionMenuItems[4];
        }
Example #22
0
        /// <summary>
        /// Activates the given mod.
        /// </summary>
        /// <param name="p_lstMod">The mods to activate.</param>
        public void ActivateMods(List <IMod> p_lstMod)
        {
            if (VirtualModActivator.MultiHDMode && !UacUtil.IsElevated)
            {
                MessageBox.Show("It looks like MultiHD mode is enabled but you're not running NMM as Administrator, you will be unable to install/activate mods or switch profiles." + Environment.NewLine + Environment.NewLine + "Close NMM and run it as Administrator to fix this.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            string strMessage;
            bool   booRequiresConfig = ModManager.GameMode.RequiresExternalConfig(out strMessage);

            if (booRequiresConfig)
            {
                ExtendedMessageBox.Show(this.ParentForm, strMessage, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

            string strErrorMessage = ModManager.RequiredToolErrorMessage;

            if (String.IsNullOrEmpty(strErrorMessage))
            {
                foreach (IMod modMod in p_lstMod)
                {
                    if (!ActiveMods.Contains(modMod))
                    {
                        IBackgroundTaskSet btsInstall = ModManager.ActivateMod(modMod, ConfirmModUpgrade, ConfirmItemOverwrite, ModManager.ActiveMods);
                        if (btsInstall != null)
                        {
                            ModManager.ModActivationMonitor.AddActivity(btsInstall);
                        }
                    }
                    else
                    {
                        EnableMod(modMod);
                    }
                }
            }
            else
            {
                ExtendedMessageBox.Show(ParentForm, strErrorMessage, "Required Tool not present", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Example #23
0
        protected virtual void UploadToServer()
        {
            isAwaitingServerResponse = true;

            string profileFilePath = AssetDatabase.GetAssetPath(profile);

            Action <WebRequestError> onSubmissionFailed = (e) =>
            {
                EditorUtility.DisplayDialog("Upload Failed",
                                            "Failed to update the mod profile on the server.\n"
                                            + e.displayMessage,
                                            "Close");

                uploadFailedMessage = e.displayMessage;
                if (e.fieldValidationMessages != null &&
                    e.fieldValidationMessages.Count > 0)
                {
                    foreach (var kvp in e.fieldValidationMessages)
                    {
                        uploadFailedMessage += "\n [" + kvp.Key + "]: " + kvp.Value;
                    }
                }

                isAwaitingServerResponse = false;
                Repaint();
            };

            if (profile.modId > 0)
            {
                ModManager.SubmitModChanges(profile.modId,
                                            profile.editableModProfile,
                                            (m) => ModProfileSubmissionSucceeded(m, profileFilePath),
                                            onSubmissionFailed);
            }
            else
            {
                ModManager.SubmitNewMod(profile.editableModProfile,
                                        (m) => ModProfileSubmissionSucceeded(m, profileFilePath),
                                        onSubmissionFailed);
            }
        }
Example #24
0
        public override void receiveLeftClick(int x, int y, bool playSound = true)
        {
            if (_button.containsPoint(x, y) && !_clicked)
            {
                _clicked = true;
                Game1.playSound("newArtifact");
                var list = Options.Where(o => o is ModManagerCheckBox opt && opt.IsChecked)
                           .Select(o => o.ModId)
                           .ToList();
                var name = ((ModManagerAddNameTextBox)Options[0]).Text;
                if (string.IsNullOrEmpty(name) || list.Count < 1)
                {
                    _clicked = false;
                    return;
                }
                ModManager.AddModPack(list, name);
                return;
            }

            base.receiveLeftClick(x, y, playSound);
        }
Example #25
0
        private static Button MakeSimpleButton(string labelKey, ToolTip toolTip, string toolTipKey, Vector2 position, BaseScreenComponent.OnMouseClickHandler onMouseClickHandler, Button button = null)
        {
            if (button == null)
            {
                button = new Button();
            }

            button.Size                = new Vector2(40, 12);
            button.Position            = position;
            button.HorizontalAlignment = HorizontalAlignment.Center;
            button.Outline.Enabled     = true;
            button.BackgroundColor     = new Color(0.0f, 0.5f, 0.0f, 0.4f);
            button.Label.Text          = ModManager.GetText(labelKey);
            if (toolTip != null)
            {
                button.Label.ToolTip     = toolTip;
                button.Label.ToolTipText = ModManager.GetText(toolTipKey);
            }
            button.OnMouseClick += onMouseClickHandler;
            return(button);
        }
        public static void EditModConfig(ref ModManager Instance)
        {
            if (Instance.ModViewer.SelectedItem != null)
            {
                var item               = (Instance.ModViewer.SelectedItem as ModViewerItem);
                var parent             = Instance as Window;
                ConfigEditorDialog cfg = new ConfigEditorDialog(ref parent);
                if (cfg.ShowConfigEditDialog(item.Source).Value == true)
                {
                    (Instance.ModViewer.SelectedItem as ModViewerItem).Source.Name        = cfg.EditorNameField.Text;
                    (Instance.ModViewer.SelectedItem as ModViewerItem).Source.Author      = cfg.EditorAuthorField.Text;
                    (Instance.ModViewer.SelectedItem as ModViewerItem).Source.Description = cfg.EditorDescriptionField.Text;
                    (Instance.ModViewer.SelectedItem as ModViewerItem).Source.URL         = cfg.EditorURLField.Text;
                    (Instance.ModViewer.SelectedItem as ModViewerItem).Source.GameVersion = cfg.EditorGameVersionField.Text;
                    (Instance.ModViewer.SelectedItem as ModViewerItem).Source.ModVersion  = cfg.EditorModVersionField.Text;

                    (Instance.ModViewer.SelectedItem as ModViewerItem).Source.Save();
                    Management.ModManagement.UpdateModsList(true);
                }
            }
        }
Example #27
0
        private void ExportButton_OnMouseClick(BaseScreenComponent sender, Vector2 position)
        {
            Preset preset   = settings.Presets[listBox.SelectedIndex];
            string fileName = string.Join("_", preset.Title.Split(Path.GetInvalidFileNameChars())) + ".json";

            string dirPath  = ModManager.CombinePaths(Application.persistentDataPath, "Mods", "ExportedPresets", mod.FileName);
            string filePath = Path.Combine(dirPath, fileName);

            var messageBox = new DaggerfallMessageBox(uiManager, this, true);

            messageBox.AllowCancel = true;
            messageBox.SetText(string.Format(ModManager.GetText("exportMessage"), preset.Title, filePath));
            messageBox.AddButton(DaggerfallMessageBox.MessageBoxButtons.OK, true);
            messageBox.OnButtonClick += (source, messageBoxButton) =>
            {
                Directory.CreateDirectory(dirPath);
                File.WriteAllText(filePath, SaveLoadManager.Serialize(typeof(Preset), preset, true));
                source.PopWindow();
            };
            uiManager.PushWindow(messageBox);
        }
        public override ModRegistrationData Register()
        {
            String filePath = Path.Combine(ModManager.GetModPath(), Path.Combine(ModKey, Path.Combine(ModVersion.ToString(), LangFileName)));

            try
            {
                var translations = (Translation[])XMLParser.ReadXML(filePath, typeof(Translation[]));
                foreach (var t in translations)
                {
                    _neededReplacements.Add(t.Old, t.New);
                }
            }
            catch (IOException ex)
            {
                Debug.LogError("Failed to load translation file: " + ex);
            }

            ModRegistrationData data = new ModRegistrationData();

            return(data);
        }
Example #29
0
    private void InsertTapeMods()
    {
        ModLoadType tape_load_type = (ModLoadType)PlayerPrefs.GetInt("mod_tape_loading", 0);

        if (tape_load_type != ModLoadType.DISABLED)
        {
            var tapeMods = ModManager.GetAvailableMods(ModType.Tapes);
            if (tapeMods.Count() > 0 && tape_load_type == ModLoadType.EXCLUSIVE)
            {
                sound_tape_content.Clear();
            }

            foreach (var mod in tapeMods)
            {
                foreach (AudioClip tape in mod.mainAsset.GetComponent <ModTapesHolder>().tapes)
                {
                    sound_tape_content.Add(tape);
                }
            }
        }
    }
Example #30
0
 private void labelVersionWarning_Click(object sender, EventArgs e)
 {
     {
         var currentMGSVersion = ModManager.GetMGSVersion();
         if (!manager.IsUpToDate(modMGSVersion))
         {
             if (currentMGSVersion > modMGSVersion && modMGSVersion > new Version(0, 0, 0, 0))
             {
                 MessageBox.Show(String.Format("This mod appears to be for MGSV Version {0}, but it may be compatible with {1} regardless.\n\nIt is recommended that you check for an updated version before installing.", modMGSVersion, currentMGSVersion), "Game version mismatch", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             }
             if (currentMGSVersion < modMGSVersion)
             {
                 MessageBox.Show(String.Format("This mod is intended for MGSV version {0}, but your MGSV installation is version {1}.\n\nThis mod may not be compatible with your MGSV version. Is your game up to date?", modMGSVersion, currentMGSVersion), "Update recommended", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             }
         }
         else
         {
             MessageBox.Show(String.Format("This mod is up to date with MGSV version {0}", currentMGSVersion), "Mod is up to date", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
 }
Example #31
0
        /// <summary>
        /// Checks for mod file's missing download id.
        /// </summary>
        /// <returns>Message</returns>
        public void CheckModFileDownloadId()
        {
            List <IMod> lstModList = new List <IMod>();

            lstModList.AddRange(from Mod in ManagedMods
                                where (String.IsNullOrWhiteSpace(Mod.DownloadId) || Mod.DownloadId == "-1")
                                select Mod);

            if (!ModRepository.IsOffline)
            {
                if (ManagedMods.Count > 0)
                {
                    UpdatingMods(this, new EventArgs <IBackgroundTask>(ModManager.UpdateMods(lstModList, ConfirmUpdaterAction, false, true)));
                }
            }
            else
            {
                ModManager.Login();
                ModManager.AsyncUpdateMods(lstModList, ConfirmUpdaterAction, false, true);
            }
        }
    public void OnPointerClick(PointerEventData pointerEventData)
    {
        Token.blocked = true;
        SFXManager.PlayFromWav(ModManager.GetAssetInMod(ModGameController.ModName, "keyhole.wav", "Hazards"));
        var mario = Instantiate((GameObject)Utils.LoadFromAssetBundle(ModGameController.ModName, "Speedrunner Mario"), new Vector2(-1000, 1000), Quaternion.identity, GameData.data.canvas.transform);

        DOTween.To(() => transform.localScale, x => transform.localScale = x, Vector3.one * 3, 1.5f);
        mario.transform.localScale = new Vector3(-1, 1, 1);
        StartCoroutine(SummonMario(mario));
        foreach (Token token in FindObjectsOfType <Token>())
        {
            var dummy = Instantiate(token.gameObject, token.transform.position, Quaternion.identity, GameData.data.foregroundEffects.transform);
            token.containsToken = false;
            token.playerIndex   = -1;
            Destroy(dummy.GetComponent <Token>());
            DOTween.To(() => dummy.transform.position, x => dummy.transform.position = x, transform.position, 7.5f).SetEase(Ease.OutExpo);
            dummy.transform.DORotate(Vector3.forward * (360 + 180 * UnityEngine.Random.Range(1f, 4f)), 7.5f, RotateMode.LocalAxisAdd).SetEase(Ease.OutExpo);
            DOTween.To(() => dummy.transform.localScale, x => dummy.transform.localScale = x, Vector3.zero, 7.5f).SetEase(Ease.OutExpo);
        }
        StartCoroutine(EndKeyhole());
    }
 public void MainMenuLoop()
 {
     if (Input.GetKeyDown(KeyCode.S))
     {
         if (sCounter == 5)
         {
             if (repetitions == 3)
             {
                 SFXManager.PlayFromWav(ModManager.GetAssetInMod(ModName, "spaghet.wav", "Generic Stuff"));
                 repetitions = 0;
             }
             else
             {
                 SFXManager.PlayFromWav(ModManager.GetAssetInMod(ModName, "spaghetti.wav", "Generic Stuff"));
             }
             sCounter = 0;
             repetitions++;
         }
         sCounter++;
     }
 }
        /// <summary>
        /// Checks for mods updated within a the last day/week/month.
        /// </summary>
        /// <returns>Message</returns>
        public void CheckUpdatedMods(string period)
        {
            var lstModList = new List <IMod>();

            lstModList.AddRange(from mod in ManagedMods
                                where mod.UpdateChecksEnabled
                                select mod);

            if (!ModRepository.IsOffline)
            {
                if (ManagedMods.Count > 0)
                {
                    UpdatingMods(this, new EventArgs <IBackgroundTask>(ModManager.UpdateMods(lstModList, ProfileManager, ConfirmUpdaterAction, period, false, null)));
                }
            }
            else
            {
                ModManager.Login();
                ModManager.AsyncUpdateMods(lstModList, ProfileManager, ConfirmUpdaterAction, false, false);
            }
        }
        /// <summary>
        /// Checks for mod file's missing download id.
        /// </summary>
        /// <returns>Message</returns>
        public void CheckModFileDownloadId(bool?onlyMissing)
        {
            var lstModList = new List <IMod>();

            lstModList.AddRange(from mod in ManagedMods
                                where mod.UpdateChecksEnabled
                                select mod);

            if (!ModRepository.IsOffline)
            {
                if (ManagedMods.Count > 0)
                {
                    UpdatingMods(this, new EventArgs <IBackgroundTask>(ModManager.UpdateMods(lstModList, ProfileManager, ConfirmUpdaterAction, string.Empty, false, onlyMissing)));
                }
            }
            else
            {
                ModManager.Login();
                ModManager.AsyncUpdateMods(lstModList, ProfileManager, ConfirmUpdaterAction, false, onlyMissing);
            }
        }
Example #36
0
    public void OnEnable()
    {
        // Clear previous options
        dropdown.ClearOptions();
        if (ModManager.IsModsEnabled())
        {
            gui_skin_holder.InsertGunMods();
        }

        // Extract names from WeaponHolder array
        List <string> strings = new List <string>();

        strings.Add("Random Gun");
        foreach (var weapon in gui_skin_holder.weapons)
        {
            strings.Add(weapon.GetComponent <WeaponHolder>().display_name);
        }

        // Add new options
        dropdown.AddOptions(strings);
    }
        //notice: notes' drawDepth are 0.8F
        protected override void PostProcessing()
        {
            //some important value
            PreEmpt    = Math.Max((int)SpeedMania.TimeAt(0, ManiaStage.Skin.HitPosition), LongestTime) + 200;
            CountTotal = CountNormal + CountLong;

            //init lighting
            SkinSource skinSource = Beatmap.PlayMode == PlayModes.OsuMania ? SkinSource.All : (SkinSource.Skin | SkinSource.Osu);

            Score s = Player.currentScore;

            if (s != null && ModManager.CheckActive(s.EnabledMods, Mods.Perfect))
            {
                perfectMod = true;
            }

            ReCalculate(-1);//for there maybe some notes put at 0 offset.

            Debug.Print("--------Mania--------");
            Debug.Write(string.Format("Note Count:{0}({1}/{2})\nPreEmpty:{3}\nMania Star:{4}\n", CountTotal, CountNormal, CountLong, PreEmpt, Beatmap.DifficultyBemaniStars));
        }
Example #38
0
        public void Start(ModManager m)
        {
            this.m = m;

            SoundSet solidSounds = new SoundSet()
            {
                Walk  = new string[] { "walk1", "walk2", "walk3", "walk4" },
                Break = new string[] { "destruct" },
                Build = new string[] { "build" },
                Clone = new string[] { "clone" },
            };

            int blockCount = 0;

            for (int r = 0; r < 16; r += 3)
            {
                for (int g = 0; g < 16; g += 3)
                {
                    for (int b = 0; b < 16; b += 3)
                    {
                        int r32 = r * 17;
                        int g32 = g * 17;
                        int b32 = b * 17;

                        string blockName = string.Format("R{0}G{1}B{2}", r32.ToString(), g32.ToString(), b32.ToString());

                        m.SetBlockType(blockName, new BlockType()
                        {
                            AllTextures  = blockName,
                            DrawType     = DrawType.Solid,
                            WalkableType = WalkableType.Solid,
                            Sounds       = solidSounds,
                        });
                        m.AddToCreativeInventory(blockName);
                        blockCount++;
                    }
                }
            }
            System.Console.WriteLine(string.Format("INFO:   TooManyColors Mod v1.0 loaded. {0} blocks registered.", blockCount));
        }
Example #39
0
        /// <summary>
        ///     If we're coming from gameplay, the screen gets intiialized this way.
        /// </summary>
        /// <exception cref="InvalidOperationException"></exception>
        private void InitializeIfGameplayType()
        {
            if (ResultsType != ResultScreenType.Gameplay)
            {
                throw new InvalidOperationException("Cannot call this if ResultsType is not Gameplay");
            }

            // Stop `capturing` the replay. Not sure if this is necessary since update isn't even called and
            // it wouldn't be capturing anyway.
            Gameplay.ReplayCapturer.ShouldCapture = false;

            // Keep the same replay and score processor if the user was watching a replay before,
            if (Gameplay.InReplayMode)
            {
                Replay               = Gameplay.LoadedReplay;
                ScoreProcessor       = Replay.Mods.HasFlag(ModIdentifier.Autoplay) ? Gameplay.Ruleset.ScoreProcessor : new ScoreProcessorKeys(Replay);
                ScoreProcessor.Stats = Gameplay.Ruleset.ScoreProcessor.Stats;

                // Remove all modifiers that was played during the replay, so the user doesn't still have them
                // activated when they go back to select.
                ModManager.RemoveAllMods();
                return;
            }

            // User has played the map, and wasn't watching a replay, so we can proceed normally.

            // Set the replay that the user has generated
            Replay            = Gameplay.ReplayCapturer.Replay;
            Replay.PauseCount = Gameplay.PauseCount;
            ScoreProcessor    = Gameplay.Ruleset.ScoreProcessor;
            Replay.FromScoreProcessor(ScoreProcessor);

            // Remove paused modifier if enabled.
            if (ModManager.IsActivated(ModIdentifier.Paused))
            {
                ModManager.RemoveMod(ModIdentifier.Paused);
            }

            SubmitScore();
        }
Example #40
0
        private void SetMods()
        {
            if (selectionType == ModSelectionType.ServerSide || selectionType == ModSelectionType.All)
            {
                UpdateModIconStatus(modNoFail, ModManager.CheckActive(Mods.NoFail));
                UpdateModIconStatus(modEasy, ModManager.CheckActive(Mods.Easy));

                UpdateModIconStatus(modHidden, ModManager.CheckActive(Mods.Hidden));
                UpdateModIconStatus(modSuddenDeath, ModManager.CheckActive(Mods.SuddenDeath));
                UpdateModIconStatus(modDoubleTime, ModManager.CheckActive(Mods.DoubleTime));
                UpdateModIconStatus(modHardRock, ModManager.CheckActive(Mods.HardRock));
                UpdateModIconStatus(modHalfTime, ModManager.CheckActive(Mods.HalfTime));
                UpdateModIconStatus(modRelax, ModManager.CheckActive(Mods.Relax));
                UpdateModIconStatus(modTaiko, ModManager.CheckActive(Mods.Taiko));
            }
            if (selectionType == ModSelectionType.ClientSide || selectionType == ModSelectionType.All)
            {
                UpdateModIconStatus(modNoVideo, ModManager.CheckActive(Mods.NoVideo));
            }

            UpdateMultiplier();
        }
Example #41
0
 public void Start(ModManager manager)
 {
     m = manager;
     m.SetBlockType(154, "Sign", new BlockType()
                    {
                    	AllTextures = "Sign",
                    	DrawType = DrawType.Solid,
                    	WalkableType = WalkableType.Solid,
                    	IsUsable = true,
                    	IsTool = true,
                    });
     m.AddToCreativeInventory("Sign");
     m.SetBlockType(155, "PermissionSign", new BlockType()
                    {
                    	AllTextures = "PermissionSign",
                    	DrawType = DrawType.Solid,
                    	WalkableType = WalkableType.Solid,
                    	IsUsable = true,
                    	IsTool = true,
                    });
     m.AddToCreativeInventory("PermissionSign");
 }
Example #42
0
        private void OpenSGAStripMenuItem1Click(object sender, EventArgs e)
        {
            if (ModManager.IsAnythingLoaded && UIHelper.ShowYNQuestion("Warning!",
                                                                       "Opening a SGA archive will close all other archives! Your tabs will remain open though. Continue anyway?")
                == DialogResult.No)
            {
                return;
            }

            if (m_dlgOpenSGA.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            Settings.Default.sLastPath = m_dlgOpenSGA.FileName.SubstringBeforeLast('\\', true);

            ParameterizedThreadStart load = x => ModManager.LoadSGAFile(x as string);
            var loadThread = new Thread(load);

            loadThread.Start(m_dlgOpenSGA.FileName);
            ShowLoadForm();
        }
Example #43
0
        private void labelVersionWarning_Click(object sender, EventArgs e)
        {
            PreinstallEntry selectedMod       = Mods[selectedIndex];
            var             currentMGSVersion = ModManager.GetMGSVersion();
            var             modMGSVersion     = selectedMod.modInfo.MGSVersion.AsVersion();

            if (currentMGSVersion != modMGSVersion && modMGSVersion != new Version(0, 0, 0, 0))
            {
                if (currentMGSVersion > modMGSVersion && modMGSVersion > new Version(0, 0, 0, 0))
                {
                    MessageBox.Show(String.Format("{0} appears to be for MGSV Version {1}.\n\nIt is recommended that you at least check for an updated version before installing.", selectedMod.modInfo.Name, modMGSVersion), "Game version mismatch", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                if (currentMGSVersion < modMGSVersion)
                {
                    MessageBox.Show(String.Format("{0} is intended for MGSV version {1}, but your installation is version {2}. This mod may not be compatible with MGSV version {2}", selectedMod.modInfo.Name, modMGSVersion, currentMGSVersion), "Update recommended", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            else
            {
                MessageBox.Show(String.Format("This mod is up to date with the current MGSV version {0}", currentMGSVersion), "Mod is up to date", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Example #44
0
        private void updateMods()
        {
            ModManager.CheckForCurrentPlayMode();

            for (Mods m = (Mods)1; m < Mods.LastMod; m = (Mods)((int)m * 2))
            {
                bool active = ModManager.CheckActive(m);
                if (!active)
                {
                    //check we aren't obliterating an already-set mod on this button.
                    ModButton b = null;
                    if (Buttons.TryGetValue(m, out b) && b.State != Mods.None && !active && ModManager.CheckActive(b.State))
                    {
                        continue;
                    }
                }

                toggle(m, active, false);
            }

            UpdateMultiplier();
        }
Example #45
0
        /// <summary>
        ///     Ctor -
        /// </summary>
        /// <param name="map"></param>
        /// <param name="md5"></param>
        /// <param name="scores"></param>
        /// <param name="replay"></param>
        public GameplayScreen(Qua map, string md5, List <Score> scores, Replay replay = null)
        {
            TimePlayed = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();

            Map          = map;
            LocalScores  = scores;
            MapHash      = md5;
            LoadedReplay = replay;

            Timing = new GameplayAudioTiming(this);

            // Remove paused modifier if enabled.
            if (ModManager.IsActivated(ModIdentifier.Paused))
            {
                ModManager.RemoveMod(ModIdentifier.Paused);
            }

            // Handle autoplay replays.
            if (ModManager.IsActivated(ModIdentifier.Autoplay))
            {
                LoadedReplay = ReplayHelper.GeneratePerfectReplay(map, MapHash);
            }

            // Determine if we're in replay mode.
            if (LoadedReplay != null)
            {
                InReplayMode = true;
                AddModsFromReplay();
            }

            // Create the current replay that will be captured.
            ReplayCapturer = new ReplayCapturer(this);

            SetRuleset();
            SetRichPresence();

            AudioTrack.AllowPlayback = true;
            View = new GameplayScreenView(this);
        }
Example #46
0
        public void loadsModsFromCandidates()
        {
            var candidates = new List <string>()
            {
                "..\\..\\..\\modFolderTest\\dummy\\DummyMod.dll",
                "..\\..\\..\\modFolderTest\\dummy2\\DummyMod2.dll",
                "..\\..\\..\\modFolderTest\\notamod\\NoOp.dll",
            };

            var titles = new List <string>()
            {
                "DummyMod",
                "DummyMod2"
            };

            var actual = ModManager.getModsFromPaths(candidates).ToList();

            Assert.True(actual.Count == 2);
            var actualTitles = actual.Select(x => x.title).ToList();

            Assert.Equal(actualTitles, titles);
        }
Example #47
0
    void SaveAndCloseButton_OnMouseClick(BaseScreenComponent sender, Vector2 position)
    {
        if (modSettings == null)
        {
            return;
        }

        for (int i = 0; i < modSettings.Length; i++)
        {
            Mod mod = ModManager.Instance.GetMod(modSettings[i].modInfo.ModTitle);
            if (mod == null)
            {
                continue;
            }
            mod.Enabled      = modSettings[i].enabled;
            mod.LoadPriority = i;
            mod = null;
        }
        //save current mod settings to file
        ModManager.WriteModSettings();
        DaggerfallUI.UIManager.PopWindow();
    }
Example #48
0
        private bool InitSubSystem(GameConfigXml gameOptions)
        {
            appStateMgr = new AppStateManager();
            locateMgr   = LocateSystem.Instance;
            modMgr      = new ModManager();
            networkMgr  = new NetworkManager();
            outputMgr   = new OutputManager();
            soundMgr    = new SoundManager();
            uiMgr       = new ScreenManager();

            SoundManager.Instance.InitSystem(
                gameOptions.AudioConfig.EnableMusic,
                gameOptions.AudioConfig.EnableSound
                );

            Update += modMgr.Update;
            Update += outputMgr.Update;
            Update += soundMgr.Update;
            Update += uiMgr.Update;

            return(true);
        }
Example #49
0
 public void Start(ModManager manager)
 {
     m = manager;
     m.SetBlockType(154, "Sign", new BlockType()
     {
         AllTextures  = "Sign",
         DrawType     = DrawType.Solid,
         WalkableType = WalkableType.Solid,
         IsUsable     = true,
         IsTool       = true,
     });
     m.AddToCreativeInventory("Sign");
     m.SetBlockType(155, "PermissionSign", new BlockType()
     {
         AllTextures  = "PermissionSign",
         DrawType     = DrawType.Solid,
         WalkableType = WalkableType.Solid,
         IsUsable     = true,
         IsTool       = true,
     });
     m.AddToCreativeInventory("PermissionSign");
 }
        /// <summary>Requests an individual ModProfile by id.</summary>
        public virtual void RequestModProfile(int id,
                                              Action <ModProfile> onSuccess, Action <WebRequestError> onError)
        {
            Debug.Assert(onSuccess != null);

            ModProfile profile = null;

            if (profileCache.TryGetValue(id, out profile))
            {
                onSuccess(profile);
                return;
            }

            profile = CacheClient.LoadModProfile(id);
            if (profile != null)
            {
                profileCache.Add(id, profile);
                onSuccess(profile);
                return;
            }

            APIClient.GetMod(id, (p) =>
            {
                if (this != null)
                {
                    profileCache[p.id] = p;

                    if (this.storeIfSubscribed &&
                        ModManager.GetSubscribedModIds().Contains(p.id))
                    {
                        CacheClient.SaveModProfile(p);
                    }
                }

                onSuccess(p);
            },
                             onError);
        }
 public void PreStart(ModManager m)
 {
     m.RequireMod ("CoreBlocks");
 }
Example #52
0
 public void PreStart(ModManager m)
 {
 }
Example #53
0
 public void PreStart(ModManager m)
 {
     m.RequireMod("CoreWar");
 }
Example #54
0
        public void Start(ModManager m)
        {
            SoundSet solidSounds = new SoundSet()
            {
                Walk = new string[] { "walk1", "walk2", "walk3", "walk4" },
                Break = new string[] { "destruct" },
                Build = new string[] { "build" },
                Clone = new string[] { "clone" },
                Shoot = new string[] { },
                ShootEnd = new string[] { "M1GarandGun-SoundBible.com-1519788442", "M1GarandGun-SoundBible.com-15197884422" },
                Reload = new string[] { "shotgun-reload-old_school-RA_The_Sun_God-580332022" },
            };
            SoundSet grenadesounds = new SoundSet()
            {
                Shoot = new string[] { "grenadestart" },
                ShootEnd = new string[] {"grenadethrow" },
                Reload = solidSounds.Reload,
            };

            m.SetBlockType(154, "Pistol", new BlockType()
                           {
                           	AllTextures = "Pistol",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           	handimage = "pistolhand.png",
                           	IsPistol = true,
                           	AimRadius = 15,
                           	Recoil = 0.04f,
                           	Delay = 0.5f,
                           	WalkSpeedWhenUsed = 1f,
                           	IronSightsEnabled = true,
                           	IronSightsMoveSpeed = 1f,
                           	IronSightsImage = "pistolhandsights.png",
                           	IronSightsAimRadius = 15,
                           	IronSightsFov = 0.8f,
                           	AmmoMagazine = 12,
                           	AmmoTotal = 120,
                           	ReloadDelay = 2,
                           	ExplosionRange = 0.2f,
                           	ExplosionTime = 0.2f,
                           	DamageBody = 15,
                           	DamageHead = 50,
                           });
            m.SetBlockType(155, "SubmachineGun", new BlockType()
                           {
                           	AllTextures = "SubmachineGun",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           	handimage = "submachinegunhand.png",
                           	IsPistol = true,
                           	AimRadius = 20,
                           	Recoil = 0.04f,
                           	Delay = 0.1f,
                           	WalkSpeedWhenUsed = 1f,
                           	IronSightsEnabled = true,
                           	IronSightsMoveSpeed = 1f,
                           	IronSightsImage = "submachinegunhandsights.png",
                           	IronSightsAimRadius = 20,
                           	IronSightsFov = 0.8f,
                           	AmmoMagazine = 30,
                           	AmmoTotal = 120,
                           	ReloadDelay = 2,
                           	ExplosionRange = 0.2f,
                           	ExplosionTime = 0.2f,
                           	DamageBody = 15,
                           	DamageHead = 40,
                           });
            m.SetBlockType(156, "Shotgun", new BlockType()
                           {
                           	AllTextures = "Shotgun",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           	handimage = "shotgunhand.png",
                           	IsPistol = true,
                           	AimRadius = 50,
                           	Recoil = 0.08f,
                           	Delay = 1f,
                           	BulletsPerShot = 6,
                           	WalkSpeedWhenUsed = 1f,
                           	IronSightsEnabled = true,
                           	IronSightsMoveSpeed = 1f,
                           	IronSightsImage = "shotgunhandsights.png",
                           	IronSightsAimRadius = 50,
                           	IronSightsFov = 0.8f,
                           	AmmoMagazine = 30,
                           	AmmoTotal = 120,
                           	ReloadDelay = 2,
                           	ExplosionRange = 0.2f,
                           	ExplosionTime = 0.2f,
                           	DamageBody = 35,
                           	DamageHead = 60,
                           });
            m.SetBlockType(157, "Rifle", new BlockType()
                           {
                           	AllTextures = "Rifle",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           	handimage = "riflehand.png",
                           	IsPistol = true,
                           	AimRadius = 20,
                           	Recoil = 0.04f,
                           	Delay = 2f,
                           	WalkSpeedWhenUsed = 1f,
                           	IronSightsEnabled = true,
                           	IronSightsMoveSpeed = 0.4f,
                           	IronSightsImage = "riflehandsights.png",
                           	IronSightsAimRadius = 10,
                           	IronSightsFov = 0.5f,
                           	AmmoMagazine = 6,
                           	AmmoTotal = 48,
                           	ReloadDelay = 2,
                           	ExplosionRange = 0.2f,
                           	ExplosionTime = 0.2f,
                           	DamageBody = 35,
                           	DamageHead = 100,
                           });
            m.SetBlockType(158, "MedicalKit", new BlockType()
                           {
                           	AllTextures = "MedicalKit",
                           	DrawType = DrawType.Transparent,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           	handimage = null,
                           	IsPistol = false,
                           	WalkSpeedWhenUsed = 1f,
                           });
            m.SetBlockType(159, "AmmoPack", new BlockType()
                           {
                           	TextureIdTop = "AmmoTop",
                           	TextureIdBack = "AmmoPack",
                           	TextureIdFront = "AmmoPack",
                           	TextureIdLeft = "AmmoPack",
                           	TextureIdRight = "AmmoPack",
                           	TextureIdForInventory = "AmmoPack",
                           	TextureIdBottom = "AmmoTop",
                           	DrawType = DrawType.Transparent,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           	handimage = null,
                           	IsPistol = false,
                           	WalkSpeedWhenUsed = 1f,
                           });

            m.SetBlockType(160, "Grenade", new BlockType()
                           {
                           	AllTextures = "Grenade",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = grenadesounds,
                           	handimage = "grenadehand.png",
                           	IsPistol = true,
                           	AimRadius = 20,
                           	Recoil = 0.04f,
                           	Delay = 0.5f,
                           	WalkSpeedWhenUsed = 1f,
                           	IronSightsEnabled = false,
                           	IronSightsMoveSpeed = 0.4f,
                           	IronSightsImage = "grenadehand.png",
                           	IronSightsAimRadius = 10,
                           	IronSightsFov = 0.5f,
                           	AmmoMagazine = 6,
                           	AmmoTotal = 6,
                           	ReloadDelay = 2,
                           	ExplosionRange = 10f,
                           	ExplosionTime = 1f,
                           	ProjectileSpeed = 25f,
                           	ProjectileBounce = true,
                           	DamageBody = 200,
                           	PistolType = PistolType.Grenade,
                           });
        }
Example #55
0
        public void Start(ModManager manager)
        {
            m = manager;

            m.RegisterOnBlockBuild(OnBuild);
            m.RegisterOnBlockDelete(OnDelete);
            m.RegisterOnBlockUse(OnUse);

            m.SetString("en", "DoorBottomClosed", "Closed Door");
            m.SetString("en", "DoorTopClosed", "Closed Door");
            m.SetString("en", "DoorBottomOpen", "Open Door");
            m.SetString("en", "DoorTopOpen", "Open Door");

            SoundSet sounds = new SoundSet()
            {
                Walk = new string[] { "walk1", "walk2", "walk3", "walk4" },
                Break = new string[] { "destruct" },
                Build = new string[] { "build" },
                Clone = new string[] { "clone" },
            };

            m.SetBlockType(126, "DoorBottomClosed", new BlockType()
                           {
                           	AllTextures = "DoorBottom",
                           	DrawType = DrawType.ClosedDoor,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = sounds,
                           	IsUsable = true,
                           });
            m.SetBlockType(127, "DoorTopClosed", new BlockType()
                           {
                           	AllTextures = "DoorTop",
                           	DrawType = DrawType.ClosedDoor,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = sounds,
                           	IsUsable = true,
                           	WhenPlayerPlacesGetsConvertedTo = 126,
                           });
            m.SetBlockType(128, "DoorBottomOpen", new BlockType()
                           {
                           	AllTextures = "DoorBottom",
                           	DrawType = DrawType.OpenDoorLeft,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = sounds,
                           	IsUsable = true,
                           	WhenPlayerPlacesGetsConvertedTo = 126,
                           });
            m.SetBlockType(129, "DoorTopOpen", new BlockType()
                           {
                           	AllTextures = "DoorTop",
                           	DrawType = DrawType.OpenDoorLeft,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = sounds,
                           	IsUsable = true,
                           	WhenPlayerPlacesGetsConvertedTo = 126,
                           });

            m.AddToCreativeInventory("DoorBottomClosed");
            m.AddCraftingRecipe("DoorBottomClosed", 1, "OakWood", 2);
            m.AddCraftingRecipe("DoorBottomClosed", 1, "BirchWood", 2);
            m.AddCraftingRecipe("DoorBottomClosed", 1, "SpruceWood", 2);

            DoorBottomClosed = m.GetBlockId("DoorBottomClosed");
            DoorTopClosed = m.GetBlockId("DoorTopClosed");
            DoorBottomOpen = m.GetBlockId("DoorBottomOpen");
            DoorTopOpen = m.GetBlockId("DoorTopOpen");
        }
Example #56
0
 void StartMod(string name, IMod mod, ModManager m)
 {
     if (loaded.ContainsKey(name))
     {
         return;
     }
     if (modRequirements.ContainsKey(name))
     {
         foreach (string required_name in modRequirements[name])
         {
             if (!mods.ContainsKey(required_name))
             {
                 try
                 {
                     System.Windows.Forms.MessageBox.Show(string.Format("Can't load mod {0} because its dependency {1} couldn't be loaded.", name, required_name));
                 }
                 catch
                 {
                     //This will be the case if the server is running on a headless linux server without X11 installed (previously crashed)
                     Console.WriteLine(string.Format("[Mod error] Can't load mod {0} because its dependency {1} couldn't be loaded.", name, required_name));
                 }
             }
             StartMod(required_name, mods[required_name], m);
         }
     }
     mod.Start(m);
     loaded[name] = true;
 }
Example #57
0
 public void PreStart(ModManager m)
 {
     m.RequireMod("BuildLog");
 }
Example #58
0
        public void Start(ModManager manager)
        {
            m = manager;

            //Timer for season changes
            m.RegisterTimer(UpdateSeasons, 1);

            //Initialize sounds
            noSound = new SoundSet();
            solidSounds = new SoundSet()
            {
                Walk = new string[] { "walk1", "walk2", "walk3", "walk4" },
                Break = new string[] { "destruct" },
                Build = new string[] { "build" },
                Clone = new string[] { "clone" },
            };
            snowSounds = new SoundSet()
            {
                Walk = new string[] { "walksnow1", "walksnow2", "walksnow3", "walksnow4" },
                Break = new string[] { "destruct" },
                Build = new string[] { "build" },
                Clone = new string[] { "clone" },
            };
            m.SetDefaultSounds(solidSounds);

            #region Block types
            m.SetBlockType(0, "Empty", new BlockType()
                           {
                           	DrawType = DrawType.Empty,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = noSound,
                           });
            m.SetBlockType(1, "Stone", new BlockType()
                           {
                           	AllTextures = "Stone",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(2, "Grass", new BlockType()
                           {
                           	TextureIdTop = "Grass",
                           	SideTextures = "GrassSide",
                           	TextureIdForInventory = "GrassSide",
                           	TextureIdBottom = "Dirt",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           	WhenPlayerPlacesGetsConvertedTo = 3,
                           });
            m.SetBlockType(3, "Dirt", new BlockType()
                           {
                           	AllTextures = "Dirt",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(4, "Cobblestone", new BlockType()
                           {
                           	AllTextures = "Cobblestone",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(5, "OakWood", new BlockType()
                           {
                           	AllTextures = "OakWood",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(6, "OakSapling", new BlockType()
                           {
                           	AllTextures = "OakSapling",
                           	DrawType = DrawType.Plant,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(7, "Adminium", new BlockType()
                           {
                           	AllTextures = "Adminium",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(8, "Water", new BlockType()
                           {
                           	AllTextures = "Water",
                           	DrawType = DrawType.Fluid,
                           	WalkableType = WalkableType.Fluid,
                           	Sounds = noSound,
                           });
            m.SetBlockType(9, "StationaryWater", new BlockType()
                           {
                           	AllTextures = "Water",
                           	DrawType = DrawType.Fluid,
                           	WalkableType = WalkableType.Fluid,
                           	Sounds = noSound,
                           });
            m.SetBlockType(10, "Lava", new BlockType()
                           {
                           	AllTextures = "Lava",
                           	DrawType = DrawType.Fluid,
                           	WalkableType = WalkableType.Fluid,
                           	Sounds = noSound,
                           	LightRadius = 15,
                           	DamageToPlayer = 2,
                           });
            m.SetBlockType(11, "StationaryLava", new BlockType()
                           {
                           	AllTextures = "Lava",
                           	DrawType = DrawType.Fluid,
                           	WalkableType = WalkableType.Fluid,
                           	Sounds = noSound,
                           	LightRadius = 15,
                           	DamageToPlayer = 2,
                           });
            m.SetBlockType(12, "Sand", new BlockType()
                           {
                           	AllTextures = "Sand",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(13, "Gravel", new BlockType()
                           {
                           	AllTextures = "Gravel",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(14, "GoldOre", new BlockType()
                           {
                           	AllTextures = "GoldOre",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(15, "IronOre", new BlockType()
                           {
                           	AllTextures = "IronOre",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(16, "CoalOre", new BlockType()
                           {
                           	AllTextures = "CoalOre",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(17, "OakTreeTrunk", new BlockType()
                           {
                           	TopBottomTextures = "OakTreeTrunkTopBottom",
                           	SideTextures = "OakTreeTrunk",
                           	TextureIdForInventory = "OakTreeTrunk",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(18, "OakLeaves", new BlockType()
                           {
                           	AllTextures = "OakLeaves",
                           	DrawType = DrawType.Transparent,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(19, "Sponge", new BlockType()
                           {
                           	AllTextures = "Sponge",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(20, "Glass", new BlockType()
                           {
                           	AllTextures = "Glass",
                           	DrawType = DrawType.Transparent,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(21, "RedCloth", new BlockType()
                           {
                           	AllTextures = "RedCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(22, "OrangeCloth", new BlockType()
                           {
                           	AllTextures = "OrangeCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(23, "YellowCloth", new BlockType()
                           {
                           	AllTextures = "YellowCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(24, "LightGreenCloth", new BlockType()
                           {
                           	AllTextures = "LightGreenCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(25, "GreenCloth", new BlockType()
                           {
                           	AllTextures = "GreenCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(26, "AquaGreenCloth", new BlockType()
                           {
                           	AllTextures = "AquaGreenCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(27, "CyanCloth", new BlockType()
                           {
                           	AllTextures = "CyanCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(28, "BlueCloth", new BlockType()
                           {
                           	AllTextures = "BlueCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(29, "PurpleCloth", new BlockType()
                           {
                           	AllTextures = "PurpleCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(30, "IndigoCloth", new BlockType()
                           {
                           	AllTextures = "IndigoCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(31, "VioletCloth", new BlockType()
                           {
                           	AllTextures = "VioletCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(32, "MagentaCloth", new BlockType()
                           {
                           	AllTextures = "MagentaCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(33, "PinkCloth", new BlockType()
                           {
                           	AllTextures = "PinkCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(34, "BlackCloth", new BlockType()
                           {
                           	AllTextures = "BlackCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(35, "GrayCloth", new BlockType()
                           {
                           	AllTextures = "GrayCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(36, "WhiteCloth", new BlockType()
                           {
                           	AllTextures = "WhiteCloth",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(37, "YellowFlowerDecorations", new BlockType()
                           {
                           	AllTextures = "YellowFlowerDecorations",
                           	DrawType = DrawType.Plant,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(38, "RedRoseDecorations", new BlockType()
                           {
                           	AllTextures = "RedRoseDecorations",
                           	DrawType = DrawType.Plant,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(39, "RedMushroom", new BlockType()
                           {
                           	AllTextures = "RedMushroom",
                           	DrawType = DrawType.Plant,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(40, "BrownMushroom", new BlockType()
                           {
                           	AllTextures = "BrownMushroom",
                           	DrawType = DrawType.Plant,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(41, "GoldBlock", new BlockType()
                           {
                           	AllTextures = "GoldBlock",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(42, "IronBlock", new BlockType()
                           {
                           	AllTextures = "IronBlock",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(43, "DoubleStair", new BlockType()
                           {
                           	TopBottomTextures = "Stair",
                           	SideTextures = "DoubleStairSide",
                           	TextureIdForInventory = "DoubleStairSide",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(44, "Stair", new BlockType()
                           {
                           	TopBottomTextures = "Stair",
                           	SideTextures = "StairSide",
                           	TextureIdForInventory = "StairInventory",
                           	DrawType = DrawType.HalfHeight,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(45, "Brick", new BlockType()
                           {
                           	AllTextures = "Brick",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(47, "Bookcase", new BlockType()
                           {
                           	TopBottomTextures = "OakWood",
                           	SideTextures = "Bookcase",
                           	TextureIdForInventory = "Bookcase",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(48, "MossyCobblestone", new BlockType()
                           {
                           	AllTextures = "MossyCobblestone",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(49, "Obsidian", new BlockType()
                           {
                           	AllTextures = "Obsidian",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(50, "Torch", new BlockType()
                           {
                           	TextureIdTop = "TorchTop",
                           	TextureIdBottom = "Torch",
                           	SideTextures = "Torch",
                           	TextureIdForInventory = "Torch",
                           	LightRadius = 15,
                           	DrawType = DrawType.Torch,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(51, "Clay", new BlockType()
                           {
                           	AllTextures = "Clay",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(52, "Marble", new BlockType()
                           {
                           	AllTextures = "Marble",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(53, "Granite", new BlockType()
                           {
                           	AllTextures = "Granite",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(54, "RedSand", new BlockType()
                           {
                           	AllTextures = "RedSand",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(55, "Sandstone", new BlockType()
                           {
                           	AllTextures = "Sandstone",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(56, "RedSandstone", new BlockType()
                           {
                           	AllTextures = "RedSandstone",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(57, "Cactus", new BlockType()
                           {
                           	TopBottomTextures = "CactusTopBottom",
                           	SideTextures = "CactusSide",
                           	TextureIdForInventory = "CactusSide",
                           	DrawType = DrawType.Cactus,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(58, "DeadPlant", new BlockType()
                           {
                           	AllTextures = "DeadPlant",
                           	DrawType = DrawType.Plant,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(59, "GrassPlant", new BlockType()
                           {
                           	AllTextures = "GrassPlant",
                           	DrawType = DrawType.Plant,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(60, "BirchTreeTrunk", new BlockType()
                           {
                           	TopBottomTextures = "BirchTreeTrunkTopBottom",
                           	SideTextures = "BirchTreeTrunk",
                           	TextureIdForInventory = "BirchTreeTrunk",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(61, "BirchLeaves", new BlockType()
                           {
                           	AllTextures = "BirchLeaves",
                           	DrawType = DrawType.Transparent,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(62, "BirchSapling", new BlockType()
                           {
                           	AllTextures = "BirchSapling",
                           	DrawType = DrawType.Plant,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(63, "BirchWood", new BlockType()
                           {
                           	AllTextures = "BirchWood",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(64, "SpruceTreeTrunk", new BlockType()
                           {
                           	TopBottomTextures = "SpruceTreeTrunkTopBottom",
                           	SideTextures = "SpruceTreeTrunk",
                           	TextureIdForInventory = "SpruceTreeTrunk",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(65, "SpruceLeaves", new BlockType()
                           {
                           	AllTextures = "SpruceLeaves",
                           	DrawType = DrawType.Transparent,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(66, "SpruceSapling", new BlockType()
                           {
                           	AllTextures = "SpruceSapling",
                           	DrawType = DrawType.Plant,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(67, "SpruceWood", new BlockType()
                           {
                           	AllTextures = "SpruceWood",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(68, "HalfCobblestone", new BlockType()
                           {
                           	TopBottomTextures = "Cobblestone",
                           	SideTextures = "CobblestoneHalf",
                           	TextureIdForInventory = "CobblestoneHalfInventory",
                           	DrawType = DrawType.HalfHeight,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(69, "HalfMossyCobblestone", new BlockType()
                           {
                           	TopBottomTextures = "MossyCobblestone",
                           	SideTextures = "MossyCobblestoneHalf",
                           	TextureIdForInventory = "MossyCobblestoneHalfInventory",
                           	DrawType = DrawType.HalfHeight,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(70, "HalfOakWood", new BlockType()
                           {
                           	TopBottomTextures = "OakWood",
                           	SideTextures = "OakWoodHalf",
                           	TextureIdForInventory = "OakWoodHalfInventory",
                           	DrawType = DrawType.HalfHeight,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(71, "HalfBirchWood", new BlockType()
                           {
                           	TopBottomTextures = "BirchWood",
                           	SideTextures = "BirchWoodHalf",
                           	TextureIdForInventory = "BirchWoodHalfInventory",
                           	DrawType = DrawType.HalfHeight,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(72, "HalfSpruceWood", new BlockType()
                           {
                           	TopBottomTextures = "SpruceWood",
                           	SideTextures = "SpruceWoodHalf",
                           	TextureIdForInventory = "SpruceWoodHalfInventory",
                           	DrawType = DrawType.HalfHeight,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(73, "HalfBrick", new BlockType()
                           {
                           	TopBottomTextures = "Brick",
                           	SideTextures = "BrickHalf",
                           	TextureIdForInventory = "BrickHalfInventory",
                           	DrawType = DrawType.HalfHeight,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(74, "HalfSandBrick", new BlockType()
                           {
                           	TopBottomTextures = "SandBrick",
                           	SideTextures = "SandBrickHalf",
                           	TextureIdForInventory = "SandBrickHalfInventory",
                           	DrawType = DrawType.HalfHeight,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(75, "Bog", new BlockType()
                           {
                            AllTextures = "Bog",
                            DrawType = DrawType.Solid,
                            WalkableType = WalkableType.Solid,
                            Sounds = solidSounds,
                            WalkSpeed = 0.5f,
                           });
            m.SetBlockType(100, "BrushedMetal", new BlockType()
                           {
                           	AllTextures = "BrushedMetal",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(101, "ChemicalGreen", new BlockType()
                           {
                           	AllTextures = "ChemicalGreen",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(102, "Salt", new BlockType()
                           {
                           	AllTextures = "Salt",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(103, "Roof", new BlockType()
                           {
                           	AllTextures = "Roof",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(104, "Camouflage", new BlockType()
                           {
                           	AllTextures = "Camouflage",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(105, "DirtForFarming", new BlockType()
                           {
                           	AllTextures = "DirtForFarming",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(106, "Apples", new BlockType()
                           {
                           	AllTextures = "Apples",
                           	DrawType = DrawType.Transparent,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(107, "Hay", new BlockType()
                           {
                           	AllTextures = "Hay",
                           	DrawType = DrawType.Transparent,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(108, "Crops1", new BlockType()
                           {
                           	AllTextures = "Crops1",
                           	DrawType = DrawType.Plant,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(109, "Crops2", new BlockType()
                           {
                           	AllTextures = "Crops2",
                           	DrawType = DrawType.Plant,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(110, "Crops3", new BlockType()
                           {
                           	AllTextures = "Crops3",
                           	DrawType = DrawType.Plant,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(111, "Crops4", new BlockType()
                           {
                           	AllTextures = "Crops4",
                           	DrawType = DrawType.Plant,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(112, "CraftingTable", new BlockType()
                           {
                           	TopBottomTextures = "CraftingTableTopBottom",
                           	SideTextures = "CraftingTableSide",
                           	TextureIdForInventory = "CraftingTableTopBottom",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           	IsUsable = true,
                           });
            m.SetBlockType(113, "Minecart", new BlockType()
                           {
                           	AllTextures = "Minecart",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(114, "Trampoline", new BlockType()
                           {
                           	AllTextures = "Trampoline",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(115, "FillStart", new BlockType()
                           {
                           	AllTextures = "FillStart",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(116, "Cuboid", new BlockType()
                           {
                           	AllTextures = "FillEnd",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(117, "FillArea", new BlockType()
                           {
                           	AllTextures = "FillArea",
                           	DrawType = DrawType.Fluid,
                           	WalkableType = WalkableType.Fluid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(118, "Water0", new BlockType()
                           {
                           	AllTextures = "Water",
                           	DrawType = DrawType.Fluid,
                           	WalkableType = WalkableType.Fluid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(119, "Water1", new BlockType()
                           {
                           	AllTextures = "Water",
                           	DrawType = DrawType.Fluid,
                           	WalkableType = WalkableType.Fluid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(120, "Water2", new BlockType()
                           {
                           	AllTextures = "Water",
                           	DrawType = DrawType.Fluid,
                           	WalkableType = WalkableType.Fluid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(121, "Water3", new BlockType()
                           {
                           	AllTextures = "Water",
                           	DrawType = DrawType.Fluid,
                           	WalkableType = WalkableType.Fluid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(122, "Water4", new BlockType()
                           {
                           	AllTextures = "Water",
                           	DrawType = DrawType.Fluid,
                           	WalkableType = WalkableType.Fluid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(123, "Water5", new BlockType()
                           {
                           	AllTextures = "Water",
                           	DrawType = DrawType.Fluid,
                           	WalkableType = WalkableType.Fluid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(124, "Water6", new BlockType()
                           {
                           	AllTextures = "Water",
                           	DrawType = DrawType.Fluid,
                           	WalkableType = WalkableType.Fluid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(125, "Water7", new BlockType()
                           {
                           	AllTextures = "Water",
                           	DrawType = DrawType.Fluid,
                           	WalkableType = WalkableType.Fluid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(130, "GrassTrap", new BlockType()
                           {
                           	TextureIdTop = "Grass",
                           	SideTextures = "GrassSide",
                           	TextureIdForInventory = "GrassSide",
                           	TextureIdBottom = "Dirt",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(131, "GoldCoin", new BlockType()
                           {
                           	AllTextures = "GoldCoin",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(132, "GoldBar", new BlockType()
                           {
                           	TopBottomTextures = "GoldBarTopBottom",
                           	SideTextures = "GoldBarSide",
                           	TextureIdForInventory = "GoldBarInvetory",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           	LightRadius = 5,
                           });
            m.SetBlockType(133, "SilverOre", new BlockType()
                           {
                           	AllTextures = "SilverOre",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(135, "SilverCoin", new BlockType()
                           {
                           	AllTextures = "SilverCoin",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(140, "DirtBrick", new BlockType()
                           {
                           	AllTextures = "DirtBrick",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(141, "LuxuryRoof", new BlockType()
                           {
                           	AllTextures = "LuxuryRoof",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(142, "SandBrick", new BlockType()
                           {
                           	AllTextures = "SandBrick",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(143, "FakeBookcase", new BlockType()
                           {
                           	TopBottomTextures = "OakWood",
                           	SideTextures = "Bookcase",
                           	TextureIdForInventory = "Bookcase",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(144, "WoodDesk", new BlockType()
                           {
                           	TextureIdTop = "WoodBlock",
                           	TextureIdBottom = "Empty",
                           	SideTextures = "GlassDeskSide",
                           	TextureIdForInventory = "WoodBlock",
                           	DrawType = DrawType.Transparent,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(145, "GlassDesk", new BlockType()
                           {
                           	TextureIdTop = "Glass",
                           	TextureIdBottom = "Empty",
                           	SideTextures = "GlassDeskSide",
                           	TextureIdForInventory = "GlassDeskSide",
                           	DrawType = DrawType.Transparent,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(146, "Mosaik", new BlockType()
                           {
                           	AllTextures = "Mosaik",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(147, "Asphalt", new BlockType()
                           {
                           	AllTextures = "Asphalt",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(148, "Cake", new BlockType()
                           {
                           	TextureIdTop = "CakeTop",
                           	TextureIdBottom = "Gray",
                           	SideTextures = "CakeSide",
                           	TextureIdForInventory = "CakeTop",
                           	DrawType = DrawType.Solid,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(149, "Fire", new BlockType()
                           {
                           	AllTextures = "Fire",
                           	LightRadius = 15,
                           	DrawType = DrawType.Plant,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds,
                           	DamageToPlayer = 2,
                           });
            m.SetBlockType(150, "Fence", new BlockType()
                           {
                           	AllTextures = "Fence",
                           	DrawType = DrawType.Fence,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(151, "Compass", new BlockType()
                           {
                           	AllTextures = "Compass",
                           	TextureIdForInventory = "CompassInventory",
                           	DrawType = DrawType.Plant,
                           	WalkableType = WalkableType.Solid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(152, "Ladder", new BlockType()
                           {
                           	AllTextures = "Ladder",
                           	DrawType = DrawType.Ladder,
                           	WalkableType = WalkableType.Fluid,
                           	Sounds = solidSounds,
                           });
            m.SetBlockType(153, "EmptyHand", new BlockType()
                           {
                           	AllTextures = "YellowThing",
                           	DrawType = DrawType.Torch,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = noSound,
                           });
            for (int i = 0; i < 64; i++)
            {
                m.SetBlockType(176 + i, "Rail" + i.ToString(), new BlockType()
                               {
                               	TextureIdTop = "Rail" + i.ToString(),
                               	TextureIdBottom = "Cobblestone",
                               	SideTextures = "Cobblestone",
                               	TextureIdForInventory = "Rail" + i.ToString(),
                               	DrawType = DrawType.Transparent,
                               	WalkableType = WalkableType.Solid,
                               	Sounds = solidSounds,
                               	Rail = i,
                               });
            }
            m.SetBlockType(241, "RedCarpet", new BlockType()
                           {
                           	AllTextures = "RedCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            m.SetBlockType(242, "OrangeCarpet", new BlockType()
                           {
                           	AllTextures = "OrangeCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            m.SetBlockType(243, "YellowCarpet", new BlockType()
                           {
                           	AllTextures = "YellowCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            m.SetBlockType(244, "LightGreenCarpet", new BlockType()
                           {
                           	AllTextures = "LightGreenCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            m.SetBlockType(245, "GreenCarpet", new BlockType()
                           {
                           	AllTextures = "GreenCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            m.SetBlockType(246, "AquaGreenCarpet", new BlockType()
                           {
                           	AllTextures = "AquaGreenCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            m.SetBlockType(247, "CyanCarpet", new BlockType()
                           {
                           	AllTextures = "CyanCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            m.SetBlockType(248, "BlueCarpet", new BlockType()
                           {
                           	AllTextures = "BlueCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            m.SetBlockType(249, "PurpleCarpet", new BlockType()
                           {
                           	AllTextures = "PurpleCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            m.SetBlockType(250, "IndigoCarpet", new BlockType()
                           {
                           	AllTextures = "IndigoCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            m.SetBlockType(251, "VioletCarpet", new BlockType()
                           {
                           	AllTextures = "VioletCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            m.SetBlockType(252, "MagentaCarpet", new BlockType()
                           {
                           	AllTextures = "MagentaCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            m.SetBlockType(253, "PinkCarpet", new BlockType()
                           {
                           	AllTextures = "PinkCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            m.SetBlockType(254, "BlackCarpet", new BlockType()
                           {
                           	AllTextures = "BlackCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            m.SetBlockType(255, "GrayCarpet", new BlockType()
                           {
                           	AllTextures = "GrayCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            m.SetBlockType(256, "WhiteCarpet", new BlockType()
                           {
                           	AllTextures = "WhiteCloth",
                           	DrawType = DrawType.Flat,
                           	WalkableType = WalkableType.Empty,
                           	Sounds = solidSounds
                           });
            #endregion

            #region Creative inventory
            m.AddToCreativeInventory("Stone");
            m.AddToCreativeInventory("Dirt");
            m.AddToCreativeInventory("Cobblestone");
            m.AddToCreativeInventory("OakWood");
            m.AddToCreativeInventory("OakSapling");
            //m.AddToCreativeInventory("Adminium");
            m.AddToCreativeInventory("Water");
            m.AddToCreativeInventory("Lava");
            m.AddToCreativeInventory("Sand");
            m.AddToCreativeInventory("Gravel");
            m.AddToCreativeInventory("GoldOre");
            m.AddToCreativeInventory("IronOre");
            m.AddToCreativeInventory("CoalOre");
            m.AddToCreativeInventory("OakTreeTrunk");
            m.AddToCreativeInventory("OakLeaves");
            m.AddToCreativeInventory("Sponge");
            m.AddToCreativeInventory("Glass");
            m.AddToCreativeInventory("RedCloth");
            m.AddToCreativeInventory("OrangeCloth");
            m.AddToCreativeInventory("YellowCloth");
            m.AddToCreativeInventory("LightGreenCloth");
            m.AddToCreativeInventory("GreenCloth");
            m.AddToCreativeInventory("AquaGreenCloth");
            m.AddToCreativeInventory("CyanCloth");
            m.AddToCreativeInventory("BlueCloth");
            m.AddToCreativeInventory("PurpleCloth");
            m.AddToCreativeInventory("IndigoCloth");
            m.AddToCreativeInventory("VioletCloth");
            m.AddToCreativeInventory("MagentaCloth");
            m.AddToCreativeInventory("PinkCloth");
            m.AddToCreativeInventory("BlackCloth");
            m.AddToCreativeInventory("GrayCloth");
            m.AddToCreativeInventory("WhiteCloth");
            m.AddToCreativeInventory("RedCarpet");
            m.AddToCreativeInventory("OrangeCarpet");
            m.AddToCreativeInventory("YellowCarpet");
            m.AddToCreativeInventory("LightGreenCarpet");
            m.AddToCreativeInventory("GreenCarpet");
            m.AddToCreativeInventory("AquaGreenCarpet");
            m.AddToCreativeInventory("CyanCarpet");
            m.AddToCreativeInventory("BlueCarpet");
            m.AddToCreativeInventory("PurpleCarpet");
            m.AddToCreativeInventory("IndigoCarpet");
            m.AddToCreativeInventory("VioletCarpet");
            m.AddToCreativeInventory("MagentaCarpet");
            m.AddToCreativeInventory("PinkCarpet");
            m.AddToCreativeInventory("BlackCarpet");
            m.AddToCreativeInventory("GrayCarpet");
            m.AddToCreativeInventory("WhiteCarpet");
            m.AddToCreativeInventory("YellowFlowerDecorations");
            m.AddToCreativeInventory("RedRoseDecorations");
            m.AddToCreativeInventory("RedMushroom");
            m.AddToCreativeInventory("BrownMushroom");
            m.AddToCreativeInventory("GoldBlock");
            m.AddToCreativeInventory("IronBlock");
            m.AddToCreativeInventory("DoubleStair");
            m.AddToCreativeInventory("Stair");
            m.AddToCreativeInventory("Brick");
            m.AddToCreativeInventory("Bookcase");
            m.AddToCreativeInventory("MossyCobblestone");
            m.AddToCreativeInventory("Obsidian");
            m.AddToCreativeInventory("Torch");
            m.AddToCreativeInventory("BrushedMetal");
            m.AddToCreativeInventory("ChemicalGreen");
            m.AddToCreativeInventory("Salt");
            m.AddToCreativeInventory("Roof");
            m.AddToCreativeInventory("Camouflage");
            m.AddToCreativeInventory("DirtForFarming");
            m.AddToCreativeInventory("Apples");
            m.AddToCreativeInventory("Hay");
            m.AddToCreativeInventory("Crops1");
            m.AddToCreativeInventory("CraftingTable");
            m.AddToCreativeInventory("Trampoline");
            m.AddToCreativeInventory("FillStart");
            m.AddToCreativeInventory("Cuboid");
            m.AddToCreativeInventory("FillArea");
            m.AddToCreativeInventory("GrassTrap");
            m.AddToCreativeInventory("GoldCoin");
            m.AddToCreativeInventory("GoldBar");
            m.AddToCreativeInventory("SilverOre");
            m.AddToCreativeInventory("SilverCoin");
            m.AddToCreativeInventory("DirtBrick");
            m.AddToCreativeInventory("LuxuryRoof");
            m.AddToCreativeInventory("SandBrick");
            m.AddToCreativeInventory("FakeBookcase");
            m.AddToCreativeInventory("WoodDesk");
            m.AddToCreativeInventory("GlassDesk");
            m.AddToCreativeInventory("Mosaik");
            m.AddToCreativeInventory("Asphalt");
            m.AddToCreativeInventory("Cake");
            m.AddToCreativeInventory("Fire");
            m.AddToCreativeInventory("Fence");
            m.AddToCreativeInventory("Compass");
            m.AddToCreativeInventory("Ladder");
            m.AddToCreativeInventory("Rail3");
            m.AddToCreativeInventory("Rail60");
            m.AddToCreativeInventory("Clay");
            m.AddToCreativeInventory("Marble");
            m.AddToCreativeInventory("Granite");
            m.AddToCreativeInventory("Sandstone");
            m.AddToCreativeInventory("RedSand");
            m.AddToCreativeInventory("RedSandstone");
            m.AddToCreativeInventory("Cactus");
            m.AddToCreativeInventory("DeadPlant");
            m.AddToCreativeInventory("GrassPlant");
            m.AddToCreativeInventory("BirchTreeTrunk");
            m.AddToCreativeInventory("BirchLeaves");
            m.AddToCreativeInventory("BirchSapling");
            m.AddToCreativeInventory("BirchWood");
            m.AddToCreativeInventory("SpruceTreeTrunk");
            m.AddToCreativeInventory("SpruceLeaves");
            m.AddToCreativeInventory("SpruceSapling");
            m.AddToCreativeInventory("SpruceWood");
            m.AddToCreativeInventory("HalfCobblestone");
            m.AddToCreativeInventory("HalfMossyCobblestone");
            m.AddToCreativeInventory("HalfOakWood");
            m.AddToCreativeInventory("HalfBirchWood");
            m.AddToCreativeInventory("HalfSpruceWood");
            m.AddToCreativeInventory("HalfBrick");
            m.AddToCreativeInventory("HalfSandBrick");
            m.AddToCreativeInventory("Bog");
            #endregion

            #region Start inventory
            m.AddToStartInventory("Torch", 6);
            m.AddToStartInventory("Crops1", 1);
            m.AddToStartInventory("CraftingTable", 6);
            m.AddToStartInventory("GoldCoin", 2);
            m.AddToStartInventory("GoldBar", 5);
            m.AddToStartInventory("SilverCoin", 1);
            m.AddToStartInventory("Compass", 1);
            #endregion
        }
Example #59
0
 public void Start(ModManager m)
 {
     var module = new HttpInfoModule();
     module.m = m;
     m.InstallHttpModule("Stats", () => "Basic server stats", module);
 }
        public void Start(ModManager manager)
        {
            m = manager;
            m.RegisterWorldGenerator(GetChunk);
            m.RegisterOptionBool("DefaultGenCaves", false);
            m.RegisterOptionBool("DefaultGenLavaCaves", false);

            BLOCK_STONE = m.GetBlockId ("Stone");
            BLOCK_DIRT = m.GetBlockId ("Dirt");
            BLOCK_SAND = m.GetBlockId ("Sand");
            BLOCK_CLAY = m.GetBlockId ("Stone");
            BLOCK_BEDROCK = m.GetBlockId ("Adminium");
            BLOCK_AIR = m.GetBlockId ("Empty");
            BLOCK_SNOW = m.GetBlockId ("Grass");
            BLOCK_ICE = m.GetBlockId ("Water");
            BLOCK_GRASS = m.GetBlockId ("Grass");
            BLOCK_WATER = m.GetBlockId ("Water");
            BLOCK_GRAVEL = m.GetBlockId ("Gravel");
            BLOCK_PUMPKIN = m.GetBlockId ("Hay");
            BLOCK_RED_ROSE = m.GetBlockId ("RedRoseDecorations");
            BLOCK_YELLOW_FLOWER = m.GetBlockId ("YellowFlowerDecorations");
            BLOCK_LAVA = m.GetBlockId ("Lava");
        }