-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from hkviz/v1_6
v1.6.0.0
- Loading branch information
Showing
14 changed files
with
385 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using Modding; | ||
using Satchel; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UnityEngine; | ||
|
||
namespace HKViz { | ||
internal class CharmsExport : Loggable { | ||
class CharmInfo { | ||
public string charmId; | ||
public string spriteName; | ||
} | ||
|
||
|
||
private static CharmsExport? _instance; | ||
public static CharmsExport Instance { | ||
get { | ||
if (_instance != null) return _instance; | ||
_instance = new CharmsExport(); | ||
return _instance; | ||
} | ||
} | ||
|
||
|
||
public void Export() { | ||
var go = GameObject.FindObjectOfType<CharmVibrations>().transform.Find("Collected Charms"); | ||
var sprites = go.GetComponentsInChildren<SpriteRenderer>(); | ||
Log("sprites length" + sprites.Length); | ||
|
||
var infos = sprites.Where(it => it.gameObject.name == "Sprite").Select(it => new CharmInfo { | ||
charmId = it.transform.parent.gameObject.name, | ||
spriteName = it.sprite.name, | ||
}).ToList(); | ||
|
||
Debug.Log("infos" + infos.Count); | ||
|
||
var json = Json.Stringify(infos); | ||
using (var writer = new StreamWriter(StoragePaths.GetUserFilePath("charms-inventory-export.txt"))) { | ||
writer.Write(json); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
using Modding; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UnityEngine; | ||
|
||
namespace HKViz { | ||
internal class EnemiesExport : Loggable { | ||
class EnemyJournalInfo { | ||
public string portraitName; | ||
Check warning on line 13 in HKVizMod/EnemiesExport.cs
|
||
public string convoName; | ||
Check warning on line 14 in HKVizMod/EnemiesExport.cs
|
||
public string descConvo; | ||
public string nameConvo; | ||
public string notesConvo; | ||
public string playerDataBoolName; | ||
public string playerDataKillsName; | ||
public string playerDataName; | ||
public string playerDataNewDataName; | ||
} | ||
|
||
|
||
private static EnemiesExport? _instance; | ||
public static EnemiesExport Instance { | ||
get { | ||
if (_instance != null) return _instance; | ||
_instance = new EnemiesExport(); | ||
return _instance; | ||
} | ||
} | ||
|
||
|
||
public void Export() { | ||
var journalList = GameObject.FindObjectOfType<JournalList>(); | ||
var listItems = journalList.transform.GetComponentsInChildren<JournalEntryStats>(true); | ||
|
||
var enemies = listItems.Select(e => new EnemyJournalInfo { | ||
portraitName = e.transform.GetChild(0).GetComponent<SpriteRenderer>().sprite.name, | ||
convoName = e.convoName, | ||
descConvo = e.descConvo, | ||
nameConvo = e.nameConvo, | ||
notesConvo = e.notesConvo, | ||
playerDataBoolName = e.playerDataBoolName, | ||
playerDataKillsName = e.playerDataKillsName, | ||
playerDataName = e.playerDataName, | ||
playerDataNewDataName = e.playerDataNewDataName, | ||
}).ToList(); | ||
|
||
|
||
var json = Json.Stringify(enemies); | ||
using (var writer = new StreamWriter(StoragePaths.GetUserFilePath("enemies-journal-export.txt"))) { | ||
writer.Write(json); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using UnityEngine; | ||
|
||
namespace HKViz { | ||
internal class KnightManager { | ||
private static KnightManager instance; | ||
public static KnightManager Instance { | ||
get { | ||
if (instance == null) { | ||
instance = new KnightManager(); | ||
} | ||
return instance; | ||
} | ||
} | ||
|
||
|
||
private Transform? knight; | ||
|
||
public Transform? Knight => knight; | ||
|
||
public void UpdateKnight() { | ||
if (knight == null) { | ||
// if destroyed needs to find new player | ||
knight = GameObject.Find("Knight").transform; | ||
if (knight != null) { | ||
//OnNewKnightFound?.Invoke(knight); | ||
PlayerHealthWriter.Instance.InitNewKnight(knight); | ||
} | ||
} | ||
} | ||
|
||
//public event Action<Transform>? OnNewKnightFound; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.