Giter Club home page Giter Club logo

mas-presence's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mas-presence's Issues

[bug] - NameError: global name 'file_rel' is not defined

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00gamemenu.rpy", line 173, in <module>
    $ ui.interact()
  File "renpy/common/00action_other.rpy", line 484, in __call__
    rv = self.callable(*self.args, **self.kwargs)
  File "game/Submods/Discord Presence Submod/settings.rpy", line 81, in reload_configs
    config.reload_configs()
  File "game/Submods/Discord Presence Submod/config.rpy", line 491, in reload_configs
    _ERROR_CONFIG_LOADING.report(file_rel, e)
NameError: global name 'file_rel' is not defined

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "lib/windows-i686/00gamemenu.rpyc", line 173, in script
  File "D:\MAS_Cn001280\1211\renpy\ast.py", line 814, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "D:\MAS_Cn001280\1211\renpy\python.py", line 1719, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/00gamemenu.rpy", line 173, in <module>
    $ ui.interact()
  File "D:\MAS_Cn001280\1211\renpy\ui.py", line 285, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "D:\MAS_Cn001280\1211\renpy\display\core.py", line 2526, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "D:\MAS_Cn001280\1211\renpy\display\core.py", line 3204, in interact_core
    rv = root_widget.event(ev, x, y, 0)
  File "D:\MAS_Cn001280\1211\renpy\display\layout.py", line 960, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\MAS_Cn001280\1211\renpy\display\transition.py", line 45, in event
    return self.new_widget.event(ev, x, y, st)  # E1101
  File "D:\MAS_Cn001280\1211\renpy\display\layout.py", line 960, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\MAS_Cn001280\1211\renpy\display\layout.py", line 960, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\MAS_Cn001280\1211\renpy\display\screen.py", line 651, in event
    rv = self.child.event(ev, x, y, st)
  File "D:\MAS_Cn001280\1211\renpy\display\layout.py", line 960, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\MAS_Cn001280\1211\renpy\display\layout.py", line 232, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "D:\MAS_Cn001280\1211\renpy\display\layout.py", line 960, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\MAS_Cn001280\1211\renpy\display\layout.py", line 232, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "D:\MAS_Cn001280\1211\renpy\display\layout.py", line 232, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "D:\MAS_Cn001280\1211\renpy\display\viewport.py", line 303, in event
    rv = super(Viewport, self).event(ev, x, y, st)
  File "D:\MAS_Cn001280\1211\renpy\display\layout.py", line 232, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "D:\MAS_Cn001280\1211\renpy\display\layout.py", line 960, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\MAS_Cn001280\1211\renpy\display\layout.py", line 960, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\MAS_Cn001280\1211\renpy\display\layout.py", line 960, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\MAS_Cn001280\1211\renpy\display\layout.py", line 960, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\MAS_Cn001280\1211\renpy\display\behavior.py", line 889, in event
    return handle_click(self.clicked)
  File "D:\MAS_Cn001280\1211\renpy\display\behavior.py", line 824, in handle_click
    rv = run(action)
  File "D:\MAS_Cn001280\1211\renpy\display\behavior.py", line 306, in run
    return action(*args, **kwargs)
  File "renpy/common/00action_other.rpy", line 484, in __call__
    rv = self.callable(*self.args, **self.kwargs)
  File "game/Submods/Discord Presence Submod/settings.rpy", line 81, in reload_configs
    config.reload_configs()
  File "game/Submods/Discord Presence Submod/config.rpy", line 491, in reload_configs
    _ERROR_CONFIG_LOADING.report(file_rel, e)
NameError: global name 'file_rel' is not defined

Windows-8-6.2.9200
Ren'Py 6.99.12.4.2187
Monika After Story 0.12.11

mas-presence/mod/config.rpy

Lines 483 to 492 in 42d62dc

rel_file = _file[len(_config_dir) + 1:]
try:
config = Config.from_file(_file)
if config.condition is not None:
eval(config.condition, dict(), store.__dict__)
config._file = rel_file
except Exception as e:
_ERROR_CONFIG_LOADING.report(file_rel, e)
continue

file_rel does not appear elsewhere, so this should be a typo :D

Move heavy logic to separate thread to prevent freezes

In many possible scenarios, with or without timeout, sending data to RPC socket would cause a game freeze. I overlooked it when I first started working on the submod, and currently it's very single-thread-oriented, so that's something we need to rework.

Pluralize day/days in event countdown

Currently, whenever event is being counted down by days (e.g. 5 days until ...), eventually it will reach "1 days" and this isn't correct English. We would need to add a custom variable (most likely will put it into events extension) that will serve for this exact case, to be used in expressions like

Details = [eve_days_1w] [eve_days_1w_days] until our [lower(eve_prompt_1w)] milestone, yay!

Replace Windows backslash directory separator with / for config overriding

In process of helping create a config, I've encountered a platform-specific case when on Windows path to config that is saved to ID map alongside the config ID (if present) was using \\ and not /.

To preserve compatibility with older configs we need to keep both backslash-based and slash-based path in ID map:

mas-presence/mod/config.rpy

Lines 460 to 463 in 5bd6a4c

# Populate ID map with desired ID and path.
id_map[config.id] = config
id_map[rel_file] = config

ImportError with lib/ modules

Some people still experience problem with this submod. It is still unclear what causes it, but my idea is that this is related to current working directory if MAS is ran from shortcut.

[code]
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/Submods/Discord Presence Submod/presence.rpy", line 13, in script
  File "game/Submods/Discord Presence Submod/presence.rpy", line 22, in <module>
ImportError: No module named uuid

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/Submods/Discord Presence Submod/presence.rpy", line 13, in script
  File "C:\Users\XXX\Desktop\DDLC-1.1.1-pc\renpy\ast.py", line 814, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\XXX\Desktop\DDLC-1.1.1-pc\renpy\python.py", line 1719, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/Submods/Discord Presence Submod/presence.rpy", line 22, in <module>
ImportError: No module named uuid

Windows-8-6.2.9200
Ren'Py 6.99.12.4.2187
Monika After Story 0.12.11
[/code]

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.