Giter Site home page Giter Site logo

Comments (3)

Deuterazamus avatar Deuterazamus commented on July 18, 2024 1

@Arcainne while I do agree that your modifies suppress the problem at hand, I wonder how much of the code of aura.js shoud actually be executed playerside. From what I can understand of the actual code CollateAuras/MainAura are the core methods that compute everything both are bound to be executed only on the gm machine (line 321 and 405).
The code hooked on updateToken, for example, relies on what has been computed gmside in CollateAuras but will execute playerside against an empty AuraMap, thus the error.
Is it possible that all hooks should be gm only?
Are the current gm-only guards a bit too deep in the execution and could be moved up at hooks level?
I'm not nearly familiar enough with Foundry+ActiveAuras inner working so please take my suggestion with a grain of salt

from active-auras.

kandashi avatar kandashi commented on July 18, 2024 1

Yeah this is a good note, will be fixed soon

from active-auras.

Arcainne avatar Arcainne commented on July 18, 2024

I resolved this locally by adding optional chaining to a few places in aura.js to make sure nothing is being called on an undefined object,
Before

aura.js:311:  if (!MapObject.effects) return;
aura.js:383:  MapObject.effects.forEach(i => EffectsArray.push(i.data.origin))
aura.js:502:  let checkEffects = MapObject.effects;

After

aura.js:311:  if (!MapObject?.effects) return false;
aura.js:383:  MapObject?.effects.forEach(i => EffectsArray.push(i.data.origin))
aura.js:502:  let checkEffects = MapObject?.effects ?? [];

from active-auras.

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.