Auto-cleanup public variables
I chose not to add them directly in the screen, to keep it readable
but even though they're still global variables, now they are dynamic and cleaned as soon as we exit the menu
(cherry picked from commit 32cf1de3a0
)
This commit is contained in:
parent
be9f071660
commit
9ea4431f0e
@ -1,7 +1,3 @@
|
||||
init python:
|
||||
def stats_sortfilter(item, sortby=False):
|
||||
return item
|
||||
|
||||
default stats_show_locked = False
|
||||
|
||||
define her_whoring_word_list = ("Pure", "Naive", "Curious", "Naughty", "Perverse", "Immoral", "Slutty", "Shameless", "Cumslut", "Total Cumslut", "Shameless Cumslut")
|
||||
@ -21,61 +17,61 @@ define ton_reputation_word_list = ("Teacher", "Bore", "Weirdo", "A Bit Nutty", "
|
||||
define ton_friendship_word_list = ("Unknown", "inferior", "employee", "advisor", "trusted advisor", "Acquaintance", "friend", "Girlfriend", "Partner in crime", "Bonnie & Clyde", "Master & Slave")
|
||||
#$ ton_sluttiness_word_list = ["Masochist", "Disgrace", "Street Whore", "Harlot", "Tart", "Sexually open", "Naughty Teacher", "Easy Going", "Professor", "Bore", "Nun"]
|
||||
|
||||
label update_stats:
|
||||
|
||||
init python:
|
||||
def __update_stats():
|
||||
return dict(
|
||||
### Hermione ###
|
||||
|
||||
# Whoring
|
||||
$ her_whoring_word = her_whoring_word_list[int(min(states.her.level, 24)/2.4)]
|
||||
her_whoring_word = her_whoring_word_list[int(min(states.her.level, 24)/2.4)],
|
||||
|
||||
# Reputation
|
||||
$ her_reputation_word = her_reputation_word_list[int(min(states.her.public_level, 24)/2.4)]
|
||||
her_reputation_word = her_reputation_word_list[int(min(states.her.public_level, 24)/2.4)],
|
||||
|
||||
# Tutoring
|
||||
$ her_tutoring_word = her_tutoring_word_list[int(states.her.ev.tutoring.stage/1.5)]
|
||||
her_tutoring_word = her_tutoring_word_list[int(states.her.ev.tutoring.stage/1.5)],
|
||||
|
||||
# Mood
|
||||
$ her_mood_word = her_mood_word_list[int(min(states.her.mood, 10)/1.0)]
|
||||
her_mood_word = her_mood_word_list[int(min(states.her.mood, 10)/1.0)],
|
||||
|
||||
### Astoria ###
|
||||
#call astoria_clothing_level
|
||||
#$ ast_cuteness_word = ast_cuteness_word_list[int(ast_clothing_level/10)]
|
||||
#ast_cuteness_word = ast_cuteness_word_list[int(ast_clothing_level/10)],
|
||||
# Mood
|
||||
$ ast_mood_word = ast_mood_word_list[int(min(states.ast.mood, 10)/1.0)]
|
||||
ast_mood_word = ast_mood_word_list[int(min(states.ast.mood, 10)/1.0)],
|
||||
|
||||
### Cho ###
|
||||
|
||||
# Whoring
|
||||
$ cho_whoring_word = cho_whoring_word_list[int(min(states.cho.level, 24)/2.4)]
|
||||
cho_whoring_word = cho_whoring_word_list[int(min(states.cho.level, 24)/2.4)],
|
||||
|
||||
# Reputation
|
||||
$ cho_reputation_word= cho_reputation_word_list[int(min(states.cho.public_level, 24)/2.4)]
|
||||
cho_reputation_word= cho_reputation_word_list[int(min(states.cho.public_level, 24)/2.4)],
|
||||
|
||||
# Mood
|
||||
$ cho_mood_word = cho_mood_word_list[int(min(states.cho.mood, 10)/1.0)]
|
||||
cho_mood_word = cho_mood_word_list[int(min(states.cho.mood, 10)/1.0)],
|
||||
|
||||
### Snape ###
|
||||
|
||||
# # Support
|
||||
# $ sna_support_word = sna_support_word_list[int(min(sna_support, 15)/1.5)]
|
||||
# sna_support_word = sna_support_word_list[int(min(sna_support, 15)/1.5)],
|
||||
|
||||
# Friendship
|
||||
$ sna_friendship_word = sna_friendship_word_list[int(min(states.sna.level, 100)/10)]
|
||||
sna_friendship_word = sna_friendship_word_list[int(min(states.sna.level, 100)/10)],
|
||||
|
||||
### Tonks ###
|
||||
|
||||
# Reputation
|
||||
$ ton_reputation_word = ton_reputation_word_list[int(min(states.ton.public_level, 24)/2.4)]
|
||||
ton_reputation_word = ton_reputation_word_list[int(min(states.ton.public_level, 24)/2.4)],
|
||||
|
||||
# Support
|
||||
# $ ton_support_word = ton_support_word_list[int(min(ton_support, 12)/1.2)]
|
||||
# ton_support_word = ton_support_word_list[int(min(ton_support, 12)/1.2)],
|
||||
|
||||
# Friendship
|
||||
$ ton_friendship_word = ton_friendship_word_list[int(min(states.ton.level, 100)/10)]
|
||||
ton_friendship_word = ton_friendship_word_list[int(min(states.ton.level, 100)/10)],
|
||||
|
||||
#$ ton_sluttiness_word = ton_sluttiness_word_list[int(ton_clothing_level/10)]
|
||||
|
||||
return
|
||||
#ton_sluttiness_word = ton_sluttiness_word_list[int(ton_clothing_level/10)],
|
||||
)
|
||||
|
||||
label stats:
|
||||
$ gui.in_context("stats_menu")
|
||||
@ -95,9 +91,7 @@ define stats_dict = {
|
||||
}
|
||||
|
||||
label stats_menu(xx=150, yy=90):
|
||||
|
||||
call update_stats
|
||||
|
||||
$ renpy.dynamic(**__update_stats())
|
||||
call screen stats(xx, yy)
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user