Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions Content/Tools/Developer/AssetManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public override void SafeClick(UIMouseEvent evt)
{
if (string.IsNullOrEmpty(mod.SourceFolder))
{
Main.NewText("Mod is not loaded from source, reloading this asset will have no effect.", Color.Red);
Main.NewText(LocalizationHelper.GetToolText("AssetManager.NotSourseMod"), Color.Red);
return;
}

Expand All @@ -161,17 +161,17 @@ public override void SafeClick(UIMouseEvent evt)
var newValue = Texture2D.FromStream(Main.graphics.GraphicsDevice, stream);
asset.ownValue = newValue;

Main.NewText($"Loaded new value from [c/CCCCFF:{path}]");
Main.NewText(LocalizationHelper.GetToolText("AssetManager.LoadedNewValue", path));
}
}
else
{
Main.NewText($"Could not reload as path does not exist! Tried: [c/FFCCCC:{path}]");
Main.NewText(LocalizationHelper.GetToolText("AssetManager.PathDoesntExist", path));
}
}
else
{
Main.NewText("You cannot reload this asset");
Main.NewText(LocalizationHelper.GetToolText("AssetManager.CannotReload"));
}
}

Expand All @@ -195,7 +195,7 @@ public override void SafeRightClick(UIMouseEvent evt)
stream.Close();
}

Main.NewText($"Exported to [c/CCCCFF:{path}]");
Main.NewText(LocalizationHelper.GetToolText("AssetManager.Exported", path));
}

public override void SafeDraw(SpriteBatch spriteBatch, Rectangle iconArea)
Expand All @@ -212,11 +212,11 @@ public override void SafeDraw(SpriteBatch spriteBatch, Rectangle iconArea)
string tip = asset.Name + "\n\n";

if (!string.IsNullOrEmpty(mod.SourceFolder))
tip += "Click to force reload";
tip += LocalizationHelper.GetToolText("AssetManager.ClickToReload");
else
tip += "[c/FFCCCC:Not loaded from source]";
tip += $"[c/FFCCCC:{LocalizationHelper.GetToolText("AssetManager.NotFromSourse")}]";

tip += "\nRight click to export";
tip += $"\n{LocalizationHelper.GetToolText("AssetManager.RBMToExport")}";

Tooltip.SetTooltip(tip);
}
Expand Down Expand Up @@ -267,7 +267,7 @@ public override void SafeClick(UIMouseEvent evt)
{
if (string.IsNullOrEmpty(mod.SourceFolder))
{
Main.NewText("Mod is not loaded from source, reloading this asset will have no effect.", Color.Red);
Main.NewText(LocalizationHelper.GetToolText("AssetManager.NotSourseMod"), Color.Red);
return;
}

Expand All @@ -280,7 +280,7 @@ public override void SafeClick(UIMouseEvent evt)

public async void ReloadFromSource()
{
Main.NewText($"Starting shader compilation for {asset.Name}", Color.SkyBlue);
Main.NewText(LocalizationHelper.GetToolText("AssetManager.StartingCompilation", asset.Name), Color.SkyBlue);

string xnbPath = Path.Combine(mod.SourceFolder, asset.Name);
xnbPath = Path.ChangeExtension(xnbPath, "xnb");
Expand Down Expand Up @@ -310,7 +310,7 @@ public void ReloadFromBinary()
var newValue = reader.ReadAsset<Effect>() as Effect;
asset.ownValue = newValue;

Main.NewText($"Loaded new value from [c/CCCCFF:{path}]");
Main.NewText(LocalizationHelper.GetToolText("AssetManager.LoadedNewValue", path));
}
}

Expand All @@ -332,14 +332,14 @@ public override void SafeDraw(SpriteBatch spriteBatch, Rectangle iconArea)
string tip = asset.Name + "\n\n";

if (!string.IsNullOrEmpty(mod.SourceFolder))
tip += "Click to force reload";
tip += LocalizationHelper.GetToolText("AssetManager.ClickToReload");
else
tip += "[c/FFCCCC:Not loaded from source]";
tip += $"[c/FFCCCC:{LocalizationHelper.GetToolText("AssetManager.NotFromSourse")}]";

if (sourcePath != null)
tip += $"\n\nSource code found at [c/CCCCFF:{sourcePath}]";
tip += $"\n\n{LocalizationHelper.GetToolText("AssetManager.SourceCodeFound", sourcePath)}]";
else
tip += "\n\n[c/FFAAAA:Could not find source code...]";
tip += $"\n\n[c/FFAAAA:{LocalizationHelper.GetToolText("AssetManager.NotFindSourceCode")}]";

