Skip to content

Commit e0037da

Browse files
committed
Merge remote-tracking branch 'upstream/content' into pr/Booplicate/9736
2 parents 32f6129 + 2087270 commit e0037da

53 files changed

Lines changed: 548 additions & 32 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/mas_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
name: ci_build
2020

2121
# The type of runner that the job will run on
22-
runs-on: ubuntu-latest
22+
runs-on: ubuntu-20.04
2323

2424
env:
2525
SDL_AUDIODRIVER: dummy # handles ALSA issues

Monika After Story/game/0config.rpy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ python early:
1414
renpy.config.name = "Monika After Story"
1515

1616
## The version of the game.
17-
renpy.config.version = "0.12.12"
17+
renpy.config.version = "0.12.14"
1818

1919
#Triple space suffix to avoid potential issues with same names in window title
2020
config.window_title = "Monika After Story "

Monika After Story/game/definitions.rpy

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4836,6 +4836,7 @@ init -100 python in mas_utils:
48364836
return [bullet + " " + str(item) for item in _list]
48374837

48384838

4839+
48394840
def nested_defaultdict(final_factory=None, levels=1):
48404841
"""
48414842
Generates a nested defaultdict. Basically good for creating an n-level
@@ -5543,6 +5544,25 @@ init -100 python in mas_utils:
55435544
return (ival, int((num - cleanival) * __FLIMIT), __FLIMIT)
55445545

55455546

5547+
def sanitize_filename(s):
5548+
"""
5549+
Sanitizes a filename by removing characters that might have special
5550+
meaning on certain platforms.
5551+
5552+
IN:
5553+
s:
5554+
String to sanitize.
5555+
5556+
OUT:
5557+
str:
5558+
Sanitized string, stripped of special characters.
5559+
"""
5560+
5561+
for c in '<>:"/\\|?*':
5562+
s = s.replace(c, "")
5563+
return s
5564+
5565+
55465566
init -985 python:
55475567
import datetime
55485568
# global stuff that should be defined somewhat early

Monika After Story/game/mod_assets/location/special/our_reality

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

Monika After Story/game/script-holidays.rpy

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ label greeting_o31_briaryoung_shuchiin_academy_uniform:
11161116

11171117
m 2hub "Welcome back!"
11181118
m 2eub "Well, what do you think?"
1119-
m 7tuu "I thought Instead of being president, I could be the secretary for today..."
1119+
m 7tuu "I thought instead of being president, I could be the secretary for today..."
11201120

11211121
if mas_isMoniAff(higher=True):
11221122
m 3rtu "Or maybe even a love detective, but that's probably a waste, I've already found that..."
@@ -6029,7 +6029,7 @@ default persistent._mas_f14_on_date = None
60296029
##Did we do a dockstat fare over all of f14?
60306030
default persistent._mas_f14_gone_over_f14 = None
60316031
#Valentine's Day
6032-
define mas_f14 = datetime.date(datetime.date.today().year,2,14)
6032+
define mas_f14 = datetime.date(datetime.date.today().year, 2, 14)
60336033

60346034
#Is it vday?
60356035
init -10 python:
@@ -6956,6 +6956,27 @@ init 20 python:
69566956
"""
69576957
)
69586958

6959+
mas_poem_vday_6 = MASPoem(
6960+
poem_id="poem_f14_6",
6961+
category="f14",
6962+
prompt="Forget-me-not",
6963+
title=" My dearest [player],",
6964+
text="""\
6965+
All the flowers know are their vase.
6966+
A few cups of soil, and a pretty case of porcelain.
6967+
They will never leave without help, even if they someday outgrow it.
6968+
6969+
Flowers need more than their vase.
6970+
Water from the skies, or a helping hand.
6971+
And without sight of the sky above, the world apart, they would someday wither.
6972+
6973+
This gardener gives all this and more.
6974+
It's said a flower blooms brighter when spoken to with love.
6975+
Even trapped in this vase, maybe it isn't a curse to know more.
6976+
6977+
Forget-me-not.
6978+
"""
6979+
)
69596980

