Skip to content

Commit f526687

Browse files
committed
Remove redundant tooltips
Actual tooltip text is handled in translation, keyed by name
1 parent 9624468 commit f526687

8 files changed

Lines changed: 7 additions & 46 deletions

File tree

Classes/Notes/Note.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,11 @@ public partial class Note : Resource, IDisplayable
1616
private Action<BattleDirector, Note, Timing> NoteEffect;
1717

1818
public const double TimingMax = 0.5d; //The max range for a note to be timed is its beat +/- this const
19-
20-
public string Tooltip { get; set; }
2119
public Texture2D Texture { get; set; }
2220

2321
public Note(
2422
int id,
2523
string name,
26-
string tooltip,
2724
Texture2D texture = null,
2825
PuppetTemplate owner = null,
2926
int baseVal = 1,
@@ -38,7 +35,6 @@ public Note(
3835
NoteEffect = noteEffect;
3936
_baseVal = baseVal;
4037
Texture = texture;
41-
Tooltip = tooltip;
4238
CostModifier = costModifier;
4339
TargetType = targetType;
4440
}
@@ -55,7 +51,6 @@ public Note Clone()
5551
Note newNote = new Note(
5652
Id,
5753
Name,
58-
Tooltip,
5954
Texture,
6055
Owner,
6156
_baseVal,

Classes/Relics/RelicTemplate.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@ public partial class RelicTemplate : Resource, IDisplayable
1111
public string Name { get; set; }
1212

1313
public Texture2D Texture { get; set; }
14-
public string Tooltip { get; set; }
1514

1615
public Rarity Rarity { get; set; }
1716

1817
public RelicTemplate(
1918
int id,
2019
string name = "",
21-
string tooltip = "",
2220
Rarity rarity = Rarity.Common,
2321
Texture2D texture = null,
2422
RelicEffect[] effectTags = null
@@ -27,14 +25,13 @@ public RelicTemplate(
2725
Id = id;
2826
Effects = effectTags;
2927
Name = name;
30-
Tooltip = tooltip;
3128
Texture = texture;
3229
Rarity = rarity;
3330
}
3431

3532
public RelicTemplate Clone()
3633
{
37-
RelicTemplate newRelic = new RelicTemplate(Id, Name, Tooltip, Rarity, Texture, Effects);
34+
RelicTemplate newRelic = new RelicTemplate(Id, Name, Rarity, Texture, Effects);
3835
return newRelic;
3936
}
4037
}

Globals/FunkEngineNameSpace.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public ArrowData(ArrowType type, Beat beat, Note note, double length = 0)
5858
public readonly Note NoteRef = null;
5959

6060
public static ArrowData Placeholder { get; private set; } =
61-
new(default, default, new Note(-1, "", ""));
61+
new(default, default, new Note(-1, ""));
6262

6363
public ArrowData BeatFromLength()
6464
{
@@ -425,7 +425,6 @@ public interface IBattleEvent
425425
public interface IDisplayable
426426
{
427427
string Name { get; set; }
428-
string Tooltip { get; set; }
429428
Texture2D Texture { get; set; }
430429
}
431430

Globals/Scribe.cs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public partial class Scribe : Node
1616
new Note(
1717
0,
1818
"EnemyBase",
19-
"Basic enemy note, deals damage to player.",
2019
null,
2120
null,
2221
1,
@@ -29,7 +28,6 @@ public partial class Scribe : Node
2928
new Note(
3029
1,
3130
"PlayerBase",
32-
"Basic player note, deals damage to enemy.",
3331
GD.Load<Texture2D>("res://Classes/Notes/Assets/Note_PlayerBasic.png"),
3432
null,
3533
4,
@@ -43,7 +41,6 @@ public partial class Scribe : Node
4341
new Note(
4442
2,
4543
"PlayerDouble",
46-
"Basic player note, deals double damage to enemy.",
4744
GD.Load<Texture2D>("res://Classes/Notes/Assets/Note_PlayerDouble.png"),
4845
null,
4946
8,
@@ -57,7 +54,6 @@ public partial class Scribe : Node
5754
new Note(
5855
3,
5956
"PlayerHeal",
60-
"Basic player note, heals player.",
6157
GD.Load<Texture2D>("res://Classes/Notes/Assets/Note_PlayerHeal.png"),
6258
null,
6359
1,
@@ -71,7 +67,6 @@ public partial class Scribe : Node
7167
new Note(
7268
4,
7369
"PlayerVampire",
74-
"Steals health from enemy.",
7570
GD.Load<Texture2D>("res://Classes/Notes/Assets/Note_PlayerVampire.png"),
7671
null,
7772
3,
@@ -87,7 +82,6 @@ public partial class Scribe : Node
8782
new Note(
8883
5,
8984
"PlayerQuarter",
90-
"Basic note at a quarter of the cost.",
9185
GD.Load<Texture2D>("res://Classes/Notes/Assets/Note_PlayerQuarter.png"),
9286
null,
9387
3,
@@ -102,7 +96,6 @@ public partial class Scribe : Node
10296
new Note(
10397
6,
10498
"PlayerBlock",
105-
"Gives player one charge of block.",
10699
GD.Load<Texture2D>("res://Classes/Notes/Assets/Note_PlayerBlock.png"),
107100
null,
108101
1,
@@ -116,7 +109,6 @@ public partial class Scribe : Node
116109
new Note(
117110
7,
118111
"PlayerExplosive",
119-
"Deals damage to all enemies.",
120112
GD.Load<Texture2D>("res://Classes/Notes/Assets/Note_PlayerExplosive.png"),
121113
null,
122114
4,
@@ -132,7 +124,6 @@ public partial class Scribe : Node
132124
new Note(
133125
8,
134126
"PlayerEcho",
135-
"Deals more damage with each loop.",
136127
GD.Load<Texture2D>("res://Classes/Notes/Assets/Note_PlayerEcho.png"),
137128
null,
138129
4,
@@ -147,7 +138,6 @@ public partial class Scribe : Node
147138
new Note(
148139
9,
149140
"PlayerPoison",
150-
"Applies stacks of poison based on timing.",
151141
GD.Load<Texture2D>("res://Classes/Notes/Assets/Note_PlayerPoison.png"),
152142
null,
153143
1,
@@ -165,7 +155,6 @@ public partial class Scribe : Node
165155
new RelicTemplate(
166156
0,
167157
"Breakfast", //Reference ha ha, Item to give when relic pool is empty.
168-
"Increases max hp.", //TODO: Description can include the relics values?
169158
Rarity.Breakfast,
170159
GD.Load<Texture2D>("res://Classes/Relics/Assets/Relic_Breakfast.png"),
171160
new RelicEffect[]
@@ -184,7 +173,6 @@ public partial class Scribe : Node
184173
new RelicTemplate(
185174
1,
186175
"Good Vibes",
187-
"Heals the player whenever they place a note.",
188176
Rarity.Common,
189177
GD.Load<Texture2D>("res://Classes/Relics/Assets/Relic_GoodVibes.png"),
190178
new RelicEffect[]
@@ -202,7 +190,6 @@ public partial class Scribe : Node
202190
new RelicTemplate(
203191
2,
204192
"Auroboros",
205-
"Bigger number, better person. Increases combo multiplier every loop.",
206193
Rarity.Common,
207194
GD.Load<Texture2D>("res://Classes/Relics/Assets/Relic_Auroboros.png"),
208195
new RelicEffect[]
@@ -221,7 +208,6 @@ public partial class Scribe : Node
221208
new RelicTemplate(
222209
3,
223210
"Colorboros",
224-
"Taste the rainbow. Charges the freestyle bar every loop.",
225211
Rarity.Common,
226212
GD.Load<Texture2D>("res://Classes/Relics/Assets/Relic_Colorboros.png"),
227213
new RelicEffect[]
@@ -240,7 +226,6 @@ public partial class Scribe : Node
240226
new RelicTemplate(
241227
4,
242228
"Chips",
243-
"Hitting a note deals a bit of damage.",
244229
Rarity.Rare, //This thing is really good imo.
245230
GD.Load<Texture2D>("res://Classes/Relics/Assets/Relic_Chips.png"),
246231
new RelicEffect[]
@@ -261,7 +246,6 @@ public partial class Scribe : Node
261246
new RelicTemplate(
262247
5,
263248
"Paper Cut",
264-
"Deals damage each loop.",
265249
Rarity.Common,
266250
GD.Load<Texture2D>("res://Classes/Relics/Assets/Relic_PaperCut.png"),
267251
new RelicEffect[]
@@ -279,7 +263,6 @@ public partial class Scribe : Node
279263
new RelicTemplate(
280264
6,
281265
"Energy Drink",
282-
"Take a chance to cool down and sip an energy drink to decrease energy costs.",
283266
Rarity.Common,
284267
GD.Load<Texture2D>("res://Classes/Relics/Assets/Relic_EnergyDrink.png"),
285268
new RelicEffect[]
@@ -297,7 +280,6 @@ public partial class Scribe : Node
297280
new RelicTemplate(
298281
7,
299282
"Bandage",
300-
"A clean strip of cloth. Use it after a fight to patch up and feel better.",
301283
Rarity.Common,
302284
GD.Load<Texture2D>("res://Classes/Relics/Assets/Relic_Bandage.png"),
303285
new RelicEffect[]
@@ -315,7 +297,6 @@ public partial class Scribe : Node
315297
new RelicTemplate(
316298
8,
317299
"Medkit",
318-
"A small kit with medical supplies. Heals you a bit after each loop.",
319300
Rarity.Common,
320301
GD.Load<Texture2D>("res://Classes/Relics/Assets/Relic_Medkit.png"),
321302
new RelicEffect[]
@@ -333,7 +314,6 @@ public partial class Scribe : Node
333314
new RelicTemplate(
334315
9,
335316
"Vinyl Record",
336-
"Right round, right round. All loop effects trigger twice.",
337317
Rarity.Epic,
338318
GD.Load<Texture2D>("res://Classes/Relics/Assets/Relic_VinylRecord.png"),
339319
new RelicEffect[]

Scenes/UI/Inventory.tscn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ follow_focus = true
8686
[node name="NotesGrid" type="GridContainer" parent="MarginContainer/InvenVBox/Tabs/INVENTORY_TAB_NOTES/MarginContainer/NotesBox"]
8787
layout_mode = 2
8888
size_flags_vertical = 4
89-
columns = 5
89+
columns = 10
9090

9191
[node name="INVENTORY_TAB_RELICS" type="MarginContainer" parent="MarginContainer/InvenVBox/Tabs"]
9292
visible = false
@@ -119,7 +119,7 @@ follow_focus = true
119119
[node name="RelicGrid" type="GridContainer" parent="MarginContainer/InvenVBox/Tabs/INVENTORY_TAB_RELICS/MarginContainer/RelicBox"]
120120
layout_mode = 2
121121
size_flags_vertical = 4
122-
columns = 5
122+
columns = 10
123123

124124
[node name="DescBox" type="MarginContainer" parent="MarginContainer/InvenVBox"]
125125
layout_mode = 2

Scenes/UI/Scripts/DisplayButton.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,17 @@
55
*/
66
public partial class DisplayButton : Button
77
{
8-
//TODO: Make various menus change descriptions when focus changes, instead of on click.
98
public static readonly string LoadPath = "res://Scenes/UI/DisplayButton.tscn";
109

1110
[Export]
1211
public Texture2D Texture;
1312

14-
[Export]
15-
public string Description;
16-
1713
[Export]
1814
public string DisplayName;
1915

20-
public void Display(
21-
Texture2D texture,
22-
string description,
23-
string name,
24-
bool focusHandling = false
25-
)
16+
public void Display(Texture2D texture, string name, bool focusHandling = false)
2617
{
2718
Texture = texture;
28-
Description = description;
2919
DisplayName = name;
3020
Icon = Texture;
3121

Scenes/UI/Scripts/Inventory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ private void AddDisplayButtons(IDisplayable[] displayables, Node parentNode)
3939
{
4040
var newButton = GD.Load<PackedScene>(DisplayButton.LoadPath)
4141
.Instantiate<DisplayButton>();
42-
newButton.Display(item.Texture, item.Tooltip, item.Name, true);
42+
newButton.Display(item.Texture, item.Name, true);
4343
newButton.Pressed += () =>
4444
{
4545
DoDescription(newButton);

Scenes/UI/Scripts/RewardSelect.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ private void AddButton(IDisplayable displayable)
6363
var button = GD.Load<PackedScene>(DisplayButton.LoadPath).Instantiate<DisplayButton>();
6464
button.SetButtonGroup(_rewardGroup);
6565
button.ToggleMode = true;
66-
button.Display(displayable.Texture, displayable.Tooltip, displayable.Name);
66+
button.Display(displayable.Texture, displayable.Name);
6767
button.Pressed += () => SetSelection(displayable);
6868
button.FocusEntered += () => ChangeDescription(displayable);
6969
ButtonContainer.AddChild(button);

0 commit comments

Comments
 (0)