-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
480cdb0
commit 6eb911d
Showing
89 changed files
with
564 additions
and
2,256 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 |
---|---|---|
@@ -1,11 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<student> | ||
<Weavers> | ||
<Costura> | ||
<IncludeAssemblies> | ||
Csv | ||
Downloader | ||
</IncludeAssemblies> | ||
</Costura> | ||
</Weavers> | ||
</student> | ||
<Weavers> | ||
<Costura> | ||
<IncludeAssemblies> | ||
Csv | ||
Downloader | ||
</IncludeAssemblies> | ||
</Costura> | ||
</Weavers> |
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 |
---|---|---|
|
@@ -6,5 +6,4 @@ protected RoleButton() | |
{ | ||
Create(); | ||
} | ||
|
||
} |
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,32 @@ | ||
using HarmonyLib; | ||
|
||
namespace NextShip.Chat; | ||
|
||
[HarmonyPatch] | ||
public static class Commands | ||
{ | ||
[HarmonyPatch(typeof(ChatController), nameof(ChatController.SendChat))] | ||
private static class SendChatPatch | ||
{ | ||
public static bool Prefix(ChatController __instance) | ||
{ | ||
__instance.timeSinceLastMessage = 3f; | ||
var text = __instance.freeChatField.Text; | ||
var args = text.Split(' '); | ||
var canceled = false; | ||
var cancelVal = ""; | ||
switch (args[0]) | ||
{ | ||
|
||
} | ||
|
||
if (canceled) | ||
{ | ||
__instance.freeChatField.Clear(); | ||
__instance.freeChatField.textArea.SetText(cancelVal); | ||
} | ||
|
||
return !canceled; | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,69 +1,85 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using HarmonyLib; | ||
using Exception = System.Exception; | ||
|
||
namespace NextShip.Patches; | ||
|
||
[HarmonyPatch(typeof(HatManager))] | ||
public static class HatManagerPatch | ||
{ | ||
public static List<HatViewData> AllCacheHatViewDatas = new(); | ||
public static List<NamePlateViewData> AllCacheNamePlateViewDatas = new(); | ||
public static List<SkinViewData> AllCacheSkinViewDatas = new(); | ||
public static List<VisorViewData> AllCacheVisorViewDatas = new(); | ||
|
||
public static bool initialized; | ||
private static bool initialized = true; | ||
|
||
[HarmonyPatch(nameof(HatManager.Initialize))] | ||
[HarmonyPostfix] | ||
public static void InitHatCache(HatManager __instance) | ||
{ | ||
if (initialized) return; | ||
|
||
|
||
TaskUtils.StartTask(() => initialized = AllCosmeticsCache.StartCache(__instance)); | ||
} | ||
} | ||
|
||
public static class AllCosmeticsCache | ||
{ | ||
public static List<HatViewData> AllHatViewDatasCache = new(); | ||
public static List<NamePlateViewData> AllNamePlateViewDatasCache = new(); | ||
public static List<SkinViewData> AllSkinViewDatasCache = new(); | ||
public static List<VisorViewData> AllVisorViewDatasCache = new(); | ||
public static List<PetBehaviour> AllPetBehavioursCache = new(); | ||
|
||
|
||
public static bool StartCache(HatManager __instance) | ||
{ | ||
try | ||
{ | ||
__instance.allHats.Do(n => n.AddToChache()); | ||
__instance.allSkins.Do(n => n.AddToChache()); | ||
__instance.allVisors.Do(n => n.AddToChache()); | ||
__instance.allNamePlates.Do(n => n.AddToChache()); | ||
initialized = true; | ||
__instance.allHats.Do(n => n.AddToCache()); | ||
__instance.allSkins.Do(n => n.AddToCache()); | ||
__instance.allVisors.Do(n => n.AddToCache()); | ||
__instance.allNamePlates.Do(n => n.AddToCache()); | ||
__instance.allPets.Do(n => n.AddToCache()); | ||
Info("缓存成功"); | ||
return true; | ||
} | ||
catch (Exception e) | ||
{ | ||
Exception(e); | ||
Error("缓存失败"); | ||
initialized = false; | ||
return false; | ||
} | ||
} | ||
|
||
|
||
public static void AddToChache(this HatData data) | ||
private static void AddToCache(this HatData data) | ||
{ | ||
var Asset = data.CreateAddressableAsset(); | ||
Asset.LoadAsync(); | ||
AllHatViewDatasCache.Add(Asset.GetAsset()); | ||
} | ||
|
||
private static void AddToCache(this NamePlateData data) | ||
{ | ||
var Asset = data.CreateAddressableAsset(); | ||
Asset.LoadAsync(); | ||
AllCacheHatViewDatas.Add(Asset.GetAsset()); | ||
AllNamePlateViewDatasCache.Add(Asset.GetAsset()); | ||
} | ||
|
||
public static void AddToChache(this NamePlateData data) | ||
private static void AddToCache(this VisorData data) | ||
{ | ||
var Asset = data.CreateAddressableAsset(); | ||
Asset.LoadAsync(); | ||
AllCacheNamePlateViewDatas.Add(Asset.GetAsset()); | ||
AllVisorViewDatasCache.Add(Asset.GetAsset()); | ||
} | ||
|
||
public static void AddToChache(this VisorData data) | ||
private static void AddToCache(this SkinData data) | ||
{ | ||
var Asset = data.CreateAddressableAsset(); | ||
Asset.LoadAsync(); | ||
AllCacheVisorViewDatas.Add(Asset.GetAsset()); | ||
AllSkinViewDatasCache.Add(Asset.GetAsset()); | ||
} | ||
|
||
public static void AddToChache(this SkinData data) | ||
private static void AddToCache(this PetData data) | ||
{ | ||
var Asset = data.CreateAddressableAsset(); | ||
Asset.LoadAsync(); | ||
AllCacheSkinViewDatas.Add(Asset.GetAsset()); | ||
AllPetBehavioursCache.Add(Asset.GetAsset()); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -2,9 +2,4 @@ namespace NextShip.Game.Info; | |
|
||
public class HostInfo | ||
{ | ||
public HostInfo() | ||
{ | ||
|
||
} | ||
} | ||
|
||
} |
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.