diff --git a/NewHorizons/Builder/Props/ItemBuilder.cs b/NewHorizons/Builder/Props/ItemBuilder.cs
index 1557351f..ae3d420f 100644
--- a/NewHorizons/Builder/Props/ItemBuilder.cs
+++ b/NewHorizons/Builder/Props/ItemBuilder.cs
@@ -81,8 +81,9 @@ namespace NewHorizons.Builder.Props
}
item.PickupCondition = info.pickupCondition;
item.ClearPickupConditionOnDrop = info.clearPickupConditionOnDrop;
+ item.PickupFact = info.pickupFact;
- Delay.FireInNUpdates(() =>
+ Delay.FireOnNextUpdate(() =>
{
if (item != null && !string.IsNullOrEmpty(info.pathToInitialSocket))
{
@@ -111,7 +112,7 @@ namespace NewHorizons.Builder.Props
NHLogger.LogError($"Could not find a socket to parent item {itemName} to at path {socketGO}");
}
}
- }, 1);
+ });
return item;
}
@@ -144,8 +145,10 @@ namespace NewHorizons.Builder.Props
socket.UseGiveTakePrompts = info.useGiveTakePrompts;
socket.InsertCondition = info.insertCondition;
socket.ClearInsertConditionOnRemoval = info.clearInsertConditionOnRemoval;
+ socket.InsertFact = info.insertFact;
socket.RemovalCondition = info.removalCondition;
socket.ClearRemovalConditionOnInsert = info.clearRemovalConditionOnInsert;
+ socket.RemovalFact = info.removalFact;
Delay.FireInNUpdates(() =>
{
diff --git a/NewHorizons/Components/Props/NHItem.cs b/NewHorizons/Components/Props/NHItem.cs
index 5090c330..b21db7ea 100644
--- a/NewHorizons/Components/Props/NHItem.cs
+++ b/NewHorizons/Components/Props/NHItem.cs
@@ -21,6 +21,7 @@ namespace NewHorizons.Components.Props
public AudioType UnsocketAudio;
public string PickupCondition;
public bool ClearPickupConditionOnDrop;
+ public string PickupFact;
public ItemType ItemType
{
@@ -72,6 +73,10 @@ namespace NewHorizons.Components.Props
{
DialogueConditionManager.SharedInstance.SetConditionState(PickupCondition, true);
}
+ if (!string.IsNullOrEmpty(PickupFact))
+ {
+ Locator.GetShipLogManager().RevealFact(PickupFact);
+ }
}
internal void TriggerDropConditions()
diff --git a/NewHorizons/Components/Props/NHItemSocket.cs b/NewHorizons/Components/Props/NHItemSocket.cs
index 29acb1bb..bd40a96d 100644
--- a/NewHorizons/Components/Props/NHItemSocket.cs
+++ b/NewHorizons/Components/Props/NHItemSocket.cs
@@ -12,8 +12,10 @@ namespace NewHorizons.Components.Props
public bool UseGiveTakePrompts;
public string InsertCondition;
public bool ClearInsertConditionOnRemoval;
+ public string InsertFact;
public string RemovalCondition;
public bool ClearRemovalConditionOnInsert;
+ public string RemovalFact;
public ItemType ItemType
{
@@ -65,6 +67,10 @@ namespace NewHorizons.Components.Props
{
DialogueConditionManager.SharedInstance.SetConditionState(RemovalCondition, false);
}
+ if (!string.IsNullOrEmpty(InsertFact))
+ {
+ Locator.GetShipLogManager().RevealFact(InsertFact);
+ }
}
internal void TriggerRemovalConditions()
@@ -77,6 +83,10 @@ namespace NewHorizons.Components.Props
{
DialogueConditionManager.SharedInstance.SetConditionState(InsertCondition, false);
}
+ if (!string.IsNullOrEmpty(RemovalFact))
+ {
+ Locator.GetShipLogManager().RevealFact(RemovalFact);
+ }
}
}
}
diff --git a/NewHorizons/External/Modules/Props/Item/ItemInfo.cs b/NewHorizons/External/Modules/Props/Item/ItemInfo.cs
index 5386a9a7..6876bd4c 100644
--- a/NewHorizons/External/Modules/Props/Item/ItemInfo.cs
+++ b/NewHorizons/External/Modules/Props/Item/ItemInfo.cs
@@ -67,6 +67,10 @@ namespace NewHorizons.External.Modules.Props.Item
///
[DefaultValue(true)] public bool clearPickupConditionOnDrop = true;
///
+ /// A ship log fact to reveal when picking up this item.
+ ///
+ public string pickupFact;
+ ///
/// A relative path from the planet to a socket that this item will be automatically inserted into.
///
public string pathToInitialSocket;
diff --git a/NewHorizons/External/Modules/Props/Item/ItemSocketInfo.cs b/NewHorizons/External/Modules/Props/Item/ItemSocketInfo.cs
index c7a2b3b2..76ac16f7 100644
--- a/NewHorizons/External/Modules/Props/Item/ItemSocketInfo.cs
+++ b/NewHorizons/External/Modules/Props/Item/ItemSocketInfo.cs
@@ -39,6 +39,10 @@ namespace NewHorizons.External.Modules.Props.Item
///
[DefaultValue(true)] public bool clearInsertConditionOnRemoval = true;
///
+ /// A ship log fact to reveal when inserting an item into this socket.
+ ///
+ public string insertFact;
+ ///
/// A dialogue condition to set when removing an item from this socket, or when the socket is empty.
///
public string removalCondition;
@@ -46,5 +50,9 @@ namespace NewHorizons.External.Modules.Props.Item
/// Whether the removal condition should be cleared when inserting a socketed item. Defaults to true.
///
[DefaultValue(true)] public bool clearRemovalConditionOnInsert = true;
+ ///
+ /// A ship log fact to reveal when removing an item from this socket, or when the socket is empty.
+ ///
+ public string removalFact;
}
}