Tooltip.SetTooltip(tip);
}
Expand Down Expand Up @@ -372,8 +372,8 @@ public override void Draw(SpriteBatch spriteBatch)

if (IsMouseHovering)
{
Tooltip.SetName("Re-scan");
Tooltip.SetTooltip("re-scans for modded assets. This may be needed if mods lazy load assets.");
Tooltip.SetName(LocalizationHelper.GetToolText("AssetManager.Rescan.DisplayName"));
Tooltip.SetTooltip(LocalizationHelper.GetToolText("AssetManager.Rescan.Description"));
}
}
}
Expand Down
14 changes: 12 additions & 2 deletions Content/Tools/Editors/ItemEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ static string GetLocalizedText(string text)
basicEditorList.Add(new IntEditor(GetLocalizedText("CritChance.Name"), n => item.crit = n, item.crit, () => item.crit, GetLocalizedText("CritChance.Description")));
basicEditorList.Add(new FloatEditor(GetLocalizedText("Knockback.Name"), n => item.knockBack = n, item.knockBack, () => item.knockBack, GetLocalizedText("Knockback.Description")));

basicEditorList.Add(new IntEditor(GetLocalizedText("UseStyle.Name"), n => item.useStyle = n, item.useStyle, () => item.useStyle, GetLocalizedText("UseStyle.Description")));
ReLogic.Graphics.DynamicSpriteFont font = Terraria.GameContent.FontAssets.MouseText.Value;

