Skip to content

Commit

Permalink
fix(?) double journal spawns
Browse files Browse the repository at this point in the history
polish up some descriptions
  • Loading branch information
Govorunb committed Dec 11, 2023
1 parent 8feaacb commit b1a5e9d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 27 deletions.
33 changes: 11 additions & 22 deletions SCHIZO/Items/PDAJournal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ private sealed class PDAJournalPrefab
internal static Dictionary<string, PDAJournalPrefab> Prefabs = [];

public CustomPrefab NautilusPrefab { get; }
public CloneTemplate CloneTemplate { get; }
public PrefabInfo Info { get; }
private PDAJournalPrefab(PDAJournal journal)
{
string prefabName = $"{nameof(PDAJournal)}_{journal.key}";
Info = new PrefabInfo

NautilusPrefab = new CustomPrefab(prefabName, null, null);

bool doSpawn = RetargetHelpers.Pick(journal.spawnInSN, journal.spawnInBZ);
if (doSpawn)
{
ClassID = prefabName,
PrefabFileName = prefabName,
// nautilus complains if we don't have a techtype
// even though prefabs like this are *not* supposed to have one
TechType = EnumHandler.AddEntry<TechType>(prefabName)
};
CloneTemplate = new CloneTemplate(Info, CloneTargetClassId)
Spawns.SpawnLocation ourLoc = RetargetHelpers.Pick(journal.spawnLocationSN, journal.spawnLocationBZ);
SpawnLocation loc = new(ourLoc.position, ourLoc.rotation);
NautilusPrefab.SetSpawns(loc);
}
NautilusPrefab.SetGameObject(new CloneTemplate(NautilusPrefab.Info, CloneTargetClassId)
{
ModifyPrefab = prefab =>
{
Expand All @@ -48,18 +48,7 @@ private PDAJournalPrefab(PDAJournal journal)
handTarget.secondaryTooltip = journal.pdaHandTargetSubtext;
handTarget.goal.key = journal.key;
}
};

NautilusPrefab = new CustomPrefab() { Info = Info };

bool doSpawn = RetargetHelpers.Pick(journal.spawnInSN, journal.spawnInBZ);
if (doSpawn)
{
Spawns.SpawnLocation ourLoc = RetargetHelpers.Pick(journal.spawnLocationSN, journal.spawnLocationBZ);
SpawnLocation loc = new(ourLoc.position, ourLoc.rotation);
NautilusPrefab.SetSpawns(loc);
}
NautilusPrefab.SetGameObject(CloneTemplate);
});
NautilusPrefab.Register();
}

Expand Down
2 changes: 1 addition & 1 deletion SCHIZO/Subtitles/ActorData.BelowZero.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static implicit operator Actor(ActorData data)

[HarmonyPatch(typeof(uGUI_TalkingHead), nameof(uGUI_TalkingHead.GetSkin))]
[HarmonyPrefix]
private static bool GetCustomSkin(uGUI_TalkingHead __instance, Actor actor, out TalkingHeadSkin __result)
private static bool GetCustomSkin(Actor actor, out TalkingHeadSkin __result)
{
__result = default;

Expand Down
6 changes: 5 additions & 1 deletion Unity/Assets/Mod/Evil Fumo/Evil Fumo item data.asset
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ MonoBehaviour:
displayName: Evil fumo
tooltip: 'Don''t poke her, or she might bite you.
Keep away from sharp objects.'
Keep away from sharp objects.
<size=75%>(Model
by w1n7er)</size>'
icon: {fileID: 21300000, guid: 60e94acee40f84d4896c5a5004c2c6a7, type: 3}
itemSize: {x: 1, y: 1}
isCraftable: 1
Expand Down
4 changes: 2 additions & 2 deletions Unity/Assets/Mod/Gymbag/Gymbag BZ.asset
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
id: 0
classId: quantumgymbag
displayName: Quantum Gymbag
tooltip: 'Provides portable access to the quantum storage network... provided you
tooltip: 'Offers portable access to the quantum storage network... provided you
don''t mind the smell.
<size=75%>(Model by Vaalmyr)</size>'
Expand All @@ -36,7 +36,7 @@ MonoBehaviour:
craftTreeTypeSN: 0
craftTreePathSN:
techGroupSN: 14
techCategorySN: 0
techCategorySN: -1
requiredForUnlockSN:
isCustom: 0
techType: 0
Expand Down
6 changes: 5 additions & 1 deletion Unity/Assets/Mod/Neurofumo/Neurofumo item data.asset
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ MonoBehaviour:
id: 0
classId: neurofumoitem
displayName: Neuro fumo
tooltip: Very huggable. Sure to keep your heart warm in any environment.
tooltip: 'Very huggable. Sure to keep your heart warm in any environment.
<size=75%>(Model
by Kat)</size>'
icon: {fileID: 21300000, guid: 45820c772f47f814d88babbafe7caa46, type: 3}
itemSize: {x: 1, y: 1}
isCraftable: 1
Expand Down

0 comments on commit b1a5e9d

Please sign in to comment.