Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
278 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# top-most EditorConfig file | ||
root = true | ||
|
||
# 4 space indentation | ||
[*.cs,*.xml] | ||
indent_style = tab | ||
indent_size = 2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.vs | ||
*.cache | ||
Source/obj | ||
/Assemblies/* | ||
*.csproj.user |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ModMetaData> | ||
<name>Replace Stuff</name> | ||
<author>Uuugggg</author> | ||
<targetVersion>0.18.0</targetVersion> | ||
<description>Replace stuff a thing is made from, e.g. replace a wall's materials</description> | ||
<url>https://steamcommunity.com/id/Uuugggg/myworkshopfiles/?appid=294100</url> | ||
</ModMetaData> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ModMetaData> | ||
<name>Replace Stuff - Dev Build</name> | ||
<author>Uuugggg</author> | ||
<targetVersion>0.18.0</targetVersion> | ||
<description>Replace stuff a thing is made from, e.g. replace a wall's materials | ||
(This is the dev version of Replace Stuff. The release version of About.xml is available for editing at About/About-Release.xml. Edits made on this file or on the temporary About/About.xml won't show up on the release version. Use VisualStudio to build a "Release" version of this mod when ready to upload your mod!)</description> | ||
<url>https://steamcommunity.com/id/Uuugggg/myworkshopfiles/?appid=294100</url> | ||
</ModMetaData> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<BaseIntermediateOutputPath>.vs\unused\</BaseIntermediateOutputPath> | ||
<ProjectGuid>{AA1EF112-E817-4ED1-849A-EE55B8DAF3C0}</ProjectGuid> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> | ||
<OutputPath>.vs\unused\</OutputPath> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> | ||
<OutputPath>..\Replace Stuff - Release\</OutputPath> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Include="About\**" /> | ||
<None Include="Defs\**" /> | ||
<None Include="Languages\**" /> | ||
<None Include="Patches\**" /> | ||
<None Include="Sounds\**" /> | ||
<None Include="Textures\**" /> | ||
</ItemGroup> | ||
<Target Name="PostBuild" AfterTargets="Build"> | ||
<RemoveDir Directories="obj" /> | ||
<Exec WorkingDirectory="$(ProjectDir)" Command="$(PostBuildEvent)" /> | ||
</Target> | ||
<Target Name="Clean" /> | ||
<Target Name="Rebuild" /> | ||
<PropertyGroup> | ||
<PostBuildEvent>if $(Configuration) == Release ( | ||
echo F|xcopy "$(ProjectDir)About\About-Release.xml" "$(OutputPath)About\About.xml" /C /Y /K /Q /D | ||
echo F|xcopy "$(ProjectDir)About\Preview.png" "$(OutputPath)About\Preview.png" /S /C /Y /K /Q /D | ||
xcopy "$(ProjectDir)Defs" "$(OutputPath)Defs" /S /C /Y /K /I /Q /D | ||
xcopy "$(ProjectDir)Patches" "$(OutputPath)Patches" /S /C /Y /K /I /Q /D | ||
xcopy "$(ProjectDir)Languages" "$(OutputPath)Languages" /S /C /Y /K /I /Q /D | ||
xcopy "$(ProjectDir)Sounds" "$(OutputPath)Sounds" /S /C /Y /K /I /Q /D | ||
xcopy "$(ProjectDir)Textures" "$(OutputPath)Textures" /S /C /Y /K /I /Q /D | ||
)</PostBuildEvent> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> | ||
</PropertyGroup> | ||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.27004.2009 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Replace_Stuff", "Source\Replace_Stuff.csproj", "{D7D21B4A-1DA7-41D8-B202-C58CA8FA62AA}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Files", "Files.csproj", "{AA1EF112-E817-4ED1-849A-EE55B8DAF3C0}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{D7D21B4A-1DA7-41D8-B202-C58CA8FA62AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D7D21B4A-1DA7-41D8-B202-C58CA8FA62AA}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D7D21B4A-1DA7-41D8-B202-C58CA8FA62AA}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D7D21B4A-1DA7-41D8-B202-C58CA8FA62AA}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{AA1EF112-E817-4ED1-849A-EE55B8DAF3C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{AA1EF112-E817-4ED1-849A-EE55B8DAF3C0}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{AA1EF112-E817-4ED1-849A-EE55B8DAF3C0}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{AA1EF112-E817-4ED1-849A-EE55B8DAF3C0}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {28CF9A73-5333-4EB3-BFCC-3FBEDDA19200} | ||
EndGlobalSection | ||
EndGlobal |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace Replace_Stuff | ||
{ | ||
static class Log | ||
{ | ||
[System.Diagnostics.Conditional("DEBUG")] | ||
public static void Message(string x) | ||
{ | ||
Verse.Log.Message(x); | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
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("Replace_Stuff")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("Replace_Stuff")] | ||
[assembly: AssemblyCopyright("Copyright © 2018")] | ||
[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("d7d21b4a-1da7-41d8-b202-c58ca8fa62aa")] | ||
|
||
// 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.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System.Reflection; | ||
using Verse; | ||
using UnityEngine; | ||
using Harmony; | ||
|
||
namespace Replace_Stuff | ||
{ | ||
public class Mod : Verse.Mod | ||
{ | ||
public Mod(ModContentPack content) : base(content) | ||
{ | ||
// initialize settings | ||
// GetSettings<Settings>(); | ||
#if DEBUG | ||
HarmonyInstance.DEBUG = true; | ||
#endif | ||
HarmonyInstance harmony = HarmonyInstance.Create("Uuugggg.rimworld.Replace_Stuff.main"); | ||
harmony.PatchAll(Assembly.GetExecutingAssembly()); | ||
} | ||
|
||
// public override void DoSettingsWindowContents(Rect inRect) | ||
// { | ||
// base.DoSettingsWindowContents(inRect); | ||
// GetSettings<Settings>().DoWindowContents(inRect); | ||
// } | ||
// | ||
// public override string SettingsCategory() | ||
// { | ||
// return "Replace Stuff"; | ||
// } | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?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> | ||
<ProjectGuid>{D7D21B4A-1DA7-41D8-B202-C58CA8FA62AA}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Replace_Stuff</RootNamespace> | ||
<AssemblyName>Replace_Stuff</AssemblyName> | ||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>false</DebugSymbols> | ||
<DebugType>none</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>..\Assemblies\</OutputPath> | ||
<DefineConstants>DEBUG</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>none</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>..\..\Replace Stuff - Release\Assemblies\</OutputPath> | ||
<DefineConstants></DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Assembly-CSharp"> | ||
<HintPath>..\..\..\RimWorldWin_Data\Managed\Assembly-CSharp.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="0Harmony"> | ||
<HintPath>..\ThirdParty\0Harmony.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="UnityEngine"> | ||
<HintPath>..\..\..\RimWorldWin_Data\Managed\UnityEngine.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="**\*.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using Verse; | ||
using RimWorld; | ||
|
||
namespace Replace_Stuff | ||
{ | ||
class Settings : ModSettings | ||
{ | ||
public bool setting; | ||
|
||
public static Settings Get() | ||
{ | ||
return LoadedModManager.GetMod<Replace_Stuff.Mod>().GetSettings<Settings>(); | ||
} | ||
|
||
public void DoWindowContents(Rect wrect) | ||
{ | ||
var options = new Listing_Standard(); | ||
options.Begin(wrect); | ||
|
||
options.CheckboxLabeled("Sample setting", ref setting); | ||
options.Gap(); | ||
|
||
options.End(); | ||
} | ||
|
||
public override void ExposeData() | ||
{ | ||
Scribe_Values.Look(ref setting, "setting", true); | ||
} | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.