mirror of
				https://gitgud.io/Tory/rimnude-unofficial.git
				synced 2024-08-15 00:03:30 +00:00 
			
		
		
		
	Baka
This commit is contained in:
		
							parent
							
								
									9dd46c99d2
								
							
						
					
					
						commit
						ed97aed6d8
					
				
					 4148 changed files with 187454 additions and 1 deletions
				
			
		
							
								
								
									
										63
									
								
								Source/RimNudeWorld/.gitattributes
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								Source/RimNudeWorld/.gitattributes
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,63 @@
 | 
			
		|||
###############################################################################
 | 
			
		||||
# Set default behavior to automatically normalize line endings.
 | 
			
		||||
###############################################################################
 | 
			
		||||
* text=auto
 | 
			
		||||
 | 
			
		||||
###############################################################################
 | 
			
		||||
# Set default behavior for command prompt diff.
 | 
			
		||||
#
 | 
			
		||||
# This is need for earlier builds of msysgit that does not have it on by
 | 
			
		||||
# default for csharp files.
 | 
			
		||||
# Note: This is only used by command line
 | 
			
		||||
###############################################################################
 | 
			
		||||
#*.cs     diff=csharp
 | 
			
		||||
 | 
			
		||||
###############################################################################
 | 
			
		||||
# Set the merge driver for project and solution files
 | 
			
		||||
#
 | 
			
		||||
# Merging from the command prompt will add diff markers to the files if there
 | 
			
		||||
# are conflicts (Merging from VS is not affected by the settings below, in VS
 | 
			
		||||
# the diff markers are never inserted). Diff markers may cause the following 
 | 
			
		||||
# file extensions to fail to load in VS. An alternative would be to treat
 | 
			
		||||
# these files as binary and thus will always conflict and require user
 | 
			
		||||
# intervention with every merge. To do so, just uncomment the entries below
 | 
			
		||||
###############################################################################
 | 
			
		||||
#*.sln       merge=binary
 | 
			
		||||
#*.csproj    merge=binary
 | 
			
		||||
#*.vbproj    merge=binary
 | 
			
		||||
#*.vcxproj   merge=binary
 | 
			
		||||
#*.vcproj    merge=binary
 | 
			
		||||
#*.dbproj    merge=binary
 | 
			
		||||
#*.fsproj    merge=binary
 | 
			
		||||
#*.lsproj    merge=binary
 | 
			
		||||
#*.wixproj   merge=binary
 | 
			
		||||
#*.modelproj merge=binary
 | 
			
		||||
#*.sqlproj   merge=binary
 | 
			
		||||
#*.wwaproj   merge=binary
 | 
			
		||||
 | 
			
		||||
###############################################################################
 | 
			
		||||
# behavior for image files
 | 
			
		||||
#
 | 
			
		||||
# image files are treated as binary by default.
 | 
			
		||||
###############################################################################
 | 
			
		||||
#*.jpg   binary
 | 
			
		||||
#*.png   binary
 | 
			
		||||
#*.gif   binary
 | 
			
		||||
 | 
			
		||||
###############################################################################
 | 
			
		||||
# diff behavior for common document formats
 | 
			
		||||
# 
 | 
			
		||||
# Convert binary document formats to text before diffing them. This feature
 | 
			
		||||
# is only available from the command line. Turn it on by uncommenting the 
 | 
			
		||||
# entries below.
 | 
			
		||||
###############################################################################
 | 
			
		||||
#*.doc   diff=astextplain
 | 
			
		||||
#*.DOC   diff=astextplain
 | 
			
		||||
#*.docx  diff=astextplain
 | 
			
		||||
#*.DOCX  diff=astextplain
 | 
			
		||||
#*.dot   diff=astextplain
 | 
			
		||||
#*.DOT   diff=astextplain
 | 
			
		||||
#*.pdf   diff=astextplain
 | 
			
		||||
#*.PDF   diff=astextplain
 | 
			
		||||
#*.rtf   diff=astextplain
 | 
			
		||||
#*.RTF   diff=astextplain
 | 
			
		||||
							
								
								
									
										261
									
								
								Source/RimNudeWorld/.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										261
									
								
								Source/RimNudeWorld/.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,261 @@
 | 
			
		|||
## Ignore Visual Studio temporary files, build results, and
 | 
			
		||||
## files generated by popular Visual Studio add-ons.
 | 
			
		||||
 | 
			
		||||
# User-specific files
 | 
			
		||||
*.suo
 | 
			
		||||
*.user
 | 
			
		||||
*.userosscache
 | 
			
		||||
*.sln.docstates
 | 
			
		||||
 | 
			
		||||
# User-specific files (MonoDevelop/Xamarin Studio)
 | 
			
		||||
*.userprefs
 | 
			
		||||
 | 
			
		||||
# Build results
 | 
			
		||||
[Dd]ebug/
 | 
			
		||||
[Dd]ebugPublic/
 | 
			
		||||
[Rr]elease/
 | 
			
		||||
[Rr]eleases/
 | 
			
		||||
x64/
 | 
			
		||||
x86/
 | 
			
		||||
bld/
 | 
			
		||||
[Bb]in/
 | 
			
		||||
[Oo]bj/
 | 
			
		||||
[Ll]og/
 | 
			
		||||
 | 
			
		||||
# Visual Studio 2015 cache/options directory
 | 
			
		||||
.vs/
 | 
			
		||||
# Uncomment if you have tasks that create the project's static files in wwwroot
 | 
			
		||||
#wwwroot/
 | 
			
		||||
 | 
			
		||||
# MSTest test Results
 | 
			
		||||
[Tt]est[Rr]esult*/
 | 
			
		||||
[Bb]uild[Ll]og.*
 | 
			
		||||
 | 
			
		||||
# NUNIT
 | 
			
		||||
*.VisualState.xml
 | 
			
		||||
TestResult.xml
 | 
			
		||||
 | 
			
		||||
# Build Results of an ATL Project
 | 
			
		||||
[Dd]ebugPS/
 | 
			
		||||
[Rr]eleasePS/
 | 
			
		||||
dlldata.c
 | 
			
		||||
 | 
			
		||||
# DNX
 | 
			
		||||
project.lock.json
 | 
			
		||||
project.fragment.lock.json
 | 
			
		||||
artifacts/
 | 
			
		||||
 | 
			
		||||
*_i.c
 | 
			
		||||
*_p.c
 | 
			
		||||
*_i.h
 | 
			
		||||
*.ilk
 | 
			
		||||
*.meta
 | 
			
		||||
*.obj
 | 
			
		||||
*.pch
 | 
			
		||||
*.pdb
 | 
			
		||||
*.pgc
 | 
			
		||||
*.pgd
 | 
			
		||||
*.rsp
 | 
			
		||||
*.sbr
 | 
			
		||||
*.tlb
 | 
			
		||||
*.tli
 | 
			
		||||
*.tlh
 | 
			
		||||
*.tmp
 | 
			
		||||
*.tmp_proj
 | 
			
		||||
*.log
 | 
			
		||||
*.vspscc
 | 
			
		||||
*.vssscc
 | 
			
		||||
.builds
 | 
			
		||||
*.pidb
 | 
			
		||||
*.svclog
 | 
			
		||||
*.scc
 | 
			
		||||
 | 
			
		||||
# Chutzpah Test files
 | 
			
		||||
_Chutzpah*
 | 
			
		||||
 | 
			
		||||
# Visual C++ cache files
 | 
			
		||||
ipch/
 | 
			
		||||
*.aps
 | 
			
		||||
*.ncb
 | 
			
		||||
*.opendb
 | 
			
		||||
*.opensdf
 | 
			
		||||
*.sdf
 | 
			
		||||
*.cachefile
 | 
			
		||||
*.VC.db
 | 
			
		||||
*.VC.VC.opendb
 | 
			
		||||
 | 
			
		||||
# Visual Studio profiler
 | 
			
		||||
*.psess
 | 
			
		||||
*.vsp
 | 
			
		||||
*.vspx
 | 
			
		||||
*.sap
 | 
			
		||||
 | 
			
		||||
# TFS 2012 Local Workspace
 | 
			
		||||
$tf/
 | 
			
		||||
 | 
			
		||||
# Guidance Automation Toolkit
 | 
			
		||||
*.gpState
 | 
			
		||||
 | 
			
		||||
# ReSharper is a .NET coding add-in
 | 
			
		||||
_ReSharper*/
 | 
			
		||||
*.[Rr]e[Ss]harper
 | 
			
		||||
*.DotSettings.user
 | 
			
		||||
 | 
			
		||||
# JustCode is a .NET coding add-in
 | 
			
		||||
.JustCode
 | 
			
		||||
 | 
			
		||||
# TeamCity is a build add-in
 | 
			
		||||
_TeamCity*
 | 
			
		||||
 | 
			
		||||
# DotCover is a Code Coverage Tool
 | 
			
		||||
*.dotCover
 | 
			
		||||
 | 
			
		||||
# NCrunch
 | 
			
		||||
_NCrunch_*
 | 
			
		||||
.*crunch*.local.xml
 | 
			
		||||
nCrunchTemp_*
 | 
			
		||||
 | 
			
		||||
# MightyMoose
 | 
			
		||||
*.mm.*
 | 
			
		||||
AutoTest.Net/
 | 
			
		||||
 | 
			
		||||
# Web workbench (sass)
 | 
			
		||||
.sass-cache/
 | 
			
		||||
 | 
			
		||||
# Installshield output folder
 | 
			
		||||
[Ee]xpress/
 | 
			
		||||
 | 
			
		||||
