├── CameraFlashMod ├── LoadAssets.cs ├── Main.cs ├── README.md ├── SaveSlots.cs ├── UIX.cs └── Utils.cs ├── CameraResChanger ├── CamResChange.cs └── README.md ├── DisableControllerOverlay ├── Main.cs └── README.md ├── DisableOneHandMovementUI ├── Main.cs └── README.md ├── DisableQMSafeMode ├── Main.cs └── README.md ├── FLuxMod ├── ActionMenu.cs ├── ImageGen.cs ├── Main.cs ├── README.md ├── SaveSlots.cs ├── UIX.cs └── Utils.cs ├── HideCameraIndicators ├── Main.cs └── README.md ├── IKTpresets ├── Main.cs ├── README.md └── SaveSlots.cs ├── ImmobilizePlayerMod ├── Main.cs ├── MethodsResolver.cs ├── README.md ├── RiskyFunc.cs └── Utils.cs ├── LocalCamera ├── Main.cs └── README.md ├── LocalCube ├── Main.cs └── README.md ├── LocalHeadLightMod ├── Main.cs ├── README.md └── Utils.cs ├── LocalLightMod ├── ImageGen.cs ├── Main.cs ├── README.md ├── SaveSlots.cs ├── UIX.cs └── Utils.cs ├── MirrorLayers ├── Main.cs └── README.md ├── NearClippingPlaneAdjuster ├── ActionMenu.cs ├── Components.cs ├── NearClippingPlaneAdjuster.cs ├── README.md └── blacklist ├── PhysBoneAdj ├── Main.cs └── README.md ├── PlayerSpeedAdjustSlower └── PlayerSpeedAdjustSlower.cs ├── QMVolumePercent ├── Main.cs └── README.md ├── README.md ├── RemoveChairs ├── Main.cs └── README.md ├── TeleportCameraToYou ├── Main.cs └── README.md └── ToggleIKTAnim ├── Main.cs └── README.md /CameraFlashMod/LoadAssets.cs: -------------------------------------------------------------------------------- 1 | using MelonLoader; 2 | using UnityEngine; 3 | using System.IO; 4 | 5 | 6 | namespace CameraFlashMod 7 | { 8 | class LoadAssets 9 | { 10 | public static Sprite LightOn, LightOff; 11 | public static void loadAssets() 12 | { 13 | LightOn = LoadEmbeddedImages("BrightnessHigher.png"); 14 | LightOff = LoadEmbeddedImages("BrightnessLower.png"); 15 | } 16 | 17 | private static Sprite LoadEmbeddedImages(string imageName) 18 | { 19 | try 20 | { 21 | //Load image into Texture 22 | using var assetStream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("CameraFlashMod.Images." + imageName); 23 | using var tempStream = new MemoryStream((int)assetStream.Length); 24 | assetStream.CopyTo(tempStream); 25 | var Texture2 = new Texture2D(2, 2); 26 | ImageConversion.LoadImage(Texture2, tempStream.ToArray()); 27 | Texture2.wrapMode = TextureWrapMode.Clamp; 28 | Texture2.hideFlags |= HideFlags.DontUnloadUnusedAsset; 29 | //Texture to Sprite 30 | var rec = new Rect(0.0f, 0.0f, Texture2.width, Texture2.height); 31 | var piv = new Vector2(.5f, 5f); 32 | var border = Vector4.zero; 33 | var s = Sprite.CreateSprite_Injected(Texture2, ref rec, ref piv, 100.0f, 0, SpriteMeshType.Tight, ref border, false); 34 | s.hideFlags |= HideFlags.DontUnloadUnusedAsset; 35 | return s; 36 | } 37 | catch (System.Exception ex) { MelonLogger.Error("Failed to load image from asset bundle: " + imageName + "\n" + ex.ToString()); return null; } 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /CameraFlashMod/Main.cs: -------------------------------------------------------------------------------- 1 | using MelonLoader; 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | using System; 5 | using UnityEngine.UI; 6 | using System.Collections; 7 | 8 | [assembly: MelonInfo(typeof(CameraFlashMod.Main), "CameraFlashMod", "1.1.1", "Nirvash")] 9 | [assembly: MelonGame("VRChat", "VRChat")] 10 | [assembly: MelonColor(ConsoleColor.Green)] 11 | 12 | namespace CameraFlashMod 13 | { 14 | public class Main : MelonMod 15 | { 16 | private const string catagory = "CameraFlashMod"; 17 | public static MelonPreferences_Category cat; 18 | 19 | public static MelonPreferences_Entry lightType; 20 | public static MelonPreferences_Entry lightRange; 21 | public static MelonPreferences_Entry lightSpotAngle; 22 | public static MelonPreferences_Entry lightColor; 23 | public static MelonPreferences_Entry lightIntensity; 24 | public static MelonPreferences_Entry savedColors; 25 | public static MelonPreferences_Entry buttEn; 26 | public static MelonPreferences_Entry buttX; 27 | public static MelonPreferences_Entry buttY; 28 | public static MelonPreferences_Entry UIXbuttEn; 29 | 30 | public static GameObject cam, viewfinder, uiButton; 31 | public static Light flash; 32 | 33 | public override void OnApplicationStart() 34 | { 35 | cat = MelonPreferences.CreateCategory(catagory, "Camera Flash Mod"); 36 | buttEn = MelonPreferences.CreateEntry(catagory, nameof(buttEn), true, "Flash Button on Camera Viewfinder"); 37 | buttX = MelonPreferences.CreateEntry(catagory, nameof(buttX), -600f, "X position of button"); 38 | buttY = MelonPreferences.CreateEntry(catagory, nameof(buttY), 100f, "Y position of button"); 39 | 40 | UIXbuttEn = MelonPreferences.CreateEntry(catagory, nameof(UIXbuttEn), true, "Settings Button on UIX Camera Menu"); 41 | lightType = MelonPreferences.CreateEntry(catagory, nameof(lightType), LightType.Spot, "Light Type", "", true); 42 | lightRange = MelonPreferences.CreateEntry(catagory, nameof(lightRange), 20f, "Light Range"); 43 | lightSpotAngle = MelonPreferences.CreateEntry(catagory, nameof(lightSpotAngle), 120f, "Spot Angle"); 44 | lightColor = MelonPreferences.CreateEntry(catagory, nameof(lightColor), Color.white, "Color"); 45 | lightIntensity = MelonPreferences.CreateEntry(catagory, nameof(lightIntensity), 1f, "Intensity"); 46 | 47 | savedColors = MelonPreferences.CreateEntry(catagory, nameof(savedColors), "1,0.0,0.0,0.0;2,0.0,0.0,0.0;3,0.0,0.0,0.0;4,0.0,0.0,0.0;5,0.0,0.0,0.0;6,0.0,0.0,0.0", "saved colors", "", true); 48 | 49 | //MelonLogger.Msg($"Init"); 50 | UIX.SetupUI(); 51 | LoadAssets.loadAssets(); 52 | MelonCoroutines.Start(OnLoad()); 53 | } 54 | 55 | public override void OnPreferencesSaved() 56 | { 57 | switch (lightType.Value) 58 | {//Check to make sure the Light Type is set to a valid type for Realtime 59 | case LightType.Directional: break; 60 | case LightType.Point: break; 61 | case LightType.Spot: break; 62 | default: MelonLogger.Msg("Can not use selected LightType, defaulting to Spot"); lightType.Value = LightType.Spot; break; 63 | } 64 | if(UIX.UIXButt != null) UIX.UIXButt.SetActive(UIXbuttEn.Value); 65 | if(uiButton != null) uiButton.SetActive(buttEn.Value); 66 | } 67 | 68 | public static IEnumerator OnLoad() 69 | { 70 | while (GameObject.Find("_Application/TrackingVolume/PlayerObjects/")?.transform.Find("UserCamera/ViewFinder/PhotoControls/Primary /ControlGroup_Main/Scroll View/Viewport/Content/Timer") == null) 71 | yield return new WaitForSeconds(1f); 72 | cam = GameObject.Find("_Application/TrackingVolume/PlayerObjects/")?.transform.Find("UserCamera/PhotoCamera").gameObject; 73 | viewfinder = GameObject.Find("_Application/TrackingVolume/PlayerObjects/")?.transform.Find("UserCamera/ViewFinder").gameObject; 74 | InitButtons(); 75 | //MelonLogger.Msg("Init Finish"); 76 | } 77 | 78 | public static void InitButtons() 79 | { 80 | var newButt = UnityEngine.Object.Instantiate(viewfinder.transform.Find("PhotoControls/Primary /ControlGroup_Main/Scroll View/Viewport/Content/Timer")); 81 | var butAction = new System.Action(() => 82 | { 83 | ToggleLight(); 84 | }); 85 | newButt.name = "CameraFlash_UI"; 86 | newButt.SetParent(viewfinder.transform.Find("PhotoControls/Primary /ControlGroup_Main")); 87 | 88 | newButt.gameObject.AddComponent(); 89 | newButt.localPosition = new Vector3(buttX.Value, buttY.Value, 0f); 90 | newButt.localScale = new Vector3(1f, 1f, .001f); 91 | newButt.localRotation = new Quaternion(0,0,0,1); 92 | newButt.GetComponent