Skip to content

Commit

Permalink
Merge branch 'master' into materialReplacement
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyOThan authored Aug 5, 2024
2 parents 7cd72de + 0937a88 commit 9b6727c
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 240 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: build

on:
push:
branches: [ "master" ]
paths:
- '**/*.cs'
pull_request:
paths:
- '**/*.cs'
workflow_dispatch:
workflow_call:

jobs:
build:
uses: KSPModdingLibs/KSPBuildTools/.github/workflows/build.yml@main
with:
dependency-identifiers: ${{ vars.DEPENDENCY_IDENTIFIERS }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
*.dll
*.dll.mdb
*.pdb
*.orig
*.userprefs
*.suo
Expand All @@ -14,5 +15,8 @@ build
obj
bin
*.csproj.user
*.DotSettings.user

Assets/*.png
KSP
*.user
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "KSPBuildTools"]
path = KSPBuildTools
url = https://github.com/KSPModdingLibs/KSPBuildTools.git
1 change: 1 addition & 0 deletions KSPBuildTools
Submodule KSPBuildTools added at d6a321
43 changes: 0 additions & 43 deletions Makefile

This file was deleted.

7 changes: 2 additions & 5 deletions Source/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[*.cs]
indent_style = tabs
csharp_indent_labels = one_less_than_current
csharp_space_around_binary_operators = before_and_after
csharp_using_directive_placement = outside_namespace:silent
Expand Down Expand Up @@ -27,15 +26,13 @@ csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
csharp_prefer_static_local_function = true:suggestion
csharp_new_line_before_open_brace = accessors,anonymous_methods,anonymous_types,lambdas,methods,object_collection_array_initializers,properties,types
csharp_new_line_before_open_brace = accessors,anonymous_methods,anonymous_types,lambdas,methods,properties,types
csharp_new_line_before_else = false
csharp_new_line_before_catch = false
csharp_new_line_before_finally = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_call_name_and_opening_parenthesis = false


[*.{cs,vb}]
#### Naming styles ####

# Naming rules
Expand Down Expand Up @@ -85,7 +82,7 @@ dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
indent_size = 4
end_of_line = crlf
end_of_line = lf
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
Expand Down
6 changes: 0 additions & 6 deletions Source/.gitignore

This file was deleted.

8 changes: 5 additions & 3 deletions Source/Shabby.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License
along with Shabby. If not, see
<http://www.gnu.org/licenses/>.
*/

using System;
using System.IO;
using System.Collections.Generic;
Expand All @@ -28,8 +29,8 @@ You should have received a copy of the GNU General Public License
using MonoMod.Utils;

Check failure on line 29 in Source/Shabby.cs

View workflow job for this annotation

GitHub Actions / build / build

The type or namespace name 'MonoMod' could not be found (are you missing a using directive or an assembly reference?)
using Code = Mono.Cecil.Cil.Code;

Check failure on line 30 in Source/Shabby.cs

View workflow job for this annotation

GitHub Actions / build / build

The type or namespace name 'Cecil' does not exist in the namespace 'Mono' (are you missing an assembly reference?)

namespace Shabby {

namespace Shabby
{
struct Replacement
{
public Replacement(ConfigNode node)
Expand Down Expand Up @@ -65,6 +66,7 @@ static Shader FindLoadedShader(string shaderName)
Debug.Log($"[Shabby] custom shader: {shader.name}");
return shader;
}

shader = Shader.Find(shaderName);
//if (shader != null) {
// Debug.Log ($"[Shabby] stock shader: {shader.name}");
Expand Down Expand Up @@ -243,4 +245,4 @@ static IEnumerable<CodeInstruction> CallSiteTranspiler(IEnumerable<CodeInstructi
}
}
}
}
}
83 changes: 25 additions & 58 deletions Source/Shabby.csproj
Original file line number Diff line number Diff line change
@@ -1,67 +1,34 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B3610197-17C4-4441-9B83-10E4755D1661}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Shabby</RootNamespace>
<TargetFramework>net48</TargetFramework>
<LangVersion>7.3</LangVersion>
<IsPackable>false</IsPackable>
<PlatformTarget>x64</PlatformTarget>
<NoWarn>1701;1702;CS0649;CS1591</NoWarn>
<AssemblyCopyright>2024 KSPModdingLibs Contributors</AssemblyCopyright>
<AssemblyVersion Condition = "'$(AssemblyVersion)' == ''">99.9.9</AssemblyVersion>
<AssemblyName>Shabby</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</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>portable</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>

<ItemGroup>
<Reference Include="0Harmony">
<HintPath>dlls\0Harmony.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>dlls\Assembly-CSharp.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="UnityEngine.AssetBundleModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>dlls\UnityEngine.AssetBundleModule.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>dlls\UnityEngine.CoreModule.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="IconMaterialPatch.cs" />
<Compile Include="ModelFilter.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Shabby.cs" />
<Compile Include="MaterialDef.cs" />
<Compile Include="MaterialReplacement.cs" />
<Compile Include="ShabLoader.cs" />
<AssemblyAttribute Include="KSPAssembly">
<_Parameter1>$(AssemblyName)</_Parameter1>
<_Parameter2_IsLiteral>true</_Parameter2_IsLiteral>
<_Parameter2>$(AssemblyVersion.Split('.')[0])</_Parameter2>
<_Parameter3_IsLiteral>true</_Parameter3_IsLiteral>
<_Parameter3>$(AssemblyVersion.Split('.')[1])</_Parameter3>
<_Parameter4_IsLiteral>true</_Parameter4_IsLiteral>
<_Parameter4>$(AssemblyVersion.Split('.')[2])</_Parameter4>
</AssemblyAttribute>
</ItemGroup>

<Import Project="$(SolutionDir)KSPBuildTools/KSPCommon.targets"/>

<ItemGroup>
<None Include=".editorconfig" />
<Reference Include="0Harmony, Culture=neutral, PublicKeyToken=null">
<HintPath>$(KSPRoot)/GameData/000_Harmony/0Harmony.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
45 changes: 0 additions & 45 deletions Source/assembly/AssemblyInfo.in

This file was deleted.

80 changes: 0 additions & 80 deletions Source/assembly/VersionReport.cs

This file was deleted.

0 comments on commit 9b6727c

Please sign in to comment.