basicEditorList.Add(new IntEditor(GetLocalizedText("UseStyle.Name"), n => item.useStyle = n, item.useStyle, () => item.useStyle, GUIHelper.WrapString(GetLocalizedText("UseStyle.Description"), 400, font, 1f)));
basicEditorList.Add(new IntEditor(GetLocalizedText("UseTime.Name"), n => item.useTime = n, item.useTime, () => item.useTime, GetLocalizedText("UseTime.Description")));
basicEditorList.Add(new IntEditor(GetLocalizedText("UseAnimation.Name"), n => item.useAnimation = n, item.useAnimation, () => item.useAnimation, GetLocalizedText("UseAnimation.Description")));
basicEditorList.Add(new BoolEditor(GetLocalizedText("AutoReuse.Name"), n => item.autoReuse = n, item.autoReuse, () => item.autoReuse, GetLocalizedText("AutoReuse.Description")));
Expand Down Expand Up @@ -372,7 +374,15 @@ public override void Draw(SpriteBatch spriteBatch)
if (IsMouseHovering)
{
Tooltip.SetName(name);
Tooltip.SetTooltip("From mod: " + (prefix != null ? prefix.Mod.DisplayName : "Vanilla"));

if (prefix != null)
{
Tooltip.SetTooltip(LocalizationHelper.GetToolText("ItemEditor.Filters.FromMod", prefix.Mod.DisplayName));
}
else
{
Tooltip.SetTooltip(LocalizationHelper.GetToolText("ItemEditor.Filters.FromVanilla"));
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Localization/GUI/ru-RU_Mods.DragonLens.GUI.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Browser: {
Defense: по защите
Value: по цене
Life: по максимальному здоровью
// AlphabeticalPath: Alphabetical by Path
AlphabeticalPath: по алфавиту (путь)
}

ButtonSizeSlider: {
Expand Down
25 changes: 24 additions & 1 deletion Localization/Tools/en-US_Mods.DragonLens.Tools.hjson
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BuffDespawner: {
BuffDespawner: {
DisplayName: Clear buffs
Description: Removes all buffs and debuffs from yourself
}
Expand Down Expand Up @@ -59,6 +59,11 @@ ItemEditor: {
'''
SetDefaults: Reset (SetDefaults)

Filters: {
FromMod: From mod:
FromVanilla: From Vanilla
}

Editors: {
Damage: {
Name: Damage
Expand Down Expand Up @@ -899,13 +904,31 @@ PlayerManager: {
AssetManager: {
DisplayName: Asset Manager
Description: Browse, export, or reload the assets of mods; this includes textures and shaders.
NotSourseMod: Mod is not loaded from source, reloading this asset will have no effect.
LoadedNewValue: Loaded new value from [c/CCCCFF:{0}]
PathDoesntExist: Could not reload as path does not exist! Tried: [c/FFCCCC:{0}]
CannotReload: You cannot reload this asset
Exported: Exported to [c/CCCCFF:{0}]
ClickToReload: Click to force reload
NotFromSourse: Not loaded from source
RBMToExport: Right click to export
SourceCodeFound: Source code found at [c/CCCCFF:{0}]
NotFindSourceCode: Could not find source code...
StartingCompilation: Starting shader compilation for {0}

Rescan: {
DisplayName: Re-scan
Description: re-scans for modded assets. This may be needed if mods lazy load assets.
}

FilterCategories: {
Mod: Mod filters
Type: Type filters
}

Filters: {
Mod.Description: Assets from {0}

Texture: {
Name: Texture assets
Description: Assets which are textures (Texture2D), these are .png files in your mod typically
Expand Down
69 changes: 46 additions & 23 deletions Localization/Tools/ru-RU_Mods.DragonLens.Tools.hjson
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BuffDespawner: {
BuffDespawner: {
DisplayName: Очистить баффы
Description: Снимает с вас все баффы и дебаффы
}
Expand Down Expand Up @@ -59,6 +59,11 @@ ItemEditor: {
'''
SetDefaults: Сброс изменений

Filters: {
FromMod: Из мода:
FromVanilla: Из ванильной игры
}

Editors: {
Damage: {
Name: Урон
Expand All @@ -77,7 +82,7 @@ ItemEditor: {

UseStyle: {
Name: Тип использования
Description: 0: None - Нельзя использовать NEWLN 1: Swing - Взмах NEWLN 3: Thrust - Выпад NEWLN 4: HoldUp - Удержание над головой NEWLN 5: Shoot - Стрельба NEWLN 6: DrinkLong - Длинная анимация питья NEWLN 7: DrinkOld - Старая анимация питья NEWLN 8: GolfPlay - Клюшка для гольфа NEWLN 9: DrinkLiquid - Новая анимация питья NEWLN 10: HiddenAnimation - Без анимации использования NEWLN 11: MowTheLawn - Газонокосилка NEWLN 12: Guitar - Гитара NEWLN 13: Rapier - Кинжалы NEWLN 14: RaiseLamp - Фонарь
Description: 0: None (нельзя использовать) NEWLN 1: Swing (взмах) NEWLN 3: Thrust(выпад) NEWLN 4: HoldUp (удержание над головой) NEWLN 5: Shoot (стрельба) NEWLN 6: DrinkLong (длинная анимация питья) NEWLN 7: DrinkOld (старая анимация питья) NEWLN 8: GolfPlay (клюшка для гольфа) NEWLN 9: DrinkLiquid (новая анимация питья) NEWLN 10: HiddenAnimation (без анимации использования) NEWLN 11: MowTheLawn (газонокосилка) NEWLN 12: Guitar (гитара) NEWLN 13: Rapier (кинжалы) NEWLN 14: RaiseLamp (фонарь)
}

UseTime: {
Expand Down Expand Up @@ -199,14 +204,14 @@ PlayerEditor: {

Difficulty: {
DisplayName: Сменить режим сложности
Description: Позволяет переключаться между тремя режимами сложности игры. NEWBLOCK Нажмите ПКМ, чтобы вкл./выкл. режим Путешествие.
Description: Позволяет переключаться между тремя режимами сложности игры. NEWBLOCK Нажмите ПКМ, чтобы вкл./выкл. режим путешествия.
RightClickName: Вкл./Выкл. режим Путешествие.
GameInNormalMode: Установлен классический режим
GameInExpertMode: Установлен режим Эксперт
GameInMasterMode: Установлен режим Мастер
JourneyToggleDisabled: Переключение режима Путешествие отключено в мультиплеере
JourneyEnabled: Режим Путешествие включён
JourneyDisabled: Режим Путешествие отключён
GameInExpertMode: Установлен режим эксперта
GameInMasterMode: Установлен режим мастера
JourneyToggleDisabled: Переключение режима путешествия отключено в мультиплеере
JourneyEnabled: Режим путешествия включён
JourneyDisabled: Режим путешествия отключён
}

FastForward: {
Expand Down Expand Up @@ -671,14 +676,14 @@ CustomizeTool: {
DisplayName: Кастомизация инструментов
Description: Позволяет настраивать панели инструментов этого мода под себя.
ToolBrowser: Добавить инструмент
// FilterCategories.Mod: Mod filters
FilterCategories.Mod: Модовые фильтры

Filters: {
// Mod.Description: Tools added by the mod {0}
Mod.Description: Инструменты, добавленные модом {0}

DragonLens: {
// Name: DragonLens
// Description: Tools added by DragonLens
Name: DragonLens
Description: Инструменты, добавленные модом DragonLens
}
}
}
Expand Down Expand Up @@ -918,29 +923,47 @@ PlayerManager: {
}

AssetManager: {
// DisplayName: Asset Manager
// Description: Browse, export, or reload the assets of mods; this includes textures and shaders.
DisplayName: Браузер ассетов
Description: Позволяет искать, экпортировать и перезагружать модовые ассеты, такие как текстуры и шейдеры.
NotSourseMod: Данный мод загружен не из исходного кода — перезагрузка ассета не дала эффекта.
LoadedNewValue: Загружено новое значение из [c/CCCCFF:{0}]
PathDoesntExist: Перезагрузка не удалась, ибо искомый путь не существует. Искомый путь: [c/FFCCCC:{0}]
CannotReload: Вы не можете перезагрузить данный ассет.
Exported: Экспортированно по пути [c/CCCCFF:{0}]
ClickToReload: Нажмите ЛКМ для принудительной перезагрузки.
NotFromSourse: Загружено не из исходного кода.
RBMToExport: Нажмите ПКМ, чтобы экспортировать.
SourceCodeFound: Искодный код эффекта найден по пути [c/CCCCFF:{0}]
NotFindSourceCode: Исходный код эффекта не найден.
StartingCompilation: Начата компиляция шейдера {0}

Rescan: {
DisplayName: Пересканирование
Description: Пересканирует модовые ассеты. Это может потребоваться, если моды загружают свои ассеты с задержкой.
}

FilterCategories: {
// Mod: Mod filters
// Type: Type filters
Mod: По модам
Type: По типу
}

Filters: {
Mod.Description: Ассеты из {0}

Texture: {
// Name: Texture assets
// Description: Assets which are textures (Texture2D), these are .png files in your mod typically
Name: Ассеты текстур
Description: Ассеты, являющиеся текстурами (Texture2D). Обычно хранятся в формате .png
}

Effect: {
// Name: Effect/Shader assets
// Description: Assets which are shaders (Effect), these are .xnb files in your mod typically, and usually have a .fx source code file aswell
Name: Ассеты эффектов/шейдеров
Description: Ассеты, являющиеся шейдерами (Effect). Обычно зранятся в формате .xnb и имеют .fx-файл исходного кода
}
}
}

Pause: {
// DisplayName: Pause
// Description: Pauses the game. You can right click this tool to advance by a single frame while paused.
// RightClickName: (Pause) Step single frame
DisplayName: Пауза
Description: Позволяет останавливать игру. Нажмите ПКМ во время паузы, чтобы перейти на один кадр вперёд.
RightClickName: (Пауза) Перейти на один кадр вперёд
}
23 changes: 23 additions & 0 deletions Localization/Tools/zh-Hans_Mods.DragonLens.Tools.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ ItemEditor: {
'''
SetDefaults: 重置 (SetDefaults)

Filters: {
// FromMod: From mod:
// FromVanilla: From Vanilla
}

Editors: {
Damage: {
Name: 伤害
Expand Down Expand Up @@ -895,13 +900,31 @@ PlayerManager: {
AssetManager: {
// DisplayName: Asset Manager
// Description: Browse, export, or reload the assets of mods; this includes textures and shaders.
// NotSourseMod: Mod is not loaded from source, reloading this asset will have no effect.
// LoadedNewValue: Loaded new value from [c/CCCCFF:{0}]
// PathDoesntExist: Could not reload as path does not exist! Tried: [c/FFCCCC:{0}]
// CannotReload: You cannot reload this asset
// Exported: Exported to [c/CCCCFF:{0}]
// ClickToReload: Click to force reload
// NotFromSourse: Not loaded from source
// RBMToExport: Right click to export
// SourceCodeFound: Source code found at [c/CCCCFF:{0}]
// NotFindSourceCode: Could not find source code...
// StartingCompilation: Starting shader compilation for {0}

Rescan: {
// DisplayName: Re-scan
// Description: re-scans for modded assets. This may be needed if mods lazy load assets.
}

FilterCategories: {
// Mod: Mod filters
// Type: Type filters
}

Filters: {
// Mod.Description: Assets from {0}

Texture: {
// Name: Texture assets
// Description: Assets which are textures (Texture2D), these are .png files in your mod typically
Expand Down
Loading