Skip to content

Commit b3fa5d7

Browse files
authored
Merge pull request #325 from Yoshis1000000/Mods-Untrustworthy-Revised
Added Untrustworthy Mod
2 parents 9de8d7f + 3226a7d commit b3fa5d7

6 files changed

Lines changed: 110 additions & 3 deletions

File tree

osu.Game.Rulesets.Hishigata/HishigataRuleset.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public override IEnumerable<Mod> GetModsFor(ModType type)
6767
case ModType.Conversion:
6868
return new Mod[]
6969
{
70-
new HishigataModTrustworthy(),
70+
new MultiMod(new HishigataModTrustworthy(), new HishigataModUntrustworthy()),
7171
new HishigataModInvert(),
7272
};
7373

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using osu.Framework.Localisation;
2+
3+
namespace osu.Game.Rulesets.Hishigata.Localisation.Mods
4+
{
5+
public static class HishigataModUntrustworthyStrings
6+
{
7+
private const string prefix = @"osu.Game.Rulesets.Hishigata.Resources.Localisation.Mods.HishigataModUntrustworthyStrings";
8+
9+
/// <summary>
10+
/// "All notes switch sides."
11+
/// </summary>
12+
public static LocalisableString ModDescription => new TranslatableString(getKey(@"mod_description"), @"All notes switch sides.");
13+
14+
private static string getKey(string key) => $"{prefix}:{key}";
15+
}
16+
}

osu.Game.Rulesets.Hishigata/Mods/HishigataModInvert.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class HishigataModInvert : Mod, IApplicableToHitObject
1616
public override LocalisableString Description => HishigataModInvertStrings.ModDescription;
1717
public override double ScoreMultiplier => 1.0;
1818
public override ModType Type => ModType.Conversion;
19-
public override Type[] IncompatibleMods => new[] { typeof(HishigataModTrustworthy) };
19+
public override Type[] IncompatibleMods => new[] { typeof(HishigataModTrustworthy), typeof(HishigataModUntrustworthy) };
2020
public override IconUsage? Icon => OsuIcon.ModInvert;
2121

2222
public void ApplyToHitObject(HitObject hitObject)

osu.Game.Rulesets.Hishigata/Mods/HishigataModTrustworthy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public class HishigataModTrustworthy : Mod, IApplicableToBeatmapConverter
1515
public override LocalisableString Description => HishigataModTrustworthyStrings.ModDescription;
1616
public override double ScoreMultiplier => 0.8;
1717
public override ModType Type => ModType.Conversion;
18-
public override Type[] IncompatibleMods => new[] { typeof(HishigataModInvert) };
1918
public override IconUsage? Icon => FontAwesome.Solid.Check;
19+
public override Type[] IncompatibleMods => new[] { typeof(HishigataModUntrustworthy), typeof(HishigataModInvert) };
2020

2121
public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter)
2222
{
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System;
2+
using osu.Framework.Graphics.Sprites;
3+
using osu.Framework.Localisation;
4+
using osu.Game.Rulesets.Objects;
5+
using osu.Game.Rulesets.Hishigata.Localisation.Mods;
6+
using osu.Game.Rulesets.Mods;
7+
using osu.Game.Rulesets.Hishigata.Objects;
8+
9+
namespace osu.Game.Rulesets.Hishigata.Mods
10+
{
11+
public class HishigataModUntrustworthy : Mod, IApplicableToHitObject
12+
{
13+
public override string Name => "Untrustworthy";
14+
public override string Acronym => "UW";
15+
public override LocalisableString Description => HishigataModUntrustworthyStrings.ModDescription;
16+
public override double ScoreMultiplier => 0.8;
17+
public override ModType Type => ModType.Conversion;
18+
//Mod Icon currently looks ugly and does not fit in properly with other Icons, so needs updating.
19+
//public override IconUsage? Icon => FontAwesome.Solid.Exclamation;
20+
public override Type[] IncompatibleMods => new[] { typeof(HishigataModTrustworthy), typeof(HishigataModInvert) };
21+
22+
public void ApplyToHitObject(HitObject hitObject)
23+
{
24+
if (hitObject is HishigataNote hishigataNote) hishigataNote.IsFeign = true;
25+
}
26+
}
27+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<root>
3+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
4+
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
5+
<xsd:element name="root" msdata:IsDataSet="true">
6+
<xsd:complexType>
7+
<xsd:choice maxOccurs="unbounded">
8+
<xsd:element name="metadata">
9+
<xsd:complexType>
10+
<xsd:sequence>
11+
<xsd:element name="value" type="xsd:string" minOccurs="0"/>
12+
</xsd:sequence>
13+
<xsd:attribute name="name" use="required" type="xsd:string"/>
14+
<xsd:attribute name="type" type="xsd:string"/>
15+
<xsd:attribute name="mimetype" type="xsd:string"/>
16+
<xsd:attribute ref="xml:space"/>
17+
</xsd:complexType>
18+
</xsd:element>
19+
<xsd:element name="assembly">
20+
<xsd:complexType>
21+
<xsd:attribute name="alias" type="xsd:string"/>
22+
<xsd:attribute name="name" type="xsd:string"/>
23+
</xsd:complexType>
24+
</xsd:element>
25+
<xsd:element name="data">
26+
<xsd:complexType>
27+
<xsd:sequence>
28+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
29+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
30+
</xsd:sequence>
31+
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/>
32+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/>
33+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/>
34+
<xsd:attribute ref="xml:space"/>
35+
</xsd:complexType>
36+
</xsd:element>
37+
<xsd:element name="resheader">
38+
<xsd:complexType>
39+
<xsd:sequence>
40+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
41+
</xsd:sequence>
42+
<xsd:attribute name="name" type="xsd:string" use="required"/>
43+
</xsd:complexType>
44+
</xsd:element>
45+
</xsd:choice>
46+
</xsd:complexType>
47+
</xsd:element>
48+
</xsd:schema>
49+
<resheader name="resmimetype">
50+
<value>text/microsoft-resx</value>
51+
</resheader>
52+
<resheader name="version">
53+
<value>2.0</value>
54+
</resheader>
55+
<resheader name="reader">
56+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
57+
</resheader>
58+
<resheader name="writer">
59+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
60+
</resheader>
61+
<data name="mod_description" xml:space="preserve">
62+
<value>All notes switch sides.</value>
63+
</data>
64+
</root>

0 commit comments

Comments
 (0)