Skip to content

Commit

Permalink
Merge pull request #9493 from Monika-After-Story/r7.4
Browse files Browse the repository at this point in the history
RenPy 8 / Python 3.9 migration
  • Loading branch information
ThePotatoGuy authored Feb 20, 2024
2 parents 06baf31 + ecab7b4 commit 075b3e9
Show file tree
Hide file tree
Showing 136 changed files with 10,175 additions and 8,413 deletions.
53 changes: 18 additions & 35 deletions .github/workflows/mas_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,57 +30,40 @@ jobs:
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2.2.1
uses: actions/setup-python@v2
with:
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
python-version: 2.7.18 # optional, default is 3.x

# get/dl renpy src
- name: cache rpy source
id: cache-rpy
uses: actions/cache@v2
with:
path: renpy/
key: ${{ runner.os }}-rpy
python-version: 3.10.4 # optional, default is 3.x

# dl renpy src
- name: Download rpy source
if: steps.cache-rpy.outputs.cache-hit != 'true'
run: |
wget https://www.renpy.org/dl/6.99.12.4/renpy-6.99.12.4-sdk.tar.bz2
tar xf renpy-6.99.12.4-sdk.tar.bz2
rm renpy-6.99.12.4-sdk.tar.bz2
mv renpy-6.99.12.4-sdk renpy
renpysdk=$(wget -qO- https://nightly.renpy.org/current-8/index.html | grep -P -m 1 -o '(?<=href=").*\.tar\.bz2(?=".*)')
wget https://nightly.renpy.org/current-8/$renpysdk
tar xf $renpysdk
rm $renpysdk
mv ${renpysdk/.tar.bz2/} renpy
# get/download base mas
- name: cache base MAS
id: cache-mas
uses: actions/cache@v2
with:
path: mas0105/
key: ${{ runner.os }}-mas
# - name: cache base MAS
# id: cache-mas
# uses: actions/cache@v2
# with:
# path: mas0105/
# key: ${{ runner.os }}-mas

- name: Download base MAS
if: steps.cache-mas.outputs.cache-hit != 'true'
# if: steps.cache-mas.outputs.cache-hit != 'true'
run: |
wget https://s3-us-west-2.amazonaws.com/monika-after-story/ddlc/mas.zip
mkdir mas0105
unzip mas.zip -d mas0105
rm mas0105/game/scripts.rpa
# TEMP
# - name: what are these
# run: |
# file mas0105
# file renpy

# copy files over
# copy over gh files to base
- name: copy source over
run: cp -Rf Monika\ After\ Story/* mas0105/

# touch file for unstable so it doesn't raise exceptions for some things
- name: exception skip for unstable
if: github.ref == 'refs/heads/unstable'
run: touch mas0105/trb

# run sprite checkers
- name: check sprites
run: python tools/ghactions.py
Expand All @@ -95,4 +78,4 @@ jobs:
- name: rpy distribute
run: |
cd renpy
./renpy.sh launcher distribute "../mas0105/" --package Mod
./renpy.sh launcher distribute "../mas0105/" --package market
68 changes: 34 additions & 34 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
*~
*.rpyc
*.rpyb
*.bak
*.pyc
*.swp
log.txt
traceback.txt
errors.txt
firstrun
*.chr
*.rpa
*.rpa
Monika After Story/game/audio.rpa
*.save
Monika After Story/game/saves/persistent
Monika After Story/IPGuidelines.md
*.rpa
#Catch all rpa, rpyc, rpyb, and rpyms
*.rpa
Monika After Story/game/screens.rpyc
Monika After Story/old_persistent.txt
Monika After Story/merged_persistent.txt
Monika After Story/game/screens.rpyc
Monika After Story/project.json
*.rpy[cbm]

#Catch any persist info
persistent
*.bak

#No compiled pycode or pycache
__pycache__
*.pyc

#Ide specific things
*.swp
**/*.vscode

#Various other clutter-y things
log.txt
traceback.txt
errors.txt
firstrun
log
*.log

#DDLC specific
*.chr
*.rpyc
Monika After Story/project.json
Monika After Story/characters/monika.chr
*.rpyc
Monika After Story/project.json

#OS Specific files
.DS_Store
Monika After Story/.DS_Store
Monika After Story/characters/monika.chr
Monika After Story/update/updates.json
zzzz*
.vscode
cacert.pem

#Toolsmenu things
zzzz*

# Build
cacert.pem
navigation.json
Monika_After_Story-[0-9]*.[0-9]*.[0-9]*-dists
Binary file removed Monika After Story/CustomIconMac.icns
Binary file not shown.
4 changes: 1 addition & 3 deletions Monika After Story/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ <h2>Disclaimer</h2>
Monika After Story is a Doki Doki Literature Club fan game that is not affiliated with Team Salvato. It is designed to be played only after the official game has been completed. You can download Doki Doki Literature Club at: <a href=http://ddlc.moe>http://ddlc.moe</a>
</em></p>
<h2>Installation</h2>
<p><b>Installation of an r7 build is NOT REVERSABLE</b></p>
<p>
The files in Monika After Story alter Doki Doki Literature Club. You must have an installation of DDLC, which can be downloaded for free from <a href=http://ddlc.moe>http://ddlc.moe</a>.
</p>
Expand All @@ -76,9 +77,6 @@ <h2>Installation</h2>
<p>
Mac users can access the game directory by right-clicking on the DDLC application and selecting <tt>Show Package Contents</tt>. Then, the game directory can be found in <tt>Contents/Resources/autorun</tt>.
</p>
<p>
To uninstall this mod, simply delete all added files in the <tt>game</tt> directory.
</p>
<h2>Basic Help</h2>
<p>
To advance through the game, <tt>left-click</tt> or press the <tt>space</tt> or <tt>enter</tt> keys. When at a menu,
Expand Down
34 changes: 31 additions & 3 deletions Monika After Story/game/0config.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ python early:
renpy.config.name = "Monika After Story"

## The version of the game.
renpy.config.version = "0.12.15"
renpy.config.version = "0.13.0"


#Triple space suffix to avoid potential issues with same names in window title
config.window_title = "Monika After Story "
Expand All @@ -35,6 +36,31 @@ python early:

renpy.config.save_directory = "Monika After Story"

### R7+ Config Var adjustments
## 7.4.11
renpy.config.mouse_focus_clickthrough = True
##7.3.3
#Only devs need this
renpy.config.report_extraneous_attributes = False

##7.3.0
renpy.config.keyword_after_python = True

##7.1.1
#Fix menu textbox issues
renpy.config.menu_showed_window = True
#Fix textbox sometimes disappearing
renpy.config.window_auto_show = ["say"]
#Fix textbox flickering
renpy.config.window_auto_hide = ["scene", "call screen"]

##7.0
#Fixes spaceroom masks from restarting every interaction
renpy.config.replay_movie_sprites = False

##6.99.13
renpy.config.atl_one_frame = False

init -1200 python:
## Sounds and music ############################################################

Expand Down Expand Up @@ -97,7 +123,7 @@ init -1200 python:

## The icon displayed on the taskbar or dock.

renpy.config.window_icon = "gui/window_icon.png"
renpy.config.window_icon = "mod_assets/mas_icon.ico"

## Custom configs ##############################################################

Expand All @@ -120,7 +146,6 @@ init -1200 python:
renpy.loadsave.location.locations.pop()

################START: INIT TIME CONFIGS

## Uncomment the following line to set an audio file that will be played while
## the player is at the main menu. This file will continue playing into the
## game, until it is stopped or another file is played.
Expand All @@ -130,3 +155,6 @@ define config.main_menu_music = audio.t1

define config.window_show_transition = dissolve_textbox
define config.window_hide_transition = dissolve_textbox

init python:
config.per_frame_screens.append("_trace_screen")
17 changes: 9 additions & 8 deletions Monika After Story/game/0statements.rpy
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
python early in mas_statements:
from collections import namedtuple

__JumpWithArgsParseData = namedtuple("__JumpWithArgsParseData", ("label", "is_expression", "arg_info"))
# Consider this being fully private member of this namespace
_JumpWithArgsParseData = namedtuple("_JumpWithArgsParseData", ("label", "is_expression", "arg_info"))


def __jump_with_args(label, args, kwargs):
Expand Down Expand Up @@ -37,7 +38,7 @@ python early in mas_statements:
NOTE: may raise exceptions
IN:
parsed_data - __JumpWithArgsParseData for this statement
parsed_data - _JumpWithArgsParseData for this statement
OUT:
str
Expand All @@ -55,7 +56,7 @@ python early in mas_statements:
lex - the Lexer object
OUT:
__JumpWithArgsParseData
_JumpWithArgsParseData
"""
lex.expect_noblock("jarg")

Expand All @@ -73,14 +74,14 @@ python early in mas_statements:
lex.expect_eol()
lex.advance()

return __JumpWithArgsParseData(label_, is_expression, arg_info)
return _JumpWithArgsParseData(label_, is_expression, arg_info)

def __execute_jump_with_args(parsed_data):
"""
Executes the jump_with_args statement
IN:
parsed_data - __JumpWithArgsParseData for this statement
parsed_data - _JumpWithArgsParseData for this statement
"""
label_ = __get_label(parsed_data)

Expand All @@ -97,7 +98,7 @@ python early in mas_statements:
Predicts the jump_with_args statement
IN:
parsed_data - __JumpWithArgsParseData for this statement
parsed_data - _JumpWithArgsParseData for this statement
"""
try:
label_ = __get_label(parsed_data)
Expand All @@ -114,7 +115,7 @@ python early in mas_statements:
A lint function for the jump_with_args statement
IN:
parsed_data - __JumpWithArgsParseData for this statement
parsed_data - _JumpWithArgsParseData for this statement
"""
try:
label_ = __get_label(parsed_data)
Expand All @@ -127,7 +128,7 @@ python early in mas_statements:

# Define the new statement
renpy.register_statement(
"jarg",
"jarg",
parse=__parse_jump_with_args,
execute=__execute_jump_with_args,
predict=__predict_jump_with_args,
Expand Down
Loading

0 comments on commit 075b3e9

Please sign in to comment.