forked from SilverStudioGames/WTS
Compare commits
3 Commits
bde6a30acc
...
f8130fdb4d
Author | SHA1 | Date | |
---|---|---|---|
f8130fdb4d | |||
9b96c5572c | |||
757a39d782 |
@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
# Quidditch stands
|
# Quidditch stands
|
||||||
|
|
||||||
default quidditch_stands = {
|
define __quidditch_stands = {
|
||||||
"weather": "sun_high",
|
"weather": "sun_high",
|
||||||
"rain": False,
|
"rain": False,
|
||||||
"puddles": False,
|
"puddles": False,
|
||||||
@ -11,6 +10,7 @@ default quidditch_stands = {
|
|||||||
"hole": False,
|
"hole": False,
|
||||||
"tree_fire": False
|
"tree_fire": False
|
||||||
}
|
}
|
||||||
|
default quidditch_stands = __quidditch_stands.copy()
|
||||||
|
|
||||||
# Crowd density presets
|
# Crowd density presets
|
||||||
define crowd_few = ("low_1")
|
define crowd_few = ("low_1")
|
||||||
@ -55,7 +55,8 @@ label quidditch_stands(hidden=False, reset=False, **kwargs):
|
|||||||
# Update and show the area.
|
# Update and show the area.
|
||||||
# Pass `hidden=True` to update only, `reset=True` to reset the area before applying arguments.
|
# Pass `hidden=True` to update only, `reset=True` to reset the area before applying arguments.
|
||||||
if reset:
|
if reset:
|
||||||
$ reset_variables("quidditch_stands")
|
$ quidditch_stands = __quidditch_stands | kwargs
|
||||||
|
else:
|
||||||
$ quidditch_stands.update(kwargs)
|
$ quidditch_stands.update(kwargs)
|
||||||
if not hidden:
|
if not hidden:
|
||||||
show screen quidditch_stands_back(**quidditch_stands)
|
show screen quidditch_stands_back(**quidditch_stands)
|
||||||
@ -158,6 +159,7 @@ label test_stands:
|
|||||||
pause 1.5
|
pause 1.5
|
||||||
call quidditch_stands(hole=True)
|
call quidditch_stands(hole=True)
|
||||||
pause 1
|
pause 1
|
||||||
call quidditch_stands(weather="overcast", crowd=["bj"])
|
call quidditch_stands(weather="overcast", crowd_bj=True)
|
||||||
pause 1
|
pause 1
|
||||||
|
call quidditch_stands(reset=True, hidden=True)
|
||||||
jump test_stands
|
jump test_stands
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
|
|
||||||
# Quidditch stands
|
# Quidditch stands
|
||||||
|
|
||||||
default quidditch_stands2 = {
|
define __quidditch_stands2 = {
|
||||||
"weather": "sun_high",
|
"weather": "sun_high",
|
||||||
"crowd": (),
|
"crowd": (),
|
||||||
"crowd_react": (None, None, None),
|
"crowd_react": (None, None, None),
|
||||||
}
|
}
|
||||||
|
default quidditch_stands2 = __quidditch_stands2.copy()
|
||||||
|
|
||||||
label quidditch_stands2(hidden=False, reset=False, **kwargs):
|
label quidditch_stands2(hidden=False, reset=False, **kwargs):
|
||||||
if reset:
|
if reset:
|
||||||
$ reset_variables("quidditch_stands2")
|
$ quidditch_stands2 = __quidditch_stands2 | kwargs
|
||||||
|
else:
|
||||||
$ quidditch_stands2.update(kwargs)
|
$ quidditch_stands2.update(kwargs)
|
||||||
if not hidden:
|
if not hidden:
|
||||||
show screen quidditch_stands_back2(**quidditch_stands2)
|
show screen quidditch_stands_back2(**quidditch_stands2)
|
||||||
|
@ -101,20 +101,6 @@ init python early:
|
|||||||
print("Error evaluating data:")
|
print("Error evaluating data:")
|
||||||
print(e)
|
print(e)
|
||||||
|
|
||||||
def reset_variables(*args):
|
|
||||||
"""Resets the given variables to their default values."""
|
|
||||||
# Refer to renpy.ast.Default.set_default for implementation details
|
|
||||||
defaults_set = renpy.store._defaults_set
|
|
||||||
changed_set = renpy.store.__dict__.ever_been_changed
|
|
||||||
for arg in args:
|
|
||||||
if arg in defaults_set:
|
|
||||||
if arg in changed_set:
|
|
||||||
defaults_set.remove(arg)
|
|
||||||
changed_set.remove(arg)
|
|
||||||
elif config.developer:
|
|
||||||
raise Exception("The variable `{}` was not previously set with a default value.".format(arg))
|
|
||||||
renpy.execute_default_statement(False)
|
|
||||||
|
|
||||||
def disable_game_menu():
|
def disable_game_menu():
|
||||||
setattr(renpy.store, "_game_menu_screen", None)
|
setattr(renpy.store, "_game_menu_screen", None)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user