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
|
default stats_show_locked = False
|
||||||
|
|
||||||
define her_whoring_word_list = ("Pure", "Naive", "Curious", "Naughty", "Perverse", "Immoral", "Slutty", "Shameless", "Cumslut", "Total Cumslut", "Shameless Cumslut")
|
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")
|
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"]
|
#$ 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 ###
|
### Hermione ###
|
||||||
|
|
||||||
# Whoring
|
# 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
|
# 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
|
# 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
|
# 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 ###
|
### Astoria ###
|
||||||
#call astoria_clothing_level
|
#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
|
# 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 ###
|
### Cho ###
|
||||||
|
|
||||||
# Whoring
|
# 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
|
# 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
|
# 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 ###
|
### Snape ###
|
||||||
|
|
||||||
# # Support
|
# # 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
|
# 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 ###
|
### Tonks ###
|
||||||
|
|
||||||
# Reputation
|
# 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
|
# 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
|
# 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)]
|
#ton_sluttiness_word = ton_sluttiness_word_list[int(ton_clothing_level/10)],
|
||||||
|
)
|
||||||
return
|
|
||||||
|
|
||||||
label stats:
|
label stats:
|
||||||
$ gui.in_context("stats_menu")
|
$ gui.in_context("stats_menu")
|
||||||
@ -95,9 +91,7 @@ define stats_dict = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
label stats_menu(xx=150, yy=90):
|
label stats_menu(xx=150, yy=90):
|
||||||
|
$ renpy.dynamic(**__update_stats())
|
||||||
call update_stats
|
|
||||||
|
|
||||||
call screen stats(xx, yy)
|
call screen stats(xx, yy)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user