Skip to content

Commit

Permalink
Merge pull request #39 from Safarte/dev
Browse files Browse the repository at this point in the history
Version 0.7.0
  • Loading branch information
Safarte authored Feb 24, 2024
2 parents 41313e5 + 509c608 commit 7a6f3ca
Show file tree
Hide file tree
Showing 59 changed files with 13,550 additions and 107 deletions.
2 changes: 1 addition & 1 deletion plugin_template/addressables/catalog.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion plugin_template/addressables/settings.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"m_buildTarget":"StandaloneWindows64","m_SettingsHash":"2f165dfa4cebbaec8d2fc6d694b83a4c","m_CatalogLocations":[{"m_Keys":["AddressablesMainContentCatalog"],"m_InternalId":"{UnityEngine.AddressableAssets.Addressables.RuntimePath}/catalog.json","m_Provider":"UnityEngine.AddressableAssets.ResourceProviders.ContentCatalogProvider","m_Dependencies":[],"m_ResourceType":{"m_AssemblyName":"Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData"},"SerializedData":[7,76,85,110,105,116,121,46,82,101,115,111,117,114,99,101,77,97,110,97,103,101,114,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,75,85,110,105,116,121,69,110,103,105,110,101,46,82,101,115,111,117,114,99,101,77,97,110,97,103,101,109,101,110,116,46,82,101,115,111,117,114,99,101,80,114,111,118,105,100,101,114,115,46,80,114,111,118,105,100,101,114,76,111,97,100,82,101,113,117,101,115,116,79,112,116,105,111,110,115,50,0,0,0,123,0,34,0,109,0,95,0,73,0,103,0,110,0,111,0,114,0,101,0,70,0,97,0,105,0,108,0,117,0,114,0,101,0,115,0,34,0,58,0,116,0,114,0,117,0,101,0,125,0]}],"m_ProfileEvents":false,"m_LogResourceManagerExceptions":true,"m_ExtraInitializationData":[],"m_DisableCatalogUpdateOnStart":false,"m_IsLocalCatalogInBundle":false,"m_CertificateHandlerType":{"m_AssemblyName":"","m_ClassName":""},"m_AddressablesVersion":"1.21.19","m_maxConcurrentWebRequests":3,"m_CatalogRequestsTimeout":0}
{"m_buildTarget":"StandaloneWindows64","m_SettingsHash":"a12ebfc24be43d7071b348b6f4bdb265","m_CatalogLocations":[{"m_Keys":["AddressablesMainContentCatalog"],"m_InternalId":"{UnityEngine.AddressableAssets.Addressables.RuntimePath}/catalog.json","m_Provider":"UnityEngine.AddressableAssets.ResourceProviders.ContentCatalogProvider","m_Dependencies":[],"m_ResourceType":{"m_AssemblyName":"Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData"},"SerializedData":[7,76,85,110,105,116,121,46,82,101,115,111,117,114,99,101,77,97,110,97,103,101,114,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,75,85,110,105,116,121,69,110,103,105,110,101,46,82,101,115,111,117,114,99,101,77,97,110,97,103,101,109,101,110,116,46,82,101,115,111,117,114,99,101,80,114,111,118,105,100,101,114,115,46,80,114,111,118,105,100,101,114,76,111,97,100,82,101,113,117,101,115,116,79,112,116,105,111,110,115,50,0,0,0,123,0,34,0,109,0,95,0,73,0,103,0,110,0,111,0,114,0,101,0,70,0,97,0,105,0,108,0,117,0,114,0,101,0,115,0,34,0,58,0,116,0,114,0,117,0,101,0,125,0]}],"m_ProfileEvents":false,"m_LogResourceManagerExceptions":true,"m_ExtraInitializationData":[],"m_DisableCatalogUpdateOnStart":false,"m_IsLocalCatalogInBundle":false,"m_CertificateHandlerType":{"m_AssemblyName":"","m_ClassName":""},"m_AddressablesVersion":"1.21.19","m_maxConcurrentWebRequests":3,"m_CatalogRequestsTimeout":0}
36 changes: 25 additions & 11 deletions plugin_template/localizations/localization.csv

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions plugin_template/patches/hide_deprecated_parts.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
@new(spring_cleaning, KLSS_food_tank_2v_1x2_cleanup)
:json {
PartId: KLSS_food_tank_2v_1x2;
Hidden: true;
Toggleable: false;
}
@new(spring_cleaning, KLSS_water_tank_2v_1x2_cleanup)
:json {
PartId: KLSS_water_tank_2v_1x2;
Hidden: true;
Toggleable: false;
}
@new(spring_cleaning, KLSS_oxygen_tank_2v_1x2_cleanup)
:json {
PartId: KLSS_oxygen_tank_2v_1x2;
Hidden: true;
Toggleable: false;
}

