Skip to content

Commit

Permalink
updated typing
Browse files Browse the repository at this point in the history
  • Loading branch information
KiloOscarSix committed May 3, 2023
1 parent 82a6c0b commit 98e66c2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 19 deletions.
1 change: 1 addition & 0 deletions CharacterColors_ren.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"#ff8afb",
"#5fc9f8",
)

FEMININE_COLORS: tuple[str, ...] = (
"#05F0D5",
"#800080",
Expand Down
21 changes: 10 additions & 11 deletions CharacterService_ren.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
from __future__ import annotations
from typing import Optional

from renpy import store
import renpy.exports as renpy


from game.characters.Relationship_ren import Relationship
from game.characters.Moods_ren import Moods
from game.characters.NonPlayableCharacter_ren import NonPlayableCharacter
from game.characters.PlayableCharacters_ren import PlayableCharacter


"""renpy
init python:
"""
Expand All @@ -18,7 +17,7 @@
class CharacterService:
@staticmethod
def get_relationship(
character: NonPlayableCharacter, target: PlayableCharacter = None
character: NonPlayableCharacter, target: Optional[PlayableCharacter] = None
) -> Relationship:
if target is None:
target = store.mc
Expand All @@ -32,7 +31,7 @@ def get_relationship(
def has_relationship(
character: NonPlayableCharacter,
relationship: Relationship,
target: PlayableCharacter = None,
target: Optional[PlayableCharacter] = None,
) -> bool:
if target is None:
target = store.mc
Expand All @@ -43,7 +42,7 @@ def has_relationship(
def set_relationship(
character: NonPlayableCharacter,
relationship: Relationship,
target: PlayableCharacter = None,
target: Optional[PlayableCharacter] = None,
) -> None:
if target is None:
target = store.mc
Expand Down Expand Up @@ -112,7 +111,7 @@ def get_profile_pictures(character_name: str) -> list[str]:

@staticmethod
def is_girlfriend(
character: NonPlayableCharacter, target: PlayableCharacter = None
character: NonPlayableCharacter, target: Optional[PlayableCharacter] = None
) -> bool:
if target is None:
target = store.mc
Expand All @@ -123,7 +122,7 @@ def is_girlfriend(

@staticmethod
def is_fwb(
character: NonPlayableCharacter, target: PlayableCharacter = None
character: NonPlayableCharacter, target: Optional[PlayableCharacter] = None
) -> bool:
if target is None:
target = store.mc
Expand All @@ -132,7 +131,7 @@ def is_fwb(

@staticmethod
def is_dating(
character: NonPlayableCharacter, target: PlayableCharacter = None
character: NonPlayableCharacter, target: Optional[PlayableCharacter] = None
) -> bool:
if target is None:
target = store.mc
Expand All @@ -141,7 +140,7 @@ def is_dating(

@staticmethod
def is_kissed(
character: NonPlayableCharacter, target: PlayableCharacter = None
character: NonPlayableCharacter, target: Optional[PlayableCharacter] = None
) -> bool:
if target is None:
target = store.mc
Expand All @@ -150,7 +149,7 @@ def is_kissed(

@staticmethod
def is_friend(
character: NonPlayableCharacter, target: PlayableCharacter = None
character: NonPlayableCharacter, target: Optional[PlayableCharacter] = None
) -> bool:
if target is None:
target = store.mc
Expand All @@ -159,7 +158,7 @@ def is_friend(

@staticmethod
def is_ex(
character: NonPlayableCharacter, target: PlayableCharacter = None
character: NonPlayableCharacter, target: Optional[PlayableCharacter] = None
) -> bool:
if target is None:
target = store.mc
Expand Down
1 change: 0 additions & 1 deletion Frat_ren.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import enum
from enum import Enum


"""renpy
init python:
"""
Expand Down
5 changes: 2 additions & 3 deletions NonPlayableCharacter_ren.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from game.characters.CharacterService_ren import CharacterService
from game.characters.Moods_ren import Moods
from game.characters.Relationship_ren import Relationship
from game.characters.PlayableCharacters_ren import PlayableCharacter
from game.phone.Message_ren import Message

"""renpy
Expand All @@ -17,15 +16,15 @@ class NonPlayableCharacter:
name: str
username: str = ""

relationships: dict[PlayableCharacter, Relationship] = field(default_factory=dict)
relationships: dict[str, Relationship] = field(default_factory=dict)
mood: Moods = Moods.NORMAL

profile_pictures: list[str] = field(default_factory=list)
points: int = 0
has_had_sex_with_mc: bool = False

is_competitive: bool = False
vindictive_characters: list[NonPlayableCharacter] = ()
vindictive_characters: tuple[NonPlayableCharacter, ...] = ()
is_talkative: bool = False

pending_text_messages: list[Message] = field(default_factory=list)
Expand Down
5 changes: 1 addition & 4 deletions PlayableCharacters_ren.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from game.detective.Detective_ren import Detective
from game.characters.CharacterService_ren import CharacterService
from game.characters.NonPlayableCharacter_ren import NonPlayableCharacter
from game.characters.Relationship_ren import Relationship

"""renpy
Expand All @@ -25,9 +24,7 @@ class PlayableCharacter:
money: int = 0
inventory: list[str] = field(default_factory=list)
detective: Optional[Detective] = None
relationships: dict[NonPlayableCharacter, Relationship] = field(
default_factory=dict
)
relationships: dict[str, Relationship] = field(default_factory=dict)
frat: Frat = Frat.WOLVES
daddy_name: str = "Daddy"

Expand Down

0 comments on commit 98e66c2

Please sign in to comment.