# DocProject is a documentation generator add-in
 | 
			
		||||
DocProject/buildhelp/
 | 
			
		||||
DocProject/Help/*.HxT
 | 
			
		||||
DocProject/Help/*.HxC
 | 
			
		||||
DocProject/Help/*.hhc
 | 
			
		||||
DocProject/Help/*.hhk
 | 
			
		||||
DocProject/Help/*.hhp
 | 
			
		||||
DocProject/Help/Html2
 | 
			
		||||
DocProject/Help/html
 | 
			
		||||
 | 
			
		||||
# Click-Once directory
 | 
			
		||||
publish/
 | 
			
		||||
 | 
			
		||||
# Publish Web Output
 | 
			
		||||
*.[Pp]ublish.xml
 | 
			
		||||
*.azurePubxml
 | 
			
		||||
# TODO: Comment the next line if you want to checkin your web deploy settings
 | 
			
		||||
# but database connection strings (with potential passwords) will be unencrypted
 | 
			
		||||
#*.pubxml
 | 
			
		||||
*.publishproj
 | 
			
		||||
 | 
			
		||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
 | 
			
		||||
# checkin your Azure Web App publish settings, but sensitive information contained
 | 
			
		||||
# in these scripts will be unencrypted
 | 
			
		||||
PublishScripts/
 | 
			
		||||
 | 
			
		||||
# NuGet Packages
 | 
			
		||||
*.nupkg
 | 
			
		||||
# The packages folder can be ignored because of Package Restore
 | 
			
		||||
**/packages/*
 | 
			
		||||
# except build/, which is used as an MSBuild target.
 | 
			
		||||
!**/packages/build/
 | 
			
		||||
# Uncomment if necessary however generally it will be regenerated when needed
 | 
			
		||||
#!**/packages/repositories.config
 | 
			
		||||
# NuGet v3's project.json files produces more ignoreable files
 | 
			
		||||
*.nuget.props
 | 
			
		||||
*.nuget.targets
 | 
			
		||||
 | 
			
		||||
# Microsoft Azure Build Output
 | 
			
		||||
csx/
 | 
			
		||||
*.build.csdef
 | 
			
		||||
 | 
			
		||||
# Microsoft Azure Emulator
 | 
			
		||||
ecf/
 | 
			
		||||
rcf/
 | 
			
		||||
 | 
			
		||||
# Windows Store app package directories and files
 | 
			
		||||
AppPackages/
 | 
			
		||||
BundleArtifacts/
 | 
			
		||||
Package.StoreAssociation.xml
 | 
			
		||||
_pkginfo.txt
 | 
			
		||||
 | 
			
		||||
# Visual Studio cache files
 | 
			
		||||
# files ending in .cache can be ignored
 | 
			
		||||
*.[Cc]ache
 | 
			
		||||
# but keep track of directories ending in .cache
 | 
			
		||||
!*.[Cc]ache/
 | 
			
		||||
 | 
			
		||||
# Others
 | 
			
		||||
ClientBin/
 | 
			
		||||
~$*
 | 
			
		||||
*~
 | 
			
		||||
*.dbmdl
 | 
			
		||||
*.dbproj.schemaview
 | 
			
		||||
*.jfm
 | 
			
		||||
*.pfx
 | 
			
		||||
*.publishsettings
 | 
			
		||||
node_modules/
 | 
			
		||||
orleans.codegen.cs
 | 
			
		||||
 | 
			
		||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
 | 
			
		||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
 | 
			
		||||
#bower_components/
 | 
			
		||||
 | 
			
		||||
# RIA/Silverlight projects
 | 
			
		||||
Generated_Code/
 | 
			
		||||
 | 
			
		||||
# Backup & report files from converting an old project file
 | 
			
		||||
# to a newer Visual Studio version. Backup files are not needed,
 | 
			
		||||
# because we have git ;-)
 | 
			
		||||
_UpgradeReport_Files/
 | 
			
		||||
Backup*/
 | 
			
		||||
UpgradeLog*.XML
 | 
			
		||||
UpgradeLog*.htm
 | 
			
		||||
 | 
			
		||||
# SQL Server files
 | 
			
		||||
*.mdf
 | 
			
		||||
*.ldf
 | 
			
		||||
 | 
			
		||||
# Business Intelligence projects
 | 
			
		||||
*.rdl.data
 | 
			
		||||
*.bim.layout
 | 
			
		||||
*.bim_*.settings
 | 
			
		||||
 | 
			
		||||
# Microsoft Fakes
 | 
			
		||||
FakesAssemblies/
 | 
			
		||||
 | 
			
		||||
# GhostDoc plugin setting file
 | 
			
		||||
*.GhostDoc.xml
 | 
			
		||||
 | 
			
		||||
# Node.js Tools for Visual Studio
 | 
			
		||||
.ntvs_analysis.dat
 | 
			
		||||
 | 
			
		||||
# Visual Studio 6 build log
 | 
			
		||||
*.plg
 | 
			
		||||
 | 
			
		||||
# Visual Studio 6 workspace options file
 | 
			
		||||
*.opt
 | 
			
		||||
 | 
			
		||||
# Visual Studio LightSwitch build output
 | 
			
		||||
**/*.HTMLClient/GeneratedArtifacts
 | 
			
		||||
**/*.DesktopClient/GeneratedArtifacts
 | 
			
		||||
**/*.DesktopClient/ModelManifest.xml
 | 
			
		||||
**/*.Server/GeneratedArtifacts
 | 
			
		||||