69606981
#######################[HOL050] dockstat farwell###############################
69616982
label bye_f14:
@@ -7331,7 +7352,7 @@ image chibi_peek = MASFilterSwitch("mod_assets/other/chibi_peek.png")
73317352
label mas_bday_surprise_party_hint:
73327353
#Set up letters
73337354
python:
7334-
persistent._mas_bday_hint_filename = "For " + player + ".txt"
7355+
persistent._mas_bday_hint_filename = mas_utils.sanitize_filename("For {0}.txt".format(player))
73357356
if mas_isMoniNormal(higher=True):
73367357
message = """\
73377358
[player],

Monika After Story/game/script-islands-event.rpy

Lines changed: 151 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ init -20 python in mas_island_event:
572572
)
573573
)
574574
IslandsDataDefinition(
575-
"decal_house",
575+
"decal_house",# FIXME: clear and snow sprites appear to be of different sizes
576576
partial_disp=functools.partial(
577577
ParallaxDecal,
578578
x=215,
@@ -744,6 +744,80 @@ init -20 python in mas_island_event:
744744
# on_click=True
745745
)
746746
)
747+
# D25 specific deco
748+
IslandsDataDefinition(
749+
"decal_bookshelf_lantern",
750+
filenames=("d", "n", "s"),
751+
partial_disp=functools.partial(
752+
ParallaxDecal,
753+
x=387,
754+
y=47,
755+
z=7,
756+
on_click=True
757+
)
758+
)
759+
IslandsDataDefinition(
760+
"decal_circle_garland",
761+
filenames=("d", "n", "s"),
762+
partial_disp=functools.partial(
763+
ParallaxDecal,
764+
x=234,
765+
y=22,
766+
z=2,
767+
on_click=True
768+
)
769+
)
770+
IslandsDataDefinition(
771+
"decal_hanging_lantern",
772+
filenames=("d", "n", "s"),
773+
partial_disp=functools.partial(
774+
ParallaxDecal,
775+
x=210,
776+
y=23,
777+
z=2,
778+
on_click=True
779+
)
780+
)
781+
IslandsDataDefinition(
782+
"decal_rectangle_garland",
783+
filenames=("d", "n", "s"),
784+
partial_disp=functools.partial(
785+
ParallaxDecal,
786+
x=320,
787+
y=28,
788+
z=2,
789+
on_click=True
790+
)
791+
)
792+
TREE_LIGHTS_FPS = (
793+
"other/tree_lights/d",
794+
"other/tree_lights/n_0",
795+
"other/tree_lights/n_1",
796+
"other/tree_lights/n_2",
797+
"other/tree_lights/s"
798+
)
799+
IslandsDataDefinition(
800+
"decal_tree_lights",
801+
fp_map={},# TODO: move TREE_LIGHTS_FPS to fp_map
802+
partial_disp=functools.partial(
803+
ParallaxDecal,
804+
x=140,
805+
y=-168,
806+
z=5,
807+
# on_click=True
808+
)
809+
)
810+
IslandsDataDefinition(
811+
"decal_wreath",
812+
filenames=("d", "n", "s"),
813+
partial_disp=functools.partial(
814+
ParallaxDecal,
815+
x=294,
816+
y=33,
817+
z=2,
818+
on_click=True
819+
)
820+
)
747821

748822
# Objects
749823
IslandsDataDefinition(
@@ -1073,6 +1147,12 @@ init -25 python in mas_island_event:
10731147
(store.MASImageData(zip_file.read(fn), fn + ".png") for fn in GLITCH_FPS)
10741148
)
10751149

1150+
tree_lights_imgs = {}
1151+
for fn in TREE_LIGHTS_FPS:
1152+
k = fn.rpartition("/")[-1]
1153+
raw_disp = store.MASImageData(zip_file.read(fn), fn + ".png")
1154+
tree_lights_imgs[k] = raw_disp
1155+
10761156
# Audio is being loaded right away
10771157
isly_data = IslandsDataDefinition.getDataFor("other_isly")
10781158
if isly_data:
@@ -1086,7 +1166,15 @@ init -25 python in mas_island_event:
10861166

10871167
else:
10881168
# We loaded the images, now create dynamic displayables
1089-
_build_displayables(island_map, decal_map, bg_map, overlay_map, interior_map, glitch_frames)
1169+
_build_displayables(
1170+
island_map,
1171+
decal_map,
1172+
bg_map,
1173+
overlay_map,
1174+
interior_map,
1175+
glitch_frames,
1176+
tree_lights_imgs
1177+
)
10901178

10911179
return True
10921180

@@ -1161,7 +1249,8 @@ init -25 python in mas_island_event:
11611249
bg_imgs_maps,
11621250
overlay_imgs_maps,
11631251
interior_imgs_map,
1164-
glitch_frames
1252+
glitch_frames,
1253+
tree_lights_imgs
11651254
):
11661255
"""
11671256
Takes multiple maps with images and builds displayables from them, sets global vars
@@ -1175,6 +1264,8 @@ init -25 python in mas_island_event:
11751264
overlay_imgs_maps - the map from overlay ids to raw images map
11761265
interior_imgs_map - the map from the interior stuff to the raw images map
11771266
glitch_frames - tuple of glitch raw anim frames
1267+
tree_lights_imgs - map of images for the tree lights, format:
1268+
img_name: disp
11781269
"""
11791270
global island_disp_map, decal_disp_map, other_disp_map
11801271
global bg_disp_map, overlay_disp_map, interior_disp_map
@@ -1245,6 +1336,23 @@ init -25 python in mas_island_event:
12451336
partial_disp = IslandsDataDefinition.getDataFor("decal_glitch").partial_disp
12461337
decal_disp_map["decal_glitch"] = partial_disp(glitch_disp)
12471338

1339+
# Build tree lights disp
1340+
tree_lights_frames = tuple(
1341+
tree_lights_imgs.pop("n_" + i)# don't need these in the map anymore
1342+
for i in "012"
1343+
)
1344+
def _tree_lights_transform_func(transform, st, at):
1345+
next_child = random.choice(tree_lights_frames)
1346+
transform.child = next_child
1347+
return 0.4
1348+
1349+
tree_lights_night_disp = Transform(child=tree_lights_frames[0], function=_tree_lights_transform_func)
1350+
tree_lights_imgs["n"] = tree_lights_night_disp
1351+
1352+
tree_lights_disp = _build_ifwd(tree_lights_imgs)
1353+
partial_disp = IslandsDataDefinition.getDataFor("decal_tree_lights").partial_disp
1354+
decal_disp_map["decal_tree_lights"] = partial_disp(tree_lights_disp)
1355+
12481356
# Build chibi disp
12491357
partial_disp = IslandsDataDefinition.getDataFor("other_shimeji").partial_disp
12501358
other_disp_map["other_shimeji"] = partial_disp()
@@ -1365,6 +1473,7 @@ init -25 python in mas_island_event:
13651473
_unlock("other_shimeji")
13661474
if not renpy.seen_label("mas_monika_islands_final_reveal"):
13671475
_unlock("decal_glitch")
1476+
13681477
_unlock("decal_pumpkins")
13691478
_unlock("decal_skull")
13701479

@@ -1383,23 +1492,33 @@ init -25 python in mas_island_event:
13831492
# This requires the 4th isld
13841493
if _is_unlocked("island_4"):
13851494
_unlock("decal_bloodfall")
1495+
13861496
# This requires the 5th isld
13871497
if _is_unlocked("island_5"):
13881498
_unlock("decal_gravestones")
13891499

13901500
def __unlocks_for_lvl_6():
13911501
_unlock("decal_bushes")
1502+
13921503
# Unlock everything from lvl 3
13931504
_unlock("island_4")
13941505
_unlock("island_5")
13951506

13961507
def __unlocks_for_lvl_7():
13971508
_unlock("island_3")
1509+
13981510
# Unlock only one, the rest at lvl 7
13991511
_unlock_one("decal_bookshelf", "decal_tree")
1512+
14001513
# These require the tree
14011514
if _is_unlocked("decal_tree"):
14021515
_unlock_one(*("decal_ghost_" + i for i in "012"))
1516+
_unlock("decal_tree_lights")
1517+
1518+
# This requires the bookshelf
1519+
if _is_unlocked("decal_bookshelf"):
1520+
_unlock("decal_bookshelf_lantern")
1521+
14031522
# Unlock everything from lvl 4
14041523
_unlock("island_7")
14051524
_unlock("island_6")
@@ -1408,18 +1527,30 @@ init -25 python in mas_island_event:
14081527
# Unlock everything from lvl 7
14091528
_unlock("decal_bookshelf")
14101529
_unlock("decal_tree")
1530+
14111531
# These require the tree
14121532
for i in "012":
14131533
_unlock("decal_haunted_tree_" + i)
1534+
_unlock("decal_tree_lights")
1535+
1536+
# This requires the bookshelf
1537+
_unlock("decal_bookshelf_lantern")
14141538

14151539
def _final_unlocks():
14161540
# TODO: update monika_why_spaceroom
14171541
# NOTE: NO SANITY CHECKS, use carefully
14181542
_unlock("other_isly")
14191543
_unlock("decal_house")
1544+
14201545
# These requires the house
14211546
_unlock("decal_jack")
14221547
_unlock("decal_webs")
1548+
_unlock("decal_circle_garland")
1549+
_unlock("decal_hanging_lantern")
1550+
_unlock("decal_rectangle_garland")
1551+
_unlock("decal_wreath")
1552+
1553+
# This should be removed once we have the house
14231554
_lock("decal_glitch")
14241555

14251556
def __unlocks_for_lvl_9():
@@ -1602,6 +1733,7 @@ init -25 python in mas_island_event:
16021733
global SHIMEJI_CHANCE
16031734

16041735
enable_o31_deco = persistent._mas_o31_in_o31_mode and not is_winter_weather()
1736+
enable_d25_deco = persistent._mas_d25_in_d25_mode and is_winter_weather()
16051737

16061738
def _reset_parallax_disp(disp):
16071739
# Just in case we always remove all decals and readd them as needed
@@ -1638,7 +1770,7 @@ init -25 python in mas_island_event:
16381770
)
16391771
)
16401772

1641-
# Now add all unlocked O31 decals
1773+
# Add all unlocked O31 decals
16421774
if enable_o31_deco:
16431775
# Basic decals
16441776
isld_to_decals_map = {
@@ -1674,6 +1806,21 @@ init -25 python in mas_island_event:
16741806
if store.mas_current_background.isFltNight() and _is_unlocked("decal_bloodfall"):
16751807
island_disp_map["island_4"].add_decals(decal_disp_map["decal_bloodfall"])
16761808

1809+
# Add all unlocked D25 decals
1810+
if enable_d25_deco:
1811+
isld_1_d25_decals = (
1812+
"decal_bookshelf_lantern",
1813+
"decal_circle_garland",
1814+
"decal_hanging_lantern",
1815+
"decal_rectangle_garland",
1816+
"decal_tree_lights",
1817+
"decal_wreath"
1818+
)
1819+
island_disp_map["island_1"].add_decals(
1820+
*(decal_disp_map[key] for key in isld_1_d25_decals if _is_unlocked(key))
1821+
)
1822+
1823+
# Add chibi
16771824
if _is_unlocked("other_shimeji") and random.random() <= SHIMEJI_CHANCE:
16781825
shimeji_disp = other_disp_map["other_shimeji"]
16791826
_reset_parallax_disp(shimeji_disp)

Monika After Story/game/script-stories.rpy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ label mas_scary_story_prison_escape:
18891889
m 7eua "Over time, she became good friends with one of the prison caretakers."
18901890
m 3esc "His job was to bury any prisoners who died in a graveyard just outside the prison walls."
18911891
m 3esd "Whenever a prisoner died, the caretaker rang a bell which was heard by all of the inmates."
1892-
m 3esc "Next, he got the body and put it in a casket, and then entered his office to fill out the death certificate before returning to the nail the casket lid shut."
1892+
m 3esc "Next, he got the body and put it in a casket, and then entered his office to fill out the death certificate before returning to nail the casket lid shut."
18931893
m 3esd "Finally, he put it on a wagon to take to the graveyard and bury it."
18941894
m 1euc "Knowing this routine, the woman devised an escape plan and shared it with the caretaker..."
18951895
m 1eud "The next time the bell rang, the woman would leave her cell and sneak into the dark room where the coffins were kept."

0 commit comments

Comments
 (0)