diff --git a/.gitignore b/.gitignore index 3210abc2..3f913b82 100644 --- a/.gitignore +++ b/.gitignore @@ -1,36 +1,61 @@ -# Windows image file caches +#About/PublishedFileId.txt # shouldn't be ignored; needed to ensure same Steam workshop item is updated (and is ignored outside of Steam anyway) +Source/DiscordWebhookToken.txt +updateinfo +RimworldModReleaseTool.exe + +# Ensure RimWorld/Unity assemblies are ignored +Assemblies/Assembly-CSharp*.dll +Assemblies/UnityEngine.*dll* +Assemblies/Unity.*dll +Assemblies/Mono.*dll +Assemblies/mscorlib.dll +Assemblies/System.*dll +Assemblies/TextMeshPro-*.dll +Assemblies/ISharpZipLib.dll +Assemblies/NAudio.dll +Assemblies/NVorbis.dll + + +## Ignore Windows temporary/cache files +## Get latest from https://github.com/github/gitignore/blob/master/Global/Windows.gitignore + +# Windows thumbnail cache files Thumbs.db +Thumbs.db:encryptable ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump # Folder config file -Desktop.ini +[Dd]esktop.ini # Recycle Bin used on file shares $RECYCLE.BIN/ -#folders we don't need -[Oo]bj/ - # Windows Installer files *.cab *.msi +*.msix *.msm *.msp # Windows shortcuts *.lnk -# ========================= -# Operating System Files -# ========================= -# OSX -# ========================= +## Ignore macOS temporary/cache files +## Get latest from https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General .DS_Store .AppleDouble .LSOverride +# Icon must end with two \r +Icon + # Thumbnails ._* @@ -41,6 +66,7 @@ $RECYCLE.BIN/ .TemporaryItems .Trashes .VolumeIcon.icns +.com.apple.timemachine.donotpresent # Directories potentially created on remote AFP share .AppleDB @@ -49,23 +75,6 @@ Network Trash Folder Temporary Items .apdisk -[Oo]bj/ -About/PublishedFileId.txt -Assemblies/Assembly-CSharp.dll -Assemblies/UnityEngine.dll -Assemblies/Assembly-CSharp-firstpass.dll -Assemblies/UnityEngine.UI.dll -Assemblies/TextMeshPro-1.0.55.56.0b11.dll -Assemblies/NAudio.dll -Assemblies/NVorbis.dll -Source/Dependencies -Source/DiscordWebhookToken.txt -updateinfo - - -# Prevents node or other packages. - -packages/ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. @@ -82,6 +91,9 @@ packages/ # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs +# Mono auto generated files +mono_crash.* + # Build results [Dd]ebug/ [Dd]ebugPublic/ @@ -89,10 +101,14 @@ packages/ [Rr]eleases/ x64/ x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ +[Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ @@ -106,9 +122,10 @@ Generated\ Files/ [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* -# NUNIT +# NUnit *.VisualState.xml TestResult.xml +nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ @@ -123,6 +140,9 @@ project.lock.json project.fragment.lock.json artifacts/ +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + # StyleCop StyleCopReport.xml @@ -189,9 +209,6 @@ _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user -# JustCode is a .NET coding add-in -.JustCode - # TeamCity is a build add-in _TeamCity* @@ -202,6 +219,9 @@ _TeamCity* .axoCover/* !.axoCover/settings.json +# Coverlet is a free, cross platform Code Coverage Tool +coverage*[.json, .xml, .info] + # Visual Studio code coverage results *.coverage *.coveragexml @@ -249,6 +269,8 @@ PublishScripts/ # NuGet Packages *.nupkg +# NuGet Symbol Packages +*.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. @@ -273,12 +295,14 @@ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx +*.appxbundle +*.appxupload # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache -!*.[Cc]ache/ +!?*.[Cc]ache/ # Others ClientBin/ @@ -322,6 +346,9 @@ ServiceFabricBackup/ *.bim.layout *.bim_*.settings *.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ @@ -357,10 +384,6 @@ paket-files/ # FAKE - F# Make .fake/ -# JetBrains Rider -.idea/ -*.sln.iml - # CodeRush personal settings .cr/personal @@ -401,11 +424,33 @@ ASALocalRun/ # Local History for Visual Studio .localhistory/ -*.ide-shm -*.ide-wal -Source/.vs/JecsTools/v15/.suo -Source/.vs/JecsTools/v15/.suo -Source/.vs/JecsTools/v15/Server/sqlite3/storage.ide-shm -Source/.vs/JecsTools/v15/.suo -Source/DiscordWebhookToken.txt -updateinfo + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# JetBrains Rider +.idea/ +*.sln.iml + + +## Ignore Visual Studio Code workspace and settings +## Get latest from https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore + +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite deleted file mode 100644 index dae54cad..00000000 Binary files a/.vs/slnx.sqlite and /dev/null differ diff --git a/1.3/Assemblies/AbilityUserAI.dll b/1.3/Assemblies/AbilityUserAI.dll index 75582f38..5d925ce5 100644 Binary files a/1.3/Assemblies/AbilityUserAI.dll and b/1.3/Assemblies/AbilityUserAI.dll differ diff --git a/1.3/Assemblies/CompActivatableEffect.dll b/1.3/Assemblies/CompActivatableEffect.dll index 16126188..8a31d133 100644 Binary files a/1.3/Assemblies/CompActivatableEffect.dll and b/1.3/Assemblies/CompActivatableEffect.dll differ diff --git a/1.3/Assemblies/CompAnimated.dll b/1.3/Assemblies/CompAnimated.dll index 09fdfc1e..cef92b7e 100644 Binary files a/1.3/Assemblies/CompAnimated.dll and b/1.3/Assemblies/CompAnimated.dll differ diff --git a/1.3/Assemblies/CompBalloon.dll b/1.3/Assemblies/CompBalloon.dll index 42220e93..2aa33200 100644 Binary files a/1.3/Assemblies/CompBalloon.dll and b/1.3/Assemblies/CompBalloon.dll differ diff --git a/1.3/Assemblies/CompBigBox.dll b/1.3/Assemblies/CompBigBox.dll index 31479095..879bcfbe 100644 Binary files a/1.3/Assemblies/CompBigBox.dll and b/1.3/Assemblies/CompBigBox.dll differ diff --git a/1.3/Assemblies/CompDeflector.dll b/1.3/Assemblies/CompDeflector.dll index d68d4221..da5ba8a7 100644 Binary files a/1.3/Assemblies/CompDeflector.dll and b/1.3/Assemblies/CompDeflector.dll differ diff --git a/1.3/Assemblies/CompDelayedSpawner.dll b/1.3/Assemblies/CompDelayedSpawner.dll index 234c054f..91cbd6fd 100644 Binary files a/1.3/Assemblies/CompDelayedSpawner.dll and b/1.3/Assemblies/CompDelayedSpawner.dll differ diff --git a/1.3/Assemblies/CompExtraSounds.dll b/1.3/Assemblies/CompExtraSounds.dll index feca712a..83cca71b 100644 Binary files a/1.3/Assemblies/CompExtraSounds.dll and b/1.3/Assemblies/CompExtraSounds.dll differ diff --git a/1.3/Assemblies/CompInstalledPart.dll b/1.3/Assemblies/CompInstalledPart.dll index b20777a3..39fd1101 100644 Binary files a/1.3/Assemblies/CompInstalledPart.dll and b/1.3/Assemblies/CompInstalledPart.dll differ diff --git a/1.3/Assemblies/CompLumbering.dll b/1.3/Assemblies/CompLumbering.dll index 1d1eb043..3cce4e10 100644 Binary files a/1.3/Assemblies/CompLumbering.dll and b/1.3/Assemblies/CompLumbering.dll differ diff --git a/1.3/Assemblies/CompOverlays.dll b/1.3/Assemblies/CompOverlays.dll index e70e9016..5bbe179e 100644 Binary files a/1.3/Assemblies/CompOverlays.dll and b/1.3/Assemblies/CompOverlays.dll differ diff --git a/1.3/Assemblies/CompOversizedWeapon.dll b/1.3/Assemblies/CompOversizedWeapon.dll index 7c546b78..b7c14cd0 100644 Binary files a/1.3/Assemblies/CompOversizedWeapon.dll and b/1.3/Assemblies/CompOversizedWeapon.dll differ diff --git a/1.3/Assemblies/CompSlotLoadable.dll b/1.3/Assemblies/CompSlotLoadable.dll index 06b90070..3be036ac 100644 Binary files a/1.3/Assemblies/CompSlotLoadable.dll and b/1.3/Assemblies/CompSlotLoadable.dll differ diff --git a/1.3/Assemblies/CompToggleDef.dll b/1.3/Assemblies/CompToggleDef.dll index 8698d401..2b1701db 100644 Binary files a/1.3/Assemblies/CompToggleDef.dll and b/1.3/Assemblies/CompToggleDef.dll differ diff --git a/1.3/Assemblies/PawnShields.dll b/1.3/Assemblies/PawnShields.dll index c805aad6..9190eab5 100644 Binary files a/1.3/Assemblies/PawnShields.dll and b/1.3/Assemblies/PawnShields.dll differ diff --git a/1.3/Assemblies/ThinkNodes.dll b/1.3/Assemblies/ThinkNodes.dll index 4a7f2957..bf2d6284 100644 Binary files a/1.3/Assemblies/ThinkNodes.dll and b/1.3/Assemblies/ThinkNodes.dll differ diff --git a/1.3/Languages/Japanese/Keyed/Grapple.xml b/1.3/Languages/Japanese/Keyed/Grapple.xml index 986a776d..10ab3a5d 100644 --- a/1.3/Languages/Japanese/Keyed/Grapple.xml +++ b/1.3/Languages/Japanese/Keyed/Grapple.xml @@ -1,11 +1,12 @@ - - - - 捕縛に成功 - 捕縛に失敗 - 倒れている相手:捕縛に成功 - 奇襲攻撃の相手:捕縛に成功 - 拘束中の相手:捕縛に成功 - 睡眠中の相手:捕縛に成功 - + + + + 捕縛に成功 + 捕縛に失敗 + 倒れている相手:捕縛に成功 + 奇襲攻撃の相手:捕縛に成功 + 拘束中の相手:捕縛に成功 + 睡眠中の相手:捕縛に成功 + 屠畜中の動物:捕縛に成功 + \ No newline at end of file diff --git a/1.4/Assemblies/0JecsTools.dll b/1.4/Assemblies/0JecsTools.dll index bf4e2c17..3f0619d0 100644 Binary files a/1.4/Assemblies/0JecsTools.dll and b/1.4/Assemblies/0JecsTools.dll differ diff --git a/1.4/Assemblies/AbilityUser.dll b/1.4/Assemblies/AbilityUser.dll index 48a22137..119acd95 100644 Binary files a/1.4/Assemblies/AbilityUser.dll and b/1.4/Assemblies/AbilityUser.dll differ diff --git a/1.4/Assemblies/AbilityUserAI.dll b/1.4/Assemblies/AbilityUserAI.dll index f6d31c81..ef2844ef 100644 Binary files a/1.4/Assemblies/AbilityUserAI.dll and b/1.4/Assemblies/AbilityUserAI.dll differ diff --git a/1.4/Assemblies/CompActivatableEffect.dll b/1.4/Assemblies/CompActivatableEffect.dll index d8a8fb82..f900c46e 100644 Binary files a/1.4/Assemblies/CompActivatableEffect.dll and b/1.4/Assemblies/CompActivatableEffect.dll differ diff --git a/1.4/Assemblies/CompAnimated.dll b/1.4/Assemblies/CompAnimated.dll index bccf873c..9a4d5991 100644 Binary files a/1.4/Assemblies/CompAnimated.dll and b/1.4/Assemblies/CompAnimated.dll differ diff --git a/1.4/Assemblies/CompBalloon.dll b/1.4/Assemblies/CompBalloon.dll index b30f8544..b2879f70 100644 Binary files a/1.4/Assemblies/CompBalloon.dll and b/1.4/Assemblies/CompBalloon.dll differ diff --git a/1.4/Assemblies/CompBigBox.dll b/1.4/Assemblies/CompBigBox.dll index 7ad69631..d6bf993a 100644 Binary files a/1.4/Assemblies/CompBigBox.dll and b/1.4/Assemblies/CompBigBox.dll differ diff --git a/1.4/Assemblies/CompDeflector.dll b/1.4/Assemblies/CompDeflector.dll index ed5bab0e..498b0e4a 100644 Binary files a/1.4/Assemblies/CompDeflector.dll and b/1.4/Assemblies/CompDeflector.dll differ diff --git a/1.4/Assemblies/CompDelayedSpawner.dll b/1.4/Assemblies/CompDelayedSpawner.dll index dd070d21..09a326c8 100644 Binary files a/1.4/Assemblies/CompDelayedSpawner.dll and b/1.4/Assemblies/CompDelayedSpawner.dll differ diff --git a/1.4/Assemblies/CompExtraSounds.dll b/1.4/Assemblies/CompExtraSounds.dll index 870924e8..bbef5229 100644 Binary files a/1.4/Assemblies/CompExtraSounds.dll and b/1.4/Assemblies/CompExtraSounds.dll differ diff --git a/1.4/Assemblies/CompInstalledPart.dll b/1.4/Assemblies/CompInstalledPart.dll index 7ba08e38..5b6d60f4 100644 Binary files a/1.4/Assemblies/CompInstalledPart.dll and b/1.4/Assemblies/CompInstalledPart.dll differ diff --git a/1.4/Assemblies/CompLumbering.dll b/1.4/Assemblies/CompLumbering.dll index 68b2c3e8..38a1c8c4 100644 Binary files a/1.4/Assemblies/CompLumbering.dll and b/1.4/Assemblies/CompLumbering.dll differ diff --git a/1.4/Assemblies/CompOverlays.dll b/1.4/Assemblies/CompOverlays.dll index a5df9371..8c3208a1 100644 Binary files a/1.4/Assemblies/CompOverlays.dll and b/1.4/Assemblies/CompOverlays.dll differ diff --git a/1.4/Assemblies/CompOversizedWeapon.dll b/1.4/Assemblies/CompOversizedWeapon.dll index 021db99b..dc273e84 100644 Binary files a/1.4/Assemblies/CompOversizedWeapon.dll and b/1.4/Assemblies/CompOversizedWeapon.dll differ diff --git a/1.4/Assemblies/CompSlotLoadable.dll b/1.4/Assemblies/CompSlotLoadable.dll index 251357e1..9b3fae54 100644 Binary files a/1.4/Assemblies/CompSlotLoadable.dll and b/1.4/Assemblies/CompSlotLoadable.dll differ diff --git a/1.4/Assemblies/CompToggleDef.dll b/1.4/Assemblies/CompToggleDef.dll index 67a33ecc..a9146861 100644 Binary files a/1.4/Assemblies/CompToggleDef.dll and b/1.4/Assemblies/CompToggleDef.dll differ diff --git a/1.4/Assemblies/PawnShields.dll b/1.4/Assemblies/PawnShields.dll index f8f157d2..680c59b6 100644 Binary files a/1.4/Assemblies/PawnShields.dll and b/1.4/Assemblies/PawnShields.dll differ diff --git a/1.4/Assemblies/ThinkNodes.dll b/1.4/Assemblies/ThinkNodes.dll index 694cd5b5..b9c9ec70 100644 Binary files a/1.4/Assemblies/ThinkNodes.dll and b/1.4/Assemblies/ThinkNodes.dll differ diff --git a/1.4/Languages/Japanese/Keyed/Grapple.xml b/1.4/Languages/Japanese/Keyed/Grapple.xml index 986a776d..1369b187 100644 --- a/1.4/Languages/Japanese/Keyed/Grapple.xml +++ b/1.4/Languages/Japanese/Keyed/Grapple.xml @@ -7,5 +7,6 @@ 奇襲攻撃の相手:捕縛に成功 拘束中の相手:捕縛に成功 睡眠中の相手:捕縛に成功 + 屠畜中の動物:捕縛に成功 \ No newline at end of file diff --git a/About/About.xml b/About/About.xml index 0a85bfd5..2b68befd 100644 --- a/About/About.xml +++ b/About/About.xml @@ -19,7 +19,7 @@ https://github.com/pardeike/HarmonyRimWorld/releases/latest - 1.3.0.5 (10-09-2022) + 1.4.0.0 (10-21-2022) Adds modding components to RimWorld: vehicles, spell casting, weapon slots, oversized weapons, and more! @@ -76,13 +76,26 @@ Michael Fisher, Storm D Bain, Luke Salinas, WonkyWoo WeebHoo, Daniel Schott, Rai ======================== Changelog ======================== +1.4.0.0 (10-21-2022) +======================== +Initial update for RimWorld 1.4 of JecsTools + +1.3.0.5 (10-09-2022) +======================== +Updated assemblies for RimWorld 1.4 unstable support. +- JecsTools BackstoryDef now inherits new RimWorld BackstoryDef setup. Once again based on erdelf's work. + 1.3.0.4 (08-08-2022) ======================== damageTypesToExclude was not working correctly and has been fixed. Grappling a pet will always succeed which should prevent some fustration. Credit for this update goes to Gefallener from our RoM Discord. +1.3.0.3b (07-31-2021) +==================== +Workaround for mod lists that contain other mods with an outdated copy of CompOversizedWeapon that's loaded before ours + 1.3.0.3 (07-30-2021) ======================== -Due to comptability issues, the patch for Enable Oversized Weapons will require additional work. Reverting back to the previous version. +Due to compatibility issues, the patch for Enable Oversized Weapons will require additional work. Reverting back to the previous version. 1.3.0.2 (07-29-2021) ======================== diff --git a/About/Changelog.txt b/About/Changelog.txt index 50a29654..e9716461 100644 --- a/About/Changelog.txt +++ b/About/Changelog.txt @@ -1,3 +1,7 @@ +1.4.0.0 (10-21-2022) +======================== +Initial update for RimWorld 1.4 of JecsTools + 1.3.0.5 (10-09-2022) ======================== Updated assemblies for RimWorld 1.4 unstable support. @@ -7,9 +11,13 @@ Updated assemblies for RimWorld 1.4 unstable support. ======================== damageTypesToExclude was not working correctly and has been fixed. Grappling a pet will always succeed which should prevent some fustration. Credit for this update goes to Gefallener from our RoM Discord. +1.3.0.3b (07-31-2021) +==================== +Workaround for mod lists that contain other mods with an outdated copy of CompOversizedWeapon that's loaded before ours + 1.3.0.3 (07-30-2021) ======================== -Due to comptability issues, the patch for Enable Oversized Weapons will require additional work. Reverting back to the previous version. +Due to compatibility issues, the patch for Enable Oversized Weapons will require additional work. Reverting back to the previous version. 1.3.0.2 (07-29-2021) ======================== diff --git a/About/Manifest.xml b/About/Manifest.xml index 61d04602..cbd9e1ab 100644 --- a/About/Manifest.xml +++ b/About/Manifest.xml @@ -1,7 +1,7 @@  JecsTools - 1.3.0.5 + 1.4.0.0 https://raw.githubusercontent.com/jecrell/JecsTools/master/About/Manifest.xml diff --git a/About/PatreonURL.txt b/About/PatreonURL.txt index dd02ada6..6c414d7d 100644 --- a/About/PatreonURL.txt +++ b/About/PatreonURL.txt @@ -1 +1 @@ -https://www.patreon.com/posts/54071148 \ No newline at end of file +https://www.patreon.com/posts/73617775 \ No newline at end of file diff --git a/About/Version.txt b/About/Version.txt index e474c207..149bb3c1 100644 --- a/About/Version.txt +++ b/About/Version.txt @@ -1 +1 @@ -1.3.0.5 +1.4.0.0 diff --git a/Assemblies/0Harmony.dll b/Assemblies/0Harmony.dll deleted file mode 100644 index 106a81a9..00000000 Binary files a/Assemblies/0Harmony.dll and /dev/null differ diff --git a/Assemblies/0JecsTools.dll b/Assemblies/0JecsTools.dll deleted file mode 100644 index 60d63d23..00000000 Binary files a/Assemblies/0JecsTools.dll and /dev/null differ diff --git a/Assemblies/AbilityUser.dll b/Assemblies/AbilityUser.dll deleted file mode 100644 index b9ce009d..00000000 Binary files a/Assemblies/AbilityUser.dll and /dev/null differ diff --git a/Assemblies/AbilityUserAI.dll b/Assemblies/AbilityUserAI.dll deleted file mode 100644 index 3783fa05..00000000 Binary files a/Assemblies/AbilityUserAI.dll and /dev/null differ diff --git a/Assemblies/CompActivatableEffect.dll b/Assemblies/CompActivatableEffect.dll deleted file mode 100644 index 8f49cb75..00000000 Binary files a/Assemblies/CompActivatableEffect.dll and /dev/null differ diff --git a/Assemblies/CompAnimated.dll b/Assemblies/CompAnimated.dll deleted file mode 100644 index 332d7e45..00000000 Binary files a/Assemblies/CompAnimated.dll and /dev/null differ diff --git a/Assemblies/CompBalloon.dll b/Assemblies/CompBalloon.dll deleted file mode 100644 index b0153a9c..00000000 Binary files a/Assemblies/CompBalloon.dll and /dev/null differ diff --git a/Assemblies/CompBigBox.dll b/Assemblies/CompBigBox.dll deleted file mode 100644 index 23b2662d..00000000 Binary files a/Assemblies/CompBigBox.dll and /dev/null differ diff --git a/Assemblies/CompDeflector.dll b/Assemblies/CompDeflector.dll deleted file mode 100644 index 5bccfdb2..00000000 Binary files a/Assemblies/CompDeflector.dll and /dev/null differ diff --git a/Assemblies/CompDelayedSpawner.dll b/Assemblies/CompDelayedSpawner.dll deleted file mode 100644 index a8602cd3..00000000 Binary files a/Assemblies/CompDelayedSpawner.dll and /dev/null differ diff --git a/Assemblies/CompExtraSounds.dll b/Assemblies/CompExtraSounds.dll deleted file mode 100644 index ac8784d0..00000000 Binary files a/Assemblies/CompExtraSounds.dll and /dev/null differ diff --git a/Assemblies/CompInstalledPart.dll b/Assemblies/CompInstalledPart.dll deleted file mode 100644 index 8b798d90..00000000 Binary files a/Assemblies/CompInstalledPart.dll and /dev/null differ diff --git a/Assemblies/CompLumbering.dll b/Assemblies/CompLumbering.dll deleted file mode 100644 index 8b8db7a8..00000000 Binary files a/Assemblies/CompLumbering.dll and /dev/null differ diff --git a/Assemblies/CompOverlays.dll b/Assemblies/CompOverlays.dll deleted file mode 100644 index dc984e0f..00000000 Binary files a/Assemblies/CompOverlays.dll and /dev/null differ diff --git a/Assemblies/CompOversizedWeapon.dll b/Assemblies/CompOversizedWeapon.dll deleted file mode 100644 index bb2dc146..00000000 Binary files a/Assemblies/CompOversizedWeapon.dll and /dev/null differ diff --git a/Assemblies/CompSlotLoadable.dll b/Assemblies/CompSlotLoadable.dll deleted file mode 100644 index aeee2b5e..00000000 Binary files a/Assemblies/CompSlotLoadable.dll and /dev/null differ diff --git a/Assemblies/CompToggleDef.dll b/Assemblies/CompToggleDef.dll deleted file mode 100644 index 44641a5f..00000000 Binary files a/Assemblies/CompToggleDef.dll and /dev/null differ diff --git a/Assemblies/CompVehicle.dll b/Assemblies/CompVehicle.dll deleted file mode 100644 index 23b36ea9..00000000 Binary files a/Assemblies/CompVehicle.dll and /dev/null differ diff --git a/Assemblies/PawnShields.dll b/Assemblies/PawnShields.dll deleted file mode 100644 index 06704eb6..00000000 Binary files a/Assemblies/PawnShields.dll and /dev/null differ diff --git a/Assemblies/ThinkNodes.dll b/Assemblies/ThinkNodes.dll deleted file mode 100644 index d0425434..00000000 Binary files a/Assemblies/ThinkNodes.dll and /dev/null differ diff --git a/Defs/AbilityDefs/Abilities_Base.xml b/Defs/AbilityDefs/Abilities_Base.xml deleted file mode 100755 index 477dd882..00000000 --- a/Defs/AbilityDefs/Abilities_Base.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - UI/Glow_Corrupt - - - diff --git a/Defs/DamageDefs/AbilityUser_Damages.xml b/Defs/DamageDefs/AbilityUser_Damages.xml deleted file mode 100755 index 4d662397..00000000 --- a/Defs/DamageDefs/AbilityUser_Damages.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - Laser - DamageWorker_AddInjury - - true - false - - false - true - {0} has been shot to death. - Burn - Heat - 15 - Mote_BlastFlame - (1, 0.7, 0.7) - (1, 1, 0.7) - Explosion_Flame - - - diff --git a/Defs/JobDefs/AbilityUser_Jobs.xml b/Defs/JobDefs/AbilityUser_Jobs.xml deleted file mode 100755 index b39575ae..00000000 --- a/Defs/JobDefs/AbilityUser_Jobs.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CastAbilityVerb - AbilityUser.JobDriver_CastAbilityVerb - Using an ability - true - false - - - - CastAbilitySelf - AbilityUser.JobDriver_CastAbilitySelf - Using an ability - true - false - - - \ No newline at end of file diff --git a/Defs/JobDefs/CompDeflector_Jobs.xml b/Defs/JobDefs/CompDeflector_Jobs.xml deleted file mode 100755 index ec1ca382..00000000 --- a/Defs/JobDefs/CompDeflector_Jobs.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - CastDeflectVerb - CompDeflector.JobDriver_CastDeflectVerb - Deflecting - true - false - - - \ No newline at end of file diff --git a/Defs/JobDefs/CompInstalledPart_Jobs.xml b/Defs/JobDefs/CompInstalledPart_Jobs.xml deleted file mode 100755 index 183535d5..00000000 --- a/Defs/JobDefs/CompInstalledPart_Jobs.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - CompInstalledPart_InstallPart - CompInstalledPart.JobDriver_InstallPart - installing TargetA. - false - - - - CompInstalledPart_UninstallPart - CompInstalledPart.JobDriver_UninstallPart - uninstalling TargetA. - false - - - diff --git a/Defs/JobDefs/CompSlotLoadable_Jobs.xml b/Defs/JobDefs/CompSlotLoadable_Jobs.xml deleted file mode 100755 index 98af40fc..00000000 --- a/Defs/JobDefs/CompSlotLoadable_Jobs.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - GatherSlotItem - CompSlotLoadable.JobDriver_GatherSlotItem - equipping TargetA. - - - \ No newline at end of file diff --git a/Defs/JobDefs/CompVehicle_Jobs.xml b/Defs/JobDefs/CompVehicle_Jobs.xml deleted file mode 100755 index e69311a1..00000000 --- a/Defs/JobDefs/CompVehicle_Jobs.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - CompVehicle_LoadPassenger - CompVehicle.JobDriver_LoadPassenger - entering TargetA. - - - CompVehicle_Assemble - CompVehicle.JobDriver_AssembleVehicle - assembling TargetA. - - diff --git a/Defs/PawnShields/Shields.xml b/Defs/PawnShields/Shields.xml deleted file mode 100644 index 8e51b641..00000000 --- a/Defs/PawnShields/Shields.xml +++ /dev/null @@ -1,197 +0,0 @@ - - - - Shield - - 35 - - - - Shield_BaseMeleeBlockChance - - Shield users melee block chance is multiplied by this. The higher the better. - Shield - PawnShields.StatWorker_Shield - 1 - 0.05 - PercentZero - false - - - - Shield_BaseRangedBlockChance - - Shield users ranged block chance is multiplied by this. The higher the better. - Shield - PawnShields.StatWorker_Shield - 0.5 - 0.05 - PercentZero - false - - - - Shield_DamageAbsorbed - - How much damage the shield absorbs from a blocked attack. - Shield - PawnShields.StatWorker_Shield - 1 - 0.05 - PercentZero - false - - - - - ShieldFatigue - - HediffWithComps - Shield Fatigue - 1.0 - -
  • - -48.0 -
  • -
    - -
  • - - -
  • - Manipulation - -0.02 -
  • -
  • - Moving - -0.02 -
  • - - -
  • - 0.5 - - -
  • - Manipulation - -0.06 -
  • -
  • - Moving - -0.06 -
  • - - -
  • - 0.8 - - -
  • - Manipulation - -0.1 -
  • -
  • - Moving - -0.1 -
  • - - -
  • - 1.0 - - -
  • - Manipulation - -0.1 -
  • -
  • - Moving - -0.1 -
  • - - -
    -
    - - - - MeleeShieldBlockChance - - Chance to block a melee attack that would've otherwise hit. - PawnCombat - 99 - false - 0.3 - PercentZero - FloatOne - 0 - -
  • - Melee - 5 - 7 -
  • -
    - -
  • - Moving - 18 -
  • -
  • - Sight - 8 - 1.4 -
  • -
    - - -
  • (5, 0.10)
  • -
  • (20, 0.30)
  • -
  • (60, 0.50)
  • -
  • (100, 0.80)
  • -
  • (140, 0.90)
  • -
    -
    -
    - - - - RangedShieldBlockChance - - Chance to block a ranged attack that would've otherwise hit. - PawnCombat - 99 - false - 0.1 - PercentZero - FloatOne - 0 - -
  • - Melee - 5 - 3 -
  • -
    - -
  • - Moving - 18 -
  • -
  • - Sight - 8 - 1.4 -
  • -
    - - -
  • (5, 0.05)
  • -
  • (20, 0.10)
  • -
  • (60, 0.30)
  • -
  • (100, 0.60)
  • -
  • (140, 0.80)
  • -
    -
    -
    -
    diff --git a/Defs/RulePackDefs/JT_DeflectionRules.xml b/Defs/RulePackDefs/JT_DeflectionRules.xml deleted file mode 100644 index 36125c88..00000000 --- a/Defs/RulePackDefs/JT_DeflectionRules.xml +++ /dev/null @@ -1,198 +0,0 @@ - - - - - Combat_RangedDamage - -
  • Combat_WoundIncludes
  • -
  • Combat_MeleeIncludes
  • -
    - - - -
  • r_logentry->[INITIATOR_definite]'s [WEAPON_projectile_label] [destroyed_past] [RECIPIENT_definite]'s [destroyed_targets].
  • -
  • r_logentry->[INITIATOR_definite]'s [WEAPON_projectile_label] [destroyed_past] [RECIPIENT_definite]'s [destroyed_targets] [to] [destroyed_suffix].
  • -
  • r_logentry->[INITIATOR_definite]'s [WEAPON_projectile_label] [destroyed_past] [RECIPIENT_definite]'s [destroyed_targets] [expertly].
  • -
  • r_logentry(p=2)->[INITIATOR_definite]'s [WEAPON_projectile_label] [missed] [ORIGINALTARGET_definite] and [destroyed_past] [RECIPIENT_definite]'s [destroyed_targets].
  • -
  • r_logentry(p=2)->[INITIATOR_definite]'s [WEAPON_projectile_label] [missed] [ORIGINALTARGET_definite], [destroyed_present] [RECIPIENT_definite]'s [destroyed_targets].
  • -
  • r_logentry->[RECIPIENT_definite]'s [destroyed_targets] was [destroyed_past] by [INITIATOR_definite]'s [WEAPON_projectile_label].
  • -
  • r_logentry->[RECIPIENT_definite]'s [destroyed_targets] was [destroyed_past] by [INITIATOR_definite]'s [expert] [WEAPON_projectile_label].
  • -
  • r_logentry->[RECIPIENT_definite]'s [destroyed_targets] was [destroyed_past] into [destroyed_suffix] by [INITIATOR_definite]'s [WEAPON_projectile_label].
  • -
  • r_logentry->[INITIATOR_definite] [expertly] returned the incoming fire. It [destroyed_past] [RECIPIENT_definite]'s [destroyed_targets].
  • -
  • r_logentry(p=0.7)->[INITIATOR_definite], wielding [INITIATOR_possessive] [WEAPON_label] [expertly], [damaged_past] [RECIPIENT_definite] in the [damaged_targets].
  • - - -
  • r_logentry(recipient_partDestroyed_count==0)->[INITIATOR_definite]'s [WEAPON_projectile_label] [damaged_past] [RECIPIENT_definite]'s [damaged_targets].
  • -
  • r_logentry(recipient_partDestroyed_count==0)->[INITIATOR_definite]'s [WEAPON_projectile_label] [damaged_past] [RECIPIENT_definite]'s [damaged_targets] [expertly].
  • -
  • r_logentry(recipient_partDestroyed_count==0,p=2)->[INITIATOR_definite]'s [WEAPON_projectile_label] [missed] [ORIGINALTARGET_definite] and [damaged_past] [RECIPIENT_definite]'s [damaged_targets].
  • -
  • r_logentry(recipient_partDestroyed_count==0,p=2)->[INITIATOR_definite]'s [WEAPON_projectile_label] [missed] [ORIGINALTARGET_definite], [damaged_present] [RECIPIENT_definite]'s [damaged_targets].
  • -
  • r_logentry(recipient_partDestroyed_count==0)->[RECIPIENT_definite]'s [damaged_targets] was [damaged_past] by [INITIATOR_definite]'s [WEAPON_projectile_label].
  • -
  • r_logentry(recipient_partDestroyed_count==0)->[RECIPIENT_definite]'s [damaged_targets] was [damaged_past] by [INITIATOR_definite]'s [expert] [WEAPON_projectile_label].
  • -
  • r_logentry(recipient_partDestroyed_count==0)->[RECIPIENT_definite]'s [damaged_targets] was [damaged_past] by [INITIATOR_definite]'s shot.
  • - - -
  • r_logentry(p=3)->[INITIATOR_definite]'s [WEAPON_projectile_label] [destroyed_past] [RECIPIENT_definite]'s [destroyed_targets] and [damaged_past] [RECIPIENT_possessive] [damaged_targets].
  • -
  • r_logentry(p=6)->[INITIATOR_definite]'s [WEAPON_projectile_label] [missed] [ORIGINALTARGET_definite], [destroyed_present] [RECIPIENT_definite]'s [destroyed_targets] and [damaged_present] [RECIPIENT_possessive] [damaged_targets].
  • -
  • r_logentry(p=6)->[INITIATOR_definite] sent a wild ricochet - [destroyed_present] [RECIPIENT_definite]'s [destroyed_targets] and [damaged_present] [RECIPIENT_possessive] [damaged_targets].
  • - - -
  • r_logentry(p=0.2)->[INITIATOR_definite] hit [RECIPIENT_definite] with a [WEAPON_projectile_label].
  • -
  • r_logentry(p=0.2)->[INITIATOR_definite]'s [WEAPON_projectile_label] hit [RECIPIENT_definite].
  • -
  • r_logentry(p=0.4)->[INITIATOR_definite] [missed] [ORIGINALTARGET_definite] and hit [RECIPIENT_definite] with a [WEAPON_projectile_label].
  • -
  • r_logentry(p=0.4)->[INITIATOR_definite]'s [WEAPON_projectile_label] [missed] [ORIGINALTARGET_definite] and hit [RECIPIENT_definite].
  • -
  • r_logentry(p=0.2)->[INITIATOR_definite] hit [RECIPIENT_definite] with a [WEAPON_projectile_label] intended for [ORIGINALTARGET_definite].
  • -
  • r_logentry(p=0.2)->[INITIATOR_definite] hit [RECIPIENT_definite] with a projectile.
  • - - -
  • WEAPON_projectile_label(p=0.05)->shot
  • -
  • WEAPON_projectile_label(p=0.05)->projectile
  • -
  • WEAPON_projectile_label(p=0.05)->blast
  • - -
  • destroyed_past->shattered
  • -
  • destroyed_past->crushed
  • -
  • destroyed_past->obliterated
  • -
  • destroyed_past->annihilated
  • -
  • destroyed_past->pierced
  • -
  • destroyed_past->perforated
  • -
  • destroyed_past->punctured
  • - -
  • destroyed_present->shattering
  • -
  • destroyed_present->crushing
  • -
  • destroyed_present->obliterating
  • -
  • destroyed_present->annihilating
  • -
  • destroyed_present->piercing
  • -
  • destroyed_present->perforating
  • -
  • destroyed_present->puncturing
  • - -
  • destroyed_suffix->pieces
  • -
  • destroyed_suffix->bits
  • -
  • destroyed_suffix->a fine mist
  • -
  • destroyed_suffix->fragments
  • -
  • destroyed_suffix(p=0.5)->a holey mess
  • -
  • destroyed_suffix(recipient_flesh!=Mechanoid,p=0.2)->ground beef
  • - -
  • damaged_past->wounded
  • -
  • damaged_past->injured
  • -
  • damaged_past->pierced
  • -
  • damaged_past->damaged
  • -
  • damaged_past->shot
  • - -
  • damaged_present->wounding
  • -
  • damaged_present->injuring
  • -
  • damaged_present->piercing
  • -
  • damaged_present->damaging
  • -
  • damaged_present->shooting
  • - -
  • damaged_suffix->in an ugly fashion
  • -
  • damaged_suffix(recipient_flesh!=Mechanoid)->with visible blood
  • -
  • damaged_suffix(recipient_flesh!=Mechanoid)->with the flesh visible
  • - -
  • to->to
  • -
  • to->into
  • - -
  • missed->missed
  • -
  • missed->narrowly missed
  • -
    -
    -
    - - - Combat_RangedDeflect - -
  • Combat_DeflectIncludes
  • -
    - - -
  • r_logentry->[INITIATOR_definite]'s [WEAPON_projectile_label] [damaged_past] [RECIPIENT_definite][damaged_target] [deflected_result].
  • -
  • r_logentry(p=2)->[INITIATOR_definite]'s [WEAPON_projectile_label] [missed] [ORIGINALTARGET_definite] and [damaged_past] [RECIPIENT_definite][damaged_target_possessive_opt] [deflected_result].
  • -
  • r_logentry->[RECIPIENT_definite][damaged_target_possessive_opt] was [damaged_past] by [INITIATOR_definite]'s [WEAPON_projectile_label] [deflected_result].
  • - -
  • r_logentry(p=0.2)->[INITIATOR_definite] hit [RECIPIENT_definite][damaged_target_possessive_opt] with a shot [deflected_result].
  • -
  • r_logentry(p=0.2)->[INITIATOR_definite]'s projectile hit [RECIPIENT_definite][damaged_target_possessive_opt] [deflected_result].
  • -
  • r_logentry(p=0.4)->[INITIATOR_definite] [missed] [ORIGINALTARGET_definite] and hit [RECIPIENT_definite][damaged_target_possessive_opt] with a [WEAPON_projectile_label] [deflected_result].
  • -
  • r_logentry(p=0.4)->[INITIATOR_definite]'s [WEAPON_projectile_label] [missed] [ORIGINALTARGET_definite] and hit [RECIPIENT_definite][damaged_target_possessive_opt] [deflected_result].
  • -
  • r_logentry(p=0.2)->[INITIATOR_definite] hit [RECIPIENT_definite][damaged_target_possessive_opt] with a [WEAPON_projectile_label] intended for [ORIGINALTARGET_definite] [deflected_result].
  • - - -
  • WEAPON_projectile_label(p=0.05)->shot
  • -
  • WEAPON_projectile_label(p=0.05)->projectile
  • -
  • WEAPON_projectile_label(p=0.05)->blast
  • -
  • ORIGINALTARGET_definite(p=0.5)->someone else
  • - -
  • damaged_target_possessive_opt->
  • -
  • damaged_target_possessive_opt(recipient_part_damaged0_outside==True)->'s [RECIPIENT_part_damaged0_label]
  • - -
  • deflected_result-> [adverb_deflected]
  • -
  • deflected_result->, [deflected_consequence]
  • - -
  • adverb_deflected_opt(p=4)->
  • -
  • adverb_deflected_opt->[adverb_deflected]
  • - -
  • adverb_deflected->harmlessly
  • -
  • adverb_deflected->uselessly
  • - -
  • deflected_consequence->but it [scraped_past] off [adverb_deflected_opt]
  • -
  • deflected_consequence->[scraped_present] off [RECIPIENT_possessive] armor [adverb_deflected_opt]
  • - -
  • scraped_past->ricocheted
  • - -
  • scraped_present->ricocheting
  • - -
  • missed->missed
  • -
  • missed->narrowly missed
  • -
    -
    -
    - - - - Combat_RangedMiss - - -
  • r_logentry->[INITIATOR_definite]'s [WEAPON_projectile_label] [missed].
  • - -
  • r_logentry->[INITIATOR_definite] missed [ORIGINALTARGET_definite].
  • -
  • r_logentry->[ORIGINALTARGET_definite] [avoidance], [INITIATOR_definite]'s [WEAPON_projectile_label] [missing].
  • - -
  • WEAPON_projectile_label(p=0.05)->shot
  • -
  • WEAPON_projectile_label(p=0.05)->projectile
  • -
  • WEAPON_projectile_label(p=0.05)->blast
  • -
  • missed(p=4)->missed
  • -
  • missed(p=2)->missed by a small margin
  • -
  • missed(p=2)->missed by a wide margin
  • -
  • missed->went wide
  • -
  • missed->flew into the air
  • -
  • missed->flew high into the air
  • -
  • missed->dug into the ground
  • -
  • missed->skipped off the ground and was lost
  • -
  • missed->dug a divot out of the ground
  • -
  • missed(p=0.2)->passed within millimeters of [ORIGINALTARGET_definite]
  • -
  • missed->passed within centimeters of [ORIGINALTARGET_definite]
  • -
  • missed->passed within a meter of [ORIGINALTARGET_definite]
  • -
  • missed->was blown offcourse
  • - -
  • missing->missing
  • -
  • missing->missing by a small margin
  • -
  • missing->missing by a wide margin
  • -
  • missing->going wide
  • -
  • missing->flying into the air
  • -
  • missing->flying high into the air
  • -
  • missing->digging into the ground
  • -
  • missing->skipping off the ground and becoming lost
  • -
  • missing->digging a divot out of the ground
  • -
  • missing(p=0.2)->passing within millimeters of [ORIGINALTARGET_definite]
  • -
  • missing->passing within centimeters of [ORIGINALTARGET_definite]
  • -
  • missing->passing within a meter of [ORIGINALTARGET_definite]
  • -
  • missing->blowing offcourse
  • - -
  • avoidance(ORIGINALTARGET_mobile==True)->jerked aside at the last second
  • -
  • avoidance(ORIGINALTARGET_mobile==True)->stumbled in an attempt to escape
  • -
  • avoidance(ORIGINALTARGET_mobile==True)->threw [ORIGINALTARGET_objective]self to the ground
  • -
  • avoidance(ORIGINALTARGET_mobile==True,p=0.3)->ducked behind [COVER_definite]
  • -
  • avoidance(ORIGINALTARGET_mobile==True,p=0.3)->leaped behind [COVER_definite]
  • -
    -
    -
    - - -
    diff --git a/Defs/RulePackDefs/JT_GrappleRules.xml b/Defs/RulePackDefs/JT_GrappleRules.xml deleted file mode 100644 index f0f93fdf..00000000 --- a/Defs/RulePackDefs/JT_GrappleRules.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - JT_GrappleSuccess - -
  • Transition_Include
  • -
    - - -
  • r_logentry->[INITIATOR_nameDef] [grappled] [SUBJECT_definite].
  • - -
  • grappled->grappled
  • -
  • grappled->seized
  • -
  • grappled->took hold of
  • -
    -
    -
    - - - JT_GrappleFailed - -
  • Transition_Include
  • -
    - - -
  • r_logentry->[INITIATOR_nameDef] [triedtograpple] [SUBJECT_definite], [but] [failedmeta].
  • - -
  • tried->tried
  • -
  • tried->attempted
  • -
  • grappleinf->to grapple
  • -
  • grappleinf->to seize
  • -
  • grappleinf->to hold onto
  • -
  • triedtograpple->[tried] [grappleinf]
  • - -
  • but->but
  • -
  • but->however
  • -
  • but->even so
  • -
  • but->yet
  • - -
  • failed->failed
  • -
  • failed->missed
  • -
  • dodged->dodged
  • -
  • dodged->slipped away
  • -
  • spectacularly->spectacularly
  • -
  • spectacularly->miserably
  • -
  • spectacularly->completely
  • -
  • spectacularly->utterly
  • -
  • failedmeta->[INITIATOR_pronoun] [failed]
  • -
  • failedmeta->[INITIATOR_pronoun] [failed] [spectacularly]
  • -
  • failedmeta->[SUBJECT_definite] [dodged]
  • -
    -
    -
    - -
    diff --git a/Defs/Stats/CompDeflection_StatWorkers.xml b/Defs/Stats/CompDeflection_StatWorkers.xml deleted file mode 100755 index 1223fd5c..00000000 --- a/Defs/Stats/CompDeflection_StatWorkers.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - MeleeWeapon_DeflectionChance - CompDeflector.StatWorker_DeflectionChance - - Chance to deflect ranged projectiles with melee weapon. - PawnCombat - 0 - 0 - PercentZero - true - 10 - - - \ No newline at end of file diff --git a/Defs/ThingDefs_Projectiles/JT_Projectiles.xml b/Defs/ThingDefs_Projectiles/JT_Projectiles.xml deleted file mode 100644 index dc29ad63..00000000 --- a/Defs/ThingDefs_Projectiles/JT_Projectiles.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Projectile - Normal - Projectile - Bullet - - False - True - - Transparent - - - - - - JT_FlyingObject - AbilityUser.FlyingObject - - - NullTex - Graphic_Single - - - true - Stun - 0 - 10 - - - - diff --git a/Defs/ThingDefs_Slots/CompSlotLoadable_Slots.xml b/Defs/ThingDefs_Slots/CompSlotLoadable_Slots.xml deleted file mode 100755 index 8f4c0ad0..00000000 --- a/Defs/ThingDefs_Slots/CompSlotLoadable_Slots.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - SlotTest - CompSlotLoadable.SlotLoadable - - -
  • MeleeWeapon_Gladius
  • -
    - true - (255, 255, 255, 255) -
    - -
    diff --git a/Defs/ThingDefs_WeaponMelee/CompSlotLoadable_ThingDefExample b/Defs/ThingDefs_WeaponMelee/CompSlotLoadable_ThingDefExample deleted file mode 100644 index 08d6e4ed..00000000 --- a/Defs/ThingDefs_WeaponMelee/CompSlotLoadable_ThingDefExample +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - MeleeWeapon_TestKnife - - Never - 0 - 0 - One of humankind's oldest tools, the knife is both an everyday tool and a deadly weapon. - Normal - -
  • - -
  • SlotTest
  • - - -
    -
    - - - - Things/Item/Equipment/WeaponMelee/Knife - Graphic_Single - - InteractAutopistol - 40 - - 4000 - 0.5 - - -65 - -
  • Metallic
  • -
    - -
  • - - -
  • Blunt
  • - - 6 - 2.5 - -
  • - - -
  • Stab
  • - - 16 - 2.5 - -
  • - - -
  • Cut
  • - - 21 - 2.5 - -
    -
    - - - - - ThingWithComps - Item - true - Item - true - Never - Primary - true - 10 - true - Never - - 100 - 1.0 - 2 - 1 - -6 - 0.20 - - -
  • -
  • - CompEquippable -
  • -
    - - 35 - -
    - - - Industrial - true - -
  • Melee
  • -
    - -
  • WeaponsMelee
  • -
    - -
  • - CompQuality -
  • -
  • - ArtName_WeaponMelee - ArtDescription_WeaponMelee - Excellent -
  • -
    - -
  • ITab_Art
  • -
    -
    - - - - - -
  • Root
  • -
    - -
  • Silver
  • -
  • Gold
  • -
  • WoodLog
  • -
    -
    -
    -
    - - -
    diff --git a/Defs/ThinkTreeDefs/CompVehicles_ThinkTree.xml b/Defs/ThinkTreeDefs/CompVehicles_ThinkTree.xml deleted file mode 100644 index 53be174a..00000000 --- a/Defs/ThinkTreeDefs/CompVehicles_ThinkTree.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - CompVehicle_Simple - - -
  • - Downed -
  • -
  • - LordDuty -
  • -
  • - Idle -
  • -
  • - - -
  • - -
  • - DraftedOrder - -
  • - -
  • -
    - - - -
  • - JoinAutoJoinableCaravan -
  • - - - -
  • - Fieldwork - -
  • - -
  • - - -
  • - -
  • - UnloadingOwnInventory - -
  • - -
  • - - - - -
  • - -
  • - Misc - -
  • - -
  • - - -
  • - - -
  • - -
  • - Misc - -
  • - Walk -
  • - - - - - - -
  • - LordDuty -
  • - - -
  • - Idle - -
  • - -
  • - -
  • - - - - - - - CompVehicle_SimpleConstant - - -
  • - - - -
  • - - -
  • - LordDutyConstant -
  • - - - -
    -
    - -
    diff --git a/Defs/ThinkTreeDefs/InsertHook_AbilityUserAI.xml b/Defs/ThinkTreeDefs/InsertHook_AbilityUserAI.xml deleted file mode 100644 index dbea8898..00000000 --- a/Defs/ThinkTreeDefs/InsertHook_AbilityUserAI.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - InsertHookTest - Humanlike_PostMentalState - 1000 - - true - -
  • - - - - \ No newline at end of file diff --git a/Defs/WorldObjectDefs/WorldObjects.xml b/Defs/WorldObjectDefs/WorldObjects.xml deleted file mode 100644 index eaeee9ce..00000000 --- a/Defs/WorldObjectDefs/WorldObjects.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - WorldObject_ProgressBar - - true - This should not be visible to players. - JecsTools.WorldObject_ProgressBar - World/WorldObjects/TribalFactionBase - true - World/WorldObjects/Expanding/RoutePlannerWaypoint - 1 - true - false - false - - - diff --git a/Languages/Japanese/DefInjected/DamageDef/AbilityUser_Damages.xml b/Languages/Japanese/DefInjected/DamageDef/AbilityUser_Damages.xml index 192a82bd..2fb18e0d 100644 --- a/Languages/Japanese/DefInjected/DamageDef/AbilityUser_Damages.xml +++ b/Languages/Japanese/DefInjected/DamageDef/AbilityUser_Damages.xml @@ -1,7 +1,7 @@ - - - - 火傷 - {0}はレーザーに焼かれて死んだ。 - + + + + 火傷 + {0}はレーザーに焼かれて死んだ。 + \ No newline at end of file diff --git a/Languages/Japanese/DefInjected/HediffDef/Shields.xml b/Languages/Japanese/DefInjected/HediffDef/Shields.xml index 8483e233..3c37f56f 100644 --- a/Languages/Japanese/DefInjected/HediffDef/Shields.xml +++ b/Languages/Japanese/DefInjected/HediffDef/Shields.xml @@ -1,12 +1,12 @@ - - - - - - シールド損耗 - 少し - かなり - 厳しい - 枯渇 - + + + + + + シールド損耗 + 少し + かなり + 厳しい + 枯渇 + \ No newline at end of file diff --git a/Languages/Japanese/DefInjected/JobDef/AbilityUser_Jobs.xml b/Languages/Japanese/DefInjected/JobDef/AbilityUser_Jobs.xml index e0a940b5..4f4d3f89 100644 --- a/Languages/Japanese/DefInjected/JobDef/AbilityUser_Jobs.xml +++ b/Languages/Japanese/DefInjected/JobDef/AbilityUser_Jobs.xml @@ -1,7 +1,7 @@ - - - - 能力を使用中 - 能力を使用中 - + + + + 能力を使用中 + 能力を使用中 + \ No newline at end of file diff --git a/Languages/Japanese/DefInjected/JobDef/CompDeflector_Jobs.xml b/Languages/Japanese/DefInjected/JobDef/CompDeflector_Jobs.xml index dcd26ed8..07662d64 100644 --- a/Languages/Japanese/DefInjected/JobDef/CompDeflector_Jobs.xml +++ b/Languages/Japanese/DefInjected/JobDef/CompDeflector_Jobs.xml @@ -1,6 +1,6 @@ - - - - 逸らしている - + + + + 逸らしている + \ No newline at end of file diff --git a/Languages/Japanese/DefInjected/JobDef/CompInstalledPart_Jobs.xml b/Languages/Japanese/DefInjected/JobDef/CompInstalledPart_Jobs.xml index 7fac5432..753833c7 100644 --- a/Languages/Japanese/DefInjected/JobDef/CompInstalledPart_Jobs.xml +++ b/Languages/Japanese/DefInjected/JobDef/CompInstalledPart_Jobs.xml @@ -1,7 +1,7 @@ - - - - TargetAを装着中 - TargetAを取り外し中 - + + + + TargetAを装着中 + TargetAを取り外し中 + \ No newline at end of file diff --git a/Languages/Japanese/DefInjected/JobDef/CompSlotLoadable_Jobs.xml b/Languages/Japanese/DefInjected/JobDef/CompSlotLoadable_Jobs.xml index a3ba4537..9534d0cd 100644 --- a/Languages/Japanese/DefInjected/JobDef/CompSlotLoadable_Jobs.xml +++ b/Languages/Japanese/DefInjected/JobDef/CompSlotLoadable_Jobs.xml @@ -1,6 +1,6 @@ - - - - TargetAをスロットに装着中 - + + + + TargetAをスロットに装着中 + \ No newline at end of file diff --git a/Languages/Japanese/DefInjected/JobDef/CompVehicle_Jobs.xml b/Languages/Japanese/DefInjected/JobDef/CompVehicle_Jobs.xml index 9da68c0a..9d316c70 100644 --- a/Languages/Japanese/DefInjected/JobDef/CompVehicle_Jobs.xml +++ b/Languages/Japanese/DefInjected/JobDef/CompVehicle_Jobs.xml @@ -1,7 +1,7 @@ - - - - TargetAに乗り込む - TargetAを組み立てる - + + + + TargetAに乗り込む + TargetAを組み立てる + \ No newline at end of file diff --git a/Languages/Japanese/DefInjected/RulePackDef/JT_GrappleRules.xml b/Languages/Japanese/DefInjected/RulePackDef/JT_GrappleRules.xml index bed2f170..0e83ea9d 100644 --- a/Languages/Japanese/DefInjected/RulePackDef/JT_GrappleRules.xml +++ b/Languages/Japanese/DefInjected/RulePackDef/JT_GrappleRules.xml @@ -1,32 +1,32 @@ - - - - r_logentry->[INITIATOR_nameDef]は、[SUBJECT_definite][grappled]。 - grappled->と取っ組み合った - grappled->を抑えつけた - grappled->を手で掴みました - - r_logentry->[INITIATOR_nameDef]は、[SUBJECT_definite]を[triedtograpple]、[but][failedmeta]。 - tried->試みた - tried->attempted - grappleinf->捕まえようと - grappleinf->捕らえようと - grappleinf->抑えつけようと - triedtograpple->[grappleinf][tried]が - but->しかし - but->またしても - but->それでも - but->すでに - failed->失敗しました - failed->逃げられました - dodged->避けました - dodged->外しました - spectacularly->見事に - spectacularly->無様に - spectacularly->完全に - spectacularly->ことごとく - failedmeta->[INITIATOR_pronoun]は[failed] - failedmeta->[INITIATOR_pronoun]は[spectacularly][failed] - failedmeta->[SUBJECT_definite]は[dodged] - + + + + r_logentry->[INITIATOR_nameDef]は、[SUBJECT_definite][grappled]。 + grappled->と取っ組み合った + grappled->を抑えつけた + grappled->を手で掴みました + + r_logentry->[INITIATOR_nameDef]は、[SUBJECT_definite]を[triedtograpple]、[but][failedmeta]。 + tried->試みた + tried->attempted + grappleinf->捕まえようと + grappleinf->捕らえようと + grappleinf->抑えつけようと + triedtograpple->[grappleinf][tried]が + but->しかし + but->またしても + but->それでも + but->すでに + failed->失敗しました + failed->逃げられました + dodged->避けました + dodged->外しました + spectacularly->見事に + spectacularly->無様に + spectacularly->完全に + spectacularly->ことごとく + failedmeta->[INITIATOR_pronoun]は[failed] + failedmeta->[INITIATOR_pronoun]は[spectacularly][failed] + failedmeta->[SUBJECT_definite]は[dodged] + \ No newline at end of file diff --git a/Languages/Japanese/DefInjected/StatCategoryDef/Shields.xml b/Languages/Japanese/DefInjected/StatCategoryDef/Shields.xml index 26f14254..099e37f5 100644 --- a/Languages/Japanese/DefInjected/StatCategoryDef/Shields.xml +++ b/Languages/Japanese/DefInjected/StatCategoryDef/Shields.xml @@ -1,6 +1,6 @@ - - - - シールド - + + + + シールド + \ No newline at end of file diff --git a/Languages/Japanese/DefInjected/StatDef/CompDeflection_StatWorkers.xml b/Languages/Japanese/DefInjected/StatDef/CompDeflection_StatWorkers.xml index 277bcd76..8def147d 100644 --- a/Languages/Japanese/DefInjected/StatDef/CompDeflection_StatWorkers.xml +++ b/Languages/Japanese/DefInjected/StatDef/CompDeflection_StatWorkers.xml @@ -1,7 +1,7 @@ - - - - 逸らす確率 - 近距離武器で遠距離攻撃の発射物を逸らす確率 - + + + + 逸らす確率 + 近距離武器で遠距離攻撃の発射物を逸らす確率 + \ No newline at end of file diff --git a/Languages/Japanese/DefInjected/StatDef/Shields.xml b/Languages/Japanese/DefInjected/StatDef/Shields.xml index cb4b1976..595ebda9 100644 --- a/Languages/Japanese/DefInjected/StatDef/Shields.xml +++ b/Languages/Japanese/DefInjected/StatDef/Shields.xml @@ -1,25 +1,25 @@ - - - - 近接防御補正 - シールドを構えた者の近接攻撃を防ぐ確率はこの値で補正乗算されます。より高いほど防御率が高い。 - - 遠距離防御補正 - シールドを構えた者の遠距離攻撃を防ぐ確率はこの値で補正乗算されます。より高いほど防御率が高い。 - - ダメージ吸収 - 防御した攻撃からシールドがどれだけのダメージを吸収できるか。 - - - - - 近接防御率 - 近接攻撃を阻止する確立で、失敗すると攻撃が命中します。 - - - - - 遠距離防御率 - 遠距離攻撃を阻止する確立で、失敗すると攻撃が命中します。 - + + + + 近接防御補正 + シールドを構えた者の近接攻撃を防ぐ確率はこの値で補正乗算されます。より高いほど防御率が高い。 + + 遠距離防御補正 + シールドを構えた者の遠距離攻撃を防ぐ確率はこの値で補正乗算されます。より高いほど防御率が高い。 + + ダメージ吸収 + 防御した攻撃からシールドがどれだけのダメージを吸収できるか。 + + + + + 近接防御率 + 近接攻撃を阻止する確立で、失敗すると攻撃が命中します。 + + + + + 遠距離防御率 + 遠距離攻撃を阻止する確立で、失敗すると攻撃が命中します。 + \ No newline at end of file diff --git a/Languages/Japanese/DefInjected/ThingDef/CompSlotLoadable_Slots.xml b/Languages/Japanese/DefInjected/ThingDef/CompSlotLoadable_Slots.xml index ef2f3841..f0c19f89 100644 --- a/Languages/Japanese/DefInjected/ThingDef/CompSlotLoadable_Slots.xml +++ b/Languages/Japanese/DefInjected/ThingDef/CompSlotLoadable_Slots.xml @@ -1,6 +1,6 @@ - - - - テスト - + + + + テスト + \ No newline at end of file diff --git a/Languages/Japanese/DefInjected/ThingDef/JT_Projectiles.xml b/Languages/Japanese/DefInjected/ThingDef/JT_Projectiles.xml index 2f358779..ebe7213a 100644 --- a/Languages/Japanese/DefInjected/ThingDef/JT_Projectiles.xml +++ b/Languages/Japanese/DefInjected/ThingDef/JT_Projectiles.xml @@ -1,6 +1,6 @@ - - - - 飛翔体 - + + + + 飛翔体 + \ No newline at end of file diff --git a/Languages/Japanese/DefInjected/WorldObjectDef/WorldObjects.xml b/Languages/Japanese/DefInjected/WorldObjectDef/WorldObjects.xml index 0a89366c..f17fe8e5 100644 --- a/Languages/Japanese/DefInjected/WorldObjectDef/WorldObjects.xml +++ b/Languages/Japanese/DefInjected/WorldObjectDef/WorldObjects.xml @@ -1,7 +1,7 @@ - - - - 進展度 - これはプレーヤーには見えないはずです。 - + + + + 進展度 + これはプレーヤーには見えないはずです。 + \ No newline at end of file diff --git a/Languages/Japanese/Keyed/AbilityUser.xml b/Languages/Japanese/Keyed/AbilityUser.xml index b163609d..4713458f 100644 --- a/Languages/Japanese/Keyed/AbilityUser.xml +++ b/Languages/Japanese/Keyed/AbilityUser.xml @@ -1,27 +1,27 @@ - - - - 指定可能な目標がありません。 - - 機能停止 - - タイプ: - 目標(範囲) - 目標(自分) - 目標(他者) - 目標(場所) - クールダウン: - 特殊 - 精神状態変化率 - 影響確率 - {0}は回復する時間が必要 - - - 影響範囲の詳細 - 目標: - キャラクター - 味方への誤射: - 最大目標数: - 使用者から開始: - + + + + 指定可能な目標がありません。 + + 機能停止 + + タイプ: + 目標(範囲) + 目標(自分) + 目標(他者) + 目標(場所) + クールダウン: + 特殊 + 精神状態変化率 + 影響確率 + {0}は回復する時間が必要 + + + 影響範囲の詳細 + 目標: + キャラクター + 味方への誤射: + 最大目標数: + 使用者から開始: + \ No newline at end of file diff --git a/Languages/Japanese/Keyed/CompActivatableEffect.xml b/Languages/Japanese/Keyed/CompActivatableEffect.xml index adc5621c..5bf0cc6d 100644 --- a/Languages/Japanese/Keyed/CompActivatableEffect.xml +++ b/Languages/Japanese/Keyed/CompActivatableEffect.xml @@ -1,6 +1,6 @@ - - - - 警告:{0}の現在所持している武器は不活性です! - + + + + 警告:{0}の現在所持している武器は不活性です! + \ No newline at end of file diff --git a/Languages/Japanese/Keyed/CompDeflector.xml b/Languages/Japanese/Keyed/CompDeflector.xml index ca955c87..285ac1ef 100644 --- a/Languages/Japanese/Keyed/CompDeflector.xml +++ b/Languages/Japanese/Keyed/CompDeflector.xml @@ -1,28 +1,28 @@ - - - - 反射率 - この武器が発射体を攻撃者に跳ね返す頻度を決定します。 - - 最大反射率 - {0}ヵ所の各射撃地点に対して、使用者は攻撃してきた目標に対して発射された攻撃を反射する可能性が{1}回あります。反射可能な最大回数は{2}回です。 - - {0}スキルLv毎の反射率(%) - 使用者は{0}の各レベルごとに、この反射率(%)を加算して発射体を跳ね返すことができます。 - - 基本反射率 - - ステータスは次の計算式で表示されます。\n反射率=(基本反射率+(スキルレベル×スキルLvごとの反射率(%))\n\n - - 反射率 - - 基本反射率 - - スキルLv - - - スキルLvごとの反射率(%) - - 念動操作率 - + + + + 反射率 + この武器が発射体を攻撃者に跳ね返す頻度を決定します。 + + 最大反射率 + {0}ヵ所の各射撃地点に対して、使用者は攻撃してきた目標に対して発射された攻撃を反射する可能性が{1}回あります。反射可能な最大回数は{2}回です。 + + {0}スキルLv毎の反射率(%) + 使用者は{0}の各レベルごとに、この反射率(%)を加算して発射体を跳ね返すことができます。 + + 基本反射率 + + ステータスは次の計算式で表示されます。\n反射率=(基本反射率+(スキルレベル×スキルLvごとの反射率(%))\n\n + + 反射率 + + 基本反射率 + + スキルLv + + + スキルLvごとの反射率(%) + + 念動操作率 + \ No newline at end of file diff --git a/Languages/Japanese/Keyed/CompInstalledPart.xml b/Languages/Japanese/Keyed/CompInstalledPart.xml index 5c78800c..f3783cb8 100644 --- a/Languages/Japanese/Keyed/CompInstalledPart.xml +++ b/Languages/Japanese/Keyed/CompInstalledPart.xml @@ -1,9 +1,9 @@ - - - - 何かを装着します - {0}を取り外す - {0}は{2}に{1}を装着しました - {0}は{2}から{1}を取り外しました - + + + + 何かを装着します + {0}を取り外す + {0}は{2}に{1}を装着しました + {0}は{2}から{1}を取り外しました + \ No newline at end of file diff --git a/Languages/Japanese/Keyed/CompVehicle.xml b/Languages/Japanese/Keyed/CompVehicle.xml index c9a74e2b..730bcef9 100644 --- a/Languages/Japanese/Keyed/CompVehicle.xml +++ b/Languages/Japanese/Keyed/CompVehicle.xml @@ -1,33 +1,33 @@ - - - - - 入植者が乗り物に乗車している間は、キャラバン隊を分割することはできません。 - - - - {0}は現在移動できません。 - - - - 燃料が残り少ない - {0}の燃料が不足しています({1})。 {0}は現在、通常速度の4分の1で移動しています。 - {0}には{2}が必要なので、車両({1})を降りました。 - {0}日分の燃料を積んでいます - 燃料が足りなくなることは無いでしょう - このキャラバン隊の燃料がなくなるまでのおよその日数です。\n\nキャラバン隊に属するすべての車両を考慮して、最悪の場合のシナリオを示します。 これは、この日数が経過した後、少なくとも1台の車両が燃料切れになることを意味します。 - このキャラバン隊は燃料を搭載しておらず、最高速度で移動することができません。\n\nこのキャラバン隊を編成してもよろしいですか? - このキャラバン隊は{0}日分の燃料しか運んでおらず、すぐに燃料が枯渇します。\n\nこのままキャラバン隊を編成しますか? - 燃料切れ - キャラバン隊の乗り物に燃料を供給する必要があります。 - - 乗り物 - {0}を積み下ろす - {0}を下ろす - {0}を積む - {0}を載せるか1つ取り出します。 - {0}を1つ積み込む - {0}を1つ取り出す - 乗り物が無効になっているか、破壊されているか、または単に損傷しており、荷物を搭載できません。 - - + + + + + 入植者が乗り物に乗車している間は、キャラバン隊を分割することはできません。 + + + + {0}は現在移動できません。 + + + + 燃料が残り少ない + {0}の燃料が不足しています({1})。 {0}は現在、通常速度の4分の1で移動しています。 + {0}には{2}が必要なので、車両({1})を降りました。 + {0}日分の燃料を積んでいます + 燃料が足りなくなることは無いでしょう + このキャラバン隊の燃料がなくなるまでのおよその日数です。\n\nキャラバン隊に属するすべての車両を考慮して、最悪の場合のシナリオを示します。 これは、この日数が経過した後、少なくとも1台の車両が燃料切れになることを意味します。 + このキャラバン隊は燃料を搭載しておらず、最高速度で移動することができません。\n\nこのキャラバン隊を編成してもよろしいですか? + このキャラバン隊は{0}日分の燃料しか運んでおらず、すぐに燃料が枯渇します。\n\nこのままキャラバン隊を編成しますか? + 燃料切れ + キャラバン隊の乗り物に燃料を供給する必要があります。 + + 乗り物 + {0}を積み下ろす + {0}を下ろす + {0}を積む + {0}を載せるか1つ取り出します。 + {0}を1つ積み込む + {0}を1つ取り出す + 乗り物が無効になっているか、破壊されているか、または単に損傷しており、荷物を搭載できません。 + + diff --git a/Languages/Japanese/Keyed/Eng_WorldObjectMods.xml b/Languages/Japanese/Keyed/Eng_WorldObjectMods.xml index 649798de..57c5c404 100644 --- a/Languages/Japanese/Keyed/Eng_WorldObjectMods.xml +++ b/Languages/Japanese/Keyed/Eng_WorldObjectMods.xml @@ -1,10 +1,10 @@ - - - - この場所にキャラバン隊がありません - 必要な資源:{0} - 特定のアイテムが足りません。{2}が{1}が必要ですが、{0}しかありません - {2}が不足しています。{1}が{1}が必要ですが、{0}しかありません - 資源不足のために、{0}の建設に失敗しました - - + + + + この場所にキャラバン隊がありません + 必要な資源:{0} + 特定のアイテムが足りません。{2}が{1}が必要ですが、{0}しかありません + {2}が不足しています。{1}が{1}が必要ですが、{0}しかありません + 資源不足のために、{0}の建設に失敗しました + + diff --git a/Languages/Japanese/Keyed/Grapple.xml b/Languages/Japanese/Keyed/Grapple.xml index 9203b6ea..986a776d 100644 --- a/Languages/Japanese/Keyed/Grapple.xml +++ b/Languages/Japanese/Keyed/Grapple.xml @@ -1,11 +1,11 @@ - - - - 捕縛に成功 - 捕縛に失敗 - 倒れている相手:捕縛に成功 - 奇襲攻撃の相手:捕縛に成功 - 拘束中の相手:捕縛に成功 - 睡眠中の相手:捕縛に成功 - + + + + 捕縛に成功 + 捕縛に失敗 + 倒れている相手:捕縛に成功 + 奇襲攻撃の相手:捕縛に成功 + 拘束中の相手:捕縛に成功 + 睡眠中の相手:捕縛に成功 + \ No newline at end of file diff --git a/Languages/Japanese/Keyed/Misc.xml b/Languages/Japanese/Keyed/Misc.xml index 88f9be82..012588fb 100644 --- a/Languages/Japanese/Keyed/Misc.xml +++ b/Languages/Japanese/Keyed/Misc.xml @@ -1,11 +1,11 @@ - - - 天井の下に置く必要があります。 - 壁に置く必要があります。 - {0}ダメージ吸収した - 貫通量:{0} - ノックバック率:{0} - 追加ダメージ: - 炸裂 - + + + 天井の下に置く必要があります。 + 壁に置く必要があります。 + {0}ダメージ吸収した + 貫通量:{0} + ノックバック率:{0} + 追加ダメージ: + 炸裂 + \ No newline at end of file diff --git a/Languages/Japanese/LanguageInfo.xml b/Languages/Japanese/LanguageInfo.xml index de78ac11..d74dc636 100644 --- a/Languages/Japanese/LanguageInfo.xml +++ b/Languages/Japanese/LanguageInfo.xml @@ -1,13 +1,13 @@ - - - 日本語 - Japanese - true - LanguageWorker_Japanese - -
  • - Translator - Proxyer -
  • - - + + + 日本語 + Japanese + true + LanguageWorker_Japanese + +
  • + Translator + Proxyer +
  • +
    +
    diff --git a/RimworldModReleaseTool.exe b/RimworldModReleaseTool.exe deleted file mode 100644 index 44e9e821..00000000 Binary files a/RimworldModReleaseTool.exe and /dev/null differ diff --git a/Source/.idea/.idea.JecsTools/.idea/.name b/Source/.idea/.idea.JecsTools/.idea/.name deleted file mode 100644 index 2cd2cc82..00000000 --- a/Source/.idea/.idea.JecsTools/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -JecsTools \ No newline at end of file diff --git a/Source/.idea/.idea.JecsTools/.idea/contentModel.xml b/Source/.idea/.idea.JecsTools/.idea/contentModel.xml deleted file mode 100644 index 8f52a367..00000000 --- a/Source/.idea/.idea.JecsTools/.idea/contentModel.xml +++ /dev/null @@ -1,388 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Source/.idea/.idea.JecsTools/.idea/indexLayout.xml b/Source/.idea/.idea.JecsTools/.idea/indexLayout.xml deleted file mode 100644 index 27ba142e..00000000 --- a/Source/.idea/.idea.JecsTools/.idea/indexLayout.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/Source/.idea/.idea.JecsTools/.idea/modules.xml b/Source/.idea/.idea.JecsTools/.idea/modules.xml deleted file mode 100644 index c1e4164c..00000000 --- a/Source/.idea/.idea.JecsTools/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/Source/.idea/.idea.JecsTools/.idea/vcs.xml b/Source/.idea/.idea.JecsTools/.idea/vcs.xml deleted file mode 100644 index 6c0b8635..00000000 --- a/Source/.idea/.idea.JecsTools/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Source/.idea/.idea.JecsTools/.idea/workspace.xml b/Source/.idea/.idea.JecsTools/.idea/workspace.xml deleted file mode 100644 index 22e15a56..00000000 --- a/Source/.idea/.idea.JecsTools/.idea/workspace.xml +++ /dev/null @@ -1,2317 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Source/AllModdingComponents/.idea/.idea.PawnShields/riderModule.iml b/Source/AllModdingComponents/.idea/.idea.PawnShields/riderModule.iml deleted file mode 100644 index 1a4e0d95..00000000 --- a/Source/AllModdingComponents/.idea/.idea.PawnShields/riderModule.iml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Source/AllModdingComponents/.vs/CompAbilityUser/v15/.suo b/Source/AllModdingComponents/.vs/CompAbilityUser/v15/.suo deleted file mode 100644 index 8de029b2..00000000 Binary files a/Source/AllModdingComponents/.vs/CompAbilityUser/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/.vs/CompAnimated/v15/.suo b/Source/AllModdingComponents/.vs/CompAnimated/v15/.suo deleted file mode 100644 index 3d788d86..00000000 Binary files a/Source/AllModdingComponents/.vs/CompAnimated/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/.vs/CompDelayedSpawner/v15/.suo b/Source/AllModdingComponents/.vs/CompDelayedSpawner/v15/.suo deleted file mode 100644 index 31d3be48..00000000 Binary files a/Source/AllModdingComponents/.vs/CompDelayedSpawner/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/.vs/CompExtraSounds/v15/.suo b/Source/AllModdingComponents/.vs/CompExtraSounds/v15/.suo deleted file mode 100644 index f238153c..00000000 Binary files a/Source/AllModdingComponents/.vs/CompExtraSounds/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/.vs/CompInstalledPart/v15/.suo b/Source/AllModdingComponents/.vs/CompInstalledPart/v15/.suo deleted file mode 100644 index cc3009ac..00000000 Binary files a/Source/AllModdingComponents/.vs/CompInstalledPart/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/.vs/CompLumbering/v15/.suo b/Source/AllModdingComponents/.vs/CompLumbering/v15/.suo deleted file mode 100644 index f4014721..00000000 Binary files a/Source/AllModdingComponents/.vs/CompLumbering/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/.vs/CompOverlays/v15/.suo b/Source/AllModdingComponents/.vs/CompOverlays/v15/.suo deleted file mode 100644 index e7e03744..00000000 Binary files a/Source/AllModdingComponents/.vs/CompOverlays/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/.vs/CompOversizedWeapon/v15/.suo b/Source/AllModdingComponents/.vs/CompOversizedWeapon/v15/.suo deleted file mode 100644 index a82ed43d..00000000 Binary files a/Source/AllModdingComponents/.vs/CompOversizedWeapon/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/.vs/CompPilotable/v15/.suo b/Source/AllModdingComponents/.vs/CompPilotable/v15/.suo deleted file mode 100644 index 9fdf9947..00000000 Binary files a/Source/AllModdingComponents/.vs/CompPilotable/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/.vs/CompToggleDef/v15/.suo b/Source/AllModdingComponents/.vs/CompToggleDef/v15/.suo deleted file mode 100644 index afb90553..00000000 Binary files a/Source/AllModdingComponents/.vs/CompToggleDef/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/.vs/CompVehicle/v15/.suo b/Source/AllModdingComponents/.vs/CompVehicle/v15/.suo deleted file mode 100644 index f44cd4aa..00000000 Binary files a/Source/AllModdingComponents/.vs/CompVehicle/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/.vs/JecsTools/v15/.suo b/Source/AllModdingComponents/.vs/JecsTools/v15/.suo deleted file mode 100644 index 61604ccb..00000000 Binary files a/Source/AllModdingComponents/.vs/JecsTools/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/.vs/PawnShields/v15/.suo b/Source/AllModdingComponents/.vs/PawnShields/v15/.suo deleted file mode 100644 index c5264290..00000000 Binary files a/Source/AllModdingComponents/.vs/PawnShields/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/AbilityUserAI.sln b/Source/AllModdingComponents/AbilityUserAI.sln deleted file mode 100644 index 734440bb..00000000 --- a/Source/AllModdingComponents/AbilityUserAI.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26430.14 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbilityUserAI", "AbilityUserAI\AbilityUserAI.csproj", "{4FC16277-5CB6-4A78-90FB-27F09888708A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4FC16277-5CB6-4A78-90FB-27F09888708A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4FC16277-5CB6-4A78-90FB-27F09888708A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4FC16277-5CB6-4A78-90FB-27F09888708A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4FC16277-5CB6-4A78-90FB-27F09888708A}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/AbilityUserAI/AbilityUserAI.csproj b/Source/AllModdingComponents/AbilityUserAI/AbilityUserAI.csproj index 1d2eb57e..73df7105 100644 --- a/Source/AllModdingComponents/AbilityUserAI/AbilityUserAI.csproj +++ b/Source/AllModdingComponents/AbilityUserAI/AbilityUserAI.csproj @@ -3,7 +3,6 @@ AbilityUserAI - RW1.3;RW1.3Unstable;RW1.4;RW1.4Unstable diff --git a/Source/AllModdingComponents/AbilityUserAI/Properties/AssemblyInfo.cs b/Source/AllModdingComponents/AbilityUserAI/Properties/AssemblyInfo.cs deleted file mode 100644 index 8bb5c330..00000000 --- a/Source/AllModdingComponents/AbilityUserAI/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -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("AbilityUserAI")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("AbilityUserAI")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[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("4fc16277-5cb6-4a78-90fb-27f09888708a")] - -// 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.18.0.0")] -[assembly: AssemblyFileVersion("1.18.0.0")] \ No newline at end of file diff --git a/Source/AllModdingComponents/AbilityUserAI/Utility/AbilityUtility.cs b/Source/AllModdingComponents/AbilityUserAI/Utility/AbilityUtility.cs index 0a73d874..6c248cdb 100644 --- a/Source/AllModdingComponents/AbilityUserAI/Utility/AbilityUtility.cs +++ b/Source/AllModdingComponents/AbilityUserAI/Utility/AbilityUtility.cs @@ -93,25 +93,23 @@ public static IEnumerable GetPawnsInsideRadius(LocalTargetInfo center, Map } /// - /// Convenience function for checking whether the pawns are allies. + /// Convenience function for checking whether the pawns are allies. Handles null Factions. /// /// Initiator pawn that is checking. /// Second pawn to check with. /// True if they are allies. False if not. public static bool AreAllies(Thing first, Thing second) { - //If you are yourself, then you are definitely allies. - if (first == second) + //You are allies with yourself and others in your factions. Treat null as a faction + if (first.Faction == second.Faction) return true; - //Null factions are allies. - if (first.Faction == null && second.Faction == null) - return true; + //Otherwise, null Factions are not allies with non-null Factions + if (first.Faction == null || second.Faction == null) + return false; - //Be allies if in the same Faction or if the goodwill with the other Faction is abouve 50%. - if (second.Faction == null) - return first.Faction == second.Faction; - return first.Faction == second.Faction || first.Faction.GoodwillWith(second.Faction) >= 0.5f; + //Be allies if the goodwill with the other Faction is above 50%. + return first.Faction.GoodwillWith(second.Faction) >= 0.5f; } /// diff --git a/Source/AllModdingComponents/CompAbilityUser.sln b/Source/AllModdingComponents/CompAbilityUser.sln deleted file mode 100755 index cf7e26e9..00000000 --- a/Source/AllModdingComponents/CompAbilityUser.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.12 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompAbilityUser", "CompAbilityUser\CompAbilityUser.csproj", "{417B8649-7A66-4580-8C75-473E46DA9C7A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {417B8649-7A66-4580-8C75-473E46DA9C7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {417B8649-7A66-4580-8C75-473E46DA9C7A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {417B8649-7A66-4580-8C75-473E46DA9C7A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {417B8649-7A66-4580-8C75-473E46DA9C7A}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompAbilityUser/.vs/AbilityUser/v14/.suo b/Source/AllModdingComponents/CompAbilityUser/.vs/AbilityUser/v14/.suo deleted file mode 100644 index 4132f901..00000000 Binary files a/Source/AllModdingComponents/CompAbilityUser/.vs/AbilityUser/v14/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/CompAbilityUser/.vs/AbilityUser/v15/.suo b/Source/AllModdingComponents/CompAbilityUser/.vs/AbilityUser/v15/.suo deleted file mode 100644 index 4132f901..00000000 Binary files a/Source/AllModdingComponents/CompAbilityUser/.vs/AbilityUser/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/CompAbilityUser/AbilityPowerManager.cs b/Source/AllModdingComponents/CompAbilityUser/AbilityPowerManager.cs deleted file mode 100755 index 0a77e6af..00000000 --- a/Source/AllModdingComponents/CompAbilityUser/AbilityPowerManager.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Verse; - -namespace AbilityUser -{ - public class AbilityPowerManager : IExposable - { - - private CompAbilityUser CompAbilityUser; - public List powersint = new List(); - public List Powers = new List(); - - - public AbilityPowerManager(CompAbilityUser CompAbilityUser) - { - this.CompAbilityUser = CompAbilityUser; - } - - public void Initialize() - { - - } - - - public void AbilityPowerManagerTick() - { - } - - public void AddPawnAbility(AbilityDef psydef) - { - if (!this.CompAbilityUser.Powers.Any(x => x.powerdef.defName == psydef.defName)) - { - this.CompAbilityUser.Powers.Add(new PawnAbility(this.CompAbilityUser.abilityUser, psydef)); - } - - this.CompAbilityUser.UpdateAbilities(); - } - - public void RemovePawnAbility(AbilityDef abilityDef) - { - PawnAbility abilityToRemove = this.CompAbilityUser.Powers.FirstOrDefault(x => x.powerdef.defName == abilityDef.defName); - if (abilityToRemove != null) - { - this.CompAbilityUser.Powers.Remove(abilityToRemove); - } - - this.CompAbilityUser.UpdateAbilities(); - } - - public void ExposeData() - { - Scribe_Values.LookValue(ref this.CompAbilityUser, "CompAbilityUser", null); - } - - } -} diff --git a/Source/AllModdingComponents/CompAbilityUser/Projectile_AbilityAoE.cs b/Source/AllModdingComponents/CompAbilityUser/Projectile_AbilityAoE.cs deleted file mode 100755 index 567a4adf..00000000 --- a/Source/AllModdingComponents/CompAbilityUser/Projectile_AbilityAoE.cs +++ /dev/null @@ -1,74 +0,0 @@ -using RimWorld; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using UnityEngine; -using Verse; - -namespace AbilityUser -{ - public class Projectile_AbilityAoE : Projectile_AbilityBase - { - public Thing target; - - public Vector3 drawpos - { - get - { - if (this.target != null) - { - return target.DrawPos; - } - return destination; - } - } - - public override void PostMake() - { - base.PostMake(); - TargetingParameters parms = new TargetingParameters(); - parms.canTargetPawns = true; - target = this.Map.thingGrid.ThingAt(destination.ToIntVec3(), ThingCategory.Pawn); - if (target != null) Log.Message("FoundTarget"); - if (target == null) Log.Message("No Target??"); - } - - public override void Draw() - { - if (target != null) - { - Vector3 vector = drawpos; - Vector3 distance = this.destination - this.origin; - Vector3 curpos = this.destination - this.Position.ToVector3(); - var num = 1 - (Mathf.Sqrt(Mathf.Pow(curpos.x, 2) + Mathf.Pow(curpos.z, 2)) / (Mathf.Sqrt(Mathf.Pow(distance.x, 2) + Mathf.Pow(distance.z, 2)))); - float angle = 0f; - Material mat = this.Graphic.MatSingle; - Vector3 s = new Vector3(num, 1f, num); - Matrix4x4 matrix = default(Matrix4x4); - vector.y = 3; - matrix.SetTRS(vector, Quaternion.AngleAxis(angle, Vector3.up), s); - Graphics.DrawMesh(MeshPool.plane10, matrix, mat, 0); - } - } - - public override void DrawAt(Vector3 drawLoc) - { - if (target != null) - { - Vector3 vector = drawpos; - Vector3 distance = this.destination - this.origin; - Vector3 curpos = this.destination - this.Position.ToVector3(); - var num = 1 - (Mathf.Sqrt(Mathf.Pow(curpos.x, 2) + Mathf.Pow(curpos.z, 2)) / (Mathf.Sqrt(Mathf.Pow(distance.x, 2) + Mathf.Pow(distance.z, 2)))); - float angle = 0f; - Material mat = this.Graphic.MatSingle; - Vector3 s = new Vector3(num, 1f, num); - Matrix4x4 matrix = default(Matrix4x4); - vector.y = 3; - matrix.SetTRS(vector, Quaternion.AngleAxis(angle, Vector3.up), s); - Graphics.DrawMesh(MeshPool.plane10, matrix, mat, 0); - } - } - - } -} \ No newline at end of file diff --git a/Source/AllModdingComponents/CompAbilityUser/Properties/AssemblyInfo.cs b/Source/AllModdingComponents/CompAbilityUser/Properties/AssemblyInfo.cs deleted file mode 100755 index 4ddcf8fd..00000000 --- a/Source/AllModdingComponents/CompAbilityUser/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -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("AbilityUser")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("AbilityUser")] -[assembly: AssemblyCopyright("Copyright © Cpt Ohu & Jecrell 2016-2017")] -[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("417b8649-7a66-4580-8c75-473e46da9c7a")] - -// 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.18.0.0")] -[assembly: AssemblyFileVersion("1.18.0.0")] \ No newline at end of file diff --git a/Source/AllModdingComponents/CompAbilityUser/bin/Release/0Harmony.dll b/Source/AllModdingComponents/CompAbilityUser/bin/Release/0Harmony.dll deleted file mode 100644 index 106a81a9..00000000 Binary files a/Source/AllModdingComponents/CompAbilityUser/bin/Release/0Harmony.dll and /dev/null differ diff --git a/Source/AllModdingComponents/CompActivatableEffect.sln b/Source/AllModdingComponents/CompActivatableEffect.sln deleted file mode 100755 index 2e899c51..00000000 --- a/Source/AllModdingComponents/CompActivatableEffect.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.12 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompActivatableEffect", "CompActivatableEffect\CompActivatableEffect.csproj", "{EC1AEA45-45FE-4A6A-A835-81B289E03BC9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EC1AEA45-45FE-4A6A-A835-81B289E03BC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EC1AEA45-45FE-4A6A-A835-81B289E03BC9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EC1AEA45-45FE-4A6A-A835-81B289E03BC9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EC1AEA45-45FE-4A6A-A835-81B289E03BC9}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompActivatableEffect/.vs/CompActivatableEffect/v14/.suo b/Source/AllModdingComponents/CompActivatableEffect/.vs/CompActivatableEffect/v14/.suo deleted file mode 100644 index f0a04c70..00000000 Binary files a/Source/AllModdingComponents/CompActivatableEffect/.vs/CompActivatableEffect/v14/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/CompActivatableEffect/.vs/CompActivatableEffect/v15/.suo b/Source/AllModdingComponents/CompActivatableEffect/.vs/CompActivatableEffect/v15/.suo deleted file mode 100644 index a78ea36d..00000000 Binary files a/Source/AllModdingComponents/CompActivatableEffect/.vs/CompActivatableEffect/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/CompActivatableEffect/Properties/AssemblyInfo.cs b/Source/AllModdingComponents/CompActivatableEffect/Properties/AssemblyInfo.cs deleted file mode 100755 index b3e3b575..00000000 --- a/Source/AllModdingComponents/CompActivatableEffect/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("CompActivatableEffect")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CompActivatableEffect")] -[assembly: AssemblyCopyright("Copyright © Jecrell 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: Guid("ec1aea45-45fe-4a6a-a835-81b289e03bc9")] - -[assembly: AssemblyVersion("1.18.0.0")] -[assembly: AssemblyFileVersion("1.18.0.0")] \ No newline at end of file diff --git a/Source/AllModdingComponents/CompActivatableEffect/xml/CompActivatableEffect.xml b/Source/AllModdingComponents/CompActivatableEffect/xml/CompActivatableEffect.xml deleted file mode 100755 index 2279a178..00000000 --- a/Source/AllModdingComponents/CompActivatableEffect/xml/CompActivatableEffect.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - WARNING: {0}'s current weapon is deactivated! - - \ No newline at end of file diff --git a/Source/AllModdingComponents/CompAnimated.sln b/Source/AllModdingComponents/CompAnimated.sln deleted file mode 100644 index 8bdb25d2..00000000 --- a/Source/AllModdingComponents/CompAnimated.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.12 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompAnimated", "CompAnimated\CompAnimated.csproj", "{CF56EA3A-AEC6-4817-BF46-A886FBEAA49B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CF56EA3A-AEC6-4817-BF46-A886FBEAA49B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CF56EA3A-AEC6-4817-BF46-A886FBEAA49B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CF56EA3A-AEC6-4817-BF46-A886FBEAA49B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CF56EA3A-AEC6-4817-BF46-A886FBEAA49B}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompAnimated/HarmonyCompLumbering.cs b/Source/AllModdingComponents/CompAnimated/HarmonyCompLumbering.cs deleted file mode 100644 index 3604d107..00000000 --- a/Source/AllModdingComponents/CompAnimated/HarmonyCompLumbering.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Harmony; -using RimWorld; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Verse; -using Verse.AI; -using System.Reflection; -using UnityEngine; - -namespace CompLumbering -{ - [StaticConstructorOnStartup] - static class HarmonyCompLumbering - { - static HarmonyCompLumbering() - { - HarmonyInstance harmony = HarmonyInstance.Create("rimworld.jecrell.comps.lumbering"); - harmony.Patch(AccessTools.Method(typeof(PawnGraphicSet), "nakedGraphic"), null, new HarmonyMethod(typeof(HarmonyCompLumbering), "SoundMissPrefix")); - } - // Verse.PawnGraphicSet - - - } -} diff --git a/Source/AllModdingComponents/CompAnimated/Properties/AssemblyInfo.cs b/Source/AllModdingComponents/CompAnimated/Properties/AssemblyInfo.cs deleted file mode 100644 index 5245f6a9..00000000 --- a/Source/AllModdingComponents/CompAnimated/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -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("CompAnimated")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CompAnimated")] -[assembly: AssemblyCopyright("Copyright © Jecrell 2017")] -[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("20f7f767-99cd-42b1-8643-504f0b932468")] - -// 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.18.0.0")] -[assembly: AssemblyFileVersion("1.18.0.0")] \ No newline at end of file diff --git a/Source/AllModdingComponents/CompBalloon.sln b/Source/AllModdingComponents/CompBalloon.sln deleted file mode 100644 index e1aa80a8..00000000 --- a/Source/AllModdingComponents/CompBalloon.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.12 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompBalloon", "CompBalloon\CompBalloon.csproj", "{CE293DBE-D76A-4F24-A086-42051996698D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompBalloon/HarmonyCompBalloon.cs b/Source/AllModdingComponents/CompBalloon/HarmonyCompBalloon.cs deleted file mode 100644 index 3604d107..00000000 --- a/Source/AllModdingComponents/CompBalloon/HarmonyCompBalloon.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Harmony; -using RimWorld; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Verse; -using Verse.AI; -using System.Reflection; -using UnityEngine; - -namespace CompLumbering -{ - [StaticConstructorOnStartup] - static class HarmonyCompLumbering - { - static HarmonyCompLumbering() - { - HarmonyInstance harmony = HarmonyInstance.Create("rimworld.jecrell.comps.lumbering"); - harmony.Patch(AccessTools.Method(typeof(PawnGraphicSet), "nakedGraphic"), null, new HarmonyMethod(typeof(HarmonyCompLumbering), "SoundMissPrefix")); - } - // Verse.PawnGraphicSet - - - } -} diff --git a/Source/AllModdingComponents/CompBalloon/Properties/AssemblyInfo.cs b/Source/AllModdingComponents/CompBalloon/Properties/AssemblyInfo.cs deleted file mode 100644 index a59f740a..00000000 --- a/Source/AllModdingComponents/CompBalloon/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -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("CompLumbering")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CompLumbering")] -[assembly: AssemblyCopyright("Copyright © Jecrell 2017")] -[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("ad466182-ac71-4e53-a0e0-3c8b5cecc2ff")] - -// 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.18.0.0")] -[assembly: AssemblyFileVersion("1.18.0.0")] \ No newline at end of file diff --git a/Source/AllModdingComponents/CompBigBox.sln b/Source/AllModdingComponents/CompBigBox.sln deleted file mode 100644 index 631de132..00000000 --- a/Source/AllModdingComponents/CompBigBox.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompBigBox", "CompBigBox\CompBigBox.csproj", "{6EC26D07-B5A0-4075-8919-3B05AF74CE87}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6EC26D07-B5A0-4075-8919-3B05AF74CE87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6EC26D07-B5A0-4075-8919-3B05AF74CE87}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6EC26D07-B5A0-4075-8919-3B05AF74CE87}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6EC26D07-B5A0-4075-8919-3B05AF74CE87}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompBigBox/Properties/AssemblyInfo.cs b/Source/AllModdingComponents/CompBigBox/Properties/AssemblyInfo.cs deleted file mode 100644 index 5bca1494..00000000 --- a/Source/AllModdingComponents/CompBigBox/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -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("CompSlotLoadable")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CompSlotLoadable")] -[assembly: AssemblyCopyright("Copyright © Jecrell 2017")] -[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("6ec26d07-b5a0-4075-8919-3b05af74ce87")] - -// 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.18.0.0")] -[assembly: AssemblyFileVersion("1.18.0.0")] \ No newline at end of file diff --git a/Source/AllModdingComponents/CompDeflector.sln b/Source/AllModdingComponents/CompDeflector.sln deleted file mode 100755 index 516cf265..00000000 --- a/Source/AllModdingComponents/CompDeflector.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompDeflector", "CompDeflector\CompDeflector.csproj", "{4A2FA470-0CA5-442B-B04D-2C4A62859CA7}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4A2FA470-0CA5-442B-B04D-2C4A62859CA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A2FA470-0CA5-442B-B04D-2C4A62859CA7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A2FA470-0CA5-442B-B04D-2C4A62859CA7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4A2FA470-0CA5-442B-B04D-2C4A62859CA7}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompDeflector/.vs/CompDeflector/v14/.suo b/Source/AllModdingComponents/CompDeflector/.vs/CompDeflector/v14/.suo deleted file mode 100644 index eb590e5a..00000000 Binary files a/Source/AllModdingComponents/CompDeflector/.vs/CompDeflector/v14/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/CompDeflector/Properties/AssemblyInfo.cs b/Source/AllModdingComponents/CompDeflector/Properties/AssemblyInfo.cs deleted file mode 100755 index 6df806ef..00000000 --- a/Source/AllModdingComponents/CompDeflector/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -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("CompDeflector")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CompDeflector")] -[assembly: AssemblyCopyright("Copyright © Jecrell 2017")] -[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("4a2fa470-0ca5-442b-b04d-2c4a62859ca7")] - -// 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.18.0.0")] -[assembly: AssemblyFileVersion("1.18.0.0")] \ No newline at end of file diff --git a/Source/AllModdingComponents/CompDelayedSpawner.sln b/Source/AllModdingComponents/CompDelayedSpawner.sln deleted file mode 100644 index b8a337a1..00000000 --- a/Source/AllModdingComponents/CompDelayedSpawner.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.12 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompDelayedSpawner", "CompDelayedSpawner\CompDelayedSpawner.csproj", "{417B8649-7A66-4580-8C75-473E46DA9C7A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {417B8649-7A66-4580-8C75-473E46DA9C7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {417B8649-7A66-4580-8C75-473E46DA9C7A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {417B8649-7A66-4580-8C75-473E46DA9C7A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {417B8649-7A66-4580-8C75-473E46DA9C7A}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompDelayedSpawner/.vs/AbilityUser/v14/.suo b/Source/AllModdingComponents/CompDelayedSpawner/.vs/AbilityUser/v14/.suo deleted file mode 100644 index 4132f901..00000000 Binary files a/Source/AllModdingComponents/CompDelayedSpawner/.vs/AbilityUser/v14/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/CompDelayedSpawner/.vs/AbilityUser/v15/.suo b/Source/AllModdingComponents/CompDelayedSpawner/.vs/AbilityUser/v15/.suo deleted file mode 100644 index 4132f901..00000000 Binary files a/Source/AllModdingComponents/CompDelayedSpawner/.vs/AbilityUser/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/CompDelayedSpawner/.vs/CompAbilityUser/v15/.suo b/Source/AllModdingComponents/CompDelayedSpawner/.vs/CompAbilityUser/v15/.suo deleted file mode 100644 index a840d3d6..00000000 Binary files a/Source/AllModdingComponents/CompDelayedSpawner/.vs/CompAbilityUser/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/CompDelayedSpawner/.vs/CompDelayedSpawner/v15/.suo b/Source/AllModdingComponents/CompDelayedSpawner/.vs/CompDelayedSpawner/v15/.suo deleted file mode 100644 index ded414f2..00000000 Binary files a/Source/AllModdingComponents/CompDelayedSpawner/.vs/CompDelayedSpawner/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/CompDelayedSpawner/AbilityPowerManager.cs b/Source/AllModdingComponents/CompDelayedSpawner/AbilityPowerManager.cs deleted file mode 100644 index 0a77e6af..00000000 --- a/Source/AllModdingComponents/CompDelayedSpawner/AbilityPowerManager.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Verse; - -namespace AbilityUser -{ - public class AbilityPowerManager : IExposable - { - - private CompAbilityUser CompAbilityUser; - public List powersint = new List(); - public List Powers = new List(); - - - public AbilityPowerManager(CompAbilityUser CompAbilityUser) - { - this.CompAbilityUser = CompAbilityUser; - } - - public void Initialize() - { - - } - - - public void AbilityPowerManagerTick() - { - } - - public void AddPawnAbility(AbilityDef psydef) - { - if (!this.CompAbilityUser.Powers.Any(x => x.powerdef.defName == psydef.defName)) - { - this.CompAbilityUser.Powers.Add(new PawnAbility(this.CompAbilityUser.abilityUser, psydef)); - } - - this.CompAbilityUser.UpdateAbilities(); - } - - public void RemovePawnAbility(AbilityDef abilityDef) - { - PawnAbility abilityToRemove = this.CompAbilityUser.Powers.FirstOrDefault(x => x.powerdef.defName == abilityDef.defName); - if (abilityToRemove != null) - { - this.CompAbilityUser.Powers.Remove(abilityToRemove); - } - - this.CompAbilityUser.UpdateAbilities(); - } - - public void ExposeData() - { - Scribe_Values.LookValue(ref this.CompAbilityUser, "CompAbilityUser", null); - } - - } -} diff --git a/Source/AllModdingComponents/CompDelayedSpawner/Projectile_AbilityAoE.cs b/Source/AllModdingComponents/CompDelayedSpawner/Projectile_AbilityAoE.cs deleted file mode 100644 index 567a4adf..00000000 --- a/Source/AllModdingComponents/CompDelayedSpawner/Projectile_AbilityAoE.cs +++ /dev/null @@ -1,74 +0,0 @@ -using RimWorld; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using UnityEngine; -using Verse; - -namespace AbilityUser -{ - public class Projectile_AbilityAoE : Projectile_AbilityBase - { - public Thing target; - - public Vector3 drawpos - { - get - { - if (this.target != null) - { - return target.DrawPos; - } - return destination; - } - } - - public override void PostMake() - { - base.PostMake(); - TargetingParameters parms = new TargetingParameters(); - parms.canTargetPawns = true; - target = this.Map.thingGrid.ThingAt(destination.ToIntVec3(), ThingCategory.Pawn); - if (target != null) Log.Message("FoundTarget"); - if (target == null) Log.Message("No Target??"); - } - - public override void Draw() - { - if (target != null) - { - Vector3 vector = drawpos; - Vector3 distance = this.destination - this.origin; - Vector3 curpos = this.destination - this.Position.ToVector3(); - var num = 1 - (Mathf.Sqrt(Mathf.Pow(curpos.x, 2) + Mathf.Pow(curpos.z, 2)) / (Mathf.Sqrt(Mathf.Pow(distance.x, 2) + Mathf.Pow(distance.z, 2)))); - float angle = 0f; - Material mat = this.Graphic.MatSingle; - Vector3 s = new Vector3(num, 1f, num); - Matrix4x4 matrix = default(Matrix4x4); - vector.y = 3; - matrix.SetTRS(vector, Quaternion.AngleAxis(angle, Vector3.up), s); - Graphics.DrawMesh(MeshPool.plane10, matrix, mat, 0); - } - } - - public override void DrawAt(Vector3 drawLoc) - { - if (target != null) - { - Vector3 vector = drawpos; - Vector3 distance = this.destination - this.origin; - Vector3 curpos = this.destination - this.Position.ToVector3(); - var num = 1 - (Mathf.Sqrt(Mathf.Pow(curpos.x, 2) + Mathf.Pow(curpos.z, 2)) / (Mathf.Sqrt(Mathf.Pow(distance.x, 2) + Mathf.Pow(distance.z, 2)))); - float angle = 0f; - Material mat = this.Graphic.MatSingle; - Vector3 s = new Vector3(num, 1f, num); - Matrix4x4 matrix = default(Matrix4x4); - vector.y = 3; - matrix.SetTRS(vector, Quaternion.AngleAxis(angle, Vector3.up), s); - Graphics.DrawMesh(MeshPool.plane10, matrix, mat, 0); - } - } - - } -} \ No newline at end of file diff --git a/Source/AllModdingComponents/CompDelayedSpawner/Properties/AssemblyInfo.cs b/Source/AllModdingComponents/CompDelayedSpawner/Properties/AssemblyInfo.cs deleted file mode 100644 index 294f8082..00000000 --- a/Source/AllModdingComponents/CompDelayedSpawner/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -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("CompDelayedSpawner")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CompDelayedSpawner")] -[assembly: AssemblyCopyright("Copyright © Jecrell 2017")] -[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("417b8649-7a66-4580-8c75-473e46da9c7a")] - -// 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.18.0.0")] -[assembly: AssemblyFileVersion("1.18.0.0")] \ No newline at end of file diff --git a/Source/AllModdingComponents/CompExtraSounds.sln b/Source/AllModdingComponents/CompExtraSounds.sln deleted file mode 100755 index 5e4017b0..00000000 --- a/Source/AllModdingComponents/CompExtraSounds.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.12 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompExtraSounds", "CompExtraSounds\CompExtraSounds.csproj", "{05E24FAB-C6BF-43B5-BF69-B92AA38338CA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompExtraSounds/Properties/AssemblyInfo.cs b/Source/AllModdingComponents/CompExtraSounds/Properties/AssemblyInfo.cs deleted file mode 100755 index eb99f767..00000000 --- a/Source/AllModdingComponents/CompExtraSounds/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -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("CompExtraSounds")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CompExtraSounds")] -[assembly: AssemblyCopyright("Copyright © Jecrell 2017")] -[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("05e24fab-c6bf-43b5-bf69-b92aa38338ca")] - -// 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.18.0.0")] -[assembly: AssemblyFileVersion("1.18.0.0")] \ No newline at end of file diff --git a/Source/AllModdingComponents/CompInstalledPart.sln b/Source/AllModdingComponents/CompInstalledPart.sln deleted file mode 100755 index 099d6811..00000000 --- a/Source/AllModdingComponents/CompInstalledPart.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.12 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompInstalledPart", "CompInstalledPart\CompInstalledPart.csproj", "{05E24FAB-C6BF-43B5-BF69-B92AA38338CA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompInstalledPart/.vs/CompInstalledPart/v15/.suo b/Source/AllModdingComponents/CompInstalledPart/.vs/CompInstalledPart/v15/.suo deleted file mode 100644 index dd8ccfbd..00000000 Binary files a/Source/AllModdingComponents/CompInstalledPart/.vs/CompInstalledPart/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/CompInstalledPart/Properties/AssemblyInfo.cs b/Source/AllModdingComponents/CompInstalledPart/Properties/AssemblyInfo.cs deleted file mode 100755 index 974db03a..00000000 --- a/Source/AllModdingComponents/CompInstalledPart/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -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("CompInstalledPart")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CompInstalledPart")] -[assembly: AssemblyCopyright("Copyright © Jecrell 2017")] -[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("05e24fab-c6bf-43b5-bf69-b92aa38338ca")] - -// 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.18.0.0")] -[assembly: AssemblyFileVersion("1.18.0.0")] \ No newline at end of file diff --git a/Source/AllModdingComponents/CompLumbering.sln b/Source/AllModdingComponents/CompLumbering.sln deleted file mode 100755 index bcccb063..00000000 --- a/Source/AllModdingComponents/CompLumbering.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.12 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompLumbering", "CompLumbering\CompLumbering.csproj", "{05E24FAB-C6BF-43B5-BF69-B92AA38338CA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompLumbering/HarmonyCompLumbering.cs b/Source/AllModdingComponents/CompLumbering/HarmonyCompLumbering.cs deleted file mode 100755 index 3604d107..00000000 --- a/Source/AllModdingComponents/CompLumbering/HarmonyCompLumbering.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Harmony; -using RimWorld; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Verse; -using Verse.AI; -using System.Reflection; -using UnityEngine; - -namespace CompLumbering -{ - [StaticConstructorOnStartup] - static class HarmonyCompLumbering - { - static HarmonyCompLumbering() - { - HarmonyInstance harmony = HarmonyInstance.Create("rimworld.jecrell.comps.lumbering"); - harmony.Patch(AccessTools.Method(typeof(PawnGraphicSet), "nakedGraphic"), null, new HarmonyMethod(typeof(HarmonyCompLumbering), "SoundMissPrefix")); - } - // Verse.PawnGraphicSet - - - } -} diff --git a/Source/AllModdingComponents/CompLumbering/Properties/AssemblyInfo.cs b/Source/AllModdingComponents/CompLumbering/Properties/AssemblyInfo.cs deleted file mode 100755 index a59f740a..00000000 --- a/Source/AllModdingComponents/CompLumbering/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -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("CompLumbering")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CompLumbering")] -[assembly: AssemblyCopyright("Copyright © Jecrell 2017")] -[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("ad466182-ac71-4e53-a0e0-3c8b5cecc2ff")] - -// 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.18.0.0")] -[assembly: AssemblyFileVersion("1.18.0.0")] \ No newline at end of file diff --git a/Source/AllModdingComponents/CompOverlays.sln b/Source/AllModdingComponents/CompOverlays.sln deleted file mode 100644 index 22856840..00000000 --- a/Source/AllModdingComponents/CompOverlays.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.12 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompOverlays", "CompOverlays\CompOverlays.csproj", "{05E24FAB-C6BF-43B5-BF69-B92AA38338CA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompOverlays/.vs/CompExtraSounds/v15/.suo b/Source/AllModdingComponents/CompOverlays/.vs/CompExtraSounds/v15/.suo deleted file mode 100644 index 4d326f12..00000000 Binary files a/Source/AllModdingComponents/CompOverlays/.vs/CompExtraSounds/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/CompOverlays/Properties/AssemblyInfo.cs b/Source/AllModdingComponents/CompOverlays/Properties/AssemblyInfo.cs deleted file mode 100644 index b158e9dd..00000000 --- a/Source/AllModdingComponents/CompOverlays/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -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("CompOverlays")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CompOverlays")] -[assembly: AssemblyCopyright("Copyright © Jecrell 2017")] -[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("05e24fab-c6bf-43b5-bf69-b92aa38338ca")] - -// 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.18.0.0")] -[assembly: AssemblyFileVersion("1.18.0.0")] \ No newline at end of file diff --git a/Source/AllModdingComponents/CompOverlays/bin/Release/CompOverlays.dll b/Source/AllModdingComponents/CompOverlays/bin/Release/CompOverlays.dll deleted file mode 100644 index d8bdc670..00000000 Binary files a/Source/AllModdingComponents/CompOverlays/bin/Release/CompOverlays.dll and /dev/null differ diff --git a/Source/AllModdingComponents/CompOversizedWeapon.sln b/Source/AllModdingComponents/CompOversizedWeapon.sln deleted file mode 100755 index b74d2f2a..00000000 --- a/Source/AllModdingComponents/CompOversizedWeapon.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompOversizedWeapon", "CompOversizedWeapon\CompOversizedWeapon.csproj", "{05E24FAB-C6BF-43B5-BF69-B92AA38338CA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompOversizedWeapon/.vs/CompExtraSounds/v14/.suo b/Source/AllModdingComponents/CompOversizedWeapon/.vs/CompExtraSounds/v14/.suo deleted file mode 100644 index 640169b9..00000000 Binary files a/Source/AllModdingComponents/CompOversizedWeapon/.vs/CompExtraSounds/v14/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/CompOversizedWeapon/HarmonyCompOversizedWeaponOLD.cs b/Source/AllModdingComponents/CompOversizedWeapon/HarmonyCompOversizedWeaponOLD.cs deleted file mode 100755 index 6f8ac5f4..00000000 --- a/Source/AllModdingComponents/CompOversizedWeapon/HarmonyCompOversizedWeaponOLD.cs +++ /dev/null @@ -1,199 +0,0 @@ -using Harmony; -using RimWorld; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Verse; -using Verse.AI; -using System.Reflection; -using UnityEngine; - -namespace CompOversizedWeapon -{ - [StaticConstructorOnStartup] - static class HarmonyCompOversizedWeapon - { - static HarmonyCompOversizedWeapon() - { - - HarmonyInstance harmony = HarmonyInstance.Create("rimworld.jecrell.comps.oversized"); - harmony.Patch(AccessTools.Method(typeof(PawnRenderer), "DrawEquipmentAiming"), new HarmonyMethod(typeof(HarmonyCompOversizedWeapon).GetMethod("DrawEquipmentAimingPreFix")), null); - //harmony.Patch(AccessTools.Method(typeof(PawnRenderer), "DrawEquipmentAiming"), null, new HarmonyMethod(typeof(HarmonyCompOversizedWeapon).GetMethod("DrawEquipmentAimingPostFix"))); - harmony.Patch(AccessTools.Method(typeof(Thing), "get_Graphic"), null, new HarmonyMethod(typeof(HarmonyCompOversizedWeapon).GetMethod("get_Graphic_PostFix"))); - - - } - - - //public static void DrawEquipmentAimingPostFix(PawnRenderer __instance, Thing eq, Vector3 drawLoc, float aimAngle) - //{ - // Pawn pawn = (Pawn)AccessTools.Field(typeof(PawnRenderer), "pawn").GetValue(__instance); - - // Pawn_EquipmentTracker pawn_EquipmentTracker = pawn.equipment; - // if (pawn_EquipmentTracker != null) - // { - // ThingWithComps thingWithComps = (ThingWithComps)AccessTools.Field(typeof(Pawn_EquipmentTracker), "primaryInt").GetValue(pawn_EquipmentTracker); - // if (thingWithComps != null) - // { - // CompOversizedWeapon compOversizedWeapon = thingWithComps.TryGetComp(); - // if (compOversizedWeapon != null) - // { - // bool flip = false; - // float num = aimAngle - 90f; - // Mesh mesh; - // if (aimAngle > 20f && aimAngle < 160f) - // { - // mesh = MeshPool.plane10; - // num += eq.def.equippedAngleOffset; - // } - // else if (aimAngle > 200f && aimAngle < 340f) - // { - // mesh = MeshPool.plane10Flip; - // flip = true; - // num -= 180f; - // num -= eq.def.equippedAngleOffset; - // } - // else - // { - // mesh = MeshPool.plane10; - // num += eq.def.equippedAngleOffset; - // } - // num %= 360f; - // Graphic_StackCount graphic_StackCount = eq.Graphic as Graphic_StackCount; - // Material matSingle; - // if (graphic_StackCount != null) - // { - // matSingle = graphic_StackCount.SubGraphicForStackCount(1, eq.def).MatSingle; - // } - // else - // { - // matSingle = eq.Graphic.MatSingle; - // } - // //mesh = MeshPool.GridPlane(thingWithComps.def.graphicData.drawSize); - // //Graphics.DrawMesh(mesh, drawLoc, Quaternion.AngleAxis(num, Vector3.up), matSingle, 0); - // //Log.Message("Oversized Draw"); - - // //Vector3 s = new Vector3(eq.def.graphicData.drawSize.x, 1f, eq.def.graphicData.drawSize.y); - // //Matrix4x4 matrix = default(Matrix4x4); - // //matrix.SetTRS(drawLoc, Quaternion.AngleAxis(num, Vector3.up), s); - // //if (!flip) Graphics.DrawMesh(MeshPool.plane10, matrix, matSingle, 0); - // //else Graphics.DrawMesh(MeshPool.plane10Flip, matrix, matSingle, 0); - // //Log.Message("Oversized Called"); - - // } - // } - // } - //} - /// - /// Adds another "layer" to the equipment aiming if they have a - /// weapon with a CompActivatableEffect. - /// - /// - /// - /// - /// - public static bool DrawEquipmentAimingPreFix(PawnRenderer __instance, Thing eq, Vector3 drawLoc, float aimAngle) - { - Pawn pawn = (Pawn)AccessTools.Field(typeof(PawnRenderer), "pawn").GetValue(__instance); - - Pawn_EquipmentTracker pawn_EquipmentTracker = pawn.equipment; - if (pawn_EquipmentTracker != null) - { - ThingWithComps thingWithComps = (ThingWithComps)AccessTools.Field(typeof(Pawn_EquipmentTracker), "primaryInt").GetValue(pawn_EquipmentTracker); - if (thingWithComps != null) - { - //If the deflector is active, it's already using this code. - ThingComp deflector = thingWithComps.AllComps.FirstOrDefault((ThingComp y) => y.GetType().ToString().Contains("Deflect")); - if (deflector != null) - { - //Log.Message("Prefix"); - bool isAnimatingNow = (bool)AccessTools.Property(deflector.GetType(), "IsAnimatingNow").GetValue(deflector, null); - if (isAnimatingNow) - { - return false; - } - } - } - CompOversizedWeapon compOversizedWeapon = thingWithComps.TryGetComp(); - if (compOversizedWeapon != null) - { - bool flip = false; - float num = aimAngle - 90f; - Mesh mesh; - if (aimAngle > 20f && aimAngle < 160f) - { - mesh = MeshPool.plane10; - num += eq.def.equippedAngleOffset; - } - else if (aimAngle > 200f && aimAngle < 340f) - { - mesh = MeshPool.plane10Flip; - flip = true; - num -= 180f; - num -= eq.def.equippedAngleOffset; - } - else - { - mesh = MeshPool.plane10; - num += eq.def.equippedAngleOffset; - } - num %= 360f; - Graphic_StackCount graphic_StackCount = eq.Graphic as Graphic_StackCount; - Material matSingle; - if (graphic_StackCount != null) - { - matSingle = graphic_StackCount.SubGraphicForStackCount(1, eq.def).MatSingle; - } - else - { - matSingle = eq.Graphic.MatSingle; - } - //mesh = MeshPool.GridPlane(thingWithComps.def.graphicData.drawSize); - //Graphics.DrawMesh(mesh, drawLoc, Quaternion.AngleAxis(num, Vector3.up), matSingle, 0); - //Log.Message("Oversized Draw"); - - Vector3 s = new Vector3(eq.def.graphicData.drawSize.x, 1f, eq.def.graphicData.drawSize.y); - Matrix4x4 matrix = default(Matrix4x4); - matrix.SetTRS(drawLoc, Quaternion.AngleAxis(num, Vector3.up), s); - if (!flip) Graphics.DrawMesh(MeshPool.plane10, matrix, matSingle, 0); - else Graphics.DrawMesh(MeshPool.plane10Flip, matrix, matSingle, 0); - return false; - //Log.Message("Oversized Called"); - - } - } - return true; - } - - - public static void get_Graphic_PostFix(Thing __instance, ref Graphic __result) - { - Graphic tempGraphic = (Graphic)AccessTools.Field(typeof(Thing), "graphicInt").GetValue(__instance); - if (tempGraphic != null) - { - ThingWithComps thingWithComps = __instance as ThingWithComps; - if (thingWithComps != null) - { - if (thingWithComps.holdingContainer != null) - { - return; - } - ThingComp activatableEffect = thingWithComps.AllComps.FirstOrDefault((ThingComp y) => y.GetType().ToString().Contains("ActivatableEffect")); - if (activatableEffect != null) - { - return; - } - CompOversizedWeapon compOversizedWeapon = thingWithComps.TryGetComp(); - if (compOversizedWeapon != null) - { - tempGraphic.drawSize = __instance.def.graphicData.drawSize; - __result = tempGraphic; - } - } - } - - } - - } -} diff --git a/Source/AllModdingComponents/CompOversizedWeapon/Properties/AssemblyInfo.cs b/Source/AllModdingComponents/CompOversizedWeapon/Properties/AssemblyInfo.cs deleted file mode 100755 index 5744d350..00000000 --- a/Source/AllModdingComponents/CompOversizedWeapon/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -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("CompOversizedWeapon")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CompOversizedWeapon")] -[assembly: AssemblyCopyright("Copyright © Jecrell 2017")] -[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("05e24fab-c6bf-43b5-bf69-b92aa38338ca")] - -// 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.18.0.0")] -[assembly: AssemblyFileVersion("1.18.0.0")] \ No newline at end of file diff --git a/Source/AllModdingComponents/CompOversizedWeapon/bin/Release/CompOversizedWeapon.dll b/Source/AllModdingComponents/CompOversizedWeapon/bin/Release/CompOversizedWeapon.dll deleted file mode 100644 index f4c606c4..00000000 Binary files a/Source/AllModdingComponents/CompOversizedWeapon/bin/Release/CompOversizedWeapon.dll and /dev/null differ diff --git a/Source/AllModdingComponents/CompSlotLoadable.sln b/Source/AllModdingComponents/CompSlotLoadable.sln deleted file mode 100755 index e97bbd54..00000000 --- a/Source/AllModdingComponents/CompSlotLoadable.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompSlotLoadable", "CompSlotLoadable\CompSlotLoadable.csproj", "{6EC26D07-B5A0-4075-8919-3B05AF74CE87}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6EC26D07-B5A0-4075-8919-3B05AF74CE87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6EC26D07-B5A0-4075-8919-3B05AF74CE87}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6EC26D07-B5A0-4075-8919-3B05AF74CE87}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6EC26D07-B5A0-4075-8919-3B05AF74CE87}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompSlotLoadable/Properties/AssemblyInfo.cs b/Source/AllModdingComponents/CompSlotLoadable/Properties/AssemblyInfo.cs deleted file mode 100755 index 5bca1494..00000000 --- a/Source/AllModdingComponents/CompSlotLoadable/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -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("CompSlotLoadable")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CompSlotLoadable")] -[assembly: AssemblyCopyright("Copyright © Jecrell 2017")] -[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("6ec26d07-b5a0-4075-8919-3b05af74ce87")] - -// 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.18.0.0")] -[assembly: AssemblyFileVersion("1.18.0.0")] \ No newline at end of file diff --git a/Source/AllModdingComponents/CompToggleDef.sln b/Source/AllModdingComponents/CompToggleDef.sln deleted file mode 100755 index d8a7c6ee..00000000 --- a/Source/AllModdingComponents/CompToggleDef.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.12 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompToggleDef", "CompToggleDef\CompToggleDef.csproj", "{9BECA870-0C2F-4F40-BEA1-6E99D68F9EDF}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9BECA870-0C2F-4F40-BEA1-6E99D68F9EDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9BECA870-0C2F-4F40-BEA1-6E99D68F9EDF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9BECA870-0C2F-4F40-BEA1-6E99D68F9EDF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9BECA870-0C2F-4F40-BEA1-6E99D68F9EDF}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompToggleDef/.vs/CompToggleDef/v15/.suo b/Source/AllModdingComponents/CompToggleDef/.vs/CompToggleDef/v15/.suo deleted file mode 100644 index 61a1459d..00000000 Binary files a/Source/AllModdingComponents/CompToggleDef/.vs/CompToggleDef/v15/.suo and /dev/null differ diff --git a/Source/AllModdingComponents/CompToggleDef/Properties/AssemblyInfo.cs b/Source/AllModdingComponents/CompToggleDef/Properties/AssemblyInfo.cs deleted file mode 100644 index 3b8f1f0c..00000000 --- a/Source/AllModdingComponents/CompToggleDef/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -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("CompToggleDef")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CompToggleDef")] -[assembly: AssemblyCopyright("Copyright © roxxploxx 2017")] -[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("9beca870-0c2f-4f40-bea1-6e99d68f9edf")] - -// 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.18.0.0")] -[assembly: AssemblyFileVersion("1.18.0.0")] \ No newline at end of file diff --git a/Source/AllModdingComponents/CompToggleDef/bin/Release/CompToggleDef.pdb b/Source/AllModdingComponents/CompToggleDef/bin/Release/CompToggleDef.pdb deleted file mode 100644 index cbf603fe..00000000 Binary files a/Source/AllModdingComponents/CompToggleDef/bin/Release/CompToggleDef.pdb and /dev/null differ diff --git a/Source/AllModdingComponents/CompVehicle.sln b/Source/AllModdingComponents/CompVehicle.sln deleted file mode 100755 index cb7572b2..00000000 --- a/Source/AllModdingComponents/CompVehicle.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.12 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompVehicle", "CompVehicle\CompVehicle.csproj", "{05E24FAB-C6BF-43B5-BF69-B92AA38338CA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {05E24FAB-C6BF-43B5-BF69-B92AA38338CA}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompVehicle.userprefs b/Source/AllModdingComponents/CompVehicle.userprefs deleted file mode 100644 index c17463f8..00000000 --- a/Source/AllModdingComponents/CompVehicle.userprefs +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Source/AllModdingComponents/CompVehicle/AbandonedVehicleContentsComp.cs b/Source/AllModdingComponents/CompVehicle/AbandonedVehicleContentsComp.cs deleted file mode 100755 index 8f01eaa3..00000000 --- a/Source/AllModdingComponents/CompVehicle/AbandonedVehicleContentsComp.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; - -using System.Collections.Generic; -using UnityEngine; -using Verse; -using RimWorld.Planet; -namespace CompVehicle -{ - //WIP - public class AbandonedVehicleContentsComp : WorldObjectComp, IThingHolder - { - public ThingOwner contents; - private static List tmpContents = new List(); - private static List tmpContentsStr = new List(); - - public AbandonedVehicleContentsComp() - { - this.contents = new ThingOwner(this); - } - public void GetChildHolders(List outChildren) - { - ThingOwnerUtility.AppendThingHoldersFromThings(outChildren, this.GetDirectlyHeldThings()); - } - - public ThingOwner GetDirectlyHeldThings() - { - return this.contents; - } - public override void PostExposeData() - { - base.PostExposeData(); - Scribe_Deep.Look(ref this.contents, "contents", new object[] - { - this - }); - } - - - } -} diff --git a/Source/AllModdingComponents/CompVehicle/Bill_LoadVehicle.cs b/Source/AllModdingComponents/CompVehicle/Bill_LoadVehicle.cs deleted file mode 100755 index 212b4ecf..00000000 --- a/Source/AllModdingComponents/CompVehicle/Bill_LoadVehicle.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Verse; - -namespace CompVehicle -{ - public class Bill_LoadVehicle : IExposable - { - public VehicleHandlerGroup group; - public Pawn pawnToLoad; - - public Bill_LoadVehicle() - { - } - - public Bill_LoadVehicle(Pawn newLoad, Pawn newVehicle, VehicleHandlerGroup newGroup) - { - pawnToLoad = newLoad; - group = newGroup; - } - - public void ExposeData() - { - Scribe_References.Look(ref pawnToLoad, "pawnToLoad"); - Scribe_References.Look(ref group, "group"); - } - } -} \ No newline at end of file diff --git a/Source/AllModdingComponents/CompVehicle/CVPathFinder.cs b/Source/AllModdingComponents/CompVehicle/CVPathFinder.cs deleted file mode 100644 index e87b3214..00000000 --- a/Source/AllModdingComponents/CompVehicle/CVPathFinder.cs +++ /dev/null @@ -1,829 +0,0 @@ -using RimWorld; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using UnityEngine; -using Verse.AI; -using Verse; - -namespace CompVehicle -{ - public class CVPathFinder - { - internal struct CostNode - { - public int index; - - public int cost; - - public CostNode(int index, int cost) - { - this.index = index; - this.cost = cost; - } - } - - private struct CVPathFinderNodeFast - { - public int knownCost; - - public int heuristicCost; - - public int parentIndex; - - public int costNodeCost; - - public ushort status; - } - - internal class CostNodeComparer : IComparer - { - public int Compare(CVPathFinder.CostNode a, CVPathFinder.CostNode b) - { - return a.cost.CompareTo(b.cost); - } - } - - private Map map; - - private FastPriorityQueue openList; - - private CVPathFinder.CVPathFinderNodeFast[] calcGrid; - - private ushort statusOpenValue = 1; - - private ushort statusClosedValue = 2; - - private RegionCostCalculatorWrapper regionCostCalculator; - - private int mapSizeX; - - private int mapSizeZ; - - private PathGrid pathGrid; - - private Building[] edificeGrid; - - private CellIndices cellIndices; - - private List disallowedCornerIndices = new List(4); - - public const int DefaultMoveTicksCardinal = 13; - - private const int DefaultMoveTicksDiagonal = 18; - - private const int SearchLimit = 160000; - - private static readonly int[] Directions = new int[] - { - 0, - 1, - 0, - -1, - 1, - 1, - -1, - -1, - -1, - 0, - 1, - 0, - -1, - 1, - 1, - -1 - }; - - private const int Cost_DoorToBash = 300; - - private const int Cost_BlockedWall = 70; - - private const float Cost_BlockedWallPerHitPoint = 0.11f; - - public const int Cost_OutsideAllowedArea = 600; - - private const int Cost_PawnCollision = 175; - - private const int NodesToOpenBeforeRegionBasedPathing = 2000; - - private const float NonRegionBasedHeuristicStrengthAnimal = 1.75f; - - private static readonly SimpleCurve NonRegionBasedHeuristicStrengthHuman_DistanceCurve = new SimpleCurve - { - { - new CurvePoint(40f, 1f), - true - }, - { - new CurvePoint(120f, 2.8f), - true - } - }; - - private static readonly SimpleCurve RegionHeuristicWeightByNodesOpened = new SimpleCurve - { - { - new CurvePoint(0f, 5f), - true - }, - { - new CurvePoint(4000f, 5f), - true - }, - { - new CurvePoint(5000f, 500f), - true - } - }; - - public CVPathFinder(Map map) - { - this.map = map; - this.mapSizeX = map.Size.x; - this.mapSizeZ = map.Size.z; - this.calcGrid = new CVPathFinder.CVPathFinderNodeFast[this.mapSizeX * this.mapSizeZ]; - this.openList = new FastPriorityQueue(new CVPathFinder.CostNodeComparer()); - this.regionCostCalculator = new RegionCostCalculatorWrapper(map); - } - - //public PawnPath FindPath(IntVec3 start, LocalTargetInfo dest, Pawn pawn, PathEndMode peMode = PathEndMode.OnCell) - //{ - // bool flag = false; - // if (pawn != null && pawn.CurJob != null && pawn.CurJob.canBash) - // { - // flag = true; - // } - // Danger maxDanger = Danger.Deadly; - // bool canBash = flag; - // return this.FindPath(start, dest, TraverseParms.For(pawn, maxDanger, TraverseMode.ByPawn, canBash), peMode); - //} - - public PawnPath FindPath(IntVec3 start, LocalTargetInfo dest, TraverseParms traverseParms, PathEndMode peMode = PathEndMode.OnCell) - { - //Walk through Walls Mode - if (DebugSettings.pathThroughWalls) - { - traverseParms.mode = TraverseMode.PassAllDestroyableThings; - } - //Check if there's a pawn to path for - Pawn pawn = traverseParms.pawn; - if (pawn != null && pawn.Map != this.map) - { - Log.Error(string.Concat(new object[] - { - "Tried to FindPath for pawn which is spawned in another map. His map CVPathFinder should have been used, not this one. pawn=", - pawn, - " pawn.Map=", - pawn.Map, - " map=", - this.map - })); - return PawnPath.NotFound; - } - //Make sure the start is valid - if (!start.IsValid) - { - Log.Error(string.Concat(new object[] - { - "Tried to FindPath with invalid start ", - start, - ", pawn= ", - pawn - })); - return PawnPath.NotFound; - } - //Make sure the end is valid - if (!dest.IsValid) - { - Log.Error(string.Concat(new object[] - { - "Tried to FindPath with invalid dest ", - dest, - ", pawn= ", - pawn - })); - return PawnPath.NotFound; - } - //Check if it's possible to get to the destination - Log.Error(traverseParms.mode.ToString()); - if (traverseParms.mode == TraverseMode.ByPawn) - { - if (!pawn.CanReach(dest, peMode, Danger.Deadly, traverseParms.canBash, traverseParms.mode)) - { - return PawnPath.NotFound; - } - } - else if (!this.map.reachability.CanReach(start, dest, peMode, traverseParms)) - { - return PawnPath.NotFound; - } - Log.Error("a"); - this.PfProfilerBeginSample(string.Concat(new object[] - { - "FindPath for ", - pawn, - " from ", - start, - " to ", - dest, - (!dest.HasThing) ? string.Empty : (" at " + dest.Cell) - })); - this.cellIndices = this.map.cellIndices; - this.pathGrid = this.map.pathGrid; - this.edificeGrid = this.map.edificeGrid.InnerArray; - int x = dest.Cell.x; - int z = dest.Cell.z; - int num = this.cellIndices.CellToIndex(start); - int num2 = this.cellIndices.CellToIndex(dest.Cell); - ByteGrid byteGrid = (pawn == null) ? null : pawn.GetAvoidGrid(); - bool flag = traverseParms.mode == TraverseMode.PassAllDestroyableThings; - bool flag2 = traverseParms.mode != TraverseMode.NoPassClosedDoorsOrWater && traverseParms.mode != TraverseMode.PassAllDestroyableThingsNotWater; - bool flag3 = !flag; - CellRect cellRect = this.CalculateDestinationRect(dest, peMode); - bool flag4 = cellRect.Width == 1 && cellRect.Height == 1; - int[] array = this.map.pathGrid.pathGrid; - EdificeGrid edificeGrid = this.map.edificeGrid; - int num3 = 0; - int num4 = 0; - Area allowedArea = this.GetAllowedArea(pawn); - bool flag5 = pawn != null && PawnUtility.ShouldCollideWithPawns(pawn); - bool flag6 = true && DebugViewSettings.drawPaths; - bool flag7 = !flag && start.GetRegion(this.map, RegionType.Set_Passable) != null; - bool flag8 = !flag || !flag3; - bool flag9 = false; - int num5 = 0; - int num6 = 0; - float num7 = this.DetermineHeuristicStrength(pawn, start, dest); - int num8; - int num9; - Log.Error("b"); - if (pawn != null) - { - num8 = pawn.TicksPerMoveCardinal; - num9 = pawn.TicksPerMoveDiagonal; - } - else - { - num8 = 13; - num9 = 18; - } - this.CalculateAndAddDisallowedCorners(traverseParms, peMode, cellRect); - this.InitStatusesAndPushStartNode(ref num, start); - while (true) - { - Log.Error("c"); - this.PfProfilerBeginSample("Open cell"); - if (this.openList.Count <= 0) - { - break; - } - num5 += this.openList.Count; - num6++; - CVPathFinder.CostNode costNode = this.openList.Pop(); - num = costNode.index; - if (costNode.cost != this.calcGrid[num].costNodeCost) - { - Log.Error("d"); - this.PfProfilerEndSample(); - } - else if (this.calcGrid[num].status == this.statusClosedValue) - { - Log.Error("e"); - this.PfProfilerEndSample(); - } - else - { - Log.Error("f"); - IntVec3 c = this.cellIndices.IndexToCell(num); - int x2 = c.x; - int z2 = c.z; - if (flag6) - { - this.DebugFlash(c, (float)this.calcGrid[num].knownCost / 1500f, this.calcGrid[num].knownCost.ToString()); - } - if (flag4) - { - if (num == num2) - { - goto Block_27; - } - } - else if (cellRect.Contains(c) && !this.disallowedCornerIndices.Contains(num)) - { - goto Block_29; - } - if (num3 > 160000) - { - goto Block_30; - } - this.PfProfilerEndSample(); - this.PfProfilerBeginSample("Neighbor consideration"); - for (int i = 0; i < 8; i++) - { - uint num10 = (uint)(x2 + CVPathFinder.Directions[i]); - uint num11 = (uint)(z2 + CVPathFinder.Directions[i + 8]); - if ((ulong)num10 < (ulong)((long)this.mapSizeX) && (ulong)num11 < (ulong)((long)this.mapSizeZ)) - { - int num12 = (int)num10; - int num13 = (int)num11; - int num14 = this.cellIndices.CellToIndex(num12, num13); - if (this.calcGrid[num14].status != this.statusClosedValue || flag9) - { - int num15 = 0; - bool flag10 = false; - if (flag2 || !new IntVec3(num12, 0, num13).GetTerrain(this.map).HasTag("Water") || (pawn.GetComp() != null && pawn.GetComp().Props.vehicleType == VehicleType.Amphibious)) - { - if (!this.pathGrid.WalkableFast(num14)) - { - if (!flag) - { - if (flag6) - { - this.DebugFlash(new IntVec3(num12, 0, num13), 0.22f, "walk"); - } - goto IL_C2E; - } - flag10 = true; - num15 += 70; - Building building = edificeGrid[num14]; - if (building == null) - { - goto IL_C2E; - } - if (!CVPathFinder.IsDestroyable(building)) - { - goto IL_C2E; - } - num15 += (int)((float)building.HitPoints * 0.11f); - } - if (i > 3) - { - switch (i) - { - case 4: - if (this.BlocksDiagonalMovement(num - this.mapSizeX)) - { - if (flag8) - { - if (flag6) - { - this.DebugFlash(new IntVec3(x2, 0, z2 - 1), 0.9f, "corn"); - } - goto IL_C2E; - } - num15 += 70; - } - if (this.BlocksDiagonalMovement(num + 1)) - { - if (flag8) - { - if (flag6) - { - this.DebugFlash(new IntVec3(x2 + 1, 0, z2), 0.9f, "corn"); - } - goto IL_C2E; - } - num15 += 70; - } - break; - case 5: - if (this.BlocksDiagonalMovement(num + this.mapSizeX)) - { - if (flag8) - { - if (flag6) - { - this.DebugFlash(new IntVec3(x2, 0, z2 + 1), 0.9f, "corn"); - } - goto IL_C2E; - } - num15 += 70; - } - if (this.BlocksDiagonalMovement(num + 1)) - { - if (flag8) - { - if (flag6) - { - this.DebugFlash(new IntVec3(x2 + 1, 0, z2), 0.9f, "corn"); - } - goto IL_C2E; - } - num15 += 70; - } - break; - case 6: - if (this.BlocksDiagonalMovement(num + this.mapSizeX)) - { - if (flag8) - { - if (flag6) - { - this.DebugFlash(new IntVec3(x2, 0, z2 + 1), 0.9f, "corn"); - } - goto IL_C2E; - } - num15 += 70; - } - if (this.BlocksDiagonalMovement(num - 1)) - { - if (flag8) - { - if (flag6) - { - this.DebugFlash(new IntVec3(x2 - 1, 0, z2), 0.9f, "corn"); - } - goto IL_C2E; - } - num15 += 70; - } - break; - case 7: - if (this.BlocksDiagonalMovement(num - this.mapSizeX)) - { - if (flag8) - { - if (flag6) - { - this.DebugFlash(new IntVec3(x2, 0, z2 - 1), 0.9f, "corn"); - } - goto IL_C2E; - } - num15 += 70; - } - if (this.BlocksDiagonalMovement(num - 1)) - { - if (flag8) - { - if (flag6) - { - this.DebugFlash(new IntVec3(x2 - 1, 0, z2), 0.9f, "corn"); - } - goto IL_C2E; - } - num15 += 70; - } - break; - } - } - Log.Error("g"); - int num16 = (i <= 3) ? num8 : num9; - num16 += num15; - if (!flag10) - { - num16 += array[num14]; - } - if (byteGrid != null) - { - num16 += (int)(byteGrid[num14] * 8); - } - if (allowedArea != null && !allowedArea[num14]) - { - num16 += 600; - } - if (flag5 && PawnUtility.AnyPawnBlockingPathAt(new IntVec3(num12, 0, num13), pawn, false, false)) - { - num16 += 175; - } - Log.Error("h"); - Building building2 = this.edificeGrid[num14]; - if (building2 != null) - { - this.PfProfilerBeginSample("Edifices"); - int buildingCost = CVPathFinder.GetBuildingCost(building2, traverseParms, pawn); - if (buildingCost == 2147483647) - { - this.PfProfilerEndSample(); - goto IL_C2E; - } - num16 += buildingCost; - this.PfProfilerEndSample(); - } - int num17 = num16 + this.calcGrid[num].knownCost; - ushort status = this.calcGrid[num14].status; - if (status == this.statusClosedValue || status == this.statusOpenValue) - { - int num18 = 0; - if (status == this.statusClosedValue) - { - num18 = num8; - } - if (this.calcGrid[num14].knownCost <= num17 + num18) - { - goto IL_C2E; - } - } - if (status != this.statusClosedValue && status != this.statusOpenValue) - { - if (flag9) - { - this.calcGrid[num14].heuristicCost = Mathf.RoundToInt((float)this.regionCostCalculator.GetPathCostFromDestToRegion(num14) * CVPathFinder.RegionHeuristicWeightByNodesOpened.Evaluate((float)num4)); - } - else - { - int dx = Math.Abs(num12 - x); - int dz = Math.Abs(num13 - z); - int num19 = GenMath.OctileDistance(dx, dz, num8, num9); - this.calcGrid[num14].heuristicCost = Mathf.RoundToInt((float)num19 * num7); - } - } - int num20 = num17 + this.calcGrid[num14].heuristicCost; - this.calcGrid[num14].parentIndex = num; - this.calcGrid[num14].knownCost = num17; - this.calcGrid[num14].status = this.statusOpenValue; - this.calcGrid[num14].costNodeCost = num20; - num4++; - this.openList.Push(new CVPathFinder.CostNode(num14, num20)); - } - } - } - IL_C2E:; - } - this.PfProfilerEndSample(); - num3++; - this.calcGrid[num].status = this.statusClosedValue; - if (num4 >= 2000 && flag7 && !flag9) - { - flag9 = true; - this.regionCostCalculator.Init(cellRect, traverseParms, num8, num9, byteGrid, allowedArea, this.disallowedCornerIndices); - this.InitStatusesAndPushStartNode(ref num, start); - num4 = 0; - num3 = 0; - } - } - } - string text = (pawn == null || pawn.CurJob == null) ? "null" : pawn.CurJob.ToString(); - string text2 = (pawn == null || pawn.Faction == null) ? "null" : pawn.Faction.ToString(); - Log.Warning(string.Concat(new object[] - { - pawn, - " pathing from ", - start, - " to ", - dest, - " ran out of cells to process.\nJob:", - text, - "\nFaction: ", - text2 - })); - this.DebugDrawRichData(); - this.PfProfilerEndSample(); - return PawnPath.NotFound; - Block_27: - this.PfProfilerEndSample(); - PawnPath result = this.FinalizedPath(num); - this.PfProfilerEndSample(); - return result; - Block_29: - this.PfProfilerEndSample(); - PawnPath result2 = this.FinalizedPath(num); - this.PfProfilerEndSample(); - return result2; - Block_30: - Log.Warning(string.Concat(new object[] - { - pawn, - " pathing from ", - start, - " to ", - dest, - " hit search limit of ", - 160000, - " cells." - })); - this.DebugDrawRichData(); - this.PfProfilerEndSample(); - return PawnPath.NotFound; - } - - public static int GetBuildingCost(Building b, TraverseParms traverseParms, Pawn pawn) - { - Building_Door building_Door = b as Building_Door; - if (building_Door != null) - { - switch (traverseParms.mode) - { - case TraverseMode.ByPawn: - if (!traverseParms.canBash && building_Door.IsForbiddenToPass(pawn)) - { - if (DebugViewSettings.drawPaths) - { - CVPathFinder.DebugFlash(b.Position, b.Map, 0.77f, "forbid"); - } - return 2147483647; - } - if (!building_Door.FreePassage) - { - if (building_Door.PawnCanOpen(pawn)) - { - return building_Door.TicksToOpenNow; - } - if (traverseParms.canBash) - { - return 300; - } - if (DebugViewSettings.drawPaths) - { - CVPathFinder.DebugFlash(b.Position, b.Map, 0.34f, "cant pass"); - } - return 2147483647; - } - break; - case TraverseMode.NoPassClosedDoors: - case TraverseMode.NoPassClosedDoorsOrWater: - if (!building_Door.FreePassage) - { - return 2147483647; - } - break; - } - } - else if (pawn != null) - { - return (int)b.PathFindCostFor(pawn); - } - return 0; - } - - public static bool IsDestroyable(Thing th) - { - return th.def.useHitPoints && th.def.destroyable; - } - - private bool BlocksDiagonalMovement(int x, int z) - { - return CVPathFinder.BlocksDiagonalMovement(x, z, this.map); - } - - private bool BlocksDiagonalMovement(int index) - { - return CVPathFinder.BlocksDiagonalMovement(index, this.map); - } - - public static bool BlocksDiagonalMovement(int x, int z, Map map) - { - return CVPathFinder.BlocksDiagonalMovement(map.cellIndices.CellToIndex(x, z), map); - } - - public static bool BlocksDiagonalMovement(int index, Map map) - { - return !map.pathGrid.WalkableFast(index) || map.edificeGrid[index] is Building_Door; - } - - private void DebugFlash(IntVec3 c, float colorPct, string str) - { - CVPathFinder.DebugFlash(c, this.map, colorPct, str); - } - - private static void DebugFlash(IntVec3 c, Map map, float colorPct, string str) - { - map.debugDrawer.FlashCell(c, colorPct, str, 50); - } - - private PawnPath FinalizedPath(int finalIndex) - { - PawnPath emptyPawnPath = this.map.pawnPathPool.GetEmptyPawnPath(); - int num = finalIndex; - while (true) - { - CVPathFinder.CVPathFinderNodeFast pathFinderNodeFast = this.calcGrid[num]; - int parentIndex = pathFinderNodeFast.parentIndex; - emptyPawnPath.AddNode(this.map.cellIndices.IndexToCell(num)); - if (num == parentIndex) - { - break; - } - num = parentIndex; - } - emptyPawnPath.SetupFound((float)this.calcGrid[finalIndex].knownCost); - return emptyPawnPath; - } - - private void InitStatusesAndPushStartNode(ref int curIndex, IntVec3 start) - { - this.statusOpenValue += 2; - this.statusClosedValue += 2; - if (this.statusClosedValue >= 65435) - { - this.ResetStatuses(); - } - curIndex = this.cellIndices.CellToIndex(start); - this.calcGrid[curIndex].knownCost = 0; - this.calcGrid[curIndex].heuristicCost = 0; - this.calcGrid[curIndex].costNodeCost = 0; - this.calcGrid[curIndex].parentIndex = curIndex; - this.calcGrid[curIndex].status = this.statusOpenValue; - this.openList.Clear(); - this.openList.Push(new CVPathFinder.CostNode(curIndex, 0)); - } - - private void ResetStatuses() - { - int num = this.calcGrid.Length; - for (int i = 0; i < num; i++) - { - this.calcGrid[i].status = 0; - } - this.statusOpenValue = 1; - this.statusClosedValue = 2; - } - - [Conditional("PFPROFILE")] - private void PfProfilerBeginSample(string s) - { - } - - [Conditional("PFPROFILE")] - private void PfProfilerEndSample() - { - } - - private void DebugDrawRichData() - { - if (DebugViewSettings.drawPaths) - { - while (this.openList.Count > 0) - { - int index = this.openList.Pop().index; - IntVec3 c = new IntVec3(index % this.mapSizeX, 0, index / this.mapSizeX); - this.map.debugDrawer.FlashCell(c, 0f, "open", 50); - } - } - } - - private float DetermineHeuristicStrength(Pawn pawn, IntVec3 start, LocalTargetInfo dest) - { - if (pawn != null && pawn.RaceProps.Animal) - { - return 1.75f; - } - float lengthHorizontal = (start - dest.Cell).LengthHorizontal; - return (float)Mathf.RoundToInt(CVPathFinder.NonRegionBasedHeuristicStrengthHuman_DistanceCurve.Evaluate(lengthHorizontal)); - } - - private CellRect CalculateDestinationRect(LocalTargetInfo dest, PathEndMode peMode) - { - CellRect result; - if (!dest.HasThing || peMode == PathEndMode.OnCell) - { - result = CellRect.SingleCell(dest.Cell); - } - else - { - result = dest.Thing.OccupiedRect(); - } - if (peMode == PathEndMode.Touch) - { - result = result.ExpandedBy(1); - } - return result; - } - - private Area GetAllowedArea(Pawn pawn) - { - if (pawn != null && pawn.playerSettings != null && !pawn.Drafted && ForbidUtility.CaresAboutForbidden(pawn, true)) - { - Area area = pawn.playerSettings.EffectiveAreaRestrictionInPawnCurrentMap; - if (area != null && area.TrueCount <= 0) - { - area = null; - } - return area; - } - return null; - } - - private void CalculateAndAddDisallowedCorners(TraverseParms traverseParms, PathEndMode peMode, CellRect destinationRect) - { - this.disallowedCornerIndices.Clear(); - if (peMode == PathEndMode.Touch) - { - int minX = destinationRect.minX; - int minZ = destinationRect.minZ; - int maxX = destinationRect.maxX; - int maxZ = destinationRect.maxZ; - if (!this.IsCornerTouchAllowed(minX + 1, minZ + 1, minX + 1, minZ, minX, minZ + 1)) - { - this.disallowedCornerIndices.Add(this.map.cellIndices.CellToIndex(minX, minZ)); - } - if (!this.IsCornerTouchAllowed(minX + 1, maxZ - 1, minX + 1, maxZ, minX, maxZ - 1)) - { - this.disallowedCornerIndices.Add(this.map.cellIndices.CellToIndex(minX, maxZ)); - } - if (!this.IsCornerTouchAllowed(maxX - 1, maxZ - 1, maxX - 1, maxZ, maxX, maxZ - 1)) - { - this.disallowedCornerIndices.Add(this.map.cellIndices.CellToIndex(maxX, maxZ)); - } - if (!this.IsCornerTouchAllowed(maxX - 1, minZ + 1, maxX - 1, minZ, maxX, minZ + 1)) - { - this.disallowedCornerIndices.Add(this.map.cellIndices.CellToIndex(maxX, minZ)); - } - } - } - - private bool IsCornerTouchAllowed(int cornerX, int cornerZ, int adjCardinal1X, int adjCardinal1Z, int adjCardinal2X, int adjCardinal2Z) - { - return TouchPathEndModeUtility.IsCornerTouchAllowed(cornerX, cornerZ, adjCardinal1X, adjCardinal1Z, adjCardinal2X, adjCardinal2Z, this.map); - } - } -} diff --git a/Source/AllModdingComponents/CompVehicle/Command_VehicleHandler.cs b/Source/AllModdingComponents/CompVehicle/Command_VehicleHandler.cs deleted file mode 100755 index 1334e5cb..00000000 --- a/Source/AllModdingComponents/CompVehicle/Command_VehicleHandler.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using UnityEngine; -using Verse; - -namespace CompVehicle -{ - public class Command_VehicleHandler : Command - { - public Action action; - - public override float GetWidth(float maxWidth) => NewWidth(maxWidth); - - public float NewWidth(float maxWidth) - { - return base.GetWidth(maxWidth) * 0.75f; - } - - public override void ProcessInput(Event ev) - { - base.ProcessInput(ev); - action(); - } - } -} \ No newline at end of file diff --git a/Source/AllModdingComponents/CompVehicle/CompProperties_Vehicle.cs b/Source/AllModdingComponents/CompVehicle/CompProperties_Vehicle.cs deleted file mode 100755 index 4e5b84c6..00000000 --- a/Source/AllModdingComponents/CompVehicle/CompProperties_Vehicle.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System.Collections.Generic; -using UnityEngine; -using Verse; - -namespace CompVehicle -{ - public enum VehicleType - { - Aircraft, - AircraftAmphibious, - AircraftSpace, - Amphibious, - LandWheeled, - LandHover, - LandWalker, - Sea, - SeaSubmarine, - SpaceOuter - } - - public enum HandlingType - { - Incapable = 0, - HandlerRequired = 1, - NoHandlerRequired = 2 - } - - public class CompProperties_Vehicle : CompProperties - { - //Added by Swenzi 1/1/2018 - //Allow animals to pull vehicles and be in a role that controls Movement Handling - public bool animalDrivers = false; - - //Modifies the draw offset of the animal when it's attached to the vehicle - public Vector3 drawOffset = new Vector3(0, 0, 0); - - //Whether or not the drivers of a pawn should be drawn, i.e. animals pulling a wagon or a pawn on a motorcycle - public bool drawDrivers = false; - - //The minimum body size requirement for an animal to haul a vehicle - public float minBodySize = 0; - - - public bool canBeDowned = false; // Does this become downed? - - public bool canWiggleWhenDowned = false; // Does this wiggle when downed? - - //Added 7/23/17 - public float cargoCapacity = 385.554f; // Cargo capacity for your vehicle in kilograms. - - public float ejectIfBelowHealthPercent = 0.0f - ; // Unloads all passengers when health percentage drops below this point - - //---------- Additions made by Swenzi ------------ - - public float ejectIfBelowNeedPercent = 0.2f - ; //Unloads passenger when one of their major needs drops below this percent - - public float foodNeedRate = 2.0E-05f; //The rate at which the food need changes while in the vehicle - public float joyNeedRate = 1.5E-05f; //The rate at which the joy need changes while in the vehicle - public string labelBroken = "Broken"; // Label replacer for when the vehicle is broken / "dead". - public string labelDamaged = "Damaged"; // Label replacer for when the vehicle is damaged. - public string labelInoperable = "Inoperable"; // Label replacer for when the vehicle is inoperable / "downed". - public string labelUndamaged = "Undamaged"; // Label replacer for when the vehicle is undamaged. - - public HandlingType manipulationHandling = HandlingType.Incapable - ; // Does this vehicle rely on others to load it? Or can it "pick" up objects? - - public int momentumTimeSeconds = 2; //Counter for how long the vehicle can travel without a driver in seconds - public HandlingType movementHandling = HandlingType.HandlerRequired; // Is the movement automatic? - public float restNeedRate = 2.0E-05f; //The rate at which the rest need changes while in the vehicle - public List roles = new List(); // Defines roles of passengers. - public float seatHitCriticalHitChance = 0.05f; // Chance of doubling the damage. - public float seatHitDamageFactor = 2.0f; // Multiply & apply this damage to passengers in seats - public SoundDef soundEject = null; // Sound when a character exits the vehicle. - public SoundDef soundEntry = null; // Sound for when a character enters the vehicle. - public SoundDef soundMoving = null; // For a sound to play while the vehicle is moving. - - public VehicleType vehicleType = VehicleType.LandWheeled; // Defaults to wheeled land vehicles. - public HandlingType weaponHandling = HandlingType.HandlerRequired; // Are the weapons automatic? - - public float worldSpeedFactor = 2.0f - ; // How much faster does this move on the world map than a standard pawn? Caravan speed is calculated from an average of the combined speeds (Vanilla formula) - - public float worldSpeedFactorNoFuel = 0.5f - ; //Modifies the change in world speed if this vehicle is present but does not have fuel - - public CompProperties_Vehicle() - { - compClass = typeof(CompVehicle); - } - - //Vehicle type (Can only be one, effects not implemented yet) - //public bool isAir = false; //Is the vehicle an aircraft? i.e. airplane, helicopter - //public bool isLand = false; //Is the vehicle a land based vehicle? i.e. car, tank - //public bool isWater = false; //Is the vehicle a water based vehicle? i.e. boat - - //---------- Additions made by Swenzi end ------------- - - public int TotalCapacity - { - get - { - var result = 0; - if (roles != null && roles.Count > 0) - foreach (var role in roles) - result += role.slots; - return result; - } - } - } -} \ No newline at end of file diff --git a/Source/AllModdingComponents/CompVehicle/CompProperties_VehicleSpawner.cs b/Source/AllModdingComponents/CompVehicle/CompProperties_VehicleSpawner.cs deleted file mode 100644 index bf7e15fe..00000000 --- a/Source/AllModdingComponents/CompVehicle/CompProperties_VehicleSpawner.cs +++ /dev/null @@ -1,18 +0,0 @@ -using RimWorld; -using Verse; - -namespace CompVehicle -{ - public class CompProperties_VehicleSpawner : CompProperties - { - public float assemblyTime = 20f; //In seconds - public string useVerb = "Assemble {0}"; - public PawnKindDef vehicleToSpawn = null; - public EffecterDef workEffect = EffecterDefOf.ConstructMetal; - - public CompProperties_VehicleSpawner() - { - compClass = typeof(CompVehicleSpawner); - } - } -} \ No newline at end of file diff --git a/Source/AllModdingComponents/CompVehicle/CompVehicle.cs b/Source/AllModdingComponents/CompVehicle/CompVehicle.cs deleted file mode 100644 index 0ef117a3..00000000 --- a/Source/AllModdingComponents/CompVehicle/CompVehicle.cs +++ /dev/null @@ -1,817 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using RimWorld; -using RimWorld.Planet; -using UnityEngine; -using Verse; -using Verse.AI; -using Verse.AI.Group; -using Verse.Sound; - -namespace CompVehicle -{ - public enum PilotableSlotType - { - pilot, - gunner, - crew, - dutiless - } - - public enum MovingState - { - frozen = 0, - able - } - - public enum WeaponState - { - frozen = 0, - able - } - - public enum ManipulationState - { - frozen = 0, - able - } - - - public class CompVehicle : ThingComp - { - public List bills = new List(); - - public bool draftStatusChanged = false - ; //Boolean connected to comp to prevent excessive changing of the draftstatus when forming a caravan - - public float fuelConsumptionRate = 80f; //Stores what the fuel usage rate is, i.e. how much fuel is lost - public List handlers = new List(); - public Rot4 lastDirection = Rot4.South; //J Stores the last direction a vehicle was facing. - public ManipulationState manipulationStatus = ManipulationState.able; - - public MovingState movingStatus = MovingState.able; - private Sustainer movingSustainer; - public List repairCostList = new List(); - - public bool ResolvedITTab; - public bool ResolvedPawns; - public int tickCount; //Counter for how long the vehicle has traveled without a driver - - public List vehicleContents = new List() - ; //Stores the handlergroups of the vehicle and its pawns while the vehicle is in a caravan - - public bool warnedNoFuel; //Boolean connected to comp to prevent spamming of the Caravan No Fuel warning message - public WeaponState weaponStatus = WeaponState.able; - - public bool CanManipulate => - Props.manipulationHandling > HandlingType.HandlerRequired || ManipulationHandlerAvailable; - - public bool ManipulationHandlerAvailable - { - get - { - var result = false; - if (handlers != null && handlers.Count > 0) - foreach (var group in handlers) - if (group.handlers != null && group.handlers.Count > 0) - if (group.role != null) - if ((group.role.handlingTypes & HandlingTypeFlags.Manipulation) != - HandlingTypeFlags.None) - result = group.handlers.Any((Pawn x) => !x.Dead && !x.Downed); - return result; - } - } - - public bool CanMove => Props.movementHandling > HandlingType.HandlerRequired || MovementHandlerAvailable; - - public bool MovementHandlerAvailable - { - get - { - var result = false; - if (handlers != null && handlers.Count > 0) - foreach (var group in handlers) - if (group.handlers != null && group.handlers.Count > 0) - if (group.role != null) - if ((group.role.handlingTypes & HandlingTypeFlags.Movement) != HandlingTypeFlags.None) - result = group.handlers.Any((Pawn x) => !x.Dead && !x.Downed); - return result; - } - } - - public bool CanFireWeapons => Props.weaponHandling > HandlingType.HandlerRequired || WeaponHandlerAvailable; - - public bool WeaponHandlerAvailable - { - get - { - var result = false; - if (handlers != null && handlers.Count > 0) - foreach (var group in handlers) - if (group.role != null && group.handlers != null && group.handlers.Count > 0) - if ((group.role.handlingTypes & HandlingTypeFlags.Weapons) != HandlingTypeFlags.None) - result = group.handlers.Any((Pawn x) => !x.Dead && !x.Downed); - return result; - } - } - - public Pawn Pawn => parent as Pawn; - - - public List AllOccupants - { - get - { - var result = new List(); - if (handlers != null && handlers.Count > 0) - foreach (var group in handlers) - if (group.handlers != null && group.handlers.Count > 0) result.AddRange(group.handlers); - return result; - } - } - - public CompProperties_Vehicle Props => (CompProperties_Vehicle) props; - - public void ResolveITab() - { - if (!ResolvedITTab) - { - ResolvedITTab = true; - //PostExposeData(); - //Make the ITab - var tabs = Pawn.GetInspectTabs(); - if (tabs != null && tabs.Count() > 0) - if (tabs.FirstOrDefault(x => x is ITab_Passengers) == null) - try - { - Pawn.def.inspectorTabsResolved.Add( - InspectTabManager.GetSharedInstance(typeof(ITab_Passengers))); - } - catch (Exception ex) - { - Log.Error(string.Concat("Could not instantiate inspector tab of type ", - typeof(ITab_Passengers), ": ", ex)); - } - } - } - - private Pawn GeneratePawn(List optionalDefs = null) - { - var newPawnKind = Pawn.Faction.RandomPawnKind(); - if (optionalDefs != null && optionalDefs.Count > 0) - newPawnKind = optionalDefs.RandomElementByWeight(x => x.selectionWeight).kind; - - var request = new PawnGenerationRequest(newPawnKind, Pawn.Faction, PawnGenerationContext.NonPlayer, - Pawn.Map.Tile, false, false, false, false, true, true, 1f, false, true, true, false, false, false, - false, false, 0, null, (0-1), null, null, null, null); - var item = PawnGenerator.GeneratePawn(request); - return item; - } - - public void InitializeVehicleHandlers() - { - if (handlers != null && handlers.Count > 0) return; - - if (Props.roles != null && Props.roles.Count > 0) - foreach (var role in Props.roles) - handlers.Add(new VehicleHandlerGroup(Pawn, role, new List())); - } - - public void ResolveFactionPilots() - { - //this.Pawn.pather. - //-------- Additions Made By Swenzi -------- - //Purpose: Remove Spawning of Premade Pawns in Vehicles - //Logic: Players should not get free pawns for making vehicles - //Improvements: None I can think of - - //Premade Pawns should only appear for non-player-faction vehicles - if (!Pawn.Faction.IsPlayer) - if (!ResolvedPawns) - { - ResolvedPawns = true; - - if (handlers != null && handlers.Count > 0) - foreach (var group in handlers) - { - var role = group.role; - if (role.slotsToOperate > 0) - { - var minimum = Math.Min(role.slotsToOperate, role.slots); - var maximum = Math.Max(role.slotsToOperate, role.slots); - var range = Rand.Range(minimum, maximum); - for (var i = 0; i < range; i++) - { - var newPawn = GeneratePawn(role.preferredHandlers); - if (newPawn != null) - group.handlers.TryAdd(newPawn); - } - } - } - } - } - - public void ResolveEjection() - { - //----Additions Made By Swenzi----- - //Purpose: Ejects pawns if the need of that pawn is below the threshold set by ejectIfBelowNeedPercent - //Logic: Prevents pawns from starving to death or other need related issues i.e. moral from poor management of pawns in vehicles - //Improvements: Have pawns remember the vehicle they left, so they return after needs are satisfied? - //Adjustments by Jecrell - - if (parent is Pawn vehicle && vehicle.Spawned && handlers != null && handlers.Count > 0 && - !(Pawn.GetLord()?.LordJob?.ToString() == "RimWorld.LordJob_FormAndSendCaravan") && - !(Pawn.CurJob?.def == JobDefOf.UnloadYourInventory) && !Pawn.Position.InNoBuildEdgeArea(Pawn.Map) && - !Pawn.IsFighting() - ) - { - //Do not eject anyone from the vehicle for needs during combat. - //It's too dangerous to leave during combat. - if (this?.Pawn?.Map?.attackTargetsCache?.GetPotentialTargetsFor(Pawn) - ?.FirstOrDefault(x => !x.ThreatDisabled(vehicle)) == null) //TODO May require further investigation for proper update - foreach (var group in handlers) - { - var toEject = group?.handlers?.InnerListForReading?.FirstOrDefault(x => - !x.Spawned && - x?.needs?.AllNeeds?.FirstOrDefault( - y => y.CurLevelPercentage < Props.ejectIfBelowNeedPercent) != null); - if (toEject != null) - { - Messages.Message("MessagePawnLeftVehicle".Translate(toEject.Label, Pawn.Label, "low"), Pawn, - MessageTypeDefOf.NegativeHealthEvent); - Pawn b; - Eject(toEject); - } - } - - //} - - //----Additions Made By Swenzi----- - - //Every 250 ticks - if (Props.ejectIfBelowHealthPercent > 0.0f) - if (Find.TickManager.TicksGame % 250 == 0) - { - if (Pawn.Dead || Pawn.Downed) - if (handlers != null && handlers.Count > 0) - { - foreach (var group in handlers) - EjectAll(); - weaponStatus = WeaponState.frozen; - movingStatus = MovingState.frozen; - if (Pawn.Downed && Pawn.Faction != Faction.OfPlayerSilentFail) - Pawn.SetFaction(Faction.OfPlayerSilentFail); - return; - } - - if (Pawn.health != null) - if (Pawn.health.summaryHealth != null) - { - var currentHealthPercentage = Pawn.health.summaryHealth.SummaryHealthPercent; - if (currentHealthPercentage < Props.ejectIfBelowHealthPercent) - if (handlers != null && handlers.Count > 0) - { - foreach (var group in handlers) - EjectAll(); - weaponStatus = WeaponState.frozen; - movingStatus = MovingState.frozen; - if (Pawn.Downed) Pawn.SetFaction(Faction.OfPlayerSilentFail); - } - } - } - } - } - - public void ResolveStatus() - { - //-------- Additions Made By Swenzi -------- - //Purpose: Fixes bugs and adds better fuel consumption if the vehicle is refuelable - //Logic: Better fuel consumption logic saves chemfuel, less bugs is good - //Improvements: None I can think of. - //Other Info: Changes marked with --- ADB Swenzi --- due to the dispersion of modifications in the method - if (Pawn?.GetComp() is CompRefuelable compRefuelable) - { - //------ ADB Swenzi ------ - //If it isn't moving than it shouldn't use fuel - if (Pawn.pather != null && !Pawn.pather.Moving || - Pawn.GetCaravan() != null && Pawn.GetCaravan().CantMove) - compRefuelable.Props.fuelConsumptionRate = 0f; - else - //If it's moving than it should use fuel - compRefuelable.Props.fuelConsumptionRate = fuelConsumptionRate; - //------ ADB Swenzi ------ - - if (!compRefuelable.HasFuel) - { - weaponStatus = WeaponState.frozen; - movingStatus = MovingState.frozen; - return; - } - } - - if (MovementHandlerAvailable && movingStatus == MovingState.frozen) - movingStatus = MovingState.able; - - if (WeaponHandlerAvailable && weaponStatus == WeaponState.frozen) - weaponStatus = WeaponState.able; - - if (!MovementHandlerAvailable && movingStatus == MovingState.able && - Props.movementHandling != HandlingType.NoHandlerRequired) - movingStatus = MovingState.frozen; - - if (!WeaponHandlerAvailable && weaponStatus == WeaponState.able && - Props.weaponHandling != HandlingType.NoHandlerRequired) - weaponStatus = WeaponState.frozen; - - if (!ManipulationHandlerAvailable && manipulationStatus == ManipulationState.able && - Props.manipulationHandling != HandlingType.NoHandlerRequired) - manipulationStatus = ManipulationState.frozen; - - // ------ ADB Swenzi ------- - //If it can move and it's in a caravan wandering than it might be stuck - //aka the movement thing hasn't kicked in. Change draft status just to be safe. - - //Fixes bug where weapon tries to fire even after gunner is removed - if (weaponStatus != WeaponState.able) - if (this?.Pawn?.CurJob?.def == JobDefOf.Wait_Combat || - this?.Pawn?.CurJob?.def == JobDefOf.AttackStatic || - this?.Pawn?.CurJob?.def == JobDefOf.AttackMelee) - if (!this?.Pawn?.pather?.Moving ?? false) - Pawn.jobs.EndCurrentJob(JobCondition.None, false); - else - Pawn.jobs.EndCurrentJob(JobCondition.None, true); - if (movingStatus == MovingState.able) - { - //Removed caravan member check as apparently pawns currently forming a caravan aren't part of one yet - // if (this.Pawn.CurJob != null && this.Pawn.CurJob.def == JobDefOf.GotoWander) - // { - // if (!this.draftStatusChanged){ - //this.Pawn.drafter.Drafted = !this.Pawn.Drafted; - //this.draftStatusChanged = true; - // } - // } - // else - // { - // //Safety to allow this for future caravans - // this.draftStatusChanged = false; - // } - } - else - { - //Vehicles that can't move shouldn't have Lords, it causes problems cause they never complete their jobs and toils - if (this?.Pawn?.GetLord() != null) - Pawn.GetLord().lordManager.RemoveLord(Pawn.GetLord()); - - if (Pawn.pather != null && Pawn.pather.Moving) - if (tickCount > Props.momentumTimeSeconds * 60) - { - //No more fake momentum, vehicle should stop - //this.Pawn.jobs. - if (Pawn.pather.Moving) Pawn.jobs.EndCurrentJob(JobCondition.None, false); - Pawn.pather.StopDead(); - tickCount = 0; - } - else - { - //Be cool, keep the momentum going - tickCount++; - } - } - if (movingStatus != MovingState.able && weaponStatus != WeaponState.able && - this?.Pawn?.mindState != null) - Pawn.mindState.lastJobTag = JobTag.Idle; - // ------ ADB Swenzi ------- - if (Pawn.Drafted && movingStatus == MovingState.frozen) - Pawn.drafter.Drafted = false; - } - - // ------ Additions made by Swenzi ------ - //Purpose: Reduce the needs of pawns while in the vehicle - //Logic: Prevent cryosleep gimmicks by storing pawns in vehicles forever - //To prevent unneccessary patching of game methods, needs are modified by this function - //Improvements: Mood modifiers if they stay too long? Traits effecting mood? Driving Experience? - // - //Addendum by Jecrell: - //-Added the ability for some pawns to resolve needs inside the vehicle. - //-Prevent needs from falling while resting. - public void ResolveNeeds() - { - //Player only, NPC factions is weird unless better logic is make them go back to vehicles after being ejected - if (Pawn.Faction.IsPlayer) - if (handlers != null && handlers.Count > 0) - foreach (var group in handlers) - if ((group?.handlers?.Count ?? 0) > 0) - for (var i = 0; i < group.handlers.Count; i++) - { - var pawn = group.handlers[i]; - //Don't change needs while a caravan member. - if (pawn.IsCaravanMember()) continue; - var pawn_needs = pawn.needs.AllNeeds; - //These needs are major and should change - for (var j = 0; j < pawn_needs.Count; j++) - { - if (pawn_needs[j] is Need_Rest need_Rest) - { - pawn_needs[j].CurLevel -= Props.restNeedRate; - CompVehicleUtility.TrySatisfyRestNeed(pawn, need_Rest, Pawn); - } - if (pawn_needs[j] is Need_Food need_Food) - { - pawn_needs[j].CurLevel -= Props.foodNeedRate; - CompVehicleUtility.TrySatisfyFoodNeed(pawn, need_Food, Pawn); - } - if (pawn_needs[j] is Need_Chemical need_Chemical) - { - pawn_needs[j].CurLevel -= Props.foodNeedRate; - CompVehicleUtility.TrySatisfyChemicalNeed(pawn, need_Chemical, Pawn); - } - if (pawn_needs[j].def == NeedDefOf.Joy) - pawn_needs[j].CurLevel -= Props.joyNeedRate; - } - } - } - - // ------ Additions made by Swenzi ------ - - public void RemovePawn(Pawn pawn) - { - //Log.Message("Remove1"); - if (handlers is List groups && !groups.NullOrEmpty()) - { - //Log.Message("Remove2"); - - var tempGroups = groups.FindAll(x => x.handlers.InnerListForReading.Contains(pawn)); - if (!tempGroups.NullOrEmpty()) - foreach (var group in tempGroups) - //Log.Message("Remove4"); - - if (group.handlers.InnerListForReading.Remove(pawn)) - return; - } - } - - public void Eject(Pawn pawn) - { - if (!pawn.Spawned) - GenSpawn.Spawn(pawn, Pawn.PositionHeld.RandomAdjacentCell8Way(), Pawn.MapHeld); - RemovePawn(pawn); - } - - public void EjectAll() - { - var pawnsToEject = new List(AllOccupants); - if (pawnsToEject != null && pawnsToEject.Count > 0) - foreach (var p in pawnsToEject) - Eject(p); - } - - public void GiveLoadJob(Thing thingToLoad, VehicleHandlerGroup group) - { - if (thingToLoad is Pawn pawn) - { - var newJob = new Job(DefDatabase.GetNamed("CompVehicle_LoadPassenger"), Pawn); - pawn.jobs.TryTakeOrderedJob(newJob); - - if (bills != null && bills.Count > 0) - { - var bill = bills.FirstOrDefault(x => x.pawnToLoad == pawn); - if (bill != null) - { - bill.group = group; - return; - } - } - bills.Add(new Bill_LoadVehicle(pawn, Pawn, group)); - } - } - - public void Notify_Loaded(Pawn pawnToLoad) - { - if ((bills != null) & (bills.Count > 0)) - { - var bill = bills.FirstOrDefault(x => x.pawnToLoad == pawnToLoad); - if (bill != null) - { - if (pawnToLoad.IsWorldPawn()) - Log.Warning("Called LoadPawn on world pawn"); - //var curFaction = pawnToLoad.Faction; - pawnToLoad.DeSpawn(); - if (pawnToLoad.holdingOwner != null) - pawnToLoad.holdingOwner.TryTransferToContainer(pawnToLoad, bill.group.handlers); - else bill.group.handlers.TryAdd(pawnToLoad); - if (!pawnToLoad.IsWorldPawn()) - Find.WorldPawns.PassToWorld(pawnToLoad, PawnDiscardDecideMode.Decide); - //pawnToLoad.SetFaction(curFaction); - bills.Remove(bill); - } - } - } - - public override void CompTick() - { - base.CompTick(); - InitializeVehicleHandlers(); - ResolveITab(); - ResolveFactionPilots(); - ResolveEjection(); - ResolveStatus(); - ResolveMovementSound(); - - //------ Additions made by Swenzi ------ - ResolveNeeds(); - //------ Additions made by Swenzi ------ - - } - - //Additions by Swenzi 1/1/2018 - public override void PostDraw() - { - //Additions by Swenzi 1/1/2018 - ResolveGraphics(); - base.PostDraw(); - } - //Draw the drivers in the vehicle if drawDrivers is true - public void ResolveGraphics(){ - if(Props.drawDrivers){ - List haulers = new List(); - if (handlers != null && handlers.Count > 0) - { - //Amass a list of drivers that are alive and in a slot modifying movement - foreach (var group in handlers) - { - if (group.handlers != null && group.handlers.Count > 0){ - if (group.role != null && (group.role.handlingTypes & HandlingTypeFlags.Movement) != HandlingTypeFlags.None) - { - if (group.handlers.Any((Pawn x) => !x.Downed && !x.Dead)) - { - foreach (Pawn p in group.handlers) - { - if (!p.Downed && !p.Dead) - { - haulers.Add(p); - } - } - } - } - } - } - if(haulers.Count > 0){ - //Display the drivers that are in the vehicle - Pawn p = parent as Pawn; - float width = p.ageTracker.CurKindLifeStage.bodyGraphicData.drawSize.x; - float height = p.ageTracker.CurKindLifeStage.bodyGraphicData.drawSize.y; - float xMod = -width / 4; - float yMod = 0; - foreach(Pawn d in haulers){ - d.Rotation = parent.Rotation; - //If it's the last driver to be displayed and on a new row, put it in the center - if (haulers.Count % 2 == 1 && d == haulers.Last()) - { - d.Drawer.renderer.RenderPawnAt(ResolveOffset(ResolveOffset(p.Drawer.DrawPos, new Vector3(0, 0, yMod), parent.Rotation), Props.drawOffset, parent.Rotation)); - } - else{ - //Draw drivers in 2 x 1 rows - d.Drawer.renderer.RenderPawnAt(ResolveOffset(ResolveOffset(p.Drawer.DrawPos,new Vector3(xMod, 0, yMod),parent.Rotation), Props.drawOffset, parent.Rotation)); - xMod += 2 * width/4; - if(xMod > 2 * width / 4){ - xMod = -width/3; - yMod += height/3; - } - } - } - } - } - } - } - - public Vector3 ResolveOffset(Vector3 oldPos, Vector3 offset, Rot4 rot){ - Vector3 newPos = oldPos; - if(rot == Rot4.North){ - newPos = new Vector3(oldPos.x + offset.x, oldPos.y, oldPos.z + offset.z); - } - if(rot == Rot4.East){ - newPos = new Vector3(oldPos.x + offset.z, oldPos.y, oldPos.z - offset.x); - } - if(rot == Rot4.South){ - newPos = new Vector3(oldPos.x - offset.x, oldPos.y, oldPos.z - offset.z); - } - if(rot == Rot4.West){ - newPos = new Vector3(oldPos.x - offset.z, oldPos.y, oldPos.z + offset.x); - } - return newPos; - } - - - public void ResolveMovementSound() - { - if (parent is Pawn p && Props.soundMoving != null) - { - var isMovingNow = p?.pather?.Moving ?? false; - if (isMovingNow && movingSustainer == null) - { - var info = SoundInfo.InMap(parent, MaintenanceType.None); - movingSustainer = Props.soundMoving.TrySpawnSustainer(info); - } - else if (!isMovingNow && movingSustainer != null) - { - movingSustainer.End(); - movingSustainer = null; - } - } - } - - public void GetVehicleButtonFloatMenu(VehicleHandlerGroup group, bool canLoad) - { - var list = new List(); - var map = Pawn.Map; - var tempList = group?.handlers?.InnerListForReading != null - ? new List(group.handlers.InnerListForReading) - : new List(); - if (canLoad && tempList.Count == 0) - { - SoundDefOf.Tick_Tiny.PlayOneShotOnCamera(null); - //Additions by Swenzi 1/1/2018 - //Allow animals to ride in vehicles or pull vehicles (animals only allowed to be in slots that allow movement) - if (Props.animalDrivers && (group.role.handlingTypes & HandlingTypeFlags.Movement) != HandlingTypeFlags.None) - { - Find.Targeter.BeginTargeting( - new TargetingParameters - { - validator = ti => ti.Thing is Pawn p && p.Faction != null && p.Faction.IsPlayer && p.training != null && p.training.HasLearned(DefDatabase.GetNamed("Haul")) && p.BodySize > Props.minBodySize - }, delegate (LocalTargetInfo target) { GiveLoadJob(target.Thing, group); }, null, null, null); - }else{ - Find.Targeter.BeginTargeting( - new TargetingParameters - { - validator = ti => ti.Thing is Pawn p && p.RaceProps.Humanlike && p.IsColonistPlayerControlled - }, delegate (LocalTargetInfo target) { GiveLoadJob(target.Thing, group); }, null, null, null); - - } - return; - } - if (canLoad) - { - var text = "CompVehicle_Load".Translate(group.role.label); - //Func extraPartOnGUI = (Rect rect) => Widgets.InfoCardButton(rect.x + 5f, rect.y + (rect.height - 24f) / 2f, handler); - - //Additions by Swenzi 1/1/2018 - //Allow animals to ride in vehicles or pull vehicles (animals only allowed to be in slots that allow movement) - if(Props.animalDrivers && (group.role.handlingTypes & HandlingTypeFlags.Movement) != HandlingTypeFlags.None){ - list.Add(new FloatMenuOption(text, delegate - { - SoundDefOf.Tick_Tiny.PlayOneShotOnCamera(null); - Find.Targeter.BeginTargeting( - new TargetingParameters - { - validator = ti => - ti.Thing is Pawn p && p.Faction != null && p.Faction.IsPlayer && p.training != null && p.training.HasLearned(DefDatabase.GetNamed("Haul")) && p.BodySize > Props.minBodySize - }, delegate (LocalTargetInfo target) { GiveLoadJob(target.Thing, group); }, null, null, null); - }, MenuOptionPriority.Default, null, null, 29f, null, null)); - } - else{ - list.Add(new FloatMenuOption(text, delegate - { - SoundDefOf.Tick_Tiny.PlayOneShotOnCamera(null); - Find.Targeter.BeginTargeting( - new TargetingParameters - { - validator = ti => - ti.Thing is Pawn p && p.RaceProps.Humanlike && p.IsColonistPlayerControlled - }, delegate (LocalTargetInfo target) { GiveLoadJob(target.Thing, group); }, null, null, null); - }, MenuOptionPriority.Default, null, null, 29f, null, null)); - - } - } - if (!canLoad && tempList.Count == 1) - { - var temptempList = new List(tempList); - foreach (var handler in temptempList) - Eject(handler); - temptempList.Clear(); - return; - } - if (tempList.Count != 0) - foreach (var handler in tempList) - { - var text = "CompVehicle_Unload".Translate(handler.Name.ToStringFull); - var arg_121_0 = list; - Func extraPartOnGUI = rect => - Widgets.InfoCardButton(rect.x + 5f, rect.y + (rect.height - 24f) / 2f, handler); - list.Add(new FloatMenuOption(text, delegate { Eject(handler); }, MenuOptionPriority.Default, null, - null, 29f, extraPartOnGUI, null)); - } - Find.WindowStack.Add(new FloatMenu(list)); - } - - public override IEnumerable CompGetGizmosExtra() - { - var enumerator = base.CompGetGizmosExtra().GetEnumerator(); - while (enumerator.MoveNext()) - { - var current = enumerator.Current; - yield return current; - } - //Log.Message("0"); - if (Pawn.Faction == Faction.OfPlayerSilentFail) - { - //Log.Message("1"); - if (Props.roles != null && Props.roles.Count > 0) - foreach (var group in handlers) - //Log.Message("3"); - if (group.role != null) - { - //Log.Message("4"); - var loadable = group.AreSlotsAvailable; - var unloadable = (group?.handlers?.Count ?? 0) > 0; - if (loadable || unloadable) - { - //Log.Message("5"); - var button = new Command_VehicleHandler - { - action = delegate - { - SoundDefOf.Tick_Tiny.PlayOneShotOnCamera(null); - GetVehicleButtonFloatMenu(group, loadable); - }, - hotKey = KeyBindingDefOf.Misc1 - }; - var label = "CompVehicle_Load"; - var desc = "CompVehicle_LoadDesc"; - if (!loadable && unloadable) - { - label = "CompVehicle_Unload"; - desc = "CompVehicle_UnloadDesc"; - } - if (loadable && unloadable) - { - label = "CompVehicle_LoadUnload"; - desc = "CompVehicle_LoadUnloadDesc"; - } - - button.defaultLabel = label.Translate(group.role.label.CapitalizeFirst()); - button.defaultDesc = desc.Translate(group.role.label.CapitalizeFirst()); - button.icon = - TexCommand - .Install; //ContentFinder.Get("UI/Commands/TryReconnect", true); - - var pctFilled = Pawn.health.summaryHealth.SummaryHealthPercent; - button.disabled = Pawn.Downed || Pawn.Dead || - pctFilled < Props.ejectIfBelowHealthPercent; - button.disabledReason = "CompVehicle_DisabledDesc".Translate(); - - //Log.Message(button.ToString()); - yield return button; - } - } - if (Pawn.drafter == null) Pawn.drafter = new Pawn_DraftController(Pawn); - } - } - - public override void PostExposeData() - { - base.PostExposeData(); - Scribe_Values.Look(ref ResolvedPawns, "ResolvedPawns", false); - Scribe_Values.Look(ref weaponStatus, "weaponStatus", WeaponState.able); - Scribe_Values.Look(ref movingStatus, "movingStatus", MovingState.able); - Scribe_Values.Look(ref lastDirection, "lastDirection", Rot4.South); - - Scribe_Collections.Look(ref vehicleContents, "vehicleContents", - LookMode.Deep); //Stores the handlergroups of the vehicle and its pawns while the vehicle is in a caravan - Scribe_Collections.Look(ref handlers, "handlers", LookMode.Deep); - Scribe_Collections.Look(ref bills, "bills", LookMode.Deep); - - //Scribe_Collections.Look(ref this.pilots, "pilots", LookMode.Deep, new object[0]); - //Scribe_Collections.Look(ref this.gunners, "gunners", LookMode.Deep, new object[0]); - //Scribe_Collections.Look(ref this.crew, "crew", LookMode.Deep, new object[0]); - //Scribe_Collections.Look(ref this.passengers, "passengers", LookMode.Deep, new object[0]); - } - - #region SwenzisCode - - //------ Additions By Swenzi ------- - //Purpose: Control the boolean warnedOnNoFuel - //Logic: Needed to prevent spamming of the warning message - - public bool WarnedOnNoFuel - { - get => warnedNoFuel; - - set => warnedNoFuel = value; - } - - //Purpose: Store the pawns in the vehicle while it is in a caravan - //Logic: Allows the vehicle to remember what pawns were inside it so they can be put back in later on map entry - - public List PawnsInVehicle - { - get => vehicleContents; - - set => vehicleContents = value; - } - - //------ Additions By Swenzi ------- - - #endregion SwenzisCode - } -} \ No newline at end of file diff --git a/Source/AllModdingComponents/CompVehicle/CompVehicle.csproj b/Source/AllModdingComponents/CompVehicle/CompVehicle.csproj deleted file mode 100644 index 4e00fb0b..00000000 --- a/Source/AllModdingComponents/CompVehicle/CompVehicle.csproj +++ /dev/null @@ -1,82 +0,0 @@ - - - - - Debug - AnyCPU - {6E907669-2299-47E1-B144-8BC7488DF5C4} - Library - Properties - CompVehicle - CompVehicle - v4.7.2 - 512 - - - - false - none - false - ..\..\..\Assemblies\ - DEBUG;TRACE - prompt - 4 - false - - - none - true - ..\..\..\Assemblies\ - TRACE - prompt - 4 - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.1.2566 - - - 2.0.0.8 - - - - - \ No newline at end of file diff --git a/Source/AllModdingComponents/CompVehicle/CompVehicle.sln b/Source/AllModdingComponents/CompVehicle/CompVehicle.sln deleted file mode 100644 index 201b28ef..00000000 --- a/Source/AllModdingComponents/CompVehicle/CompVehicle.sln +++ /dev/null @@ -1,17 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompVehicle", "CompVehicle.csproj", "{6E907669-2299-47E1-B144-8BC7488DF5C4}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6E907669-2299-47E1-B144-8BC7488DF5C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6E907669-2299-47E1-B144-8BC7488DF5C4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6E907669-2299-47E1-B144-8BC7488DF5C4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6E907669-2299-47E1-B144-8BC7488DF5C4}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/Source/AllModdingComponents/CompVehicle/CompVehicle.userprefs b/Source/AllModdingComponents/CompVehicle/CompVehicle.userprefs deleted file mode 100644 index 6fd6f72e..00000000 --- a/Source/AllModdingComponents/CompVehicle/CompVehicle.userprefs +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Source/AllModdingComponents/CompVehicle/CompVehicleSpawner.cs b/Source/AllModdingComponents/CompVehicle/CompVehicleSpawner.cs deleted file mode 100644 index 05c956cf..00000000 --- a/Source/AllModdingComponents/CompVehicle/CompVehicleSpawner.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Collections.Generic; -using Verse; -using Verse.AI; - -namespace CompVehicle -{ - /// Component that spawns a vehicle. - public class CompVehicleSpawner : ThingComp - { - /// Get the thing that is creating the vehicle. - public ThingWithComps Spawner => parent; - - /// Use the XML configurations. - public CompProperties_VehicleSpawner Props => props as CompProperties_VehicleSpawner; - - /// Adds a right click option to unpack and spawn the vehicle. - public override IEnumerable CompFloatMenuOptions(Pawn selPawn) - { - foreach (var o in base.CompFloatMenuOptions(selPawn)) yield return o; - - if (!Spawner.DestroyedOrNull() && Spawner.Spawned && - !selPawn.DestroyedOrNull() && selPawn.Spawned) - yield return new FloatMenuOption(string.Format(Props.useVerb, Spawner.Label), - delegate - { - selPawn.jobs.TryTakeOrderedJob(new Job(DefDatabase.GetNamed("CompVehicle_Assemble"), - Spawner)); - }); - } - - /// When assembled, be sure to spawn the vehicle and destroy this object. - public void Notify_Assembled(Pawn assembler) - { - var pawn = (Pawn) GenSpawn.Spawn(PawnGenerator.GeneratePawn(Props.vehicleToSpawn, assembler.Faction), - Spawner.PositionHeld, Spawner.MapHeld); - Spawner.Destroy(DestroyMode.KillFinalize); - } - } -} \ No newline at end of file diff --git a/Source/AllModdingComponents/CompVehicle/CompVehicleUtility.cs b/Source/AllModdingComponents/CompVehicle/CompVehicleUtility.cs deleted file mode 100644 index 4ed971e6..00000000 --- a/Source/AllModdingComponents/CompVehicle/CompVehicleUtility.cs +++ /dev/null @@ -1,158 +0,0 @@ -using RimWorld; -using RimWorld.Planet; -using Verse; - -namespace CompVehicle -{ - public class CompVehicleUtility - { - // ToDo: Rotate pawns to allow for some pawns to rest while others - // use the vehicle. - // RimWorld.Planet.CaravanPawnsNeedsUtility - public static void TrySatisfyRestNeed(Pawn pawn, Need_Rest rest, Pawn Vehicle) - { - //Do not try to rest in the vehicle during combat. - //It's too dangerous to sleep while driving. - //if (Vehicle.Map?.attackTargetsCache?.GetPotentialTargetsFor(Vehicle)?.FirstOrDefault(x => !x.ThreatDisabled()) == null) - //{ - // float restEffectiveness = RestUtility.PawnHealthRestEffectivenessFactor(pawn); - // rest.TickResting(restEffectiveness); - //} - } - - - // RimWorld.Planet.CaravanPawnsNeedsUtility - public static void TrySatisfyFoodNeed(Pawn pawn, Need_Food food, Pawn vehicle) - { - if (food.CurCategory < HungerCategory.Hungry) - return; - Thing thing; - Pawn pawn2; - if (VirtualPlantsUtility.CanEatVirtualPlantsNow(pawn)) - { - VirtualPlantsUtility.EatVirtualPlants(pawn); - } - else if (TryGetBestFood(vehicle, pawn, out thing, out pawn2)) - { - food.CurLevel += thing.Ingested(pawn, food.NutritionWanted); - if (thing.Destroyed) - if (pawn2 != null) - vehicle.inventory.innerContainer.Remove(thing); - } - } - - // RimWorld.Planet.CaravanInventoryUtility - public static bool TryGetBestFood(Pawn vehicle, Pawn forPawn, out Thing food, out Pawn owner) - { - var list = vehicle?.inventory?.innerContainer?.InnerListForReading; - Thing thing = null; - var num = 0f; - for (var i = 0; i < list.Count; i++) - { - var thing2 = list[i]; - if (CanNowEatForNutrition(thing2, forPawn)) - { - var foodScore = CaravanPawnsNeedsUtility.GetFoodScore(thing2, forPawn); - if (thing == null || foodScore > num) - { - thing = thing2; - num = foodScore; - } - } - } - if (thing != null) - { - food = thing; - owner = forPawn; //CaravanInventoryUtility.GetOwnerOf(caravan, thing); - return true; - } - food = null; - owner = null; - return false; - } - - // RimWorld.Planet.CaravanPawnsNeedsUtility - public static bool CanNowEatForNutrition(Thing food, Pawn pawn) - { - return food.IngestibleNow && CanNowEatForNutrition(food.def, pawn); - } - - // RimWorld.Planet.CaravanPawnsNeedsUtility - public static bool CanNowEatForNutrition(ThingDef food, Pawn pawn) - { - return CanEverEatForNutrition(food, pawn) && (pawn.needs.food.CurCategory >= HungerCategory.Starving || - food.ingestible.preferability > - FoodPreferability.DesperateOnly); - } - - // RimWorld.Planet.CaravanPawnsNeedsUtility - public static bool CanEverEatForNutrition(ThingDef food, Pawn pawn) - { - return food.IsNutritionGivingIngestible && pawn.RaceProps.CanEverEat(food) && - food.ingestible.preferability > FoodPreferability.NeverForNutrition && - (!pawn.IsTeetotaler() || !food.IsDrug); - } - - // RimWorld.Planet.CaravanPawnsNeedsUtility - public static void TrySatisfyChemicalNeed(Pawn pawn, Need_Chemical chemical, Pawn vehicle) - { - if (chemical.CurCategory >= DrugDesireCategory.Satisfied) - return; - Thing drug; - Pawn drugOwner; - if (TryGetBestDrug(vehicle, pawn, chemical, out drug, out drugOwner)) - IngestDrug(pawn, drug, drugOwner, vehicle); - } - - // RimWorld.Planet.CaravanInventoryUtility - public static bool TryGetBestDrug(Pawn vehicle, Pawn forPawn, Need_Chemical chemical, out Thing drug, - out Pawn owner) - { - var addictionHediff = chemical.AddictionHediff; - if (addictionHediff == null) - { - drug = null; - owner = null; - return false; - } - var list = vehicle?.inventory?.innerContainer?.InnerListForReading; - Thing thing = null; - for (var i = 0; i < list.Count; i++) - { - var thing2 = list[i]; - if (thing2.IngestibleNow && thing2.def.IsDrug) - { - var compDrug = thing2.TryGetComp(); - if (compDrug != null && compDrug.Props.chemical != null) - if (compDrug.Props.chemical.addictionHediff == addictionHediff.def) - if (forPawn.drugs == null || forPawn.drugs.CurrentPolicy[thing2.def].allowedForAddiction || - forPawn.story == null || forPawn.story.traits.DegreeOfTrait(TraitDefOf.DrugDesire) > 0) - { - thing = thing2; - break; - } - } - } - if (thing != null) - { - drug = thing; - owner = forPawn; - return true; - } - drug = null; - owner = null; - return false; - } - - // RimWorld.Planet.CaravanPawnsNeedsUtility - public static void IngestDrug(Pawn pawn, Thing drug, Pawn drugOwner, Pawn vehicle) - { - var num = drug.Ingested(pawn, 0f); - var food = pawn.needs.food; - if (food != null) - food.CurLevel += num; - if (drug.Destroyed && drugOwner != null) - vehicle.inventory.innerContainer.Remove(drug); - } - } -} \ No newline at end of file diff --git a/Source/AllModdingComponents/CompVehicle/DeathActionWorker_NoCorpse.cs b/Source/AllModdingComponents/CompVehicle/DeathActionWorker_NoCorpse.cs deleted file mode 100755 index 25562405..00000000 --- a/Source/AllModdingComponents/CompVehicle/DeathActionWorker_NoCorpse.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Verse; - -namespace CompVehicle -{ - public class DeathActionWorker_NoCorpse : DeathActionWorker - { - private Map map; - - public override void PawnDied(Corpse corpse) - { - //Corpse NullCheck - if (corpse == null) - return; - //Get Corpse Properties - map = corpse.Map; - var pos = corpse.Position; - var pawn = corpse.InnerPawn; - - //Destroy Corpse - corpse.Destroy(); - //Read through killedLeavings of the pawn - var thingOwner = new ThingOwner(); - for (var i = 0; i < pawn.def.killedLeavings.Count; i++) - { - var thing = ThingMaker.MakeThing(pawn.def.killedLeavings[i].thingDef, null); - thing.stackCount = pawn.def.killedLeavings[i].count; - thingOwner.TryAdd(thing, true); - } - //Generate items/amount in list - for (var i = 0; i < thingOwner.Count; i++) - GenPlace.TryPlaceThing(thingOwner[i], pos, map, ThingPlaceMode.Near, null); - } - } -} \ No newline at end of file diff --git a/Source/AllModdingComponents/CompVehicle/GlobalSuppressions.cs b/Source/AllModdingComponents/CompVehicle/GlobalSuppressions.cs deleted file mode 100644 index 4a338905..00000000 --- a/Source/AllModdingComponents/CompVehicle/GlobalSuppressions.cs +++ /dev/null @@ -1,10 +0,0 @@ -// This file is used by Code Analysis to maintain SuppressMessage -// attributes that are applied to this project. -// Project-level suppressions either have no target or are given -// a specific target and scoped to a namespace, type, member, etc. - -using System.Diagnostics.CodeAnalysis; - -[assembly: - SuppressMessage("Style", "IDE0019:Use pattern matching", Justification = "", Scope = "member", - Target = "~M:CompVehicle.HarmonyCompVehicle.VehicleRotatorTick(Verse.Pawn_RotationTracker)~System.Boolean")] \ No newline at end of file diff --git a/Source/AllModdingComponents/CompVehicle/HandlingTypeFlags.cs b/Source/AllModdingComponents/CompVehicle/HandlingTypeFlags.cs deleted file mode 100755 index cbed0fb4..00000000 --- a/Source/AllModdingComponents/CompVehicle/HandlingTypeFlags.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace CompVehicle -{ - [Flags] - public enum HandlingTypeFlags - { - None = 0, - Movement = 1, - Manipulation = 2, - Weapons = 4 - } -} \ No newline at end of file diff --git a/Source/AllModdingComponents/CompVehicle/HarmonyCompVehicle.cs b/Source/AllModdingComponents/CompVehicle/HarmonyCompVehicle.cs deleted file mode 100644 index 1cb60098..00000000 --- a/Source/AllModdingComponents/CompVehicle/HarmonyCompVehicle.cs +++ /dev/null @@ -1,3065 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Reflection.Emit; -using System.Runtime.CompilerServices; -using System.Text; -using HarmonyLib; -using RimWorld; -using RimWorld.BaseGen; -using RimWorld.Planet; -using UnityEngine; -using UnityEngine.AI; -using Verse; -using Verse.AI; -using Verse.AI.Group; -using Verse.Sound; - -namespace CompVehicle -{ - [StaticConstructorOnStartup] - internal static class HarmonyCompVehicle - { - static HarmonyCompVehicle() - { - -// var harmony = new Harmony("jecstools.jecrell.comps.vehicle"); -// //HarmonyInstance.DEBUG = true; - -// #region Functions - -// /// -// /// VEHICLE FUNCTIONS -// /// Implements new systems to RimWorld when -// /// vehicles are present. -// /// -// harmony.Patch( -// AccessTools.Method(typeof(Pawn_RotationTracker), nameof(Pawn_RotationTracker.RotationTrackerTick)), -// new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(VehicleRotatorTick)), null); - -// harmony.Patch( -// typeof(DamageWorker_AddInjury).GetMethods(bindingAttr: AccessTools.all).First( -// mi => mi.ReturnType == typeof(float) && -// mi.GetParameters().ElementAt(1).ParameterType == typeof(Hediff_Injury) -//// new[] -//// { -//// typeof(Pawn), typeof(Hediff_Injury), typeof(DamageInfo), -//// AccessTools.TypeByName("DamageWorker.DamageResult").MakeByRefType(), typeof(float) -//// } -// ), null, -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(TryInjureVehicleOccupants))); -// harmony.Patch(AccessTools.Method(typeof(HealthUtility), nameof(HealthUtility.GetGeneralConditionLabel)), -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(ReplaceConditionLabel)), null); -// //TODO: Fix for 1.0 -// //harmony.Patch(AccessTools.Method(typeof(HealthCardUtility), "DrawOverviewTab"), -// // new HarmonyMethod(typeof(HarmonyCompVehicle), -// // nameof(DisplayOperationalSystems)), null); -// harmony.Patch( -// AccessTools.Property(typeof(MapPawns), nameof(MapPawns.FreeColonistsSpawnedCount)).GetGetMethod(), null, -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(IncludeVehicleOccupantsInMapPawns))); -// harmony.Patch( -// AccessTools.Property(typeof(MapPawns), -// nameof(MapPawns.FreeColonistsSpawnedOrInPlayerEjectablePodsCount)).GetGetMethod(), null, -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(IncludeVehicleOccupantsInMapPawns))); -// harmony.Patch(AccessTools.Method(typeof(Pawn_HealthTracker), "ShouldBeDowned"), -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(VehicleShouldBeDowned)), null); -// harmony.Patch(AccessTools.Method(typeof(PawnDownedWiggler), nameof(PawnDownedWiggler.WigglerTick)), -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(VehicleShouldWiggle)), null); -//// harmony.Patch(AccessTools.Method(typeof(FloatMenuUtility), nameof(FloatMenuUtility.GetRangedAttackAction)), -//// null, null, -//// new HarmonyMethod(typeof(HarmonyCompVehicle), -//// nameof(FightActionTranspiler))); -//// harmony.Patch(AccessTools.Method(typeof(FloatMenuUtility), nameof(FloatMenuUtility.GetMeleeAttackAction)), -//// null, null, -//// new HarmonyMethod(typeof(HarmonyCompVehicle), -//// nameof(FightActionTranspiler))); -// //Not enough experience Disabled -// harmony.Patch(AccessTools.Method(typeof(VerbTracker), nameof(VerbTracker.GetVerbsCommands)), -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(GetVerbsCommands_PreFix)), null, null); -// //Not enough experience Disabled -// // harmony.Patch(AccessTools.Method(typeof(PathFinder), "FindPath",new[] { typeof(IntVec3),typeof(LocalTargetInfo),typeof(TraverseParms),typeof(PathEndMode) }), new HarmonyMethod(typeof(HarmonyCompVehicle), -// //nameof(FindPath_PreFix)), null, null); - -// #endregion Functions - -// #region ErrorHandling - -// /// -// /// VEHICLE ERROR HANDLING -// /// These patches help integrate vehicles safely -// /// into existing/new games and handle errors / exceptions. -// /// - -// //harmony.Patch(AccessTools.) -// harmony.Patch( -// AccessTools.Method(typeof(PawnUtility), nameof(PawnUtility.IsTravelingInTransportPodWorldObject)), null, -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(PreventAssigningRandomFaction))); -// harmony.Patch(AccessTools.Method(typeof(SocialCardUtility), "Recache"), new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(SocialTabNullHandling)), null); -// harmony.Patch(AccessTools.Property(typeof(Pawn), nameof(Pawn.IsColonistPlayerControlled)).GetGetMethod(), -// null, new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(IncludeVehiclesInIsColonistPlayerControlled))); -// harmony.Patch(AccessTools.Method(typeof(Pawn), nameof(Pawn.CurrentlyUsableForBills)), null, -// new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(CantUseMovingVehicles))); -// harmony.Patch( -// AccessTools.Property(typeof(Pawn_DraftController), nameof(Pawn_DraftController.Drafted)).GetSetMethod(), -// new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(DraftedVehiclesCanMove)), null); -// //TODO: Fix for 1.0 -// //harmony.Patch(AccessTools.Method(typeof(Pawn_PathFollower), nameof(Pawn_PathFollower.StartPath)), -// // new HarmonyMethod( -// // typeof(HarmonyCompVehicle), -// // nameof(CanVehicleMove)), null); -// harmony.Patch(AccessTools.Method(typeof(Verb_Shoot), "TryCastShot"), new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(CanVehicleShoot)), null); -// harmony.Patch(AccessTools.Method(typeof(GameEnder), "IsPlayerControlledWithFreeColonist"), null, -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(CanEndGame))); -// harmony.Patch( -// typeof(RestUtility).GetMethods(BindingFlags.Public | BindingFlags.Static) -// .First(mi => mi.Name == "FindBedFor" && mi.GetParameters().Count() > 1), null, new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(DontRescueVehicles)), null); -// harmony.Patch(AccessTools.Method(typeof(FloatMenuMakerMap), "AddHumanlikeOrders"), null, new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(DontRescueVehiclesInFloatMenus))); - -// harmony.Patch( -// typeof(SymbolResolver_RandomMechanoidGroup).GetMethods(BindingFlags.NonPublic | BindingFlags.Static) -// .First(mi => -// mi.HasAttribute() && mi.ReturnType == typeof(bool) && -// mi.GetParameters().Count() == 1 && mi.GetParameters()[0].ParameterType == typeof(PawnKindDef)), -// null, new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(MechanoidsFixerAncient))); - -//// Tad Patched out the Mechanoid on damaged method as its no longer recognised. -//// harmony.Patch( -//// typeof(CompSpawnerMechanoidsOnDamaged).GetMethods(BindingFlags.NonPublic | BindingFlags.Instance).First( -//// mi => mi.HasAttribute() && mi.ReturnType == typeof(bool) && -//// mi.GetParameters().Count() == 1 && -//// mi.GetParameters()[0].ParameterType == typeof(PawnKindDef)), null, new HarmonyMethod( -//// typeof(HarmonyCompVehicle), -//// nameof(MechanoidsFixer))); - -//// harmony.Patch(AccessTools.Method(typeof(JobDriver_Wait), "CheckForAutoAttack"), null, null, -//// new HarmonyMethod(typeof(HarmonyCompVehicle), -//// nameof(CheckForAutoAttackTranspiler))); -// //harmony.Patch( -// //AccessTools.Method( -// // typeof(VerbTracker).GetNestedTypes(BindingFlags.NonPublic | BindingFlags.Instance) -// // .First(t => AccessTools.Method(t, "MoveNext") != null), "MoveNext"), null, null, -// //new HarmonyMethod(typeof(HarmonyCompVehicle), -// //nameof(GetVerbsCommandsTranspiler))); -// harmony.Patch(AccessTools.Method(typeof(ThinkNode_ConditionalColonist), "Satisfied"), null, -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(Satisfied_PostFix)), null); -//// harmony.Patch(AccessTools.Method(typeof(FloatMenuMakerMap), "AddUndraftedOrders"), null, null,new HarmonyMethod(typeof(HarmonyCompVehicle), -//// nameof(AddUndraftedOrders_Transpiler))); -// harmony.Patch(AccessTools.Method(typeof(JobGiver_Haul), "TryGiveJob"), new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(TryGiveJob_PreFix)), null, null); - -// #endregion ErrorHandling - -// #region AIHandling - -// /// AI HANDLING -// /// Handles various AI issues for vehicles to function -// /// properly. - -// harmony.Patch(AccessTools.Method(typeof(JobGiver_Orders), "TryGiveJob"), null, new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(PreventWaitAttackError))); - -// harmony.Patch( -// AccessTools.Method(typeof(LordToil_PrepareCaravan_GatherItems), -// nameof(LordToil_PrepareCaravan_GatherItems.UpdateAllDuties)), -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(GiveVehiclesLoadItemDuties)), null); - -// harmony.Patch( -// AccessTools.Method(typeof(LordToil_PrepareCaravan_GatherAnimals), -// nameof(LordToil_PrepareCaravan_GatherAnimals.UpdateAllDuties)), -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(GiveVehiclesLoadAnimalDuties)), null); - -// harmony.Patch( -// AccessTools.Method(typeof(LordToil_PrepareCaravan_GatherSlaves), -// nameof(LordToil_PrepareCaravan_GatherSlaves.LordToilTick)), -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(GiveVehiclesLoadSlaveDuties)), null); - -// harmony.Patch( -// AccessTools.Method(typeof(LordToil_PrepareCaravan_GatherItems), -// nameof(LordToil_PrepareCaravan_GatherItems.LordToilTick)), -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(GiveVehiclesLoadItemToil)), null); - -// harmony.Patch(AccessTools.Method(typeof(Caravan_NeedsTracker), "TrySatisfyPawnNeeds"), -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(TrySatisfyFuelNeeds)), null); -// //Reminder to check this code.... - -// harmony.Patch(AccessTools.Method(typeof(JobGiver_PrepareCaravan_GatherItems), "TryGiveJob"), -// new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(TryGiveItemJob_PreFix)), null); - -// #endregion AIHandling - -// #region CaravanHandling - -// /// -// /// CARAVAN HANDLING -// /// These patches handle exceptions and -// /// cases involving vehicles and caravans. -// /// - -// harmony.Patch(AccessTools.Method(typeof(Caravan), nameof(Caravan.AddPawn)), new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(AddVehiclePawnsToCaravan)), null); -// harmony.Patch(AccessTools.Method(typeof(Dialog_SplitCaravan), "CheckForErrors"), new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(DontSplitCaravansWithVehicles)), null); -// harmony.Patch(AccessTools.Method(typeof(Dialog_FormCaravan), "CheckForErrors"), new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(CheckForErrors_PreFix)), null); - -// //TODO New patch -// //harmony.Patch(AccessTools.Method(typeof(CaravanPeopleAndItemsTabUtility), "DoRows"), new HarmonyMethod( -// // typeof(HarmonyCompVehicle), -// // nameof(DoRows_PreFix)), null); -// harmony.Patch(AccessTools.Method(typeof(CaravanUIUtility), nameof(CaravanUIUtility.AddPawnsSections)), null, -// new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(AddPawnsSections_PostFix))); - -// harmony.Patch( -// AccessTools.Method(typeof(CaravanExitMapUtility), -// nameof(CaravanExitMapUtility.CanExitMapAndJoinOrCreateCaravanNow)), -// null, new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(CanExit_PostFix)), null); - -// harmony.Patch(AccessTools.Method(typeof(MassUtility), nameof(MassUtility.Capacity)), null, -// new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(Capacity_PostFix)), null); - -// harmony.Patch( -// typeof(CaravanTicksPerMoveUtility).GetMethods().First(mi => -// mi.GetParameters().ElementAt(0).ParameterType == typeof(List)), -// null, new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(GetTicksPerMove_PostFix))); - - -// //harmony.Patch(AccessTools.Method(typeof(RimWorld.Planet.CaravanMaker), "MakeCaravan"), null, new HarmonyMethod(typeof(HarmonyCompVehicle), -// // nameof(MakeCaravan_PostFix))); -//// harmony.Patch(AccessTools.Method(typeof(CaravanExitMapUtility), "ExitMapAndJoinOrCreateCaravan"), -//// new HarmonyMethod(typeof(HarmonyCompVehicle), -//// nameof(ExitMapAndJoinOrCreateCaravan_PreFix)), null); -// harmony.Patch( -// AccessTools.Method(typeof(CaravanEnterMapUtility), nameof(CaravanEnterMapUtility.Enter), -// new[] -// { -// typeof(Caravan), typeof(Map), typeof(Func), typeof(CaravanDropInventoryMode), -// typeof(bool) -// }), new HarmonyMethod(typeof(HarmonyCompVehicle), -// nameof(Enter_PreFix)), null, null); -// harmony.Patch(AccessTools.Method(typeof(Caravan), "GetInspectString"), null, new HarmonyMethod( -// typeof(HarmonyCompVehicle), -// nameof(GetInspectString_PostFix))); - -// //TODO New patch -//// harmony.Patch( -//// AccessTools.Method(typeof(CaravanPeopleAndItemsTabUtility), "DoRow", -//// new[] -//// { -//// typeof(Rect), typeof(Thing), typeof(Caravan), typeof(Pawn).MakeByRefType(), typeof(bool), -//// typeof(bool) -//// }), null, null, new HarmonyMethod(typeof(HarmonyCompVehicle), -//// nameof(DoRow_Transpiler))); -// //harmony.Patch(AccessTools.Method(typeof(Dialog_FormCaravan), "DoWindowContents"), new HarmonyMethod( -// // typeof(HarmonyCompVehicle), -// // nameof(DoWindowContents_PreFix)), null); - -// #endregion CaravanHandling - -// #region Tests - -// /// -// /// TESTS -// /// This is for testing or debugging for errors. -// /// Most of these methods are prefix detours to make tests. -// /// - - -// //harmony.Patch(AccessTools.Method(typeof(CaravanExitMapUtility), "ExitMapAndCreateCaravan", new Type[] { typeof(IEnumerable), typeof(Faction), typeof(int) }), new HarmonyMethod(typeof(HarmonyCompVehicle), -// //nameof(ExitMapAndCreateCaravan_Test)), null); -// //harmony.Patch(AccessTools.Method(typeof(Pawn_PathFollower), "TrySetNewPath"), new HarmonyMethod(typeof(HarmonyCompVehicle), -// //nameof(TrySetNewPath_Test)), null); - -// #endregion - } - - /// CODE LEGEND - /// J = Jec's patch. - /// S = Swenzi's patch. - /// E = Erdelf's patch. - /// ??? = Needs cleaning - - #region FunctionsMethods - - //S I don't have enough experience with AI or pathing, will come back to this in the future. - //S Temporary prefix patching solution until a transpiler is made - //Patches PathFinder to create custom pathing based off of a vehicles stats, i.e. boats can only be in water - //Due to PathFinder being a none static method, I used slightly destructive patching to call a copy of the PathFinder class (CVPathFinder) - //public static bool FindPath_PreFix(IntVec3 start, LocalTargetInfo dest, TraverseParms traverseParms, PathFinder __instance, ref PawnPath __result, PathEndMode peMode = PathEndMode.OnCell){ - // Pawn pawn = traverseParms.pawn; - // if(pawn.GetComp() != null){ - // CVPathFinder test = new CVPathFinder(pawn.Map); - // __result = test.FindPath(start, dest, traverseParms, peMode); - // //Log.Error((__result.Found.ToString())); - // return false; - // } - // return true; - //} - - // J This patch allows colonists to freely join vehicles - // without having their factions randomly switched around. - // RimWorld.PawnUtility - public static void PreventAssigningRandomFaction(ref bool __result, Pawn pawn) - { - bool prevResult = __result; - //Check for vehicles... - if (pawn?.Faction != null) - __result = prevResult || (ThingOwnerUtility.AnyParentIs(pawn)); - } - - - //S Temporary prefix patching solution until a transpiler is made - //Patches Pawn_PathFollower to create custom pathing based off of a vehicles stats, i.e. boats can only be in water - public static bool CostToMoveIntoCell_PreFix(IntVec3 c, ref int __result, Pawn_PathFollower __instance) - { - Pawn pawn = (Pawn) AccessTools.Field(typeof(Pawn_PathFollower), "pawn").GetValue(__instance); - if (pawn.GetComp() != null) - { - int num; - if (c.x == pawn.Position.x || c.z == pawn.Position.z) - { - num = pawn.TicksPerMoveCardinal; - } - else - { - num = pawn.TicksPerMoveDiagonal; - } - num += CalculatedCostAt(c, false, pawn.Position, __instance, - pawn.GetComp().Props.vehicleType, pawn); - Building edifice = c.GetEdifice(pawn.Map); - if (edifice != null) - { - num += (int) edifice.PathWalkCostFor(pawn); - } - if (num > 450) - { - num = 450; - } - if (pawn.jobs.curJob != null) - { - switch (pawn.jobs.curJob.locomotionUrgency) - { - case LocomotionUrgency.Amble: - num *= 3; - if (num < 60) - { - num = 60; - } - break; - case LocomotionUrgency.Walk: - num *= 2; - if (num < 50) - { - num = 50; - } - break; - case LocomotionUrgency.Jog: - num = num; - break; - case LocomotionUrgency.Sprint: - num = Mathf.RoundToInt((float) num * 0.75f); - break; - } - } - __result = Mathf.Max(num, 1); - return false; - } - - return true; - } - - //S Patches FloatingMenuMakerMap so that null reference errors don't occur when generating the GUI for - //pawns that don't have worksettings -// public static IEnumerable AddUndraftedOrders_Transpiler( -// IEnumerable instructions) -// { -// var instructionList = instructions.ToList(); -// var workSettings = AccessTools.Field(typeof(Pawn), nameof(Pawn.workSettings)); -// for (var i = 0; i < instructionList.Count; i++) -// { -// var instruction = instructionList[i]; -// -// yield return instruction; -// if (instruction.operand == workSettings) -// { -// yield return new CodeInstruction(OpCodes.Brfalse_S, instructionList[i + 3].operand); -// yield return new CodeInstruction(instructionList[i - 2]) {labels = new List