Skip to content

Commit

Permalink
update for rw 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorVanGogh committed Mar 4, 2020
1 parent a3a00d9 commit d6bb3b1
Show file tree
Hide file tree
Showing 29 changed files with 149 additions and 96 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@
Source/ export-ignore
*.psd export-ignore
Textures/Things/Building/Furniture/MedCab/trays.png export-ignore
Textures/Things/Building/Furniture/*.psd export-ignore
*.CodeAnalysisLog.xml export-ignore
*.lastcodeanalysissucceeded export-ignore
21 changes: 18 additions & 3 deletions About/About.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<ModMetaData>
<name>Extended Storage</name>
<supportedVersions>
<li>1.0</li>
</supportedVersions>
<author>(see description)</author>
<description xml:whitespace="preserve">Adds additional storage buildings that multi stack items. Auto sort by Fluffy, Harmony by spdskatr

Authors: Skullywag, Fluffy, spdskatr, DoctorVanGogh
</description>
<packageId>Skullywag.ExtendedStorage</packageId>
<supportedVersions>
<li>1.0</li>
<li>1.1</li>
</supportedVersions>
<modDependenciesByVersion>
<v1.1>
<li>
<packageId>brrainz.harmony</packageId>
<displayName>Harmony</displayName>
<steamWorkshopUrl>steam://url/CommunityFilePage/2009463077</steamWorkshopUrl>
<downloadUrl>https://github.com/pardeike/HarmonyRimWorld/releases/latest</downloadUrl>
</li>
</v1.1>
</modDependenciesByVersion>
<loadAfter>
<li>brrainz.harmony</li>
</loadAfter>
</ModMetaData>
2 changes: 1 addition & 1 deletion About/Manifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>Extended Storage</identifier>
<version>3.4.1.1</version>
<version>3.5.0.0</version>
<manifestUri>https://raw.githubusercontent.com/Skullywag/ExtendedStorage/master/About/Manifest.xml</manifestUri>
<downloadUri>https://github.com/Skullywag/ExtendedStorage/releases/latest</downloadUri>
</Manifest>
Binary file modified Assemblies/ExtendedStorage.dll
Binary file not shown.
34 changes: 34 additions & 0 deletions Assemblies/ExtendedStorage.dll.CodeAnalysisLog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="c:\program files (x86)\microsoft visual studio\2017\enterprise\team tools\static analysis tools\fxcop\Xml\CodeAnalysisReport.xsl"?>
<FxCopReport Version="15.0">
<Localized>
<String Key="Category">Category</String>
<String Key="Certainty">Certainty</String>
<String Key="CollapseAll">Collapse All</String>
<String Key="CheckId">Check Id</String>
<String Key="Error">Error</String>
<String Key="Errors">error(s)</String>
<String Key="ExpandAll">Expand All</String>
<String Key="Help">Help</String>
<String Key="Line">Line</String>
<String Key="Messages">message(s)</String>
<String Key="LocationNotStoredInPdb">[Location not stored in Pdb]</String>
<String Key="Project">Project</String>
<String Key="Resolution">Resolution</String>
<String Key="Rule">Rule</String>
<String Key="RuleFile">Rule File</String>
<String Key="RuleDescription">Rule Description</String>
<String Key="Source">Source</String>
<String Key="Status">Status</String>
<String Key="Target">Target</String>
<String Key="Warning">Warning</String>
<String Key="Warnings">warning(s)</String>
<String Key="ReportTitle">Code Analysis Report</String>
</Localized>
<Exceptions>
<Exception Keyword="CA0068" Kind="Engine" TreatAsWarning="True">
<Type>Microsoft.FxCop.Sdk.FxCopException</Type>
<ExceptionMessage>Debug information could not be found for target assembly 'ExtendedStorage.dll'. For best analysis results, include the .pdb file with debug information for 'ExtendedStorage.dll' in the same directory as the target assembly.</ExceptionMessage>
</Exception>
</Exceptions>
</FxCopReport>
Empty file.
6 changes: 6 additions & 0 deletions LoadFolders.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<loadFolders>
<v1.1>
<li>/</li>
<li>v1.1</li>
</v1.1>
</loadFolders>
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Extended Storage

[![RimWorld 1.0](https://img.shields.io/badge/RimWorld-1.0-green.svg?style=popout-square)](http://rimworldgame.com/)
[![RimWorld 1.1](https://img.shields.io/badge/RimWorld-1.0-green.svg?style=popout-square)](http://rimworldgame.com/)

Adds additional storage buildings that multi stack items.

Expand Down
4 changes: 2 additions & 2 deletions Source/ExtendedStorage.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A36BEEB2-7379-475B-B537-827E34571962}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A36BEEB2-7379-475B-B537-827E34571962}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A36BEEB2-7379-475B-B537-827E34571962}.Debug|Any CPU.ActiveCfg = Release|Any CPU
{A36BEEB2-7379-475B-B537-827E34571962}.Debug|Any CPU.Build.0 = Release|Any CPU
{A36BEEB2-7379-475B-B537-827E34571962}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A36BEEB2-7379-475B-B537-827E34571962}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
Expand Down
4 changes: 3 additions & 1 deletion Source/ExtendedStorage/Building_ExtendedStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public override IEnumerable<Gizmo> GetGizmos()
defaultDesc = LanguageKeys.keyed.ExtendedStorage_Rename.Translate(this.def.label),
defaultLabel = "Rename".Translate(),
activateSound = SoundDef.Named("Click"),
action = delegate { Find.WindowStack.Add(new Dialog_Rename(this)); },
action = delegate { Find.WindowStack.Add(new ES_Dialog_Rename(this)); },
groupKey = 942608684 // guaranteed to be random - https://xkcd.com/221/
};
yield return a;
Expand Down Expand Up @@ -247,13 +247,15 @@ public override IEnumerable<StatDrawEntry> SpecialDisplayStats() {
DefReferences.StatCategory_ExtendedStorage,
LanguageKeys.keyed.ExtendedStorage_CurrentlyStoringStat.Translate(),
StoredThingDef?.LabelCap ?? LanguageKeys.keyed.ExtendedStorage_Nothing.Translate(),
StoredThingDef?.DescriptionDetailed,
-1);
yield return new StatDrawEntry(
DefReferences.StatCategory_ExtendedStorage,
LanguageKeys.keyed.ExtendedStorage_UsageStat.Translate(),
StoredThingDef != null
? LanguageKeys.keyed.ExtendedStorage_UsageStat_Value.Translate(StoredThingTotal, ApparentMaxStorage)
: LanguageKeys.keyed.ExtendedStorage_NA.Translate(),
null,
-2);
}

Expand Down
60 changes: 0 additions & 60 deletions Source/ExtendedStorage/Dialog_Rename.cs

This file was deleted.

13 changes: 13 additions & 0 deletions Source/ExtendedStorage/ES_Dialog_Rename.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using UnityEngine;
using Verse;

namespace ExtendedStorage
{
public class ES_Dialog_Rename : Dialog_Rename
{
private Building_ExtendedStorage building;

public ES_Dialog_Rename(Building_ExtendedStorage building) => this.building = building;
protected override void SetName(string name) => building.label = name;
}
}
32 changes: 21 additions & 11 deletions Source/ExtendedStorage/ExtendedStorage.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(SolutionDir)\RimworldInstall.props" />
<PropertyGroup>
Expand All @@ -10,15 +10,14 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ExtendedStorage</RootNamespace>
<AssemblyName>ExtendedStorage</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Assemblies\</OutputPath>
<OutputPath>..\..\v1.1\Assemblies\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -27,7 +26,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Assemblies\</OutputPath>
<OutputPath>..\..\v1.1\Assemblies\</OutputPath>
<DefineConstants>
</DefineConstants>
<ErrorReport>prompt</ErrorReport>
Expand All @@ -36,19 +35,27 @@
</PropertyGroup>
<ItemGroup>
<!-- this block is *not* needed for devenv builds - *BUT* if we ever switch to an msbuild based system this allows T4 access to project variables -->
<T4ParameterValues Include="RimworldManagedDir">
<Value>$(RimworldManagedDir)</Value>
<T4ParameterValues Include="RimworldManagedDir11">
<Value>$(RimworldManagedDir11)</Value>
</T4ParameterValues>
</ItemGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\Lib\1.0\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
<HintPath>$(RimworldManagedDir11)\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>$(RimworldManagedDir11)\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="UnityEngine">
<HintPath>..\..\..\Lib\1.0\RimWorldWin64_Data\Managed\UnityEngine.dll</HintPath>
<HintPath>$(RimworldManagedDir11)\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>$(RimworldManagedDir11)\UnityEngine.IMGUIModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
Expand Down Expand Up @@ -79,7 +86,7 @@
<Compile Include="Patches\Thing_SpawnSetup.cs" />
<Compile Include="Patches\[GUI]\Thing_DrawGUIOverlay.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Dialog_Rename.cs" />
<Compile Include="ES_Dialog_Rename.cs" />
<Compile Include="UserSettings.cs" />
<Compile Include="Utility\AccessUtility.cs" />
<Compile Include="Utility\EnumUtility.cs" />
Expand All @@ -101,7 +108,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lib.Harmony">
<Version>1.2.0.1</Version>
<Version>2.0.0.8</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand All @@ -116,4 +123,7 @@
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>DEL "$(OutDir)\0Harmony.dll"</PostBuildEvent>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions Source/ExtendedStorage/ExtendedStorageMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
using System.Reflection;
using Verse;
using RimWorld;
using Harmony;
using HarmonyLib;

namespace ExtendedStorage
{
partial class ExtendedStorageMod : Mod {
public ExtendedStorageMod(ModContentPack content) : base(content)
{
try {
HarmonyInstance instance = HarmonyInstance.Create("com.extendedstorage.patches");
Harmony instance = new Harmony("com.extendedstorage.patches");
instance.PatchAll(Assembly.GetExecutingAssembly());
Log.Message($"Extended Storage {typeof(ExtendedStorageMod).Assembly.GetName().Version} - Harmony patches successful");
} catch (Exception ex) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using System.Diagnostics.CodeAnalysis;
using Harmony;
using HarmonyLib;
using JetBrains.Annotations;
using RimWorld;
using Verse;

namespace ExtendedStorage.Patches {

[HarmonyPatch(typeof(CompressibilityDeciderUtility), nameof(CompressibilityDeciderUtility.IsSaveCompressible))]
[UsedImplicitly]
[SuppressMessage("ReSharper", "InconsistentNaming")]
internal class CompressibilityDeciderUtility_IsSaveCompressible {

Expand Down
2 changes: 1 addition & 1 deletion Source/ExtendedStorage/Patches/GenSpawn_Spawn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using Harmony;
using HarmonyLib;
using Verse;

namespace ExtendedStorage.Patches
Expand Down
2 changes: 1 addition & 1 deletion Source/ExtendedStorage/Patches/ITab_Storage_FillTab.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Harmony;
using HarmonyLib;
using JetBrains.Annotations;
using UnityEngine;
using Verse;
Expand Down
2 changes: 1 addition & 1 deletion Source/ExtendedStorage/Patches/Map_FinalizeLoading.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Reflection;
using System.Reflection.Emit;
using System.Text;
using Harmony;
using HarmonyLib;
using Verse;

namespace ExtendedStorage.Patches {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using Harmony;
using HarmonyLib;
using JetBrains.Annotations;
using RimWorld;
using Verse;
Expand Down
2 changes: 1 addition & 1 deletion Source/ExtendedStorage/Patches/StorageSettings.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using Harmony;
using HarmonyLib;
using JetBrains.Annotations;
using RimWorld;

Expand Down
2 changes: 1 addition & 1 deletion Source/ExtendedStorage/Patches/Thing_SpawnSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection.Emit;
using Harmony;
using HarmonyLib;
using JetBrains.Annotations;
using Verse;

Expand Down
Loading

0 comments on commit d6bb3b1

Please sign in to comment.