Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using spaar.ModLoader;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- namespace ShowHiddenBlocks
- {
- // If you need documentation about any of these values or the mod loader
- // in general, take a look at https://spaar.github.io/besiege-modloader.
- public class YourMod : Mod
- {
- public override string Name { get; } = "ShowHiddenBlocks";
- public override string DisplayName { get; } = "Show Hidden Blocks";
- public override string Author { get; } = "Why7090";
- public override Version Version { get; } = new Version(0, 0, 1);
- // You don't need to override this, if you leavie it out it will default
- // to an empty string.
- public override string VersionExtra { get; } = "";
- // You don't need to override this, if you leave it out it will default
- // to the current version.
- public override string BesiegeVersion { get; } = "v0.42";
- // You don't need to override this, if you leave it out it will default
- // to false.
- public override bool CanBeUnloaded { get; } = false;
- // You don't need to override this, if you leave it out it will default
- // to false.
- public override bool Preload { get; } = false;
- static void Show (Scene s, LoadSceneMode mode)
- {
- GameObject scalingBlock = GameObject.Find("HUD/BottomBar/AlignBottomLeft/BLOCK BUTTONS/t_BLOCKS/Scaling Block");
- if (scalingBlock == null)
- {
- return;
- }
- scalingBlock.SetActive(true);
- GameObject magnet = GameObject.Find("HUD/BottomBar/AlignBottomLeft/BLOCK BUTTONS/t_MECHANICAL/Magnet");
- if (magnet == null)
- {
- return;
- }
- magnet.SetActive(true);
- }
- public override void OnLoad ()
- {
- SceneManager.sceneLoaded += Show;
- }
- public override void OnUnload ()
- {
- // Your code here
- // e.g. save configuration, destroy your objects if CanBeUnloaded is true etc
- }
- }
- }
Add Comment
Please, Sign In to add comment