**/*.Server/ModelManifest.xml
 | 
			
		||||
_Pvt_Extensions
 | 
			
		||||
 | 
			
		||||
# Paket dependency manager
 | 
			
		||||
.paket/paket.exe
 | 
			
		||||
paket-files/
 | 
			
		||||
 | 
			
		||||
# FAKE - F# Make
 | 
			
		||||
.fake/
 | 
			
		||||
 | 
			
		||||
# JetBrains Rider
 | 
			
		||||
.idea/
 | 
			
		||||
*.sln.iml
 | 
			
		||||
 | 
			
		||||
# CodeRush
 | 
			
		||||
.cr/
 | 
			
		||||
 | 
			
		||||
# Python Tools for Visual Studio (PTVS)
 | 
			
		||||
__pycache__/
 | 
			
		||||
*.pyc
 | 
			
		||||
							
								
								
									
										25
									
								
								Source/RimNudeWorld/RimNudeWorld.sln
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								Source/RimNudeWorld/RimNudeWorld.sln
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,25 @@
 | 
			
		|||
 | 
			
		||||
Microsoft Visual Studio Solution File, Format Version 12.00
 | 
			
		||||
# Visual Studio 15
 | 
			
		||||
VisualStudioVersion = 15.0.28307.1022
 | 
			
		||||
MinimumVisualStudioVersion = 10.0.40219.1
 | 
			
		||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RimNudeWorld", "RimNudeWorld\RimNudeWorld.csproj", "{097B6685-662D-44A7-A082-E1060E81D9D2}"
 | 
			
		||||
EndProject
 | 
			
		||||
Global
 | 
			
		||||
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 | 
			
		||||
		Debug|Any CPU = Debug|Any CPU
 | 
			
		||||
		Release|Any CPU = Release|Any CPU
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 | 
			
		||||
		{097B6685-662D-44A7-A082-E1060E81D9D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 | 
			
		||||
		{097B6685-662D-44A7-A082-E1060E81D9D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
 | 
			
		||||
		{097B6685-662D-44A7-A082-E1060E81D9D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
			
		||||
		{097B6685-662D-44A7-A082-E1060E81D9D2}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(SolutionProperties) = preSolution
 | 
			
		||||
		HideSolutionNode = FALSE
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(ExtensibilityGlobals) = postSolution
 | 
			
		||||
		SolutionGuid = {9B2711CD-40A4-4E3C-A6D1-036AAC4A245C}
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
EndGlobal
 | 
			
		||||
							
								
								
									
										17
									
								
								Source/RimNudeWorld/RimNudeWorld/CachedGraphics.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								Source/RimNudeWorld/RimNudeWorld/CachedGraphics.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,17 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RimNudeWorld
 | 
			
		||||
{
 | 
			
		||||
    public static class CachedGraphics
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public static Dictionary<string, Graphic> LewdGraphics = new Dictionary<string, Graphic>();
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										36
									
								
								Source/RimNudeWorld/RimNudeWorld/Properties/AssemblyInfo.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								Source/RimNudeWorld/RimNudeWorld/Properties/AssemblyInfo.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -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("RimNudeWorld")]
 | 
			
		||||
[assembly: AssemblyDescription("")]
 | 
			
		||||
[assembly: AssemblyConfiguration("")]
 | 
			
		||||
[assembly: AssemblyCompany("")]
 | 
			
		||||
[assembly: AssemblyProduct("RimNudeWorld")]
 | 
			
		||||
[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("097b6685-662d-44a7-a082-e1060e81d9d2")]
 | 
			
		||||
 | 
			
		||||
// 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")]
 | 
			
		||||
							
								
								
									
										81
									
								
								Source/RimNudeWorld/RimNudeWorld/RimNudeWorld.csproj
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								Source/RimNudeWorld/RimNudeWorld/RimNudeWorld.csproj
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,81 @@
 | 
			
		|||
<?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>{097B6685-662D-44A7-A082-E1060E81D9D2}</ProjectGuid>
 | 
			
		||||
    <OutputType>Library</OutputType>
 | 
			
		||||
    <AppDesignerFolder>Properties</AppDesignerFolder>
 | 
			
		||||
    <RootNamespace>RimNudeWorld</RootNamespace>
 | 
			
		||||
    <AssemblyName>RimNudeWorld</AssemblyName>
 | 
			
		||||
    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
 | 
			
		||||
    <FileAlignment>512</FileAlignment>
 | 
			
		||||
    <Deterministic>true</Deterministic>
 | 
			
		||||
    <TargetFrameworkProfile />
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
 | 
			
		||||
    <DebugSymbols>false</DebugSymbols>
 | 
			
		||||
    <DebugType>none</DebugType>
 | 
			
		||||
    <Optimize>false</Optimize>
 | 
			
		||||
    <OutputPath>..\..\..\1.3 Assembly\Assemblies\</OutputPath>
 | 
			
		||||
    <DefineConstants>DEBUG;TRACE</DefineConstants>
 | 
			
		||||
    <ErrorReport>prompt</ErrorReport>
 | 
			
		||||
    <WarningLevel>4</WarningLevel>
 | 
			
		||||
    <Prefer32Bit>false</Prefer32Bit>
 | 
			
		||||
  </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>
 | 
			
		||||
    <Prefer32Bit>false</Prefer32Bit>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <Reference Include="0Harmony">
 | 
			
		||||
      <HintPath>..\..\..\..\..\..\..\workshop\content\294100\2009463077\Current\Assemblies\0Harmony.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="AlienRace">
 | 
			
		||||
      <HintPath>..\..\..\..\..\..\..\workshop\content\294100\839005762\1.3\Assemblies\AlienRace.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="Assembly-CSharp">
 | 
			
		||||
      <HintPath>..\..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="RJW">
 | 
			
		||||
      <HintPath>..\..\..\..\RJW-4.8.2\1.3\Assemblies\RJW.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </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>..\..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="UnityEngine.CoreModule">
 | 
			
		||||
      <HintPath>..\..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <Compile Include="CachedGraphics.cs" />
 | 
			
		||||
    <Compile Include="patches\BodyTypeAddon.cs" />
 | 
			
		||||
    <Compile Include="patches\HarmonyPatch_GetErect.cs" />
 | 
			
		||||
    <Compile Include="patches\HAR\HarmonyPatch_GenitalRotation.cs" />
 | 
			
		||||
    <Compile Include="patches\RevealingApparel.cs" />
 | 
			
		||||
    <Compile Include="patches\rjw\HarmonyPatch_AddBodyGraphicForRJW.cs" />
 | 
			
		||||
    <Compile Include="patches\rjw\HarmonyPatch_ResolveGraphicsOnStart.cs" />
 | 
			
		||||
    <Compile Include="patches\rjw\HarmonyPatch_SwapBodyGraphicForRJW.cs" />
 | 
			
		||||
    <Compile Include="Properties\AssemblyInfo.cs" />
 | 
			
		||||
    <Compile Include="settings\NudeSettings.cs" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 | 
			
		||||
</Project>
 | 
			
		||||
							
								
								
									
										146
									
								
								Source/RimNudeWorld/RimNudeWorld/patches/BodyTypeAddon.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										146
									
								
								Source/RimNudeWorld/RimNudeWorld/patches/BodyTypeAddon.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,146 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using System.Reflection;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using HarmonyLib;
 | 
			
		||||
using Verse;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using AlienRace;
 | 
			
		||||
using rjw;
 | 
			
		||||
 | 
			
		||||
namespace RimNudeWorld
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    [StaticConstructorOnStartup]
 | 
			
		||||
    public class BodyTypeAddon
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public static bool IsLactating(Pawn pawn)
 | 
			
		||||
        {
 | 
			
		||||
            if (pawn != null)
 | 
			
		||||
            {
 | 
			
		||||
                if (pawn.RaceProps.Humanlike)
 | 
			
		||||
                {
 | 
			
		||||
                    foreach (Hediff hediff in pawn.health.hediffSet.hediffs)
 | 
			
		||||
                    {
 | 
			
		||||
                        if (hediff != null)
 | 
			
		||||
                        {
 | 
			
		||||
                            if (hediff.def.defName.Contains("Lactating") || hediff.def.defName.Contains("lactating"))
 | 
			
		||||
                            {
 | 
			
		||||
                                return true;
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        //[HarmonyAfter(new string[] { "net.example.plugin2" })]
 | 
			
		||||
        [HarmonyPatch(typeof(AlienPartGenerator.BodyAddon), "GetPath")]
 | 
			
		||||
        class HARPatch
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            public static void Postfix(Pawn pawn, ref Graphic __result)
 | 
			
		||||
            {
 | 
			
		||||
                if (__result != null)
 | 
			
		||||
                {
 | 
			
		||||
                    if (pawn == null)
 | 
			
		||||
                        return;
 | 
			
		||||
                    string originalPath = __result.path;
 | 
			
		||||
                    bool validTexture = false;
 | 
			
		||||
 | 
			
		||||
                    //Body typed texture
 | 
			
		||||
                    if (pawn.story.bodyType == BodyTypeDefOf.Hulk || pawn.story.bodyType == BodyTypeDefOf.Fat)
 | 
			
		||||
                    {
 | 
			
		||||
                        if (pawn.story.bodyType == BodyTypeDefOf.Hulk)
 | 
			
		||||
                        {
 | 
			
		||||
                            if ((ContentFinder<Texture2D>.Get(originalPath + "_Hulk" + "_south", false) != null))
 | 
			
		||||
                            {
 | 
			
		||||
                                Graphic newGraphic = GraphicDatabase.Get<Graphic_Multi>(originalPath + "_Hulk", __result.Shader, __result.drawSize, __result.color, __result.colorTwo);
 | 
			
		||||
                                __result = newGraphic;
 | 
			
		||||
                                validTexture = true;
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                        else if (pawn.story.bodyType == BodyTypeDefOf.Fat)
 | 
			
		||||
                        {
 | 
			
		||||
                            if ((ContentFinder<Texture2D>.Get(originalPath + "_Fat" + "_south", false) != null))
 | 
			
		||||
                            {
 | 
			
		||||
                                Graphic newGraphic = GraphicDatabase.Get<Graphic_Multi>(originalPath + "_Fat", __result.Shader, __result.drawSize, __result.color, __result.colorTwo);
 | 
			
		||||
                                __result = newGraphic;
 | 
			
		||||
                                validTexture = true;
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                        if (validTexture == false)
 | 
			
		||||
                        {
 | 
			
		||||
                            if ((ContentFinder<Texture2D>.Get(originalPath + "_Wide" + "_south", false) != null))
 | 
			
		||||
                            {
 | 
			
		||||
                                Graphic newGraphic = GraphicDatabase.Get<Graphic_Multi>(originalPath + "_Wide", __result.Shader, __result.drawSize, __result.color, __result.colorTwo);
 | 
			
		||||
                                __result = newGraphic;
 | 
			
		||||
                                validTexture = true;
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    else if (pawn.story.bodyType == BodyTypeDefOf.Thin)
 | 
			
		||||
                    {
 | 
			
		||||
                        if ((ContentFinder<Texture2D>.Get(originalPath + "_Thin" + "_south", false) != null))
 | 
			
		||||
                        {
 | 
			
		||||
                            Graphic newGraphic = GraphicDatabase.Get<Graphic_Multi>(originalPath + "_Thin", __result.Shader, __result.drawSize, __result.color, __result.colorTwo);
 | 
			
		||||
                            __result = newGraphic;
 | 
			
		||||
                            validTexture = true;
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    else if (pawn.story.bodyType == BodyTypeDefOf.Male)
 | 
			
		||||
                    {
 | 
			
		||||
                        if ((ContentFinder<Texture2D>.Get(originalPath + "_Male" + "_south", false) != null))
 | 
			
		||||
                        {
 | 
			
		||||
                            Graphic newGraphic = GraphicDatabase.Get<Graphic_Multi>(originalPath + "_Male", __result.Shader, __result.drawSize, __result.color, __result.colorTwo);
 | 
			
		||||
                            __result = newGraphic;
 | 
			
		||||
                            validTexture = true;
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    else if (pawn.story.bodyType == BodyTypeDefOf.Female)
 | 
			
		||||
                    {
 | 
			
		||||
                        if ((ContentFinder<Texture2D>.Get(originalPath + "_Female" + "_south", false) != null))
 | 
			
		||||
                        {
 | 
			
		||||
                            Graphic newGraphic = GraphicDatabase.Get<Graphic_Multi>(originalPath + "_Female", __result.Shader, __result.drawSize, __result.color, __result.colorTwo);
 | 
			
		||||
                            __result = newGraphic;
 | 
			
		||||
                            validTexture = true;
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    else
 | 
			
		||||
                    {
 | 
			
		||||
                        string bodyname = pawn.story.bodyType.defName;
 | 
			
		||||
                        if ((ContentFinder<Texture2D>.Get(originalPath + "_" + bodyname + "_south", false) != null))
 | 
			
		||||
                        {
 | 
			
		||||
                            Graphic newGraphic = GraphicDatabase.Get<Graphic_Multi>(originalPath + "_" + bodyname, __result.Shader, __result.drawSize, __result.color, __result.colorTwo);
 | 
			
		||||
                            __result = newGraphic;
 | 
			
		||||
                            validTexture = true;
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    //lactation
 | 
			
		||||
                    if (IsLactating(pawn))
 | 
			
		||||
                    {
 | 
			
		||||
                        //Log.Message("finding Lactation Texture");
 | 
			
		||||
                        if ((ContentFinder<Texture2D>.Get(__result.path + "_Lactating" + "_south", false) != null))
 | 
			
		||||
                        {
 | 
			
		||||
                            Graphic newGraphic = GraphicDatabase.Get<Graphic_Multi>(__result.path + "_Lactating", __result.Shader, __result.drawSize, __result.color, __result.colorTwo);
 | 
			
		||||
                            __result = newGraphic;
 | 
			
		||||
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,119 @@
 | 
			
		|||
using HarmonyLib;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Reflection;
 | 
			
		||||
using System.Reflection.Emit;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using Verse;
 | 
			
		||||
using AlienRace;
 | 
			
		||||
using rjw;
 | 
			
		||||
 | 
			
		||||
namespace RimNudeWorld
 | 
			
		||||
{
 | 
			
		||||
	/*
 | 
			
		||||
	[HarmonyPatch(typeof(AlienRace.HarmonyPatches), "DrawAddons")]
 | 
			
		||||
	[HarmonyPriority(399)]
 | 
			
		||||
	public static class HarmonyPatch_AlienRace
 | 
			
		||||
	{
 | 
			
		||||
 | 
			
		||||
		const float PawnGenitalAngleIfPregnant = 15f;
 | 
			
		||||
 | 
			
		||||
		public static bool Prefix(bool portrait, Vector3 vector, Vector3 headOffset, Pawn pawn, Quaternion quat, Rot4 rotation, bool invisible)
 | 
			
		||||
		{
 | 
			
		||||
 | 
			
		||||
			if (!pawn.IsVisiblyPregnant()) return true;
 | 
			
		||||
			if (!(pawn.def is ThingDef_AlienRace alienProps) || invisible) return false;
 | 
			
		||||
 | 
			
		||||
			List<AlienPartGenerator.BodyAddon> addons = alienProps.alienRace.generalSettings.alienPartGenerator.bodyAddons;
 | 
			
		||||
			AlienPartGenerator.AlienComp alienComp = pawn.GetComp<AlienPartGenerator.AlienComp>();
 | 
			
		||||
 | 
			
		||||
			for (int i = 0; i < addons.Count; i++)
 | 
			
		||||
			{
 | 
			
		||||
				AlienPartGenerator.BodyAddon ba = addons[index: i];
 | 
			
		||||
				if (!ba.CanDrawAddon(pawn: pawn)) continue;
 | 
			
		||||
 | 
			
		||||
				AlienPartGenerator.RotationOffset offset;
 | 
			
		||||
				offset = rotation == Rot4.South ?
 | 
			
		||||
									ba.offsets.south :
 | 
			
		||||
									rotation == Rot4.North ?
 | 
			
		||||
										ba.offsets.north :
 | 
			
		||||
										rotation == Rot4.East ?
 | 
			
		||||
										ba.offsets.east :
 | 
			
		||||
										ba.offsets.west;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
				Vector2 bodyOffset = (portrait ? offset?.portraitBodyTypes ?? offset?.bodyTypes : offset?.bodyTypes)?.FirstOrDefault(predicate: to => to.bodyType == pawn.story.bodyType)
 | 
			
		||||
								   ?.offset ?? Vector2.zero;
 | 
			
		||||
				Vector2 crownOffset = (portrait ? offset?.portraitCrownTypes ?? offset?.crownTypes : offset?.crownTypes)?.FirstOrDefault(predicate: to => to.crownType == alienComp.crownType)
 | 
			
		||||
									?.offset ?? Vector2.zero;
 | 
			
		||||
 | 
			
		||||
				//Defaults for tails 
 | 
			
		||||
				//south 0.42f, -0.3f, -0.22f
 | 
			
		||||
				//north     0f,  0.3f, -0.55f
 | 
			
		||||
				//east -0.42f, -0.3f, -0.22f   
 | 
			
		||||
 | 
			
		||||
				float genitalRotation = -1*PawnGenitalAngleIfPregnant;
 | 
			
		||||
 | 
			
		||||
				float moffsetX = 0.42f;
 | 
			
		||||
				float moffsetZ = -0.22f;
 | 
			
		||||
 | 
			
		||||
				float layerOffset = offset?.layerOffset ?? ba.layerOffset;
 | 
			
		||||
 | 
			
		||||
				float moffsetY = ba.inFrontOfBody ? 0.3f + ba.layerOffset : -0.3f - ba.layerOffset;
 | 
			
		||||
				float num = ba.angle;
 | 
			
		||||
 | 
			
		||||
				if (rotation == Rot4.North)
 | 
			
		||||
				{
 | 
			
		||||
					genitalRotation = 0;
 | 
			
		||||
					moffsetX = 0f;
 | 
			
		||||
					if (ba.layerInvert)
 | 
			
		||||
						moffsetY = -moffsetY;
 | 
			
		||||
 | 
			
		||||
					moffsetZ = -0.55f;
 | 
			
		||||
					num = 0;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				if(rotation == Rot4.South)
 | 
			
		||||
                {
 | 
			
		||||
					genitalRotation = 0;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
				moffsetX += bodyOffset.x + crownOffset.x;
 | 
			
		||||
				moffsetZ += bodyOffset.y + crownOffset.y;
 | 
			
		||||
 | 
			
		||||
				if (rotation == Rot4.East)
 | 
			
		||||
				{
 | 
			
		||||
					genitalRotation *= -1;
 | 
			
		||||
					moffsetX = -moffsetX;
 | 
			
		||||
					num = -num; //Angle
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				Vector3 offsetVector = new Vector3(x: moffsetX, y: moffsetY, z: moffsetZ);
 | 
			
		||||
 | 
			
		||||
				//Angle calculation to not pick the shortest, taken from Quaternion.Angle and modified
 | 
			
		||||
 | 
			
		||||
				//assume drawnInBed means headAddon
 | 
			
		||||
				Graphic addonGraphic = alienComp.addonGraphics[i];
 | 
			
		||||
				addonGraphic.drawSize = (portrait && ba.drawSizePortrait != Vector2.zero ? ba.drawSizePortrait : ba.drawSize) * (ba.scaleWithPawnDrawsize ? alienComp.customDrawSize : Vector2.one) * 1.5f;
 | 
			
		||||
 | 
			
		||||
				Quaternion addonRotation = quat;
 | 
			
		||||
				if (ba?.hediffGraphics != null && ba.hediffGraphics.Count != 0 && ba.hediffGraphics[0]?.path != null && (ba.hediffGraphics[0].path.Contains("Penis") || ba.hediffGraphics[0].path.Contains("penis")))
 | 
			
		||||
				{
 | 
			
		||||
					addonRotation = Quaternion.AngleAxis(angle: genitalRotation, axis: Vector3.up);
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				GenDraw.DrawMeshNowOrLater(mesh: addonGraphic.MeshAt(rot: rotation), loc: vector + offsetVector.RotatedBy(angle: Mathf.Acos(f: Quaternion.Dot(a: Quaternion.identity, b: quat)) * 2f * 57.29578f),
 | 
			
		||||
				quat: Quaternion.AngleAxis(angle: num, axis: Vector3.up) * addonRotation, mat: addonGraphic.MatAt(rot: rotation), drawNow: portrait);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	*/
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,155 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using Verse;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using HarmonyLib;
 | 
			
		||||
