Skip to content

Commit

Permalink
Init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeiwork committed Oct 14, 2020
0 parents commit db174c8
Show file tree
Hide file tree
Showing 10 changed files with 249 additions and 0 deletions.
22 changes: 22 additions & 0 deletions About/About.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<ModMetaData>
<packageId>rimworld.undone.burningcorpse</packageId>
<name>Burning Corpse</name>
<author>sergeiwork</author>
<supportedVersions>
<li>1.0</li>
<li>1.1</li>
<li>1.2</li>
</supportedVersions>
<description>
This mod adds mood buff when burning corpse is observed.
</description>
<modDependencies>
<li>
<packageId>brrainz.harmony</packageId>
<displayName>Harmony</displayName>
<steamWorkshopUrl>steam://url/CommunityFilePage/2009463077</steamWorkshopUrl>
<downloadUrl>https://github.com/pardeike/HarmonyRimWorld/releases/latest</downloadUrl>
</li>
</modDependencies>
</ModMetaData>
Binary file added About/Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions Defs/ThoughtDefs/Thoughts_Memory_Misc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

<ThoughtDef>
<defName>ObservedBurningCorpse</defName>
<thoughtClass>Thought_MemoryObservation</thoughtClass>
<durationDays>0.5</durationDays>
<stackLimit>1</stackLimit>
<stages>
<li>
<label>observed burning corpse</label>
<description>I saw a burning dead body. It was satisfying.</description>
<baseMoodEffect>4</baseMoodEffect>
</li>
</stages>
</ThoughtDef>

</Defs>
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Burning Corpses!

Mod for RimWorld.

You like to burn corpses but your pawns don't? Let's change it!

![Main Image](./About/Preview.png)

### Features

- Mood buff when observing burning corpses


### Download

[Latest release](https://github.com/sergeiwork/RimworldBurningCorpses/releases/latest)

[All the releases](https://github.com/sergeiwork/RimworldBurningCorpses/releases)

### Changelog

This is first version


### License

This mod can be used by anyone for any purpose as long as it's free and there's proper attribution - mod name, author's name and a link to this page.
23 changes: 23 additions & 0 deletions Sources/BurningCorpse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;
using HarmonyLib;
using System.Reflection;

namespace BurningCorpse
{
public class BurningCorpse : Mod
{
public BurningCorpse(ModContentPack content) : base(content)
{
Harmony harmony = new Harmony("rimworld.undone.burningcorpse");
harmony.PatchAll(Assembly.GetExecutingAssembly());

Log.Message("Burning Corpse loaded");
}
}
}
65 changes: 65 additions & 0 deletions Sources/BurningCorpse.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?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>{BC069C26-358E-4303-8066-0E55AAEF9167}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BurningCorpse</RootNamespace>
<AssemblyName>BurningCorpse</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</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>
<ItemGroup>
<Reference Include="0Harmony, Version=2.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Lib.Harmony.2.0.2\lib\net472\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>D:\Games\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>D:\Games\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="BurningCorpse.cs" />
<Compile Include="Harmony_Corpse_GiveObservedThought.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
25 changes: 25 additions & 0 deletions Sources/BurningCorpse.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 15
VisualStudioVersion = 15.0.28307.1259
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BurningCorpse", "BurningCorpse.csproj", "{BC069C26-358E-4303-8066-0E55AAEF9167}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BC069C26-358E-4303-8066-0E55AAEF9167}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC069C26-358E-4303-8066-0E55AAEF9167}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC069C26-358E-4303-8066-0E55AAEF9167}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC069C26-358E-4303-8066-0E55AAEF9167}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {32E72B37-7947-419B-A015-315EB4477DF6}
EndGlobalSection
EndGlobal
29 changes: 29 additions & 0 deletions Sources/Harmony_Corpse_GiveObservedThought.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using HarmonyLib;
using RimWorld;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;

namespace BurningCorpse
{
[HarmonyPatch(typeof(Corpse))]
[HarmonyPatch("GiveObservedThought")]
class Harmony_Corpse_GiveObservedThought
{
[HarmonyPrefix]
static bool GiveObservedThought_Prefix(Corpse __instance, ref Thought_Memory __result)
{
if (__instance.IsBurning())
{
__result = (Thought_MemoryObservation) ThoughtMaker.MakeThought(ThoughtDef.Named("ObservedBurningCorpse"));
(__result as Thought_MemoryObservation).Target = __instance;
Log.Message("Burning Corpse found");
return false;
}
return true;
}
}
}
36 changes: 36 additions & 0 deletions Sources/Properties/AssemblyInfo.cs
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("BurningCorpse")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BurningCorpse")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[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("bc069c26-358e-4303-8066-0e55aaef9167")]

// 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")]
4 changes: 4 additions & 0 deletions Sources/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.0.2" targetFramework="net472" />
</packages>

0 comments on commit db174c8

Please sign in to comment.