-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from RimWorldCCLTeam/development
v0.14.3 - I'm Too Tired To Be Clever
- Loading branch information
Showing
151 changed files
with
3,569 additions
and
777 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
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
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,63 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{1F8C3C2D-E04E-4475-A20A-FE69CB96FB29}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<RootNamespace>CCLModTweaks</RootNamespace> | ||
<AssemblyName>CCLModTweaks</AssemblyName> | ||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> | ||
<ReleaseVersion>0.14.0</ReleaseVersion> | ||
<TargetFrameworkProfile>Client</TargetFrameworkProfile> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\</OutputPath> | ||
<DefineConstants>DEBUG;</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<ConsolePause>false</ConsolePause> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\</OutputPath> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<ConsolePause>false</ConsolePause> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="Community Core Library"> | ||
<HintPath>..\bin\Community Core Library.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Assembly-CSharp"> | ||
<HintPath>..\bin\Assembly-CSharp.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine"> | ||
<HintPath>..\bin\UnityEngine.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="DefInjectionQualifiers\WorkTableCompPowerLowIdleDrawTickerChangerQualifier.cs" /> | ||
<Compile Include="DefInjectionQualifiers\WorkTableCompPowerLowIdleDrawCompAdderQualifier.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Folder Include="DefInjectionQualifiers\" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | ||
<PropertyGroup> | ||
<PostBuildEvent>call "$(ProjectDir)PostBuild.bat" $(ConfigurationName) "$(TargetPath)" $(SolutionDir)</PostBuildEvent> | ||
</PropertyGroup> | ||
</Project> |
39 changes: 39 additions & 0 deletions
39
...ct/CCLModTweaks/DefInjectionQualifiers/WorkTableCompPowerLowIdleDrawCompAdderQualifier.cs
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,39 @@ | ||
using System; | ||
|
||
using CommunityCoreLibrary; | ||
using RimWorld; | ||
using Verse; | ||
|
||
namespace CCLModTweaks | ||
{ | ||
|
||
public class WorkTableCompPowerLowIdleDrawCompAdderQualifier : DefInjectionQualifier | ||
{ | ||
|
||
public override bool Test( Def def ) | ||
{ | ||
var thingDef = def as ThingDef; | ||
if( thingDef == null ) | ||
{ | ||
return false; | ||
} | ||
if( | ||
( thingDef.thingClass != typeof( Building_WorkTable ) )&& | ||
( thingDef.thingClass != typeof( Building_WorkTable_HeatPush ) ) | ||
) | ||
{ | ||
return false; | ||
} | ||
if( !thingDef.HasComp( typeof( CompPowerTrader ) ) ) | ||
{ | ||
return false; | ||
} | ||
if( thingDef.HasComp( typeof( CompPowerLowIdleDraw) ) ) | ||
{ | ||
return false; | ||
} | ||
return true; | ||
} | ||
|
||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...CLModTweaks/DefInjectionQualifiers/WorkTableCompPowerLowIdleDrawTickerChangerQualifier.cs
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,43 @@ | ||
using System; | ||
|
||
using CommunityCoreLibrary; | ||
using RimWorld; | ||
using Verse; | ||
|
||
namespace CCLModTweaks | ||
{ | ||
|
||
public class WorkTableCompPowerLowIdleDrawTickerChangerQualifier : DefInjectionQualifier | ||
{ | ||
|
||
public override bool Test( Def def ) | ||
{ | ||
var thingDef = def as ThingDef; | ||
if( thingDef == null ) | ||
{ | ||
return false; | ||
} | ||
if( | ||
( thingDef.thingClass != typeof( Building_WorkTable ) )&& | ||
( thingDef.thingClass != typeof( Building_WorkTable_HeatPush ) ) | ||
) | ||
{ | ||
return false; | ||
} | ||
if( !thingDef.HasComp( typeof( CompPowerTrader ) ) ) | ||
{ | ||
return false; | ||
} | ||
if( !thingDef.HasComp( typeof( CompPowerLowIdleDraw) ) ) | ||
{ | ||
return false; | ||
} | ||
if( thingDef.tickerType != TickerType.Never ) | ||
{ | ||
return false; | ||
} | ||
return 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
REM Copy this file to "PostBuild.bat" | ||
REM This is a local file copy after build. Get it once and your .gitignore | ||
REM should handle it after that. Make all your local copies at the end. | ||
|
||
REM Set this to your local RimWorld install path and CCL Mod Tweaks Assemblies directory | ||
REM Example: | ||
REM Set InstalledCCLAssemblies="C:\Games\Steam\steamapps\common\RimWorld\Mods\Community Core Library - Mod Tweaks\Assemblies" | ||
Set InstalledCCLAssemblies="/badkarma/" | ||
|
||
if NOT EXIST %InstalledCCLAssemblies% ( | ||
echo Missing or invalid copy target: | ||
echo %InstalledCCLAssemblies% | ||
EXIT -1 | ||
) | ||
|
||
echo Build Config: %1 | ||
echo Build Target: %2 | ||
echo Solution Path: %3 | ||
echo CCL Install Path: %InstalledCCLAssemblies% | ||
|
||
del "%3DLL_Project\CCLModTweaks\bin\CCLModTweaks.pdb" | ||
|
||
echo Copy to RimWorld | ||
|
||
copy %2 %InstalledCCLAssemblies% | ||
|
||
if %1 == Release ( | ||
echo Copy to User Release | ||
copy %2 "%3_Mod\User Release\Community Core Library - Mod Tweaks\Assemblies" | ||
) else ( | ||
echo Copy to Modders Resource | ||
copy %2 "%3_Mod\Modders Resource\Community Core Library - Mod Tweaks\Assemblies" | ||
) | ||
|
||
REM Add any other local copies here | ||
REM See example below | ||
|
||
rem echo Copy to ModPile | ||
rem copy %2 "C:\Utils\dev\Projects\ModPile\Source-DLLs" | ||
|
||
:Finished |
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,18 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
|
||
// Information about this assembly is defined by the following attributes. | ||
// Change them to the values specific to your project. | ||
|
||
[assembly: AssemblyTitle( "CCLModTweaks" )] | ||
[assembly: AssemblyCompany("RimWorldCCLTeam")] | ||
[assembly: AssemblyProduct("CCLModTweaks")] | ||
[assembly: AssemblyCopyright("The Unlicense")] | ||
|
||
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". | ||
// The form "{Major}.{Minor}.*" will automatically update the build and revision, | ||
// and "{Major}.{Minor}.{Build}.*" will update just the revision. | ||
|
||
[assembly: AssemblyVersion("0.14.0")] | ||
[assembly: AssemblyFileVersion("0.14.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,35 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
using RimWorld; | ||
using Verse; | ||
|
||
namespace CommunityCoreLibrary | ||
{ | ||
|
||
public abstract class DefInjectionQualifier | ||
{ | ||
public abstract bool Test( Def def ); | ||
|
||
public static List<ThingDef> FilteredThingDefs( Type qualifier, ref DefInjectionQualifier qualifierInt, List<string> targetDefs ) | ||
{ | ||
if( !targetDefs.NullOrEmpty() ) | ||
{ | ||
return DefDatabase<ThingDef>.AllDefs.Where( def => targetDefs.Contains( def.defName ) ).ToList(); | ||
} | ||
if( qualifierInt == null ) | ||
{ | ||
qualifierInt = (DefInjectionQualifier) Activator.CreateInstance( qualifier ); | ||
if( qualifierInt == null ) | ||
{ | ||
return null; | ||
} | ||
} | ||
return DefDatabase<ThingDef>.AllDefs.Where( qualifierInt.Test ).ToList(); | ||
} | ||
|
||
} | ||
|
||
} | ||
|
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,15 @@ | ||
using System; | ||
|
||
using Verse; | ||
|
||
namespace CommunityCoreLibrary | ||
{ | ||
|
||
public abstract class ToggleSetting | ||
{ | ||
|
||
public abstract bool Value{ get; set; } | ||
|
||
} | ||
|
||
} |
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
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
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
Oops, something went wrong.