From 1cc413f908d1cfb3cecac917753455a548cc8703 Mon Sep 17 00:00:00 2001 From: Andrea Landaker Date: Tue, 15 Jun 2021 22:03:46 -0600 Subject: [PATCH] Updated android icons. Fixed bug where stats.rpy was from the dse and lost custom stuff. --- .gitignore | 0 License.html | 0 README.txt | 0 Renpy-help.html | 0 android-icon.png | Bin android-presplash.jpg | Bin game/options.rpy | 6 +- game/script.rpy | 88 +++++++++++++++------------ game/stats.rpy | 138 +++++++++++++++++++++--------------------- gpl-3.0.txt | 0 icon.ico | Bin installer.nsi | 0 12 files changed, 120 insertions(+), 112 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 License.html mode change 100644 => 100755 README.txt mode change 100644 => 100755 Renpy-help.html mode change 100644 => 100755 android-icon.png mode change 100644 => 100755 android-presplash.jpg mode change 100644 => 100755 gpl-3.0.txt mode change 100644 => 100755 icon.ico mode change 100644 => 100755 installer.nsi diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/License.html b/License.html old mode 100644 new mode 100755 diff --git a/README.txt b/README.txt old mode 100644 new mode 100755 diff --git a/Renpy-help.html b/Renpy-help.html old mode 100644 new mode 100755 diff --git a/android-icon.png b/android-icon.png old mode 100644 new mode 100755 diff --git a/android-presplash.jpg b/android-presplash.jpg old mode 100644 new mode 100755 diff --git a/game/options.rpy b/game/options.rpy index b8b91fc..2b6d28e 100644 --- a/game/options.rpy +++ b/game/options.rpy @@ -28,7 +28,7 @@ init -1 python hide: # These control the name and version of the game, that are reported # with tracebacks and other debugging logs. config.name = "Our Personal Space" - config.version = "1.21" + config.version = "1.22" config.window_icon = "GUI/window-icon.png" config.windows_icon = "GUI/windows-icon.png" @@ -239,7 +239,7 @@ init -1 python hide: config.nvl_adv_transition = zoomout # add a default dissolve transition between each say if no other transition is speficied - config.say_attribute_transition = dissolve + config.say_attribute_transition = { "master" : Dissolve(0.5, alpha=True) } ######################################### @@ -282,7 +282,7 @@ init python: ## The name that's used for directories and archive files. For example, if ## this is 'mygame-1.0', the windows distribution will be in the ## directory 'mygame-1.0-win', in the 'mygame-1.0-win.zip' file. - build.directory_name = "OurPersonalSpace-1.21" + build.directory_name = "OurPersonalSpace-1.22" ## The name that's uses for executables - the program that users will run ## to start the game. For example, if this is 'mygame', then on Windows, diff --git a/game/script.rpy b/game/script.rpy index 97881a9..dd27aa5 100644 --- a/game/script.rpy +++ b/game/script.rpy @@ -32,17 +32,17 @@ init: define note = Character("note", kind=nvl, ctc="ctc_blink", ctc_position="nestled") # defaults used for debugging purposes - define his_name = "Jack" - define her_name = "Kelly" - define his_nickname = "dear" - define her_nickname = "lover" + default his_name = "Jack" + default her_name = "Kelly" + default his_nickname = "dear" + default her_nickname = "lover" # Variables about emotional state. -100 is minimum, 100 is maximum - define relaxed = 0 # negative = stressed - define loved = 0 # negative = neglected - define made_love = 0 # Counter of lovemaking, used for pregnancy calculation - define community_level = 0 # how successful is the colony? + default relaxed = 0 # negative = stressed + default loved = 0 # negative = neglected + default made_love = 0 # Counter of lovemaking, used for pregnancy calculation + default community_level = 0 # how successful is the colony? # This definition needs to happen before our transitions are defined init -201 python: @@ -134,39 +134,47 @@ label splashscreen: label start: # Initializing Variables # Variables about our characters and their relationship - define month = 0 - define local_month = 0 - define year = 1 - define earth_year = 1 - define earth_month = 0 - define save_name = "Intro" #name for the saved game + default month = 0 + default local_month = 0 + default year = 1 + default earth_year = 1 + default earth_month = 0 + default save_name = "Intro" #name for the saved game - define known_each_other = "" - define profession = "" - define father_attitude = "" - define favorite_wedding_gift = "" - define want_kids = False - define have_goat = False - define is_pregnant = False - define is_pregnant_later = False - define wearing_dress = False - define is_nude = False - define slacked_off = 0 #number of times slacked off at work - define has_grass = False - define times_worked = 1 - define he_hunts = False - define brennan_relationship = 0 - define trimester = "None" - define season = "spring" - define weather = "calm and cool" - define cheated_on_him = False - define exposed_brennan = False - define discovered_qec = False - define ocean_character = "" - define wants_to_leave = False - define hated_food = "turnips" - define baby_name = "Terra" - define notified_stat_max = False + default known_each_other = "" + default profession = "" + default father_attitude = "" + default favorite_wedding_gift = "" + default want_kids = False + default have_goat = False + default is_pregnant = False + default is_pregnant_later = False + default wearing_dress = False + default is_nude = False + default slacked_off = 0 #number of times slacked off at work + default has_grass = False + default times_worked = 1 + default he_hunts = False + default brennan_relationship = 0 + default trimester = "None" + default season = "spring" + default weather = "calm and cool" + default cheated_on_him = False + default exposed_brennan = False + default discovered_qec = False + default ocean_character = "" + default wants_to_leave = False + default hated_food = "turnips" + default baby_name = "Terra" + default notified_stat_max = False + + default skill_domestic = 0 + default skill_creative = 0 + default skill_technical = 0 + default skill_spiritual = 0 + default skill_social = 0 + default skill_knowledge = 0 + default skill_physical = 0 scene bg stars with fade diff --git a/game/stats.rpy b/game/stats.rpy index 40dfa7d..6abeb4c 100644 --- a/game/stats.rpy +++ b/game/stats.rpy @@ -1,109 +1,109 @@ # stats.rpy # Keeps track of and displays the stats for the DSE. # -# To change styles, look for the dse_stats_* blocks in styles.rpy - +# To change styles, add a style block for the element you want +# preceded by "dse_stats_" down below init -100 python: - __dse_stats = [ ] + dse_stats = [ ] class __Stat(object): - def __init__(self, name, var, default, max, hidden=False): + def __init__(self, name, var, default, max): self.name = name self.var = var self.default = default self.max = max - self.hidden = hidden def __init_stats(): - for s in __dse_stats: + for s in dse_stats: setattr(store, s.var, s.default) config.start_callbacks.append(__init_stats) - - # Call this function to add a stat to keep track of. - # Arguments: - # Name: name of stat. Will be displayed in the Stats screen - # var: name of variable to use to keep track of stat. - # default: starting value for the stat - # max: maximum value for the stat - # hidden: Is this stat hidden from the user? Hidden stats will not be displayed in the stats screen. - def register_stat(name, var, default=0, max=100, hidden=False): - __dse_stats.append(__Stat(name, var, default, max, hidden)) + + def register_stat(name, var, default, max): + dse_stats.append(__Stat(name, var, default, max)) def normalize_stats(): - for s in __dse_stats: - if hasattr(store, s.var): - v = getattr(store, s.var) + for s in dse_stats: + + v = getattr(store, s.var) - if v > s.max: - v = s.max - if v < 0: - v = 0 + if v > s.max: + v = s.max + if v < 0: + v = 0 - setattr(store, s.var, v) + setattr(store, s.var, v) # Whenever a python statement is executed, we will ensure our stats # stay within range. config.python_callbacks.append(normalize_stats) + + + # Function to save skills for New Game +, up to SKILL_SAVED_MAX, + # if they are greater than what has already been saved. + def save_skill(current_saved_value, new_skill_value): + if (new_skill_value <= SKILL_SAVED_MAX): + if (not current_saved_value): + return new_skill_value + else: + if (current_saved_value < new_skill_value): + return new_skill_value + else: + return current_saved_value + else: + return SKILL_SAVED_MAX + + def highest_stat(): + normalize_stats() + + highest_stat = 0 + highest_stat_name = "" + + for curr_stat in dse_stats: + stat_value = getattr(store, curr_stat.var) + if (stat_value > highest_stat): + highest_stat_name = curr_stat.name + highest_stat = stat_value + return highest_stat_name + + +# Here you can change the style of any elements in the Stats screen you want. +# As an example, here is a style defined for the label text to make sure it is not bold. +style dse_stats_label_text: + bold False -# Display the stats in a frame. -# name - display the stat's name -# bar - display a bar indicating the value of the stat -# value - display the numerical value of the stat -# max - display the maximum value of the stat screen display_stats(name=True, bar=True, value=True, max=True): - $ dse_stat_length = len(__dse_stats) - - #The number of rows is the number of stats that are not hidden - for s in __dse_stats: - if s.hidden: - $ dse_stat_length -= 1 - + $ dse_stat_length = len(dse_stats) frame: - style_group "dse_stats" + style_group "dse_stats" yalign 0.0 xalign 0.5 - vbox: yalign 0.0 xalign 0.5 label "Statistics" xalign 0.5 - # Depending on what the user chooses to display, calculate how many columns we need - $ num_columns = 0 - if name: - $ num_columns+=1 - if bar: - $ num_columns+=1 - if value or max: - $ num_columns+=1 - - # Make a grid with up to 3 columns and as many rows as there are stats. - grid num_columns dse_stat_length: + grid 3 dse_stat_length: xalign 0.5 yalign 0.5 spacing 5 - - for s in __dse_stats: - #Skip if the stat is a hidden stat - if (not s.hidden): - $ v = getattr(store, s.var) - - - if name: - label s.name - - if bar: - bar value v range s.max xmaximum 150 xalign 0.0 - - if value and max: - label ("%d/%d" % (v, s.max)) xalign 1.0 - elif value: - label ("%d" % (v,)) xalign 1.0 - elif max: - label ("%d" % (s.max,)) xalign 1.0 - + + for s in dse_stats: + $ v = getattr(store, s.var) + + if name: + label s.name + + if bar: + bar value v range s.max xmaximum 150 xalign 0.0 + + if value and max: + label ("%d/%d" % (v, s.max)) xalign 1.0 + elif value: + label ("%d" % (v,)) xalign 1.0 + elif max: + label ("%d" % (max,)) xalign 1.0 diff --git a/gpl-3.0.txt b/gpl-3.0.txt old mode 100644 new mode 100755 diff --git a/icon.ico b/icon.ico old mode 100644 new mode 100755 diff --git a/installer.nsi b/installer.nsi old mode 100644 new mode 100755