Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
OliBomby committed Feb 15, 2024
2 parents 5124144 + 040e17f commit f3654c8
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 19 deletions.
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
# built documents.
#
# The short X.Y version.
version = '0.7.0'
version = '0.8.0'
# The full version, including alpha/beta/rc tags.
release = '0.7.0'
release = '0.8.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name='slider',
version='0.7.0',
version='0.8.0',
description='Utilities for working with osu! files and data',
author='Joe Jevnik',
author_email='[email protected]',
Expand Down
11 changes: 9 additions & 2 deletions slider/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .beatmap import Beatmap
from .beatmap import (Beatmap, Circle, Slider, Spinner, TimingPoint, HitObject,
HoldNote)
from .client import Client
from .game_mode import GameMode
from .mod import Mod
Expand All @@ -7,7 +8,7 @@
from .library import Library
from .collection import CollectionDB

__version__ = '0.7.0'
__version__ = '0.8.0'


__all__ = [
Expand All @@ -19,4 +20,10 @@
'Position',
'Replay',
'CollectionDB',
'Circle',
'Slider',
'Spinner',
'TimingPoint',
'HitObject',
'HoldNote'
]
25 changes: 25 additions & 0 deletions slider/beatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ class HitObject:
The hitsound to play when this object is hit.
addition : str, optional
Unknown currently.
new_combo : bool
Whether this element is the start of a new combo.
combo_skip : int
How many combo colors to skip if this element is the start of a new
combo.
"""
time_related_attributes = frozenset({'time'})
# must be set by subclasses
Expand Down Expand Up @@ -477,6 +482,11 @@ class Circle(HitObject):
Where this circle appears on the screen.
time : timedelta
When this circle appears in the map.
new_combo : bool
Whether this circle is the start of a new combo.
combo_skip : int
How many combo colors to skip if this circle is the start of a new
combo.
"""
type_code = 1

Expand Down Expand Up @@ -524,6 +534,11 @@ class Spinner(HitObject):
When this spinner ends in the map.
addition : str
Hitsound additions.
new_combo : bool
Whether this spinner is the start of a new combo.
combo_skip : int
How many combo colors to skip if this spinner is the start of a new
combo.
"""
type_code = 8
time_related_attributes = frozenset({'time', 'end_time'})
Expand Down Expand Up @@ -614,6 +629,11 @@ class Slider(HitObject):
A list of additions for each edge.
addition : str
Hitsound additions.
new_combo : bool
Whether this slider is the start of a new combo.
combo_skip : int
How many combo colors to skip if this slider is the start of a new
combo.
"""
type_code = 2
time_related_attributes = frozenset({'time', 'end_time', 'ms_per_beat'})
Expand Down Expand Up @@ -928,6 +948,11 @@ class HoldNote(HitObject):
Where this HoldNote appears on the screen.
time : timedelta
When this HoldNote appears in the map.
new_combo : bool
Whether this HoldNote is the start of a new combo.
combo_skip : int
How many combo colors to skip if this HoldNote is the start of a new
combo.
Notes
-----
Expand Down
9 changes: 2 additions & 7 deletions slider/example_data/beatmaps/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pkg_resources import resource_filename
from pathlib import Path

from slider import Beatmap

Expand All @@ -11,12 +11,7 @@ def example_beatmap(name):
name : str
The name of the example file to open.
"""
return Beatmap.from_path(
resource_filename(
__name__,
name,
),
)
return Beatmap.from_path(Path(__file__).parent / name)


_sendan_life_versions = frozenset({
Expand Down
9 changes: 2 additions & 7 deletions slider/example_data/collections/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pkg_resources import resource_filename
from pathlib import Path

from slider import CollectionDB

Expand All @@ -11,12 +11,7 @@ def example_collection(name):
name : str
The name of the example file to open.
"""
return CollectionDB.from_path(
resource_filename(
__name__,
name,
),
)
return CollectionDB.from_path(Path(__file__).parent / name)


def test_db():
Expand Down

0 comments on commit f3654c8

Please sign in to comment.