@new(spring_cleaning, KLSS_food_pack_0v_radial_cleanup)
:json {
PartId: KLSS_food_pack_0v_radial;
Hidden: true;
Toggleable: false;
}
@new(spring_cleaning, KLSS_water_tank_0v_radial_cleanup)
:json {
PartId: KLSS_water_tank_0v_radial;
Hidden: true;
Toggleable: false;
}
@new(spring_cleaning, KLSS_oxygen_tank_0v_radial_cleanup)
:json {
PartId: KLSS_oxygen_tank_0v_radial;
Hidden: true;
Toggleable: false;
}

@new(spring_cleaning, KLSS_food_pack_2v_radial_cleanup)
:json {
PartId: KLSS_food_pack_2v_radial;
Hidden: true;
Toggleable: false;
}
@new(spring_cleaning, KLSS_water_tank_2v_radial_cleanup)
:json {
PartId: KLSS_water_tank_2v_radial;
Hidden: true;
Toggleable: false;
}
@new(spring_cleaning, KLSS_oxygen_tank_2v_radial_cleanup)
:json {
PartId: KLSS_oxygen_tank_2v_radial;
Hidden: true;
Toggleable: false;
}
File renamed without changes.
181 changes: 181 additions & 0 deletions plugin_template/patches/part_variants.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
@use "VSwift:*";

:parts #KLSS_storage_0v_radial {
@include part-switch() {
+TankType {
VariantSetLocalizationKey: "KLSS/Variants/TankType";
+Food {
VariantLocalizationKey: "Resource/DisplayName/Food";
+TransformActivator {
Transforms: [food];
}
}
+Water {
VariantLocalizationKey: "Resource/DisplayName/Water";
+TransformActivator {
Transforms: [water];
}
+ResourceContainerAdder {
Containers: [
{
Name: "Water",
CapacityUnits: 45.0,
InitialUnits: 45.0
},
{
Name: "WasteWater",
CapacityUnits: 45.0,
InitialUnits: 0.0
}
];
}
+ResourceContainerRemover {
Containers: [Food, Waste];
}
}
+Oxygen {
VariantLocalizationKey: "Resource/DisplayName/Oxygen";
+TransformActivator {
Transforms: [oxygen];
}
+ResourceContainerAdder {
Containers: [
{
Name: "Oxygen",
CapacityUnits: 0.015,
InitialUnits: 0.015
},
{
Name: "CarbonDioxide",
CapacityUnits: 0.015,
InitialUnits: 0.0
}
];
}
+ResourceContainerRemover {
Containers: [Food, Waste];
}
}
}
}
}

:parts #KLSS_storage_2v_radial {
@include part-switch() {
+TankType {
VariantSetLocalizationKey: "KLSS/Variants/TankType";
+Food {
VariantLocalizationKey: "Resource/DisplayName/Food";
+TransformActivator {
Transforms: [food];
}
}
+Water {
VariantLocalizationKey: "Resource/DisplayName/Water";
+TransformActivator {
Transforms: [water];
}
+ResourceContainerAdder {
Containers: [
{
Name: "Water",
CapacityUnits: 7668.0,
InitialUnits: 7668.0
},
{
Name: "WasteWater",
CapacityUnits: 7668.0,
InitialUnits: 0.0
}
];
}
+ResourceContainerRemover {
Containers: [Food, Waste];
}
}
+Oxygen {
VariantLocalizationKey: "Resource/DisplayName/Oxygen";
+TransformActivator {
Transforms: [oxygen];
}
+ResourceContainerAdder {
Containers: [
{
Name: "Oxygen",
CapacityUnits: 2.556,
InitialUnits: 2.556
},
{
Name: "CarbonDioxide",
CapacityUnits: 2.556,
InitialUnits: 0.0
}
];
}
+ResourceContainerRemover {
Containers: [Food, Waste];
}
}
}
}
}

:parts #KLSS_storage_2v_1x2 {
@include part-switch() {
+TankType {
VariantSetLocalizationKey: "KLSS/Variants/TankType";
+Food {
VariantLocalizationKey: "Resource/DisplayName/Food";
+TransformActivator {
Transforms: [food];
}
}
+Water {
VariantLocalizationKey: "Resource/DisplayName/Water";
+TransformActivator {
Transforms: [water];
}
+ResourceContainerAdder {
Containers: [
{
Name: "Water",
CapacityUnits: 3834.0,
InitialUnits: 3834.0
},
{
Name: "WasteWater",
CapacityUnits: 3834.0,
InitialUnits: 0.0
}
];
}
+ResourceContainerRemover {
Containers: [Food, Waste];
}
}
+Oxygen {
VariantLocalizationKey: "Resource/DisplayName/Oxygen";
+TransformActivator {
Transforms: [oxygen];
}
+ResourceContainerAdder {
Containers: [
{
Name: "Oxygen",
CapacityUnits: 1.278,
InitialUnits: 1.278
},
{
Name: "CarbonDioxide",
CapacityUnits: 1.278,
InitialUnits: 0.0
}
];
}
+ResourceContainerRemover {
Containers: [Food, Waste];
}
}
}
}
}
12 changes: 3 additions & 9 deletions plugin_template/patches/tech_tree.patch
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,19 @@

