Skip to content

Commit

Permalink
Merge pull request #170 from LumpBloom7/Hidden
Browse files Browse the repository at this point in the history
Add Hidden mod
  • Loading branch information
LumpBloom7 authored Oct 21, 2022
2 parents 8a4428b + 6f5eafd commit f4594d5
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 0 deletions.
1 change: 1 addition & 0 deletions osu.Game.Rulesets.Hishigata/HishigataRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public override IEnumerable<Mod> GetModsFor(ModType type)
new HishigataModHardRock(),
new HishigataModSuddenDeath(),
new MultiMod(new HishigataModDoubleTime(), new HishigataModNightcore()),
new HishigataModHidden(),
};

case ModType.Automation:
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 HishigataModHiddenStrings
{
private const string prefix = @"osu.Game.Rulesets.Hishigata.Resources.Localisation.Mods.HishigataModHiddenStrings";

/// <summary>
/// "Notes fade out just before you hit them."
/// </summary>
public static LocalisableString ModDescription => new TranslatableString(getKey(@"mod_description"), @"Notes fade out just before you hit them.");

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

namespace osu.Game.Rulesets.Hishigata.Mods
{
public class HishigataModHidden : ModHidden
{
public override LocalisableString Description => HishigataModHiddenStrings.ModDescription;

public override double ScoreMultiplier => 1.06;

protected override void ApplyIncreasedVisibilityState(DrawableHitObject hitObject, ArmedState state) => ApplyNormalVisibilityState(hitObject, state);

protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state)
{
DrawableHishigataHitObject hishiObj = (DrawableHishigataHitObject)hitObject;

using (hishiObj.BeginAbsoluteSequence(hishiObj.HitObject.StartTime - hishiObj.HitObject.TimePreempt))
hishiObj.FadeOut(hishiObj.HitObject.TimePreempt / 1.5f);
}
}
}
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>Notes fade out just before you hit them.</value>
</data>
</root>

0 comments on commit f4594d5

Please sign in to comment.