mirror of
https://github.com/4sval/FModel.git
synced 2026-08-25 02:44:29 -05:00
Added FortAbilityKit to the icon creator + more todo
This commit is contained in:
@@ -969,6 +969,7 @@ namespace FModel
|
||||
case "FortConditionalResourceItemDefinition":
|
||||
case "FortAwardItemDefinition":
|
||||
case "FortChallengeBundleScheduleDefinition":
|
||||
case "FortAbilityKit":
|
||||
CreateItemIcon(AssetArray[0]);
|
||||
break;
|
||||
case "FortChallengeBundleItemDefinition":
|
||||
|
||||
@@ -309,25 +309,48 @@ namespace FModel
|
||||
JToken description = theItem["Description"];
|
||||
if (description != null)
|
||||
{
|
||||
JToken key = description["key"];
|
||||
JToken sourceString = description["source_string"];
|
||||
if (key != null && sourceString != null)
|
||||
string descriptionText = string.Empty;
|
||||
|
||||
if (theItem["export_type"].Value<string>().Equals("FortAbilityKit"))
|
||||
{
|
||||
//myGraphic.DrawRectangle(new Pen(new SolidBrush(Color.Pink)), new Rectangle(5, 455, 512, 42));
|
||||
|
||||
string text = SearchResource.getTextByKey(key.Value<string>(), sourceString.Value<string>());
|
||||
|
||||
if (!string.IsNullOrEmpty(CosmeticSet))
|
||||
JArray descriptionArray = theItem["Description"].Value<JArray>();
|
||||
foreach (JToken token in descriptionArray)
|
||||
{
|
||||
string theSet = DrawCosmeticSet(CosmeticSet);
|
||||
if (!string.IsNullOrEmpty(theSet))
|
||||
JToken key = token["key"];
|
||||
JToken sourceString = token["source_string"];
|
||||
if (key != null && sourceString != null)
|
||||
{
|
||||
text += theSet;
|
||||
string text = SearchResource.getTextByKey(key.Value<string>(), sourceString.Value<string>());
|
||||
descriptionText += text;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
JToken key = description["key"];
|
||||
JToken sourceString = description["source_string"];
|
||||
if (key != null && sourceString != null)
|
||||
{
|
||||
//myGraphic.DrawRectangle(new Pen(new SolidBrush(Color.Pink)), new Rectangle(5, 455, 512, 42));
|
||||
|
||||
string text = SearchResource.getTextByKey(key.Value<string>(), sourceString.Value<string>());
|
||||
descriptionText = text;
|
||||
|
||||
if (!string.IsNullOrEmpty(CosmeticSet))
|
||||
{
|
||||
string theSet = DrawCosmeticSet(CosmeticSet);
|
||||
if (!string.IsNullOrEmpty(theSet))
|
||||
{
|
||||
descriptionText += theSet;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(descriptionText))
|
||||
{
|
||||
myGraphic.DrawString(
|
||||
text,
|
||||
descriptionText,
|
||||
new Font("Arial", Settings.Default.rarityNew ? 9 : 10),
|
||||
new SolidBrush(Color.White),
|
||||
new RectangleF(5, Settings.Default.rarityNew ? 455 : 441, 512, Settings.Default.rarityNew ? 42 : 49),
|
||||
|
||||
@@ -148,6 +148,7 @@ namespace FModel
|
||||
{
|
||||
JToken largePreviewImage = theItem["LargePreviewImage"];
|
||||
JToken smallPreviewImage = theItem["SmallPreviewImage"];
|
||||
JToken iconBrush = theItem["IconBrush"];
|
||||
if (largePreviewImage != null)
|
||||
{
|
||||
JToken assetPathName = largePreviewImage["asset_path_name"];
|
||||
@@ -165,6 +166,16 @@ namespace FModel
|
||||
{
|
||||
string textureFile = Path.GetFileName(assetPathName.Value<string>()).Substring(0, Path.GetFileName(assetPathName.Value<string>()).LastIndexOf('.'));
|
||||
|
||||
ItemIconPath = JohnWick.AssetToTexture2D(textureFile);
|
||||
}
|
||||
}
|
||||
else if (iconBrush != null)
|
||||
{
|
||||
JToken resourceObject = iconBrush["ResourceObject"];
|
||||
if (resourceObject != null)
|
||||
{
|
||||
string textureFile = resourceObject.Value<string>();
|
||||
|
||||
ItemIconPath = JohnWick.AssetToTexture2D(textureFile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,9 @@ I'd highly suggest you to use [UModel](https://github.com/gildor2/UModel) if you
|
||||
|
||||
## TODO
|
||||
- [ ] Code refactoring
|
||||
- [ ] Schematics icon with weapon icon and ingredients
|
||||
- [ ] Special Schematics icon design with weapon icon and ingredients
|
||||
- [ ] New Heroes icon design with perks and more
|
||||
- [ ] New Defenders icon design with useful infos
|
||||
- [x] Translation support
|
||||
- [x] AES Manager
|
||||
- [x] Display support for .locres files
|
||||
|
||||
Reference in New Issue
Block a user