:science (#tNode_1v_rover, #wmcc_buggies) {
UnlockedPartsIDs +: [
KLSS_food_pack_0v_radial,
KLSS_water_tank_0v_radial,
KLSS_oxygen_tank_0v_radial
KLSS_storage_0v_radial
];
}

:science (#tNode_2v_docking, #wmcc_early_docking_ports) {
UnlockedPartsIDs +: [
KLSS_food_tank_2v_1x2,
KLSS_water_tank_2v_1x2,
KLSS_oxygen_tank_2v_1x2
KLSS_storage_2v_1x2
];
}

:science (#tNode_3v_payload_01, #wmcc_heavy_payloads) {
UnlockedPartsIDs +: [
KLSS_food_pack_2v_radial,
KLSS_water_tank_2v_radial,
KLSS_oxygen_tank_2v_radial
KLSS_storage_2v_radial
];
}

Expand Down
16 changes: 15 additions & 1 deletion plugin_template/swinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Kerbal Life-Support System",
"description": "Kerbals need their Snacks.",
"source": "https://github.com/Safarte/KerbalLifeSupportSystem",
"version": "0.6.0",
"version": "0.7.0",
"version_check": "https://raw.githubusercontent.com/Safarte/KerbalLifeSupportSystem/main/plugin_template/swinfo.json",
"ksp2_version": {
"min": "0.2.0",
Expand Down Expand Up @@ -39,6 +39,20 @@
"min": "0.2.1",
"max": "*"
}
},
{
"id": "SpringCleaning",
"version": {
"min": "0.1.0",
"max": "*"
}
},
{
"id": "VSwift",
"version": {
"min": "0.2.0",
"max": "*"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<!-- Package references -->
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" PrivateAssets="all"/>
<PackageReference Include="Premonition.Core" Version="0.2.0"/>
<PackageReference Include="UnityEngine.Modules" Version="2022.3.5" PrivateAssets="all"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ MonoBehaviour:
m_DefaultGroup: 7255e8ec59fefb74f82ff1b22addad88
m_currentHash:
serializedVersion: 2
Hash: 2f165dfa4cebbaec8d2fc6d694b83a4c
Hash: 00000000000000000000000000000000
m_OptimizeCatalogSize: 0
m_BuildRemoteCatalog: 0
m_BundleLocalCatalog: 0
Expand All @@ -38,7 +38,7 @@ MonoBehaviour:
m_Id:
m_RemoteCatalogLoadPath:
m_Id:
m_ContentStateBuildPathProfileVariableName:
m_ContentStateBuildPathProfileVariableName: <default settings path>
m_CustomContentStateBuildPath:
m_ContentStateBuildPath:
m_BuildAddressablesWithPlayerBuild: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,54 @@ MonoBehaviour:
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: b1f0338931dcd7e40a292a3e533b9a09
m_Address: KLSS_storage_0v_radial.json
m_ReadOnly: 0
m_SerializedLabels:
- parts_data
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 0fab42c11e5726c4ca6463bbf64e4293
m_Address: KLSS_storage_0v_radial.prefab
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: d36594f215efcf14aa3fa057df522ed6
m_Address: KLSS_storage_0v_radial_icon.png
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 1f7650c621fd2544490c3baa83dca05e
m_Address: KLSS_storage_2v_radial.json
m_ReadOnly: 0
m_SerializedLabels:
- parts_data
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 410b7955ae327fb4aa823c50c18bd369
m_Address: KLSS_storage_2v_radial.prefab
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: df601eb6faf93c84d9e6de1f87469fae
m_Address: KLSS_storage_2v_radial_icon.png
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 1c62f507a9c6f1747831bc53d5353ef6
m_Address: KLSS_storage_2v_1x2.json
m_ReadOnly: 0
m_SerializedLabels:
- parts_data
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: f29aadd8a127b6b488e13b70f97cf773
m_Address: KLSS_storage_2v_1x2.prefab
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 550ca1588debc004dad83fc8a5eb2bc8
m_Address: KLSS_storage_2v_1x2_icon.png
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: ab0e05a9dcf69b340a5b2a3d0207d022, type: 2}
m_SchemaSet:
Expand Down
Loading

0 comments on commit 7a6f3ca

Please sign in to comment.