Compare commits

..

No commits in common. "7adac63345e8d7eed74e916190e2beb556439d14" and "69231bc92aca78d0057a1cb2d4300c11d7bd72e1" have entirely different histories.

23 changed files with 22 additions and 287 deletions

View File

@ -1,8 +1,10 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEngine;
using System.Windows;
public class HookahAssetBuilder
{
@ -13,53 +15,28 @@ public class HookahAssetBuilder
static readonly string ModPackProfilePath = $@"{ModManagerProfilesPath}/{ModPackProfileName}";
static readonly string ModPackHookahPlacePath = @$"{ModPackProfilePath}/BepInEx/plugins/{ModPackModName}";
static readonly string ModProjectPath = @"D:\Code\LethalCompany\Mods\HookahPlace";
static readonly string ModProjectPath = @"D:\Code\LC-Decompiled\Mods\HookahPlace";
static readonly string DllName = "Ratijas.HookahPlace.dll";
static readonly string DllSourcePath = $@"{ModProjectPath}/HookahPlace/bin/Debug/netstandard2.1/{DllName}";
static readonly string[] DllDestinationPaths = new string[]
{
// relative to Unity project
$@"Assets/LethalCompany/Mods/plugins/Dependencies/{ModPackModName}",
$@"Assets/LethalCompany/Mods/plugins/HookahPlace/Dependencies/{ModPackModName}",
ModPackHookahPlacePath,
};
static readonly string AssetBundlesPath = "Assets/LethalCompany/Mods/plugins/HookahPlace/AssetBundles";
static readonly string[] AssetBundlesNames = new string[]
{
"hookahplaceasset",
"hookahunlockableassets",
};
static readonly string[] AssetBundlesDestinationPaths = new string[]
{
@$"{ModPackHookahPlacePath}/Assets",
@$"{ModProjectPath}/HookahPlace/res",
};
public static BuildAssetBundlesParameters GetBuildAssetBundlesParameters()
{
var assetBundleDefinitions = new AssetBundleBuild[]
{
new AssetBundleBuild()
{
assetBundleName = "hookahplaceasset",
assetNames = new string[]
{
"Assets/LethalCompany/Mods/plugins/HookahPlace/HookahContentContainer.asset",
}
},
new AssetBundleBuild()
{
assetBundleName = "hookahunlockableassets",
assetNames = new string[]
{
"Assets/LethalCompany/Mods/plugins/HookahPlace/Content/Unlockables",
}
},
};
var buildParameters = new BuildAssetBundlesParameters()
{
outputPath = AssetBundlesPath,
options = BuildAssetBundleOptions.ChunkBasedCompression,
bundleDefinitions = assetBundleDefinitions
};
return buildParameters;
}
[MenuItem("HookahPlace/All")]
public static void DoAll()
{
@ -105,22 +82,9 @@ public class HookahAssetBuilder
{
UnityEngine.Debug.Log("Building asset bundles for HookahPlace...");
var buildParameters = GetBuildAssetBundlesParameters();
Directory.CreateDirectory(buildParameters.outputPath);
AssetBundleManifest manifest = BuildPipeline.BuildAssetBundles(buildParameters);
Directory.CreateDirectory(AssetBundlesPath);
if (manifest != null)
{
foreach(var bundleName in manifest.GetAllAssetBundles())
{
string projectRelativePath = buildParameters.outputPath + "/" + bundleName;
UnityEngine.Debug.Log($"Size of AssetBundle {projectRelativePath} is {new FileInfo(projectRelativePath).Length}");
}
}
else
{
UnityEngine.Debug.Log("Build failed, see Console and Editor log for details");
}
BuildPipeline.BuildAssetBundles(AssetBundlesPath, BuildAssetBundleOptions.ChunkBasedCompression, BuildTarget.StandaloneWindows);
if (Application.isBatchMode)
{
@ -133,16 +97,13 @@ public class HookahAssetBuilder
{
UnityEngine.Debug.Log("Installing asset bundles for HookahPlace...");
var buildParameters = GetBuildAssetBundlesParameters();
foreach (var destinationPath in AssetBundlesDestinationPaths)
{
Directory.CreateDirectory(destinationPath);
foreach (var bundle in buildParameters.bundleDefinitions)
foreach (var name in AssetBundlesNames)
{
var name = bundle.assetBundleName;
var sourceFileName = $"{buildParameters.outputPath}/{name}";
var sourceFileName = $"{AssetBundlesPath}/{name}";
var destFileName = $"{destinationPath}/{name}";
FileCopy(sourceFileName, destFileName);
}

View File

@ -4,7 +4,7 @@
<PropertyGroup>
<AssemblyName>Ratijas.HookahPlace</AssemblyName>
<Product>HookahPlace</Product>
<Version>4.20.0</Version>
<Version>4.2.0</Version>
</PropertyGroup>
<!-- Project Properties -->
<PropertyGroup>
@ -44,7 +44,7 @@
</PropertyGroup>
<PropertyGroup>
<DawnLibVersion>0.9.3</DawnLibVersion>
<DawnLibVersion>0.7.11</DawnLibVersion>
</PropertyGroup>
<!-- Primary Package References - BepInEx -->
@ -61,18 +61,12 @@
<PackageReference Include="UnityEngine.Modules" Version="2022.3.62" PrivateAssets="all"/>
<PackageReference Include="TeamXiaolan.DawnLib" Version="$(DawnLibVersion)" PrivateAssets="all"/>
<PackageReference Include="TeamXiaolan.DawnLib.DuskMod" Version="$(DawnLibVersion)" />
<PackageReference Include="TeamXiaolan.DawnLib.SourceGen" Version="$(DawnLibVersion)" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all"/>
</ItemGroup>
<ItemGroup>
<None Remove="data\**\*.json" />
<AdditionalFiles Include="data\**\*.json" />
</ItemGroup>
<!-- Package References - Game Assembly HookGen -->
<ItemGroup>
<Reference Include="MMHOOK_Assembly-CSharp">
@ -92,6 +86,6 @@
</PropertyGroup>
<Target Name="PackThunderstore" DependsOnTargets="NetcodePatch" AfterTargets="PostBuildEvent" Condition="$(Configuration) == 'Release'">
<Exec Command="dotnet tcli build --config-path &quot;$(ProjectDir)Thunderstore/thunderstore.toml&quot; --package-version $(Version) --package-name $(Product)" />
<Exec Command="tcli build --config-path &quot;$(ProjectDir)Thunderstore/thunderstore.toml&quot; --package-version $(Version) --package-name $(Product)" />
</Target>
</Project>

View File

@ -10,7 +10,9 @@ Become a ship-mom (or a ship-dad) and smoke shisha while guiding your crew over
## Store
The mod adds a ship decor/furniture to the store called "Hookah". It is _always available_ in the store.
The mod adds a ship decor/furniture to the store called "Hookah".
The store rotates between random 4-6 entries every quota. To make the hookah always available in the store, use another mod like [`StoreRotationConfig` by `pacoito`](https://thunderstore.io/c/lethal-company/p/pacoito/StoreRotationConfig/) with the `stockAll` option toggled ON or add "Hookah" (with capital 'H', without quotes) to the `itemWhitelist`.
## Made by Ratijas

View File

@ -1,8 +1,3 @@
# 4.20.0
- Update dependencies, and rebuild for v81 (also known as "v80").
- Hookah is always in shop now.
# 4.2.0
Fixed Hookah unlockable item disappearing after reloading a save file.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

View File

@ -4,14 +4,14 @@ schemaVersion = "0.0.1"
[package]
namespace = "Ratijas"
name = "HookahPlace"
versionNumber = "4.20.0"
versionNumber = "4.2.0"
description = "Relaxing hookah as a ship upgrade"
websiteUrl = "https://git.vilunov.me/ratijas/HookahPlace"
containsNsfwContent = false
[package.dependencies]
BepInEx-BepInExPack = "5.4.2305"
TeamXiaolan-DawnLib = "0.9.3"
BepInEx-BepInExPack = "5.4.2304"
TeamXiaolan-DawnLib = "0.7.11"
[build]
icon = "./icon.png"

View File

@ -1,6 +0,0 @@
{
"HookahPlaceKeys": {
"__type": "DawnUnlockableItemInfo",
"Hookah": "hookah_place:hookah"
}
}

Binary file not shown.

View File

@ -1,22 +0,0 @@
using HarmonyLib;
using System.Linq;
using Dawn;
namespace HookahPlace;
[HarmonyPatch(typeof(Terminal))]
internal static class TerminalPatch
{
[HarmonyPrefix]
[HarmonyPatch("Update")]
private static void UpdatePatch(Terminal __instance)
{
var hookahNode = LethalContent.Unlockables[HookahPlaceKeys.Hookah].UnlockableItem.shopSelectionNode;
if (!__instance.ShipDecorSelection.Any(node => node.shipUnlockableID == hookahNode.shipUnlockableID))
{
HookahPlace.Logger.LogInfo($"Patching terminal selection list {hookahNode.shipUnlockableID}");
__instance.ShipDecorSelection = [.. __instance.ShipDecorSelection, hookahNode];
}
}
}

View File

@ -1 +0,0 @@
Content for initial release announcements for various discord communities.

View File

@ -1,23 +0,0 @@
---
Announcement for community discord
https://discord.com/channels/1169792572382773318/1465128348434038980
---
# Hookah Place
_Relaxing hookah as a ship upgrade_
:link: https://thunderstore.io/c/lethal-company/p/Ratijas/HookahPlace/
Welcome to your very own Lethal Hookah Place!
Become a ship-mom (or a ship-dad) and smoke shisha while guiding your crew over a walkie-talkie. Let 'em know you're having a good time! :speaking_head::100::thought_balloon:
## Store
The mod adds a ship decor/furniture to the store called "Hookah".
The store rotates between random 4-6 entries every quota. To make the hookah always available in the store, use another mod like [`StoreRotationConfig` by `pacoito`](https://thunderstore.io/c/lethal-company/p/pacoito/StoreRotationConfig/) with the `stockAll` option toggled ON or add "Hookah" (with capital 'H', without quotes) to the `itemWhitelist`.
---
insert picture
HookahPlace/Thunderstore/HookahPlace-demo-1.jpg

View File

@ -1,23 +0,0 @@
---
Announcement for modding discord
https://discord.com/channels/1168655651455639582/1465126696117076242
---
# Hookah Place
_Relaxing hookah as a ship upgrade_
:Thunderstore: https://thunderstore.io/c/lethal-company/p/Ratijas/HookahPlace/
Welcome to your very own Lethal Hookah Place!
Become a ship-mom (or a ship-dad) and smoke shisha while guiding your crew over a walkie-talkie. Let 'em know you're having a good time! :speaking_head::100::thought_balloon:
## Store
The mod adds a ship decor/furniture to the store called "Hookah".
The store rotates between random 4-6 entries every quota. To make the hookah always available in the store, use another mod like [`StoreRotationConfig` by `pacoito`](https://thunderstore.io/c/lethal-company/p/pacoito/StoreRotationConfig/) with the `stockAll` option toggled ON or add "Hookah" (with capital 'H', without quotes) to the `itemWhitelist`.
---
insert picture
HookahPlace/Thunderstore/HookahPlace-demo-1.jpg

View File

@ -1,14 +0,0 @@
---
Announcement for russian discord
https://discord.com/channels/762286753989132299/1410237812829065268/1465132804395241618
---
Давно мечтали сходить в кальянку, но всё время не позволяло? Новый мод **HookahPlace by Ratijas** позволит отовариться прямо на рабочем месте! :speaking_head::100::thought_balloon:
Множество вкусов на выбор, дымные занавесы и бульканье в радиоэфир — всё включено в скромную цену 130 шекелей¹.
¹ Предметы декора обновляются по 4-6 позиций каждую квоту. Чтобы гарантировать наличие, используйте сторонние моды, например StoreRotationConfig by pacoito с опцией stockAll, либо добавить строчку "Hookah" (с большой буквы, без кавычек) в `itemWhitelist`.
---
insert picture
HookahPlace/Thunderstore/HookahPlace-demo-1.jpg

View File

@ -1,4 +0,0 @@
Also check out my other mod, 💭 [Hookah Place](https://thunderstore.io/c/lethal-company/p/Ratijas/HookahPlace/) ship decor/furniture! (thread: https://discord.com/channels/1169792572382773318/1465128348434038980)
---
Note: the link refers to the [Unofficial Lethal Company Community Discord](https://discord.gg/lethal-company)

View File

@ -1 +0,0 @@
Reference to this mod which can be appended to README of other mods.

View File

@ -1,77 +0,0 @@
---
link for modding discord
---
# Hookah Place
_Relaxing hookah as a ship upgrade_
Welcome to your very own Lethal Hookah Place!
Become a ship-mom (or a ship-dad) and smoke shisha while guiding your crew over a walkie-talkie. Let 'em know you're having a good time! :speaking_head::100::thought_balloon:
## Store
The mod adds a ship decor/furniture to the store called "Hookah".
The store rotates between random 4-6 entries every quota. To make the hookah always available in the store, use another mod like `StoreRotationConfig` by `pacoito` with the `stockAll` option toggled ON.
:speech_balloon: Thread: https://discord.com/channels/1168655651455639582/1465126696117076242
:Thunderstore: Thunderstore: https://thunderstore.io/c/lethal-company/p/Ratijas/HookahPlace/
---
insert picture
HookahPlace/Thunderstore/HookahPlace-demo-1.jpg
---
link for community discord
---
# Hookah Place
_Relaxing hookah as a ship upgrade_
Welcome to your very own Lethal Hookah Place!
Become a ship-mom (or a ship-dad) and smoke shisha while guiding your crew over a walkie-talkie. Let 'em know you're having a good time! :speaking_head::100::thought_balloon:
## Store
The mod adds a ship decor/furniture to the store called "Hookah".
The store rotates between random 4-6 entries every quota. To make the hookah always available in the store, use another mod like `StoreRotationConfig` by `pacoito` with the `stockAll` option toggled ON.
:speech_balloon: Thread: https://discord.com/channels/1169792572382773318/1465128348434038980
:link: Thunderstore: https://thunderstore.io/c/lethal-company/p/Ratijas/HookahPlace/
---
insert picture
HookahPlace/Thunderstore/HookahPlace-demo-1.jpg
---
post for #looking-for-crew-modded to dodge auto-moderation
---
# Hookah Place
_Relaxing hookah as a ship upgrade_
Welcome to your very own Lethal Hookah Place!
Become a ship-mom (or a ship-dad) and smoke shisha while guiding your crew over a walkie-talkie. Let 'em know you're having a good time! :speaking_head::100::thought_balloon:
The mod adds a ship decor/furniture called "Hookah". To make it always available, use another mod like `StoreRotationConfig` by `pacoito` with the `stockAll` option toggled ON.
:speech_balloon: Thread: https://discord.com/channels/1169792572382773318/1465128348434038980
:link: Thunderstore: https://thunderstore.io/c/lethal-company/p/Ratijas/HookahPlace/
---
update 4.2.0
---
# Hookah Place 4.2.0
Fixed Hookah unlockable item disappearing after reloading a save file.

View File

@ -1,12 +0,0 @@
---
Announcement for community discord
https://discord.com/channels/1169792572382773318/1465128348434038980
---
# Hookah Place 4.2.0
Fixed Hookah unlockable item disappearing after reloading a save file.
---
insert picture
HookahPlace/Thunderstore/HookahPlace-demo-2.jpg

View File

@ -1,12 +0,0 @@
---
Announcement for modding discord
https://discord.com/channels/1168655651455639582/1465126696117076242
---
# Hookah Place 4.2.0
Fixed Hookah unlockable item disappearing after reloading a save file.
---
insert picture
HookahPlace/Thunderstore/HookahPlace-demo-2.jpg

View File

@ -1,8 +0,0 @@
---
Announcement for russian discord
https://discord.com/channels/762286753989132299/1410237812829065268/1469357224139686039
---
Выпустил обновление HookahPlace 4.2.0, через пару часов будет доступно в мод менеджерах.
Исправлено исчезновение кальяна после перезапуска игры, теперь он корректно сохраняется в сейв-файл.

View File

@ -1 +0,0 @@
Content for update announcements for various discord communities.

View File

@ -1,13 +0,0 @@
{
"version": 1,
"isRoot": true,
"tools": {
"tcli": {
"version": "0.2.4",
"commands": [
"tcli"
],
"rollForward": false
}
}
}