Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
XDelta committed Mar 13, 2023
1 parent dfb827d commit bd7a098
Show file tree
Hide file tree
Showing 6 changed files with 178 additions and 2 deletions.
35 changes: 35 additions & 0 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ScalableWorldOrbs")]
[assembly: AssemblyDescription("Makes World Orbs you spawn scalable by default")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("XDelta")]
[assembly: AssemblyProduct("ScalableWorldOrbs")]
[assembly: AssemblyCopyright("Copyright © XDelta 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("914e6c38-0ac4-4de4-82b3-e0edea2f756a")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("1.0.0")]
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# ScalableWorldOrbs
Makes World Orbs you spawn scalable by default
# ScalableWorldOrbs

A [NeosModLoader](https://github.com/neos-modding-group/NeosModLoader) mod for [Neos VR](https://neos.com/). Makes World Orbs you spawn scalable by default.

## Installation
1. Install [NeosModLoader](https://github.com/neos-modding-group/NeosModLoader).
1. Place [ScalableWorldOrbs.dll](https://github.com/XDelta/ScalableWorldOrbs/releases/latest/download/ScalableWorldOrbs.dll) into your `nml_mods` folder. This folder should be at `C:\Program Files (x86)\Steam\steamapps\common\NeosVR\nml_mods` for a default install. You can create it if it's missing, or if you launch the game once with NeosModLoader installed it will create the folder for you.
1. Start the game. If you want to verify that the mod is working you can check your Neos logs.
31 changes: 31 additions & 0 deletions ScalableWorldOrbs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using FrooxEngine;
using HarmonyLib;
using NeosModLoader;

namespace ScalableWorldOrbs {
public class ScalableWorldOrbs : NeosMod {
public override string Name => "ScalableWorldOrbs";
public override string Author => "Delta";
public override string Version => "1.0.0";
public override string Link => "https://github.com/XDelta/ScalableWorldOrbs";

[AutoRegisterConfigKey]
private static readonly ModConfigurationKey<bool> modEnabled = new ModConfigurationKey<bool>("modEnabled", "Mod Enabled", () => true);

private static ModConfiguration Config;
public override void OnEngineInit() {
Config = GetConfiguration();
Config.Save(true);
Harmony harmony = new Harmony("net.deltawolf.ScalableWorldOrbs");
harmony.PatchAll();
}

[HarmonyPatch(typeof(WorldOrb), "SetupOrb")]
class WorldOrb_SetupOrb_Patch {
public static void Postfix(WorldOrb __instance) {
if (!Config.GetValue(modEnabled)) { return; }
__instance.Slot.GetComponent<Grabbable>().Scalable.Value = true;
}
}
}
}
75 changes: 75 additions & 0 deletions ScalableWorldOrbs.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ScalableWorldOrbs</RootNamespace>
<AssemblyName>ScalableWorldOrbs</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<LangVersion>latestMajor</LangVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<ProjectGuid>{914E6C38-0AC4-4DE4-82B3-E0EDEA2F756A}</ProjectGuid>
<!-- If you don't want to provide a NeosPath in dotnet build, you can specify one here -->
<!-- <NeosPath Condition="'$(NeosPath)'==''"></NeosPath> -->
</PropertyGroup>
<PropertyGroup Condition="'$(NeosPath)'==''">
<!-- Windows steam -->
<NeosPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\NeosVR\')">C:\Program Files (x86)\Steam\steamapps\common\NeosVR\</NeosPath>
<!-- Windows standalone -->
<NeosPath Condition="Exists('C:\Neos\app\')">C:\Neos\app\</NeosPath>
<!-- Linux steam -->
<NeosPath Condition="Exists('$(HOME)/.steam/steam/steamapps/common/NeosVR/')">$(HOME)/.steam/steam/steamapps/common/NeosVR/</NeosPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemDefinitionGroup>
<Reference>
<Private>false</Private>
</Reference>
</ItemDefinitionGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>$(NeosPath)\nml_libs\0Harmony.dll</HintPath>
</Reference>
<Reference Include="FrooxEngine">
<HintPath>$(NeosPath)\Neos_Data\Managed\FrooxEngine.dll</HintPath>
</Reference>
<Reference Include="NeosModLoader">
<HintPath>$(NeosPath)\Libraries\NeosModLoader.dll</HintPath>
</Reference>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="ScalableWorldOrbs.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="README.md" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
25 changes: 25 additions & 0 deletions ScalableWorldOrbs.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.32228.343
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScalableWorldOrbs", "ScalableWorldOrbs.csproj", "{914E6C38-0AC4-4DE4-82B3-E0EDEA2F756A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{914E6C38-0AC4-4DE4-82B3-E0EDEA2F756A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{914E6C38-0AC4-4DE4-82B3-E0EDEA2F756A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{914E6C38-0AC4-4DE4-82B3-E0EDEA2F756A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{914E6C38-0AC4-4DE4-82B3-E0EDEA2F756A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E1228749-6991-40A5-A534-22669CBDF5AD}
EndGlobalSection
EndGlobal
4 changes: 4 additions & 0 deletions packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Lib.Harmony" version="2.1.1" targetFramework="net472" />
</packages>

0 comments on commit bd7a098

Please sign in to comment.