Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test topic and exception for register_img_same #8393

Merged
merged 3 commits into from
Jan 16, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Monika After Story/game/dev/deco/fakebg_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Monika After Story/game/dev/deco/fakedeco_3_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 67 additions & 1 deletion Monika After Story/game/dev/dev_deco.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@

image dev_monika_bg_one = "dev/deco/fakebg_1.png"
image dev_monika_bg_two = "dev/deco/fakebg_2.png"
image dev_monika_bg_thr = "dev/deco/fakebg_3.png"
image dev_monika_deco_one = "dev/deco/fakedeco_1_0.png"
image dev_monika_deco_one_alt = "dev/deco/fakedeco_1_0_alt.png"
image dev_monika_deco_two = "dev/deco/fakedeco_2_0.png"
image dev_monika_deco_thr = "dev/deco/fakedeco_3_0.png"

image dev_monika_deco_flt = MASFilterSwitch("dev/deco/fakedeco_1_2.png")

Expand Down Expand Up @@ -45,6 +47,23 @@ init -1 python:
store.mas_background.default_MBGFM(),
unlocked=True
)
dev_mas_bg_3 = MASFilterableBackground(
"dev_mas_bg_3",
"Fake BG 3",
MASFilterWeatherMap(
day=MASWeatherMap({
store.mas_weather.PRECIP_TYPE_DEF: "dev_monika_bg_thr",
}),
night=MASWeatherMap({
store.mas_weather.PRECIP_TYPE_DEF: "dev_monika_bg_thr",
}),
sunset=MASWeatherMap({
store.mas_weather.PRECIP_TYPE_DEF: "dev_monika_bg_thr",
}),
),
store.mas_background.default_MBGFM(),
unlocked=True
)


init 501 python:
Expand All @@ -59,6 +78,11 @@ init 501 python:
store.mas_background.MBG_DEF,
MASAdvancedDecoFrame(zorder=6)
)
MASImageTagDecoDefinition.register_img(
"dev_monika_deco_thr",
store.mas_background.MBG_DEF,
MASAdvancedDecoFrame(zorder=6)
)

# fake bg 1
MASImageTagDecoDefinition.register_img(
Expand All @@ -71,6 +95,11 @@ init 501 python:
"dev_mas_bg_1",
MASAdvancedDecoFrame(at_list=[i31], zorder=6)
)
MASImageTagDecoDefinition.register_img_same(
"dev_monika_deco_thr",
store.mas_background.MBG_DEF,
"dev_mas_bg_1"
)

# fake bg 2
MASImageTagDecoDefinition.register_img(
Expand All @@ -89,6 +118,11 @@ init 501 python:
"dev_mas_bg_2",
MASAdvancedDecoFrame(zorder=20)
)
MASImageTagDecoDefinition.register_img_same(
"dev_monika_deco_thr",
store.mas_background.MBG_DEF,
"dev_mas_bg_2"
)


init 5 python:
Expand All @@ -97,7 +131,7 @@ init 5 python:
persistent.event_database,
eventlabel="dev_deco_tag_test_api",
category=["dev"],
prompt="DECO TAG TEST API",
prompt="DECO TAG TEST API REG",
pool=True,
unlocked=True
)
Expand Down Expand Up @@ -147,6 +181,38 @@ label dev_deco_tag_test_api:
return


init 5 python:
addEvent(
Event(
persistent.event_database,
eventlabel="dev_deco_tag_test_api_same",
category=["dev"],
prompt="DECO TAG TEST API REG SAME",
pool=True,
unlocked=True
)
)

label dev_deco_tag_test_api_same:

m 1eub "TIME TO TEST `register_img_same`"
$ mas_showDecoTag("dev_monika_deco_thr", show_now=True)

m "a blue deco whould be visible"
call mas_background_change(dev_mas_bg_1, skip_leadin=True, skip_outro=True)
m "the deco should be in the same place"

call mas_background_change(dev_mas_bg_2, skip_leadin=True, skip_outro=True)
m 1eua "the deco should STILL be in the same place"

$ mas_hideDecoTag("dev_monika_deco_thr")
call mas_background_change(mas_background_def, skip_leadin=True, skip_outro=True)
m 2eub "deco should be hideen now"
m 6wuw "Thanks"

return


init 5 python:
addEvent(
Event(
Expand Down