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

Minor enhancements #6069

Merged

Conversation

ThePotatoGuy
Copy link
Member

Key changes

  • added mas_utils.stdout_as - useful when using python functions that only print to stdout, like dis.dis.
  • added mas_globals.this_ev - this is set to the current Event object in call_next_event. Like how persistent.current_monikatopic is set to the label, but the EV is not persistent. NOTE: Since this is only set in call_next_event, its not accurate when using delegate topics. If a delegated topic wants to use this, the delegate topic should set the variable accordingly.

Testing

  • Verify that the mas_globals.this_ev is set to the correct event object when viewing regular, non-delegate topics (or greetings/farewells, and anything else that uses call_next_event). Also verify the var is set to None in all other cases.

Don't really have any in-game testing instructions for the util function. You could paste this in the console if you want to try it out:

import dis
with open("testfile.out", "w") as outfile:
    with mas_utils.stdout_as(outfile):
        dis.dis(<insert a mas function you want to look at>)

then open the text file and see bytecode. (If you are launching with renpy SDK, this code will write the file in the root of the SDK's folder)

@ThePotatoGuy ThePotatoGuy added awaiting testing code needs to be tested awaiting code review someone needs to check for syntax/logic/indentation errors labels Jul 12, 2020
@ThePotatoGuy ThePotatoGuy added this to the 0.11.4 milestone Jul 12, 2020
@multimokia multimokia removed awaiting code review someone needs to check for syntax/logic/indentation errors awaiting testing code needs to be tested labels Jul 13, 2020
@multimokia multimokia merged commit f720e44 into Monika-After-Story:content Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants