Skip to content

Commit

Permalink
Rename , preparing for 2.2 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
nekitdev committed Nov 18, 2023
1 parent d432c01 commit 837a9c6
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 35 deletions.
14 changes: 7 additions & 7 deletions gd/api/database/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class Database(Binary):
wave_id: int = field(default=DEFAULT_ICON_ID)
robot_id: int = field(default=DEFAULT_ICON_ID)
spider_id: int = field(default=DEFAULT_ICON_ID)
# swing_copter_id: int = field(default=DEFAULT_ICON_ID)
# swing_id: int = field(default=DEFAULT_ICON_ID)
color_1_id: int = field(default=DEFAULT_COLOR_1_ID)
color_2_id: int = field(default=DEFAULT_COLOR_2_ID)
trail_id: int = field(default=DEFAULT_ICON_ID)
Expand Down Expand Up @@ -321,7 +321,7 @@ def load_parts(cls: Type[D], main: bytes, levels: bytes) -> D:
wave_id = main_data.get(WAVE_ID, DEFAULT_ICON_ID)
robot_id = main_data.get(ROBOT_ID, DEFAULT_ICON_ID)
spider_id = main_data.get(SPIDER_ID, DEFAULT_ICON_ID)
# swing_copter_id = main_data.get(SWING_COPTER_ID, DEFAULT_ICON_ID)
# swing_id = main_data.get(SWING_ID, DEFAULT_ICON_ID)

color_1_id = main_data.get(COLOR_1_ID, DEFAULT_COLOR_1_ID)
color_2_id = main_data.get(COLOR_2_ID, DEFAULT_COLOR_2_ID)
Expand Down Expand Up @@ -527,7 +527,7 @@ def create_folder(string: str, name: str) -> Folder:
wave_id=wave_id,
robot_id=robot_id,
spider_id=spider_id,
# swing_copter_id=swing_copter_id,
# swing_id=swing_id,
color_1_id=color_1_id,
color_2_id=color_2_id,
trail_id=trail_id,
Expand Down Expand Up @@ -594,7 +594,7 @@ def dump_main(self) -> bytes:
WAVE_ID: self.wave_id,
ROBOT_ID: self.robot_id,
SPIDER_ID: self.spider_id,
# SWING_COPTER_ID: self.swing_copter_id,
# SWING_ID: self.swing_id,
COLOR_1_ID: self.color_1_id,
COLOR_2_ID: self.color_2_id,
TRAIL_ID: self.trail_id,
Expand Down Expand Up @@ -816,7 +816,7 @@ def from_binary(
wave_id = reader.read_u8()
robot_id = reader.read_u8()
spider_id = reader.read_u8()
# swing_copter_id = reader.read_u8()
# swing_id = reader.read_u8()
color_1_id = reader.read_u8()
color_2_id = reader.read_u8()
trail_id = reader.read_u8()
Expand Down Expand Up @@ -1011,7 +1011,7 @@ def custom_object_from_binary() -> List[Object]:
wave_id=wave_id,
robot_id=robot_id,
spider_id=spider_id,
# swing_copter_id=swing_copter_id,
# swing_id=swing_id,
color_1_id=color_1_id,
color_2_id=color_2_id,
trail_id=trail_id,
Expand Down Expand Up @@ -1108,7 +1108,7 @@ def to_binary(
writer.write_u8(self.wave_id)
writer.write_u8(self.robot_id)
writer.write_u8(self.spider_id)
# writer.write_u8(self.swing_copter_id)
# writer.write_u8(self.swing_id)
writer.write_u8(self.color_1_id)
writer.write_u8(self.color_2_id)
writer.write_u8(self.trail_id)
Expand Down
22 changes: 11 additions & 11 deletions gd/api/database/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
WAVES = "dart"
ROBOTS = "robot"
SPIDERS = "spider"
# SWING_COPTERS = "swing_copter"
# SWINGS = "swing"
EXPLOSIONS = "death"
STREAKS = "special"
COLORS_1 = "c0"
Expand All @@ -34,7 +34,7 @@
WAVES_PREFIX = prefix(WAVES)
ROBOTS_PREFIX = prefix(ROBOTS)
SPIDERS_PREFIX = prefix(SPIDERS)
# SWING_COPTERS_PREFIX = prefix(SWING_COPTERS)
# SWINGS_PREFIX = prefix(SWINGS)
EXPLOSIONS_PREFIX = prefix(EXPLOSIONS)
STREAKS_PREFIX = prefix(STREAKS)
COLORS_1_PREFIX = prefix(COLORS_1)
Expand All @@ -55,7 +55,7 @@ class Values(Binary):
waves: OrderedSet[int] = field(factory=ordered_set)
robots: OrderedSet[int] = field(factory=ordered_set)
spiders: OrderedSet[int] = field(factory=ordered_set)
# swing_copters: OrderedSet[int] = field(factory=ordered_set)
# swings: OrderedSet[int] = field(factory=ordered_set)
explosions: OrderedSet[int] = field(factory=ordered_set)
streaks: OrderedSet[int] = field(factory=ordered_set)
colors_1: OrderedSet[int] = field(factory=ordered_set)
Expand Down Expand Up @@ -110,11 +110,11 @@ def to_binary(

iter(spiders).for_each(writer.write_u8)

# swing_copters = self.swing_copters
# swings = self.swings

# writer.write_u8(len(swing_copters))
# writer.write_u8(len(swings))

# iter(swing_copters).for_each(writer.write_u8)
# iter(swings).for_each(writer.write_u8)

explosions = self.explosions

Expand Down Expand Up @@ -179,10 +179,10 @@ def from_binary(

spiders = iter.repeat_exactly_with(reader.read_u8, spiders_length).ordered_set()

# swing_copters_length = reader.read_u8()
# swings_length = reader.read_u8()

# swing_copters = (
# iter.repeat_exactly_with(reader.read_u8, swing_copters_length).ordered_set()
# swings = (
# iter.repeat_exactly_with(reader.read_u8, swings_length).ordered_set()
# )

explosions_length = reader.read_u8()
Expand Down Expand Up @@ -210,7 +210,7 @@ def from_binary(
waves=waves,
robots=robots,
spiders=spiders,
# swing_copters=swing_copters,
# swings=swings,
explosions=explosions,
streaks=streaks,
colors_1=colors_1,
Expand All @@ -227,7 +227,7 @@ def prefix_to_ordered_set(self) -> StringDict[OrderedSet[int]]:
WAVES_PREFIX: self.waves,
ROBOTS_PREFIX: self.robots,
SPIDERS_PREFIX: self.spiders,
# SWING_COPTERS_PREFIX: self.swing_copters,
# SWINGS_PREFIX: self.swings,
EXPLOSIONS_PREFIX: self.explosions,
STREAKS_PREFIX: self.streaks,
COLORS_1_PREFIX: self.colors_1,
Expand Down
4 changes: 2 additions & 2 deletions gd/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ async def update_profile(
wave_id: Optional[int] = None,
robot_id: Optional[int] = None,
spider_id: Optional[int] = None,
# swing_copter_id: Optional[int] = None,
# swing_id: Optional[int] = None,
explosion_id: Optional[int] = None,
special: int = DEFAULT_SPECIAL,
*,
Expand Down Expand Up @@ -417,7 +417,7 @@ async def update_profile(
wave_id=switch_none(wave_id, cosmetics.wave_id),
robot_id=switch_none(robot_id, cosmetics.robot_id),
spider_id=switch_none(spider_id, cosmetics.spider_id),
# swing_copter_id=switch_none(swing_copter_id, cosmetics.swing_copter_id),
# swing_id=switch_none(swing_id, cosmetics.swing_id),
explosion_id=switch_none(explosion_id, cosmetics.explosion_id),
special=special,
account_id=self.account_id,
Expand Down
8 changes: 4 additions & 4 deletions gd/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class IconType(Enum):
WAVE = 4
ROBOT = 5
SPIDER = 6
# SWING_COPTER = 7
# SWING = 7

DEFAULT = CUBE

Expand Down Expand Up @@ -190,8 +190,8 @@ def is_robot(self) -> bool:
def is_spider(self) -> bool:
return self is type(self).SPIDER

# def is_swing_copter(self) -> bool:
# return self is type(self).SWING_COPTER
# def is_swing(self) -> bool:
# return self is type(self).SWING


class MessageState(Enum):
Expand Down Expand Up @@ -1114,7 +1114,7 @@ class GameMode(Enum):
WAVE = 4
ROBOT = 5
SPIDER = 6
# SWING_COPTER = 7
# SWING = 7

DEFAULT = CUBE

Expand Down
2 changes: 1 addition & 1 deletion gd/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ async def update_profile(
wave_id: int,
robot_id: int,
spider_id: int,
# swing_copter_id: int,
# swing_id: int,
explosion_id: int,
special: int = DEFAULT_SPECIAL,
*,
Expand Down
4 changes: 2 additions & 2 deletions gd/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ async def update_profile(
wave_id: int,
robot_id: int,
spider_id: int,
# swing_copter_id: int,
# swing_id: int,
explosion_id: int,
special: int = DEFAULT_SPECIAL,
*,
Expand All @@ -191,7 +191,7 @@ async def update_profile(
wave_id=wave_id,
robot_id=robot_id,
spider_id=spider_id,
# swing_copter_id=swing_copter_id,
# swing_id=swing_id,
explosion_id=explosion_id,
special=special,
account_id=account_id,
Expand Down
16 changes: 8 additions & 8 deletions gd/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class UserCosmeticsData(Data):
wave_id: int
robot_id: int
spider_id: int
swing_copter_id: int
swing_id: int
explosion_id: int
glow: bool

Expand All @@ -210,7 +210,7 @@ class UserCosmetics(Binary):
wave_id: int = DEFAULT_ICON_ID
robot_id: int = DEFAULT_ICON_ID
spider_id: int = DEFAULT_ICON_ID
# swing_copter_id: int = DEFAULT_ICON_ID
# swing_id: int = DEFAULT_ICON_ID
explosion_id: int = DEFAULT_ICON_ID
glow: bool = DEFAULT_GLOW

Expand Down Expand Up @@ -251,7 +251,7 @@ def from_binary(
wave_id = reader.read_u8()
robot_id = reader.read_u8()
spider_id = reader.read_u8()
# swing_copter_id = reader.read_u8()
# swing_id = reader.read_u8()

explosion_id = reader.read_u8()

Expand All @@ -267,7 +267,7 @@ def from_binary(
wave_id=wave_id,
robot_id=robot_id,
spider_id=spider_id,
# swing_copter_id=swing_copter_id,
# swing_id=swing_id,
explosion_id=explosion_id,
glow=glow,
)
Expand Down Expand Up @@ -297,7 +297,7 @@ def to_binary(
writer.write_u8(self.wave_id)
writer.write_u8(self.robot_id)
writer.write_u8(self.spider_id)
# writer.write_u8(self.swing_copter_id)
# writer.write_u8(self.swing_id)

writer.write_u8(self.explosion_id)

Expand All @@ -322,7 +322,7 @@ def icon_id_by_type(self) -> Dict[IconType, int]:
IconType.WAVE: self.wave_id,
IconType.ROBOT: self.robot_id,
IconType.SPIDER: self.spider_id,
# IconType.SWING_COPTER: self.swing_copter_id,
# IconType.SWING: self.swing_id,
}

def get_icon(self, type: Optional[IconType] = None) -> Icon:
Expand Down Expand Up @@ -900,7 +900,7 @@ def from_profile_model(cls: Type[U], model: ProfileModel) -> U:
wave_id=model.wave_id,
robot_id=model.robot_id,
spider_id=model.spider_id,
# swing_copter_id=model.swing_copter_id,
# swing_id=model.swing_id,
explosion_id=model.explosion_id,
glow=model.glow,
),
Expand Down Expand Up @@ -949,7 +949,7 @@ def from_search_user_and_profile_models(
wave_id=profile_model.wave_id,
robot_id=profile_model.robot_id,
spider_id=profile_model.spider_id,
# swing_copter_id=profile_model.swing_copter_id,
# swing_id=profile_model.swing_id,
explosion_id=profile_model.explosion_id,
glow=profile_model.glow,
),
Expand Down

0 comments on commit 837a9c6

Please sign in to comment.