diff --git a/.gitignore b/.gitignore
index a930fc00..25b7d25b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,4 +11,5 @@
.idea/.idea.Funk Engine/.idea/
*.DotSettings.user
-export_presets.cfg
\ No newline at end of file
+export_presets.cfg
+*.translation
diff --git a/Funk Engine.csproj b/Funk Engine.csproj
index 0fb7dbfb..e6707425 100644
--- a/Funk Engine.csproj
+++ b/Funk Engine.csproj
@@ -7,7 +7,7 @@
FunkEngine
-
+
diff --git a/Globals/BgAudioPlayer.cs b/Globals/BgAudioPlayer.cs
index 95fae32a..35f17e75 100644
--- a/Globals/BgAudioPlayer.cs
+++ b/Globals/BgAudioPlayer.cs
@@ -7,6 +7,7 @@ public partial class BgAudioPlayer : AudioStreamPlayer
private void PlayMusic(AudioStream music, float volume)
{
+ ProcessMode = ProcessModeEnum.Always;
if (Playing && music.Equals(Stream))
{
return;
diff --git a/Globals/FunkEngineNameSpace.cs b/Globals/FunkEngineNameSpace.cs
index 1c31fb5a..99f790fa 100644
--- a/Globals/FunkEngineNameSpace.cs
+++ b/Globals/FunkEngineNameSpace.cs
@@ -63,6 +63,7 @@ public enum Stages
Quit,
Map,
Controls,
+ Options,
}
public class MapGrid
@@ -166,7 +167,6 @@ private void CreateCommonChildren(int width, int height)
continue;
if (_map[curPos.X, curPos.Y + 1] == 0)
continue;
- GD.Print("Added child on same X.");
room.AddChild(_map[curPos.X, curPos.Y + 1]);
}
}
diff --git a/Globals/Scribe.cs b/Globals/Scribe.cs
index 16c87a9f..27aaf993 100644
--- a/Globals/Scribe.cs
+++ b/Globals/Scribe.cs
@@ -24,7 +24,7 @@ public partial class Scribe : Node
),
new Note(
"PlayerBase",
- "Basic player note, deals damage to enemy",
+ "Basic player note, deals damage to enemy.",
GD.Load("res://Classes/Notes/assets/single_note.png"),
null,
1,
@@ -35,7 +35,7 @@ public partial class Scribe : Node
),
new Note(
"PlayerDouble",
- "Basic player note, deals double damage to enemy",
+ "Basic player note, deals double damage to enemy.",
GD.Load("res://Classes/Notes/assets/double_note.png"),
null,
1,
@@ -48,7 +48,7 @@ public partial class Scribe : Node
),
new Note(
"PlayerHeal",
- "Basic player note, heals player",
+ "Basic player note, heals player.",
GD.Load("res://Classes/Notes/assets/heal_note.png"),
null,
1,
@@ -59,7 +59,7 @@ public partial class Scribe : Node
),
new Note(
"PlayerVampire",
- "Steals health from enemy",
+ "Steals health from enemy.",
GD.Load("res://Classes/Notes/assets/vampire_note.png"),
null,
1,
@@ -71,7 +71,7 @@ public partial class Scribe : Node
),
new Note(
"PlayerQuarter",
- "Basic note at a quarter of the cost",
+ "Basic note at a quarter of the cost.",
GD.Load("res://Classes/Notes/assets/quarter_note.png"),
null,
1,
diff --git a/Globals/StageProducer.cs b/Globals/StageProducer.cs
index d8928bc4..fc990abe 100644
--- a/Globals/StageProducer.cs
+++ b/Globals/StageProducer.cs
@@ -25,6 +25,21 @@ public partial class StageProducer : Node
//TODO: Allow for permanent changes and battle temporary stat changes.
public static PlayerStats PlayerStats;
+ public override void _EnterTree()
+ {
+ InitFromCfg();
+ }
+
+ private void InitFromCfg()
+ {
+ OptionsMenu.ChangeVolume(
+ SaveSystem.GetConfigValue(SaveSystem.ConfigSettings.Volume).As()
+ );
+ TranslationServer.SetLocale(
+ SaveSystem.GetConfigValue(SaveSystem.ConfigSettings.LanguageKey).As()
+ );
+ }
+
public void StartGame()
{
Map.InitMapGrid(MapSize.X, MapSize.Y, 3);
@@ -63,9 +78,6 @@ public void TransitionStage(Stages nextStage, int nextRoomIdx = -1)
Config = MakeConfig(nextStage, nextRoomIdx);
GetTree().ChangeSceneToFile("res://scenes/BattleDirector/test_battle_scene.tscn");
break;
- case Stages.Controls:
- GetTree().ChangeSceneToFile("res://scenes/Remapping/Remap.tscn");
- break;
case Stages.Chest:
Config = MakeConfig(nextStage, nextRoomIdx);
GetTree().ChangeSceneToFile("res://scenes/ChestScene/ChestScene.tscn");
diff --git a/Globals/translations.csv b/Globals/translations.csv
new file mode 100644
index 00000000..5bba08ad
--- /dev/null
+++ b/Globals/translations.csv
@@ -0,0 +1,54 @@
+keys,en,cn
+TITLE,Midnight Riff,中夜现场
+TITLE_START,Start Game,开始游戏
+TITLE_QUIT,Quit Game,退出游戏
+TITLE_OPTIONS,Options,选项
+TITLE_CONTROLS,Change Controls,更改操控
+CONTROLS_TITLE_TYPE_WASD,WASD,WASD
+CONTROLS_TITLE_TYPE_QWER,QWERT,QWERT
+CONTROLS_TITLE_TYPE_ARROW,Arrow,箭头键
+CONTROLS_TITLE_SELECTED,Selected,已选择
+CONTROLS_WASD_BUTTON,WASD,WASD
+CONTROLS_QWER_BUTTON,QWER,QWER
+CONTROLS_ARROW_BUTTON,Arrow Keys,箭头键
+CONTROLS_RETURN_BUTTON,Return,返回
+ESCAPE_MENU_RESUME,Resume,继续
+ESCAPE_MENU_QUIT,Quit,退出
+ESCAPE_MENU_TITLE,Quit to Title,返回标题
+CHEST_ROOM_REWARDS,Rewards!,奖励!
+CHEST_ROOM_SKIP,Skip,跳过
+CHEST_ROOM_ACCEPT,Accept,接受
+BATTLE_ROOM_BEGIN_BUTTON,"Begin Battle [Enter]","开始战斗 [Enter]"
+BATTLE_ROOM_PERFECT,Perfect,精准
+BATTLE_ROOM_GOOD,Good,良好
+BATTLE_ROOM_OK,OK,可以
+BATTLE_ROOM_MISS,Miss,错误
+BATTLE_ROOM_WIN,"You win!","你获胜了!"
+BATTLE_ROOM_LOSE,"Game Over!","游戏结束!"
+END_SCREEN_RESTART,Restart,重新开始
+BATTLE_ROOM_SKIP_BUTTON,Skip,跳过
+BATTLE_ROOM_ACCEPT_BUTTON,Accept,接受
+NOTE_ENEMYBASE_NAME,EnemyBase,敌人基地
+NOTE_ENEMYBASE_TOOLTIP,"Basic enemy note, deals damage to player.","基础敌人音符,对玩家造成伤害"
+NOTE_PLAYERBASE_NAME,PlayerBase,玩家基地
+NOTE_PLAYERBASE_TOOLTIP,"Basic player note, deals damage to enemy.","基础玩家音符,对敌人造成伤害"
+NOTE_PLAYERDOUBLE_NAME,PlayerDouble,玩家双击
+NOTE_PLAYERDOUBLE_TOOLTIP,"Basic player note, deals double damage to enemy.","基础玩家音符,对敌人造成双倍伤害"
+NOTE_PLAYERHEAL_NAME,PlayerHeal,玩家治愈
+NOTE_PLAYERHEAL_TOOLTIP,"Basic player note, heals player.","基础玩家音符,治愈玩家"
+NOTE_PLAYERVAMPIRE_NAME,PlayerVampire,玩家吸血
+NOTE_PLAYERVAMPIRE_TOOLTIP,"Steals health from enemy.","从敌人吸取生命值"
+NOTE_PLAYERQUARTER_NAME,PlayerQuarter,玩家一分之一
+NOTE_PLAYERQUARTER_TOOLTIP,"Basic note at a quarter of the cost.","以四分之一的耗费时间量发出基础音符"
+RELIC_BREAKFAST_NAME,Breakfast,早餐
+RELIC_BREAKFAST_TOOLTIP,"Increases max hp.",提高最大生命值
+RELIC_GOODVIBES_NAME,Good Vibes,良好消息
+RELIC_GOODVIBES_TOOLTIP,"Heals the player whenever they place a note.","每开始一个音符时治愈玩家"
+RELIC_AUROBOROS_NAME,Auroboros,无尾蛇
+RELIC_AUROBOROS_TOOLTIP,"Bigger number, better person. Increases combo multiplier every riff.","进一步增加综合倍数,每次现场提升"
+RELIC_COLORBOROS_NAME,Colorboros,彩蛇轮回
+RELIC_COLORBOROS_TOOLTIP,"Taste the rainbow. Charges the freestyle bar every riff.","品尝临岛,每次现场充值自由格条"
+INVENTORY_TAB_NOTES,Notes,乐谱
+INVENTORY_TAB_RELICS,Relics,遗物
+OPTIONS_VOLUME_LABEL,Master Volume,最终音量设置
+OPTIONS_CONTRAST_LABEL,High Contrast,高对比度模式
diff --git a/Globals/translations.csv.import b/Globals/translations.csv.import
new file mode 100644
index 00000000..c1c79034
--- /dev/null
+++ b/Globals/translations.csv.import
@@ -0,0 +1,17 @@
+[remap]
+
+importer="csv_translation"
+type="Translation"
+uid="uid://drjnsd6mqpxqh"
+
+[deps]
+
+files=["res://Globals/translations.en.translation", "res://Globals/translations.cn.translation"]
+
+source_file="res://Globals/translations.csv"
+dest_files=["res://Globals/translations.en.translation", "res://Globals/translations.cn.translation"]
+
+[params]
+
+compress=true
+delimiter=0
diff --git a/SaveData/SaveData.json b/SaveData/SaveData.json
deleted file mode 100644
index 1aeaf3cc..00000000
--- a/SaveData/SaveData.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "AccountName": null,
- "Notes": {
- "PlayerBase": 2,
- "PlayerDouble": 1
- },
- "Relics": {},
- "Settings": {}
-}
\ No newline at end of file
diff --git a/SaveData/SaveSystem.cs b/SaveData/SaveSystem.cs
index 7cc7af03..fa9159fd 100644
--- a/SaveData/SaveSystem.cs
+++ b/SaveData/SaveSystem.cs
@@ -1,48 +1,127 @@
using System.Collections.Generic;
using System.IO;
+using System.Linq;
using System.Text.Json;
using Godot;
+using FileAccess = Godot.FileAccess;
// TODO: implement saving
public static class SaveSystem
{
- private static string SavePath => "res://SaveData/SaveData.json"; // Update if needed
+ public static string UserConfigPath = "user://Options.cfg";
+ private static ConfigFile _curConfigData;
- // Loads only the notes section
- public static Dictionary LoadNotes()
+ private const float DefaultVolume = 80f;
+ private const string DefaultInput = "WASD";
+ private const string DefaultLanguage = "en";
+ private const bool DefaultHighCon = false;
+
+ public enum ConfigSettings
+ {
+ Volume,
+ InputKey,
+ LanguageKey,
+ HighContrast,
+ }
+
+ private static void InitConfig()
+ {
+ _curConfigData = new ConfigFile();
+ UpdateConfig(ConfigSettings.Volume, DefaultVolume);
+ UpdateConfig(ConfigSettings.InputKey, DefaultInput);
+ UpdateConfig(ConfigSettings.LanguageKey, DefaultLanguage);
+ UpdateConfig(ConfigSettings.HighContrast, DefaultHighCon);
+ }
+
+ private static void SaveConfig()
+ {
+ AssertConfigFile();
+ _curConfigData.Save(UserConfigPath);
+ }
+
+ public static void UpdateConfig(ConfigSettings setting, Variant value)
{
- var saveData = LoadSaveData();
- if (saveData != null && saveData.Notes != null)
+ AssertConfigFile();
+ switch (setting)
{
- return saveData.Notes;
+ case ConfigSettings.Volume:
+ _curConfigData.SetValue("Options", "Volume", value);
+ break;
+ case ConfigSettings.InputKey:
+ _curConfigData.SetValue("Options", "InputKey", value);
+ break;
+ case ConfigSettings.LanguageKey:
+ _curConfigData.SetValue("Options", "LanguageKey", value);
+ break;
+ case ConfigSettings.HighContrast:
+ _curConfigData.SetValue("Options", "HighContrast", value);
+ break;
}
- else
+ SaveConfig();
+ }
+
+ public static void AssertConfigFile()
+ {
+ if (_curConfigData == null)
{
- return new Dictionary();
+ LoadConfigData();
}
}
// This method loads the entire save data
- public static SaveData LoadSaveData()
+ private static void LoadConfigData()
{
- string path = ProjectSettings.GlobalizePath(SavePath);
- if (!File.Exists(path))
- {
- GD.PrintErr("Can't load save game");
- return null;
- }
+ _curConfigData = new ConfigFile();
+ VerifyConfig();
+ if (_curConfigData.Load(UserConfigPath) == Error.Ok)
+ return;
+ GD.Print("No config could be found, creating a new one.");
+ InitConfig();
+ SaveConfig();
+ }
- string json = File.ReadAllText(path);
- SaveData data = JsonSerializer.Deserialize(json);
- return data;
+ //Really naive approach to verifying config integrity, could I have just changed back to JSON? yes. But I'm a real programmer.
+ //In theory ConfigFiles should be more stable across any version changes.
+ private static void VerifyConfig()
+ {
+ if (!FileAccess.FileExists(UserConfigPath))
+ return;
+ string[] sus = new[]
+ {
+ "init",
+ "object",
+ "script",
+ "source",
+ "extends",
+ "RefCounted",
+ "sus",
+ };
+ FileAccess file = FileAccess.Open(UserConfigPath, FileAccess.ModeFlags.Read);
+ if (!sus.Any(s => file.GetAsText().Contains(s)))
+ return;
+ file.Close();
+ InitConfig();
}
-}
-public class SaveData
-{
- public string AccountName { get; set; }
- public Dictionary Notes { get; set; } = new Dictionary();
- public Dictionary Relics { get; set; } = new Dictionary();
- public Dictionary Settings { get; set; } = new Dictionary();
+ public static Variant GetConfigValue(ConfigSettings setting)
+ {
+ AssertConfigFile();
+ switch (setting)
+ {
+ case ConfigSettings.Volume:
+ return _curConfigData.GetValue("Options", "Volume", DefaultVolume);
+ case ConfigSettings.InputKey:
+ return _curConfigData.GetValue("Options", "InputKey", DefaultInput);
+ case ConfigSettings.LanguageKey:
+ return _curConfigData.GetValue("Options", "LanguageKey", DefaultLanguage);
+ case ConfigSettings.HighContrast:
+ return _curConfigData.GetValue("Options", "HighContrast", DefaultHighCon);
+ default:
+ GD.PushError(
+ "SaveSystem.GetConfigValue: Invalid config setting passed. " + setting
+ );
+ return float.MinValue;
+ }
+ }
}
diff --git a/project.godot b/project.godot
index d98a7e8c..c29c5c15 100644
--- a/project.godot
+++ b/project.godot
@@ -15,11 +15,15 @@ run/main_scene="res://scenes/SceneTransitions/TitleScreen.tscn"
config/features=PackedStringArray("4.3", "C#", "Forward Plus")
config/icon="res://scenes/BattleDirector/assets/Character1.png"
+[audio]
+
+buses/default_bus_layout=""
+
[autoload]
+StageProducer="*res://Globals/StageProducer.cs"
TimeKeeper="*res://Globals/TimeKeeper.cs"
Scribe="*res://Globals/Scribe.cs"
-StageProducer="*res://Globals/StageProducer.cs"
BgAudioPlayer="*res://Globals/BGAudioPlayer.tscn"
[display]
@@ -39,12 +43,45 @@ input_scheme="ARROWS"
[input]
+ui_left={
+"deadzone": 0.5,
+"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194319,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
+, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
+, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
+, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
+]
+}
+ui_right={
+"deadzone": 0.5,
+"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194321,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
+, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
+, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
+, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
+]
+}
+ui_up={
+"deadzone": 0.5,
+"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194320,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
+, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":false,"script":null)
+, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
+, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
+]
+}
+ui_down={
+"deadzone": 0.5,
+"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194322,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
+, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
+, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
+, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
+]
+}
arrowUp={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":88,"key_label":0,"unicode":120,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null)
+, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":50,"key_label":0,"unicode":50,"location":0,"echo":false,"script":null)
]
}
arrowDown={
@@ -53,6 +90,7 @@ arrowDown={
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":67,"key_label":0,"unicode":99,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
+, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":51,"key_label":0,"unicode":51,"location":0,"echo":false,"script":null)
]
}
arrowLeft={
@@ -61,6 +99,7 @@ arrowLeft={
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":90,"key_label":0,"unicode":122,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null)
+, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":49,"key_label":0,"unicode":49,"location":0,"echo":false,"script":null)
]
}
arrowRight={
@@ -69,6 +108,7 @@ arrowRight={
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":86,"key_label":0,"unicode":118,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":114,"location":0,"echo":false,"script":null)
+, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":52,"key_label":0,"unicode":52,"location":0,"echo":false,"script":null)
]
}
Pause={
@@ -87,6 +127,10 @@ Secondary={
]
}
+[internationalization]
+
+locale/translations=PackedStringArray("res://Globals/translations.cn.translation", "res://Globals/translations.en.translation")
+
[rendering]
textures/canvas_textures/default_texture_filter=0
diff --git a/scenes/BattleDirector/scripts/BattleDirector.cs b/scenes/BattleDirector/scripts/BattleDirector.cs
index 48b943e2..399f9b4b 100644
--- a/scenes/BattleDirector/scripts/BattleDirector.cs
+++ b/scenes/BattleDirector/scripts/BattleDirector.cs
@@ -156,7 +156,11 @@ private void OnTimedInput(Note note, ArrowType arrowType, int beat, double beatD
if (PlayerAddNote(arrowType, beat))
return; //Miss on empty note. This does not apply to inactive existing notes as a balance decision for now.
NotePlacementBar.MissNote();
- CM.ComboText(Timing.Miss.ToString(), arrowType, NotePlacementBar.GetCurrentCombo());
+ CM.ComboText(
+ Tr("BATTLE_ROOM_" + Timing.Miss.ToString().ToUpper()),
+ arrowType,
+ NotePlacementBar.GetCurrentCombo()
+ );
Player.TakeDamage(4);
return;
}
@@ -172,7 +176,11 @@ private void OnTimedInput(Note note, ArrowType arrowType, int beat, double beatD
{
NotePlacementBar.HitNote();
}
- CM.ComboText(timed.ToString(), arrowType, NotePlacementBar.GetCurrentCombo());
+ CM.ComboText(
+ Tr("BATTLE_ROOM_" + timed.ToString().ToUpper()),
+ arrowType,
+ NotePlacementBar.GetCurrentCombo()
+ );
}
private Timing CheckTiming(double beatDif)
@@ -226,7 +234,7 @@ private void ShowRewardSelection(int amount)
if (StageProducer.Config.RoomType == Stages.Boss)
type = "Relic";
var rewardSelect = RewardSelect.CreateSelection(this, Player.Stats, amount, type);
- rewardSelect.GetNode