Code Monkey home page Code Monkey logo

Comments (3)

CensoredUsername avatar CensoredUsername commented on August 9, 2024 1

Maybe we could still change the behaviour so that the original else branch is put with comments and elif True is replaced with else to avoid confusion?

The goal of unrpyc is to replicate the input files as exact as possible. If the input file contained elif True followed by else then we should emit the same, even if it is something silly from the original author. So I don't think anything needs to be changed here.

And yeah, probably they were just trying some things and didn't want to delete the original branch just yet.

from unrpyc.

CensoredUsername avatar CensoredUsername commented on August 9, 2024

Huh. do you have an example file for this? I have seen no evidence in renpy itself for this.

Are you sure the source file didn't actually state elif True?

edit: especially as the PyExpr seems to point to the "True" being a piece of text from something in the game/scripts/quests/.. folder I'm inclined to believe someone just wrote elif True there.

from unrpyc.

Lumpy-dev avatar Lumpy-dev commented on August 9, 2024

This could have been something generated with a specific version RenPy as I found this file by downloading a bunch of random games, decompiling the RPAs and comparing both implementations.

So I dug a bit deeper to find out and conveniently, the original creator of this game left the original RPY files in the final game and I did found an elif True statement and then an else statement. Maybe they wanted to make this branch as some sort of comment? In that case UnRPYC did not make any mistake so I retested without my change and it seems like the behavior is the same... Also with the 14 large games I tested this is the single time this happens.

Maybe we could still change the behavior so that the original else branch is put with comments and elif True is replaced with else to avoid confusion?

This problematic file (original and compiled):
group_event_dinner_time_2_dinner.zip

from unrpyc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.