Created
April 4, 2021 12:01
-
-
Save LottieVixen/a8111748cc0ffd50d877f8c863f08ec5 to your computer and use it in GitHub Desktop.
files I tested on
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using BepInEx; | |
using HarmonyLib; | |
using UnityEngine; | |
namespace Valheim_BuildInDungeon | |
{ | |
[BepInPlugin(GUID, Name, Version)] | |
[BepInProcess("valheim.exe")] | |
[HarmonyPatch] | |
public class ChangePlacePiece : BaseUnityPlugin | |
{ | |
private const string GUID = "valheim.lottievixen.build_in_dungeons"; | |
private const string Name = "Build In Dungeons"; | |
private const string Version = "1.0.0.0"; | |
void Awake() | |
{ | |
var harmony = new Harmony(GUID); | |
harmony.PatchAll(); | |
} | |
[HarmonyPostfix] | |
[HarmonyPatch(typeof(Piece), "Awake")] | |
static void Placement_Patch(Piece __instance) | |
{ | |
__instance.m_allowedInDungeons = true; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class DrawDebugSphere : MonoBehaviour | |
{ | |
// Start is called before the first frame update | |
void Start() | |
{ | |
} | |
// Update is called once per frame | |
void Update() | |
{ | |
} | |
private void OnDrawGizmos() | |
{ | |
Gizmos.color = new Color(1, 0, 0, 0.5F); | |
Gizmos.DrawWireSphere(transform.position, 0.2f); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment