Replies: 2 comments
-
To be honest, the only times I use |
Beta Was this translation helpful? Give feedback.
-
config always overrides what the calling command asks for. default is player, but specifying 'global' makes default global scope. This cover all the basis. As Firi says, I would strongly encourage to specify the app scope when building it, so that a loaded app always behaves like the author intended. |
Beta Was this translation helpful? Give feedback.
-
Since long, long ago, there has been a
global
parameter at the end of the/script load <app> [global]
, which is supposed to allow you to load any arbitrary app as a global scoped app, regardless of whether the app has configured itself as a global or player scope app.However, that flag only works if there is no
__config()
function defined in the app, no matter if scope is specified or not, since when Carpet finds it, it will set theperPlayer
flag to either the one specified in there, orplayer
if it's not specified, again regardless of the flag.What I'm proposing here is, even if the flag would work, should it be kept? While it may have a few limited use cases (can't think of any right now), there is also the problem that it may break apps relying on having a specific scope (by thinking default won't change), and anyway it can already be specified per-app, which allows both not having to remember the scope an app should be and making sure the app will never be loaded in the wrong scope.
My proposal is to remove the
global
parameter from the/script load
command and let the app decide its scope always.Discussion appreciated.
Beta Was this translation helpful? Give feedback.
All reactions