using AlienRace;
 | 
			
		||||
using rjw;
 | 
			
		||||
using System.Reflection;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
 | 
			
		||||
namespace RimNudeWorld
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    [StaticConstructorOnStartup]
 | 
			
		||||
    static class HarmonyPatchAll {
 | 
			
		||||
 | 
			
		||||
        static HarmonyPatchAll() {
 | 
			
		||||
 | 
			
		||||
            Harmony har = new Harmony("RimNudeWorld");
 | 
			
		||||
            har.PatchAll(Assembly.GetExecutingAssembly());
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    [HarmonyPatch(typeof(AlienPartGenerator.BodyAddon), "GetPath")]
 | 
			
		||||
    public static class GenitalPatch {
 | 
			
		||||
 | 
			
		||||
        public static readonly char[] NUMBERS = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
 | 
			
		||||
 | 
			
		||||
        public static void Postfix(Pawn pawn, ref Graphic __result) {
 | 
			
		||||
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
 | 
			
		||||
                if (pawn == null)
 | 
			
		||||
                {
 | 
			
		||||
                    if (NudeSettings.debugMode)
 | 
			
		||||
                    {
 | 
			
		||||
                        Log.Message("Pawn is null; patch stopped");
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                else if (__result?.path == null)
 | 
			
		||||
                {
 | 
			
		||||
 | 
			
		||||
                    if (NudeSettings.debugMode)
 | 
			
		||||
                    {
 | 
			
		||||
                        Log.Message("Original graphic that's trying to be replaced doesn't exist!");
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
 | 
			
		||||
                    string originalPath = __result.path;
 | 
			
		||||
 | 
			
		||||
                    if (pawn.Dead)
 | 
			
		||||
                    {
 | 
			
		||||
 | 
			
		||||
                        if (NudeSettings.debugMode)
 | 
			
		||||
                        {
 | 
			
		||||
                            Log.Message("Attempting to remove corpse genitals...");
 | 
			
		||||
                        }
 | 
			
		||||
 | 
			
		||||
                        if (pawn.Corpse != null && pawn.Corpse.CurRotDrawMode == RotDrawMode.Dessicated && ((originalPath.Length > 8 && originalPath.Contains("Genitals")) || (originalPath.Length > 7 && originalPath.Contains("Breasts"))))
 | 
			
		||||
                        {
 | 
			
		||||
                            __result = GraphicDatabase.Get<Graphic_Multi>("Genitals/FeaturelessCrotch", __result.Shader, __result.drawSize, __result.color, __result.colorTwo);
 | 
			
		||||
                        }
 | 
			
		||||
                        return;
 | 
			
		||||
 | 
			
		||||
                    }
 | 
			
		||||
                    else if (NudeSettings.pubicHair && originalPath.Length >= 5 && originalPath.Contains("Pubes"))
 | 
			
		||||
                    {
 | 
			
		||||
 | 
			
		||||
                        __result = GraphicDatabase.Get<Graphic_Multi>("Genitals/Pubes/Shaved", __result.Shader, __result.drawSize, __result.color, __result.colorTwo);
 | 
			
		||||
                        return;
 | 
			
		||||
 | 
			
		||||
                    }
 | 
			
		||||
                    else if (originalPath.Length >= 9 && originalPath.Contains("penis"))
 | 
			
		||||
                    {
 | 
			
		||||
 | 
			
		||||
                        string modifiedPath = originalPath.Insert(9, "Flaccid/");
 | 
			
		||||
                        string modifiedPathNoNumber = originalPath.TrimEnd(NUMBERS).Length >= 9 ? originalPath.TrimEnd(NUMBERS).Insert(9, "Flaccid/") : "";
 | 
			
		||||
 | 
			
		||||
                        if (pawn.RaceHasSexNeed())
 | 
			
		||||
                        {
 | 
			
		||||
 | 
			
		||||
                            if (xxx.need_sex(pawn) > xxx.SexNeed.Frustrated && pawn?.jobs?.curDriver != null && !(pawn.jobs.curDriver is JobDriver_Sex))
 | 
			
		||||
                            {
 | 
			
		||||
 | 
			
		||||
                                if (ContentFinder<Texture2D>.Get(modifiedPath + "_north", false) != null)
 | 
			
		||||
                                {
 | 
			
		||||
 | 
			
		||||
                                    __result = GraphicDatabase.Get<Graphic_Multi>(modifiedPath, __result.Shader, __result.drawSize, __result.color, __result.colorTwo);
 | 
			
		||||
                                    if (NudeSettings.debugMode)
 | 
			
		||||
                                        Log.Message("Modifying path " + originalPath + " with " + modifiedPath);
 | 
			
		||||
                                    return;
 | 
			
		||||
                                }
 | 
			
		||||
                                else if (modifiedPathNoNumber != "" && ContentFinder<Texture2D>.Get(modifiedPathNoNumber + "_north", false) != null)
 | 
			
		||||
                                {
 | 
			
		||||
 | 
			
		||||
                                    __result = GraphicDatabase.Get<Graphic_Multi>(modifiedPathNoNumber, __result.Shader, __result.drawSize, __result.color, __result.colorTwo);
 | 
			
		||||
                                    if (NudeSettings.debugMode)
 | 
			
		||||
                                        Log.Message("Modifying path " + originalPath + " with " + modifiedPathNoNumber + " (with end numbers trimmed)");
 | 
			
		||||
                                    return;
 | 
			
		||||
 | 
			
		||||
                                }
 | 
			
		||||
                                else
 | 
			
		||||
                                {
 | 
			
		||||
 | 
			
		||||
                                    if (NudeSettings.debugMode)
 | 
			
		||||
                                    {
 | 
			
		||||
                                        Log.Message("Could not find " + modifiedPath + " or " + modifiedPathNoNumber + " (with end numbers trimmed)");
 | 
			
		||||
                                    }
 | 
			
		||||
 | 
			
		||||
                                }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                            }
 | 
			
		||||
                            else
 | 
			
		||||
                            {
 | 
			
		||||
                                if (NudeSettings.debugMode)
 | 
			
		||||
                                    Log.Message("Pawn is either: horny or has jobdriver sex");
 | 
			
		||||
                            }
 | 
			
		||||
 | 
			
		||||
                        }
 | 
			
		||||
                        else
 | 
			
		||||
                        {
 | 
			
		||||
                            if (NudeSettings.debugMode)
 | 
			
		||||
                                Log.Message("Pawn race does not have sexneed");
 | 
			
		||||
                        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    }
 | 
			
		||||
                    else
 | 
			
		||||
                    {
 | 
			
		||||
                        if (NudeSettings.debugMode)
 | 
			
		||||
                            Log.Message(originalPath + " does not contain string \"penis\" or is shorter than a length of 9");
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            catch (NullReferenceException e)
 | 
			
		||||
            {
 | 
			
		||||
                Log.Message(e.Message + " " + e.Source);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										254
									
								
								Source/RimNudeWorld/RimNudeWorld/patches/RevealingApparel.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										254
									
								
								Source/RimNudeWorld/RimNudeWorld/patches/RevealingApparel.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,254 @@
 | 
			
		|||
using AlienRace;
 | 
			
		||||
using HarmonyLib;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
namespace RevealingApparel
 | 
			
		||||
{
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    //[StaticConstructorOnStartup]
 | 
			
		||||
    // public static class HarmonyPatching
 | 
			
		||||
    //    {
 | 
			
		||||
 | 
			
		||||
    //        static HarmonyPatching()
 | 
			
		||||
    //        {
 | 
			
		||||
    //            Harmony harmony = new Harmony("RevealingApparel");
 | 
			
		||||
    //            harmony.PatchAll();           
 | 
			
		||||
    //        }
 | 
			
		||||
    //    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public class ApparelRevealingExtension : DefModExtension
 | 
			
		||||
    {
 | 
			
		||||
        public List<RevealingExtensionEntry> revealingBodyPartEntries = new List<RevealingExtensionEntry>();
 | 
			
		||||
 | 
			
		||||
        public ApparelRevealingExtension()
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class RevealingExtensionEntry
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public String revealingPath;
 | 
			
		||||
        public List<BodyTypeDef> revealingBodyTypes = new List<BodyTypeDef>();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public static class RevealingApparel
 | 
			
		||||
    {
 | 
			
		||||
        public static bool CanDrawRevealing(AlienPartGenerator.BodyAddon bodyAddon, Pawn pawn)
 | 
			
		||||
        {
 | 
			
		||||
            // the below 2 conditions are added by CnArmor in attempt to fix conflict with MoHAR.
 | 
			
		||||
            if (pawn.apparel.WornApparel != null && pawn.apparel.WornApparel.Count == 0)   //no need to bother if pawn is naked
 | 
			
		||||
                return false;
 | 
			
		||||
 | 
			
		||||
            //if body addon is not mentioned in that list, don't bother
 | 
			
		||||
            bool bodyAddonMentioned = false;
 | 
			
		||||
            if(pawn.apparel.WornApparel != null)
 | 
			
		||||
            {
 | 
			
		||||
                for(int i = 0; i < pawn.apparel.WornApparel.Count; i++)
 | 
			
		||||
                {
 | 
			
		||||
                    Apparel apparel = pawn.apparel.WornApparel[i];
 | 
			
		||||
                    ApparelRevealingExtension ARE = apparel.def.GetModExtension<ApparelRevealingExtension>();
 | 
			
		||||
                    if (ARE != null && ARE.revealingBodyPartEntries.Any((RevealingExtensionEntry ree) => (bodyAddon.path == ree.revealingPath)))
 | 
			
		||||
                    {
 | 
			
		||||
                        bodyAddonMentioned = true;
 | 
			
		||||
                        break;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                if (bodyAddonMentioned == false)
 | 
			
		||||
                    return false;
 | 
			
		||||
            }
 | 
			
		||||
            // the above 2 conditions are added by CnArmor in attempt to fix conflict with MoHAR. I didn't dare to touch the original code below because of complexity.
 | 
			
		||||
 | 
			
		||||
            BodyTypeDef pawnBodyDef = pawn.story.bodyType;
 | 
			
		||||
 | 
			
		||||
            if (!(pawn.apparel.WornApparel == null) &&
 | 
			
		||||
 | 
			
		||||
                pawn.apparel.WornApparel.Where((Apparel ap)  //First fetching everything that covers the bodypart
 | 
			
		||||
                    => ap.def.apparel.bodyPartGroups.Any((BodyPartGroupDef bpgd)
 | 
			
		||||
                    => bodyAddon.hiddenUnderApparelFor.Contains(bpgd))
 | 
			
		||||
                    || ap.def.apparel.tags.Any((string s) => bodyAddon.hiddenUnderApparelTag.Contains(s)))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    .All((Apparel ap) //Then checking that list, if everything has the revealing flag for the current body, reveal
 | 
			
		||||
                    => (ap.def.GetModExtension<ApparelRevealingExtension>()?.revealingBodyPartEntries.Any((RevealingExtensionEntry revealingExtensionEntry)
 | 
			
		||||
                    => (bodyAddon.path.Contains(revealingExtensionEntry.revealingPath) && revealingExtensionEntry.revealingBodyTypes.Any((BodyTypeDef revealingBodyType) => pawnBodyDef.defName.Contains(revealingBodyType.defName))))
 | 
			
		||||
                    ?? false
 | 
			
		||||
 | 
			
		||||
                    )))
 | 
			
		||||
            {
 | 
			
		||||
 | 
			
		||||
                Building_Bed building_Bed = pawn.CurrentBed();
 | 
			
		||||
 | 
			
		||||
                if ((building_Bed == null || building_Bed.def.building.bed_showSleeperBody || bodyAddon.drawnInBed) && (bodyAddon.backstoryRequirement.NullOrEmpty() || pawn.story.AllBackstories.Any((Backstory b) => b.identifier == bodyAddon.backstoryRequirement)))
 | 
			
		||||
                {
 | 
			
		||||
                    if (!bodyAddon.drawnDesiccated)
 | 
			
		||||
                    {
 | 
			
		||||
                        Corpse corpse = pawn.Corpse;
 | 
			
		||||
                        if (corpse != null && corpse.GetRotStage() == RotStage.Dessicated)
 | 
			
		||||
                        {
 | 
			
		||||
                            return false;
 | 
			
		||||
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    if (!bodyAddon.bodyPart.NullOrEmpty() && !pawn.health.hediffSet.GetNotMissingParts(BodyPartHeight.Undefined, BodyPartDepth.Undefined, null, null).Any((BodyPartRecord bpr) => bpr.untranslatedCustomLabel == bodyAddon.bodyPart || bpr.def.defName == bodyAddon.bodyPart))
 | 
			
		||||
                    {
 | 
			
		||||
                        List<AlienPartGenerator.BodyAddonHediffGraphic> list = bodyAddon.hediffGraphics;
 | 
			
		||||
                        bool flag;
 | 
			
		||||
                        if (list == null)
 | 
			
		||||
                        {
 | 
			
		||||
                            flag = false;
 | 
			
		||||
                        }
 | 
			
		||||
                        else
 | 
			
		||||
                        {
 | 
			
		||||
                            flag = list.Any((AlienPartGenerator.BodyAddonHediffGraphic bahg) => bahg.hediff == HediffDefOf.MissingBodyPart);
 | 
			
		||||
                        }
 | 
			
		||||
                        if (!flag)
 | 
			
		||||
                        {
 | 
			
		||||
                            return false;
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    if ((pawn.gender == Gender.Female) ? bodyAddon.drawForFemale : bodyAddon.drawForMale)
 | 
			
		||||
                    {
 | 
			
		||||
                        //return bodyAddon.bodyTypeRequirement.NullOrEmpty() || pawn.story.bodyType.ToString() == bodyAddon.bodyTypeRequirement;
 | 
			
		||||
                        return bodyAddon.bodyTypeRequirement.NullOrEmpty() || pawn.story.bodyType.ToString() == bodyAddon.bodyTypeRequirement;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    [HarmonyPatch(typeof(AlienRace.HarmonyPatches), "DrawAddons")]
 | 
			
		||||
    class HarmonyPatch_DrawAddons
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        //[TweakValue("AAAInfrontAAAAAAAAtittyoffset", -0.1f, 0.1f)]
 | 
			
		||||
        private static float underClothingOffset = 0.0136f;
 | 
			
		||||
        //[TweakValue("AAABehindAAAAAAAAtittyoffset", -0.2f, 0.0f)]
 | 
			
		||||
        //private static float Behind = -0.1f;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public static void Postfix(PawnRenderFlags renderFlags, Vector3 vector, Vector3 headOffset, Pawn pawn, Quaternion quat, Rot4 rotation)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            ThingDef_AlienRace thingDef_AlienRace = pawn.def as ThingDef_AlienRace;
 | 
			
		||||
            if (thingDef_AlienRace == null || renderFlags.FlagSet(PawnRenderFlags.Invisible))
 | 
			
		||||
            {
 | 
			
		||||
                //Log.Message(pawn.def.defName);
 | 
			
		||||
                if (pawn.def.defName == "Human")
 | 
			
		||||
                {
 | 
			
		||||
                    //Log.Message(pawn.def.defName);
 | 
			
		||||
                }
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            Building_Bed building_Bed = pawn.CurrentBed();
 | 
			
		||||
 | 
			
		||||
            List<AlienPartGenerator.BodyAddon> bodyAddons = thingDef_AlienRace.alienRace.generalSettings.alienPartGenerator.bodyAddons;
 | 
			
		||||
            AlienPartGenerator.AlienComp comp = pawn.GetComp<AlienPartGenerator.AlienComp>();
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < bodyAddons.Count; i++)
 | 
			
		||||
            {
 | 
			
		||||
                AlienPartGenerator.BodyAddon bodyAddon = bodyAddons[i];
 | 
			
		||||
                if (!bodyAddon.CanDrawAddon(pawn) && RevealingApparel.CanDrawRevealing(bodyAddon, pawn)) //No need to draw twice
 | 
			
		||||
                {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    pawn.apparel.WornApparel.Any((Apparel ap)
 | 
			
		||||
                        => ap.def.apparel.bodyPartGroups.Any((BodyPartGroupDef bpgd)
 | 
			
		||||
                        => bodyAddon.hiddenUnderApparelFor.Contains(bpgd)));
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    AlienPartGenerator.RotationOffset offset = bodyAddon.defaultOffsets.GetOffset(rotation);
 | 
			
		||||
                    Vector3 a = (offset != null) ? offset.GetOffset(renderFlags.FlagSet(PawnRenderFlags.Portrait), pawn.story.bodyType, comp.crownType) : Vector3.zero;
 | 
			
		||||
                    AlienPartGenerator.RotationOffset offset2 = bodyAddon.offsets.GetOffset(rotation);
 | 
			
		||||
                    Vector3 vector2 = a + ((offset2 != null) ? offset2.GetOffset(renderFlags.FlagSet(PawnRenderFlags.Portrait), pawn.story.bodyType, comp.crownType) : Vector3.zero);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    vector2.y = (bodyAddon.inFrontOfBody ? (0.3f + vector2.y - underClothingOffset) : (-0.3f - vector2.y + underClothingOffset));
 | 
			
		||||
 | 
			
		||||
                    // Log.Message(pawn.def.defName +"  "+ bodyAddon.path + " has vector2.y " + vector2.y + "Default offset: " + bodyAddon.defaultOffsets.GetOffset(rotation).layerOffset);
 | 
			
		||||
 | 
			
		||||
                    if (bodyAddon.inFrontOfBody && vector2.y < 0f) //The offset of some bodyaddons is too far out of the "over body, under clothes"-range, e.g. OTY bellies.
 | 
			
		||||
                    {
 | 
			
		||||
                        vector2.y = 0.01f;
 | 
			
		||||
                    }
 | 
			
		||||
                    // Log.Message(pawn.def.defName + "  " + bodyAddon.path + " has now vector2.y " + vector2.y + "Default offset: " + bodyAddon.defaultOffsets.GetOffset(rotation).layerOffset);
 | 
			
		||||
 | 
			
		||||
                    float num = bodyAddon.angle;
 | 
			
		||||
                    if (rotation == Rot4.North)
 | 
			
		||||
                    {
 | 
			
		||||
                        if (bodyAddon.layerInvert)
 | 
			
		||||
                        {
 | 
			
		||||
                            vector2.y = -vector2.y;
 | 
			
		||||
                            vector2.y -= underClothingOffset * 2; //I am not sure why I am doing this, but it puts Anus under the pants layer.
 | 
			
		||||
                        }
 | 
			
		||||
                        num = 0f;
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    if (rotation == Rot4.East)
 | 
			
		||||
                    {
 | 
			
		||||
                        num = -num;
 | 
			
		||||
                        vector2.x = -vector2.x;
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    Vector3 outputVector = vector + (bodyAddon.alignWithHead ? headOffset : Vector3.zero) + vector2.RotatedBy(Mathf.Acos(Quaternion.Dot(Quaternion.identity, quat)) * 2f * 57.29578f);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    Graphic graphic = comp.addonGraphics[i];
 | 
			
		||||
                    graphic.drawSize = ((renderFlags.FlagSet(PawnRenderFlags.Portrait) && bodyAddon.drawSizePortrait != Vector2.zero) ? bodyAddon.drawSizePortrait : bodyAddon.drawSize) * (bodyAddon.scaleWithPawnDrawsize ? (bodyAddon.alignWithHead ? (renderFlags.FlagSet(PawnRenderFlags.Portrait) ? comp.customPortraitHeadDrawSize : comp.customHeadDrawSize) : (renderFlags.FlagSet(PawnRenderFlags.Portrait) ? comp.customPortraitDrawSize : comp.customDrawSize)) : Vector2.one) * 1.5f;
 | 
			
		||||
                    GenDraw.DrawMeshNowOrLater(
 | 
			
		||||
                        graphic.MeshAt(rotation),
 | 
			
		||||
                        outputVector,
 | 
			
		||||
                        Quaternion.AngleAxis(num, Vector3.up) * quat,
 | 
			
		||||
                        graphic.MatAt(rotation, null),
 | 
			
		||||
                        renderFlags.FlagSet(PawnRenderFlags.DrawNow));
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            //return true;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										235
									
								
								Source/RimNudeWorld/RimNudeWorld/patches/RevealingApparel.cs.bk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										235
									
								
								Source/RimNudeWorld/RimNudeWorld/patches/RevealingApparel.cs.bk
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,235 @@
 | 
			
		|||
using AlienRace;
 | 
			
		||||
using HarmonyLib;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
namespace RevealingApparel
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    //[StaticConstructorOnStartup]
 | 
			
		||||
    // public static class HarmonyPatching
 | 
			
		||||
    //    {
 | 
			
		||||
 | 
			
		||||
    //        static HarmonyPatching()
 | 
			
		||||
    //        {
 | 
			
		||||
    //            Harmony harmony = new Harmony("RevealingApparel");
 | 
			
		||||
    //            harmony.PatchAll();           
 | 
			
		||||
    //        }
 | 
			
		||||
    //    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public class ApparelRevealingExtension : DefModExtension
 | 
			
		||||
    {
 | 
			
		||||
        public List<RevealingExtensionEntry> revealingBodyPartEntries = new List<RevealingExtensionEntry>();
 | 
			
		||||
 | 
			
		||||
        public ApparelRevealingExtension()
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class RevealingExtensionEntry
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public String revealingPath;
 | 
			
		||||
        public List<BodyTypeDef> revealingBodyTypes = new List<BodyTypeDef>();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public static class RevealingApparel
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public static bool CanDrawRevealing(AlienPartGenerator.BodyAddon bodyAddon, Pawn pawn)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            BodyTypeDef pawnBodyDef = pawn.story.bodyType;
 | 
			
		||||
 | 
			
		||||
            if (!(pawn.apparel.WornApparel == null) &&
 | 
			
		||||
 | 
			
		||||
                pawn.apparel.WornApparel.Where((Apparel ap)  //First fetching everything that covers the bodypart
 | 
			
		||||
                    => ap.def.apparel.bodyPartGroups.Any((BodyPartGroupDef bpgd)
 | 
			
		||||
                    => bodyAddon.hiddenUnderApparelFor.Contains(bpgd))
 | 
			
		||||
                    || ap.def.apparel.tags.Any((string s) => bodyAddon.hiddenUnderApparelTag.Contains(s)))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    .All((Apparel ap) //Then checking that list, if everything has the revealing flag for the current body, reveal
 | 
			
		||||
                    => (ap.def.GetModExtension<ApparelRevealingExtension>()?.revealingBodyPartEntries.Any((RevealingExtensionEntry revealingExtensionEntry)
 | 
			
		||||
                    => (bodyAddon.path.Contains(revealingExtensionEntry.revealingPath) && revealingExtensionEntry.revealingBodyTypes.Any((BodyTypeDef revealingBodyType) => pawnBodyDef.defName.Contains(revealingBodyType.defName))))
 | 
			
		||||
                    ?? false
 | 
			
		||||
 | 
			
		||||
                    )))
 | 
			
		||||
            {
 | 
			
		||||
 | 
			
		||||
                Building_Bed building_Bed = pawn.CurrentBed();
 | 
			
		||||
 | 
			
		||||
                if ((building_Bed == null || building_Bed.def.building.bed_showSleeperBody || bodyAddon.drawnInBed) && (bodyAddon.backstoryRequirement.NullOrEmpty() || pawn.story.AllBackstories.Any((Backstory b) => b.identifier == bodyAddon.backstoryRequirement)))
 | 
			
		||||
                {
 | 
			
		||||
                    if (!bodyAddon.drawnDesiccated)
 | 
			
		||||
                    {
 | 
			
		||||
                        Corpse corpse = pawn.Corpse;
 | 
			
		||||
                        if (corpse != null && corpse.GetRotStage() == RotStage.Dessicated)
 | 
			
		||||
                        {
 | 
			
		||||
                            return false;
 | 
			
		||||
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    if (!bodyAddon.bodyPart.NullOrEmpty() && !pawn.health.hediffSet.GetNotMissingParts(BodyPartHeight.Undefined, BodyPartDepth.Undefined, null, null).Any((BodyPartRecord bpr) => bpr.untranslatedCustomLabel == bodyAddon.bodyPart || bpr.def.defName == bodyAddon.bodyPart))
 | 
			
		||||
                    {
 | 
			
		||||
                        List<AlienPartGenerator.BodyAddonHediffGraphic> list = bodyAddon.hediffGraphics;
 | 
			
		||||
                        bool flag;
 | 
			
		||||
                        if (list == null)
 | 
			
		||||
                        {
 | 
			
		||||
                            flag = false;
 | 
			
		||||
                        }
 | 
			
		||||
                        else
 | 
			
		||||
                        {
 | 
			
		||||
                            flag = list.Any((AlienPartGenerator.BodyAddonHediffGraphic bahg) => bahg.hediff == HediffDefOf.MissingBodyPart);
 | 
			
		||||
                        }
 | 
			
		||||
                        if (!flag)
 | 
			
		||||
                        {
 | 
			
		||||
                            return false;
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    if ((pawn.gender == Gender.Female) ? bodyAddon.drawForFemale : bodyAddon.drawForMale)
 | 
			
		||||
                    {
 | 
			
		||||
                        //return bodyAddon.bodyTypeRequirement.NullOrEmpty() || pawn.story.bodyType.ToString() == bodyAddon.bodyTypeRequirement;
 | 
			
		||||
                        return bodyAddon.bodyTypeRequirement.NullOrEmpty() || pawn.story.bodyType.ToString() == bodyAddon.bodyTypeRequirement;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    [HarmonyPatch(typeof(AlienRace.HarmonyPatches), "DrawAddons")]
 | 
			
		||||
    class HarmonyPatch_DrawAddons
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        //[TweakValue("AAAInfrontAAAAAAAAtittyoffset", -0.1f, 0.1f)]
 | 
			
		||||
        private static float underClothingOffset = 0.0136f;
 | 
			
		||||
        //[TweakValue("AAABehindAAAAAAAAtittyoffset", -0.2f, 0.0f)]
 | 
			
		||||
        //private static float Behind = -0.1f;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public static void Postfix(PawnRenderFlags renderFlags, Vector3 vector, Vector3 headOffset, Pawn pawn, Quaternion quat, Rot4 rotation)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            ThingDef_AlienRace thingDef_AlienRace = pawn.def as ThingDef_AlienRace;
 | 
			
		||||
            if (thingDef_AlienRace == null || renderFlags.FlagSet(PawnRenderFlags.Invisible))
 | 
			
		||||
            {
 | 
			
		||||
                //Log.Message(pawn.def.defName);
 | 
			
		||||
                if (pawn.def.defName == "Human")
 | 
			
		||||
                {
 | 
			
		||||
                    //Log.Message(pawn.def.defName);
 | 
			
		||||
                }
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            Building_Bed building_Bed = pawn.CurrentBed();
 | 
			
		||||
 | 
			
		||||
            List<AlienPartGenerator.BodyAddon> bodyAddons = thingDef_AlienRace.alienRace.generalSettings.alienPartGenerator.bodyAddons;
 | 
			
		||||
            AlienPartGenerator.AlienComp comp = pawn.GetComp<AlienPartGenerator.AlienComp>();
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < bodyAddons.Count; i++)
 | 
			
		||||
            {
 | 
			
		||||
                AlienPartGenerator.BodyAddon bodyAddon = bodyAddons[i];
 | 
			
		||||
                if (!bodyAddon.CanDrawAddon(pawn) && RevealingApparel.CanDrawRevealing(bodyAddon, pawn)) //No need to draw twice
 | 
			
		||||
                {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    pawn.apparel.WornApparel.Any((Apparel ap)
 | 
			
		||||
                        => ap.def.apparel.bodyPartGroups.Any((BodyPartGroupDef bpgd)
 | 
			
		||||
                        => bodyAddon.hiddenUnderApparelFor.Contains(bpgd)));
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    AlienPartGenerator.RotationOffset offset = bodyAddon.defaultOffsets.GetOffset(rotation);
 | 
			
		||||
                    Vector3 a = (offset != null) ? offset.GetOffset(renderFlags.FlagSet(PawnRenderFlags.Portrait), pawn.story.bodyType, comp.crownType) : Vector3.zero;
 | 
			
		||||
                    AlienPartGenerator.RotationOffset offset2 = bodyAddon.offsets.GetOffset(rotation);
 | 
			
		||||
                    Vector3 vector2 = a + ((offset2 != null) ? offset2.GetOffset(renderFlags.FlagSet(PawnRenderFlags.Portrait), pawn.story.bodyType, comp.crownType) : Vector3.zero);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    vector2.y = (bodyAddon.inFrontOfBody ? (0.3f + vector2.y - underClothingOffset) : (-0.3f - vector2.y + underClothingOffset));
 | 
			
		||||
 | 
			
		||||
                    // Log.Message(pawn.def.defName +"  "+ bodyAddon.path + " has vector2.y " + vector2.y + "Default offset: " + bodyAddon.defaultOffsets.GetOffset(rotation).layerOffset);
 | 
			
		||||
 | 
			
		||||
                    if (bodyAddon.inFrontOfBody && vector2.y < 0f) //The offset of some bodyaddons is too far out of the "over body, under clothes"-range, e.g. OTY bellies.
 | 
			
		||||
                    {
 | 
			
		||||
                        vector2.y = 0.01f;
 | 
			
		||||
                    }
 | 
			
		||||
                    // Log.Message(pawn.def.defName + "  " + bodyAddon.path + " has now vector2.y " + vector2.y + "Default offset: " + bodyAddon.defaultOffsets.GetOffset(rotation).layerOffset);
 | 
			
		||||
 | 
			
		||||
                    float num = bodyAddon.angle;
 | 
			
		||||
                    if (rotation == Rot4.North)
 | 
			
		||||
                    {
 | 
			
		||||
                        if (bodyAddon.layerInvert)
 | 
			
		||||
                        {
 | 
			
		||||
                            vector2.y = -vector2.y;
 | 
			
		||||
                            vector2.y -= underClothingOffset * 2; //I am not sure why I am doing this, but it puts Anus under the pants layer.
 | 
			
		||||
                        }
 | 
			
		||||
                        num = 0f;
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    if (rotation == Rot4.East)
 | 
			
		||||
                    {
 | 
			
		||||
                        num = -num;
 | 
			
		||||
                        vector2.x = -vector2.x;
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    Vector3 outputVector = vector + (bodyAddon.alignWithHead ? headOffset : Vector3.zero) + vector2.RotatedBy(Mathf.Acos(Quaternion.Dot(Quaternion.identity, quat)) * 2f * 57.29578f);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    Graphic graphic = comp.addonGraphics[i];
 | 
			
		||||
                    graphic.drawSize = ((renderFlags.FlagSet(PawnRenderFlags.Portrait) && bodyAddon.drawSizePortrait != Vector2.zero) ? bodyAddon.drawSizePortrait : bodyAddon.drawSize) * (bodyAddon.scaleWithPawnDrawsize ? (bodyAddon.alignWithHead ? (renderFlags.FlagSet(PawnRenderFlags.Portrait) ? comp.customPortraitHeadDrawSize : comp.customHeadDrawSize) : (renderFlags.FlagSet(PawnRenderFlags.Portrait) ? comp.customPortraitDrawSize : comp.customDrawSize)) : Vector2.one) * 1.5f;
 | 
			
		||||
                    GenDraw.DrawMeshNowOrLater(
 | 
			
		||||
                        graphic.MeshAt(rotation),
 | 
			
		||||
                        outputVector,
 | 
			
		||||
                        Quaternion.AngleAxis(num, Vector3.up) * quat,
 | 
			
		||||
                        graphic.MatAt(rotation, null),
 | 
			
		||||
                        renderFlags.FlagSet(PawnRenderFlags.DrawNow));
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            //return true;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,81 @@
 | 
			
		|||
using HarmonyLib;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
 | 
			
		||||
namespace RimNudeWorld
 | 
			
		||||
{
 | 
			
		||||
    [HarmonyPatch(typeof(PawnRenderer), "RenderPawnInternal",
 | 
			
		||||
        new Type[] { 
 | 
			
		||||
            typeof(Vector3),
 | 
			
		||||
            typeof(float),
 | 
			
		||||
            typeof(bool),
 | 
			
		||||
            typeof(Rot4),
 | 
			
		||||
            typeof(RotDrawMode),
 | 
			
		||||
            typeof(PawnRenderFlags)
 | 
			
		||||
        })]
 | 
			
		||||
    class HarmonyPatch_AddBodyGraphicForRJW
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public static Dictionary<Pawn, float> timeSinceSex = new Dictionary<Pawn, float>();
 | 
			
		||||
 | 
			
		||||
        public static void Postfix(PawnRenderer __instance, Pawn ___pawn, Vector3 rootLoc, float angle, bool renderBody, Rot4 bodyFacing, RotDrawMode bodyDrawType, PawnRenderFlags flags)
 | 
			
		||||
        {
 | 
			
		||||
            Pawn p = ___pawn;
 | 
			
		||||
            if (!Genital_Helper.has_penis_fertile(p) && !Genital_Helper.has_penis_infertile(p) && !Genital_Helper.has_multipenis(p))
 | 
			
		||||
            {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            string originalPath = __instance.graphics.nakedGraphic.path;
 | 
			
		||||
            string modifiedPath = originalPath + "_Lewd";
 | 
			
		||||
 | 
			
		||||
            if (ContentFinder<Texture2D>.Get(modifiedPath + "_north", false) != null)
 | 
			
		||||
            {
 | 
			
		||||
                if (p?.jobs?.curDriver != null && p.jobs.curDriver is JobDriver_Sex ||
 | 
			
		||||
                    (timeSinceSex.ContainsKey(p)))
 | 
			
		||||
                {
 | 
			
		||||
                    GraphicData originalGraphicData = p.ageTracker.CurKindLifeStage.bodyGraphicData;
 | 
			
		||||
                    Graphic lewdGraphic = CachedGraphics.LewdGraphics.TryGetValue(modifiedPath);
 | 
			
		||||
 | 
			
		||||
                    if(lewdGraphic != null)
 | 
			
		||||
                    {
 | 
			
		||||
                        Mesh lewdMesh = lewdGraphic.MeshAt(bodyFacing);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                        rootLoc.y = (bodyFacing == Rot4.South ? AltitudeLayer.PawnUnused + 1 : AltitudeLayer.LayingPawn - 1).AltitudeFor();
 | 
			
		||||
                        GenDraw.DrawMeshNowOrLater(lewdMesh, rootLoc, Quaternion.AngleAxis(angle, Vector3.up), lewdGraphic.MatAt(bodyFacing), flags.FlagSet(PawnRenderFlags.DrawNow));
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if(p?.jobs?.curDriver != null && p.jobs.curDriver is JobDriver_Sex)
 | 
			
		||||
                {
 | 
			
		||||
                    if(p.jobs.curDriver.ticksLeftThisToil <= 30f)
 | 
			
		||||
                    {
 | 
			
		||||
                        if(timeSinceSex.ContainsKey(p))
 | 
			
		||||
                        {
 | 
			
		||||
                            timeSinceSex[p] = GenTicks.TicksGame - Rand.Range(0, 180);
 | 
			
		||||
                        }
 | 
			
		||||
                        else
 | 
			
		||||
                        {
 | 
			
		||||
                            timeSinceSex.Add(p, GenTicks.TicksGame);
 | 
			
		||||
                        }
 | 
			
		||||
                        
 | 
			
		||||
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                else if(timeSinceSex.ContainsKey(p) && timeSinceSex[p] + 1000 < GenTicks.TicksGame) //time delay to disappearing texture on job end
 | 
			
		||||
                {
 | 
			
		||||
                    timeSinceSex.Remove(p);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,30 @@
 | 
			
		|||
using HarmonyLib;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RimNudeWorld {
 | 
			
		||||
 | 
			
		||||
    [HarmonyPatch(typeof(JobDriver_SexBaseInitiator), "Start")]
 | 
			
		||||
    class HarmonyPatch_ResolveGraphicsOnStart {
 | 
			
		||||
 | 
			
		||||
        public static void Prefix(JobDriver_SexBaseInitiator __instance) {
 | 
			
		||||
 | 
			
		||||
            //call resolveallgraphics to make sure genitalia are drawn during sex
 | 
			
		||||
 | 
			
		||||
            if(NudeSettings.debugMode) {
 | 
			
		||||
                Log.Message("Calling ResolveAllGraphics on pawns starting sex");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            __instance?.pawn?.Drawer?.renderer?.graphics?.ResolveAllGraphics();
 | 
			
		||||
            __instance?.Partner?.Drawer?.renderer?.graphics?.ResolveAllGraphics();
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,43 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using HarmonyLib;
 | 
			
		||||
using Verse;
 | 
			
		||||
using rjw;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
 | 
			
		||||
namespace RimNudeWorld
 | 
			
		||||
{
 | 
			
		||||
    
 | 
			
		||||
    [HarmonyPatch(typeof(PawnGraphicSet), "ResolveAllGraphics")]
 | 
			
		||||
    class HarmonyPatch_SwapBodyGraphicForRJW
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public static void Postfix(PawnGraphicSet __instance)
 | 
			
		||||
        {
 | 
			
		||||
            
 | 
			
		||||
            string originalPath = __instance.nakedGraphic.path;
 | 
			
		||||
            string modifiedPath = originalPath + "_Lewd";
 | 
			
		||||
 | 
			
		||||
            if (!CachedGraphics.LewdGraphics.ContainsKey(modifiedPath))
 | 
			
		||||
            {
 | 
			
		||||
                Pawn p = __instance.pawn;
 | 
			
		||||
                if (ContentFinder<Texture2D>.Get(modifiedPath + "_north", false) != null)
 | 
			
		||||
                {
 | 
			
		||||
                    GraphicData originalGraphicData = p.ageTracker.CurKindLifeStage.bodyGraphicData;
 | 
			
		||||
                    Graphic lewdGraphic = GraphicDatabase.Get(originalGraphicData.graphicClass, modifiedPath, (originalGraphicData.shaderType == null ? ShaderTypeDefOf.Cutout.Shader : originalGraphicData.shaderType.Shader), originalGraphicData.drawSize, originalGraphicData.color, originalGraphicData.colorTwo, originalGraphicData, originalGraphicData.shaderParameters);
 | 
			
		||||
 | 
			
		||||
                    CachedGraphics.LewdGraphics.Add(modifiedPath, lewdGraphic);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										49
									
								
								Source/RimNudeWorld/RimNudeWorld/settings/NudeSettings.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								Source/RimNudeWorld/RimNudeWorld/settings/NudeSettings.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,49 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
 | 
			
		||||
namespace RimNudeWorld {
 | 
			
		||||
    public class NudeSettings : ModSettings {
 | 
			
		||||
 | 
			
		||||
        public static bool debugMode = false, pubicHair = true;
 | 
			
		||||
 | 
			
		||||
        public override void ExposeData() {
 | 
			
		||||
            Scribe_Values.Look(ref debugMode, "RimNudeWorldDebugMode", false);
 | 
			
		||||
            Scribe_Values.Look(ref pubicHair, "PubicHair", false);
 | 
			
		||||
            base.ExposeData();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class RimNudeWorld : Mod {
 | 
			
		||||
 | 
			
		||||
        public RimNudeWorld(ModContentPack content) : base(content) {
 | 
			
		||||
            GetSettings<NudeSettings>();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void DoSettingsWindowContents(Rect inRect) {
 | 
			
		||||
 | 
			
		||||
            Listing_Standard listingStandard = new Listing_Standard();
 | 
			
		||||
            listingStandard.Begin(inRect);
 | 
			
		||||
 | 
			
		||||
            listingStandard.CheckboxLabeled("Debug Mode", ref NudeSettings.debugMode);
 | 
			
		||||
            listingStandard.CheckboxLabeled("Disable Pubic Hair (Might take a few seconds to update ingame)", ref NudeSettings.pubicHair);
 | 
			
		||||
 | 
			
		||||
            listingStandard.End();
 | 
			
		||||
 | 
			
		||||
            base.DoSettingsWindowContents(inRect);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override string SettingsCategory() {
 | 
			
		||||
            return "RimNudeWorld Settings";
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue