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
1 change: 1 addition & 0 deletions osu.Game.Rulesets.Hishigata/HishigataRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public override IEnumerable<Mod> GetModsFor(ModType type)
return new Mod[]
{
new HishigataModTrustworthy(),
new HishigataModInvert(),
};

case ModType.Fun:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using osu.Framework.Localisation;

namespace osu.Game.Rulesets.Hishigata.Localisation.Mods
{
public static class HishigataModInvertStrings
{
private const string prefix = @"osu.Game.Rulesets.Hishigata.Resources.Localisation.Mods.HishigataModInvertStrings";

/// <summary>
/// "Regular notes and feigns are swapped."
/// </summary>
public static LocalisableString ModDescription => new TranslatableString(getKey(@"mod_description"), @"Regular notes and feigns are swapped.");

private static string getKey(string key) => $"{prefix}:{key}";
}
}
28 changes: 28 additions & 0 deletions osu.Game.Rulesets.Hishigata/Mods/HishigataModInvert.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Hishigata.Localisation.Mods;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Hishigata.Objects;

namespace osu.Game.Rulesets.Hishigata.Mods
{
public class HishigataModInvert : Mod, IApplicableToHitObject
{
public override string Name => "Invert";
public override string Acronym => "IN";
public override LocalisableString Description => HishigataModInvertStrings.ModDescription;
public override double ScoreMultiplier => 1.0;
public override ModType Type => ModType.Conversion;
public override Type[] IncompatibleMods => new[] { typeof(HishigataModTrustworthy) };
public override IconUsage? Icon => OsuIcon.ModInvert;

public void ApplyToHitObject(HitObject hitObject)
{
var hishigataHitObject = (HishigataHitObject)hitObject;
if (hishigataHitObject is HishigataNote hishigataNote) hishigataNote.IsFeign = !hishigataNote.IsFeign;
}
}
}
2 changes: 2 additions & 0 deletions osu.Game.Rulesets.Hishigata/Mods/HishigataModTrustworthy.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Beatmaps;
Expand All @@ -14,6 +15,7 @@ public class HishigataModTrustworthy : Mod, IApplicableToBeatmapConverter
public override LocalisableString Description => HishigataModTrustworthyStrings.ModDescription;
public override double ScoreMultiplier => 0.8;
public override ModType Type => ModType.Conversion;
public override Type[] IncompatibleMods => new[] { typeof(HishigataModInvert) };
public override IconUsage? Icon => FontAwesome.Solid.Check;

public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string"/>
<xsd:attribute name="type" type="xsd:string"/>
<xsd:attribute name="mimetype" type="xsd:string"/>
<xsd:attribute ref="xml:space"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string"/>
<xsd:attribute name="name" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/>
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/>
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/>
<xsd:attribute ref="xml:space"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="mod_description" xml:space="preserve">
<value>Regular notes and feigns are swapped.</value>
</data>
</root>
Loading