Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Saludame.activity/character_creator.py
diff options
context:
space:
mode:
Diffstat (limited to 'Saludame.activity/character_creator.py')
-rwxr-xr-xSaludame.activity/character_creator.py62
1 files changed, 57 insertions, 5 deletions
diff --git a/Saludame.activity/character_creator.py b/Saludame.activity/character_creator.py
index 7197cc1..e98d902 100755
--- a/Saludame.activity/character_creator.py
+++ b/Saludame.activity/character_creator.py
@@ -28,9 +28,10 @@ import pygame
class CharacterLoader:
def __init__(self):
- self.clothes_list = self.__load_clothes()
- self.character = self.__load_character(SEX, NAME, LEVEL, SCORE, self.clothes_list[0])
- self.environments_dictionary = self.__load_environments()
+ self.character = self.__load_character(SEX, NAME, LEVEL, SCORE, "school")
+ self.environments_dictionary = self.__load_environments()
+ self.places = self.__load_places()
+ self.weather_effects = self.__load_weather_effects()
def get_character(self):
return self.character
@@ -38,8 +39,11 @@ class CharacterLoader:
def get_environments_dictionary(self):
return self.environments_dictionary
- def __load_clothes(self):
- return ["a clothes"]
+ def get_places(self):
+ return self.places
+
+ def get_weather_effects(self):
+ return self.weather_effects
def __load_character(self, sex, name, level, score, clothes):
hair_color = [pygame.Color(color) for color in HAIR_COLOR]
@@ -50,6 +54,53 @@ class CharacterLoader:
char = character.Character(sex, name, level, score, hair_color, socks_color, skin_color, shoes_color, clothes)
return char
+ def __load_weather_effects(self):
+ weather_effects = {
+ # (clothes_id, weather_id, boolean indoor outdoor) : list of tuples [(id_bar, rate)]
+ #school clothes
+ ("school", "sunny", True) : [("fun", 1.0)],
+ ("school", "sunny", False) : [("physica", 1.0)],
+ ("school", "rainy", True) : [("physica", 1.0)],
+ ("school", "rainy", False) : [("physica", 1.0)],
+ ("school", "normal", True) : [("physica", 1.0)],
+ ("school", "normal", False) : [("physica", 1.0)],
+ ("school", "cold", True) : [("physica", 1.0)],
+ ("school", "cold", False) : [("physica", 1.0)],
+ #sunny clothes
+ ("sunny", "sunny", True) : [("physica", 1.0)],
+ ("sunny", "sunny", False) : [("physica", 1.0)],
+ ("sunny", "rainy", True) : [("physica", 1.0)],
+ ("sunny", "rainy", False) : [("physica", 1.0)],
+ ("sunny", "normal", True) : [("physica", 1.0)],
+ ("sunny", "normal", False) : [("physica", 1.0)],
+ ("sunny", "cold", True) : [("physica", 1.0)],
+ ("sunny", "cold", False) : [("physica", 1.0)],
+ #rainy clothes
+ ("rainy", "sunny", True) : [("physica", 1.0)],
+ ("rainy", "sunny", False) : [("physica", 1.0)],
+ ("rainy", "rainy", True) : [("physica", 1.0)],
+ ("rainy", "rainy", False) : [("physica", 1.0)],
+ ("rainy", "normal", True) : [("physica", 1.0)],
+ ("rainy", "normal", False) : [("physica", 1.0)],
+ ("rainy", "cold", True) : [("physica", 1.0)],
+ ("rainy", "cold", False) : [("physica", 1.0)],
+ }
+ return weather_effects
+
+ def __load_places(self):
+ places = { #schoolyard
+ "schoolyard" : {"outdoor": True},
+ #square
+ "square" : {"outdoor": True},
+ #classroom
+ "classroom" : {"outdoor": False},
+ #home
+ "home": {"outdoor": False},
+ #country
+ "country": {"outdoor": True}
+ }
+ return places
+
def __load_environments(self):
environments = {#schoolyard
"schoolyard_sunny" : character.Environment("assets/background/schoolyard_sunny.png", "music_path"),
@@ -79,3 +130,4 @@ class CharacterLoader:
}
return environments
+