More accurate behavior, such as Font objects properly inheriting
their name attributes, and centralization of code for picking
the first existing name from a passed string array.
Also centralizes initial default_name population in core.
Note: This currently breaks the mruby binding build.
The default value is an empty string, which triggers the simple
transition. Passing null is not legal (and wasn't possible in
mkxp from Ruby side anyway).
Fixes#108.
This underlines that no reference inside the setter is taken,
and that these attributes are non-nullable.
Also removes a couple of superfluous attribute macros.
As noted, on Viewport dispose, RMXP always calls the core
dispose method for child objects regardless of whether
user scripts override it in sub classes.
Implement this behavior in mkxp to prevent infinite recursion.
This function which was formerly a simple wrapper around
SLD_GetPrefPath() is changed to instead return the directory
assembled from org/app name specified in mkxp.conf, so one
can be sure that both mkxp and user scripts will always write
into the same directory when a custom path is preferred.
This breaks script compatibility.
'System' is way too generic of a name to reserve for mkxp use,
and I have already seen at least one occurance in the wild of
it being used by user scripts.
Ideally, all mkxp RGSS extensions would be moved under this
module, but I feel like the core modules (Input, Graphics etc)
are more safe as users are hesitant to directly extend these.
Either of these would previously crash (same for VX):
tm = Tilemap.new
at = tm.autotiles
tm = nil
GC.start
at[0] = Bitmap.new(1, 1)
tm = Tilemap.new
at = tm.autotiles
tm.dispose
at[0] = Bitmap.new(1, 1)
Funnily, this makes RMXP itself crash too, but crashing is
never acceptable except for possibly resource exhaustion.
The RGSS doesn't do it. But doing it shouldn't be a problem, as it's the
correct way. If a game is broken by this commit (unlikely), then the game
needs to be fixed as silent truncation is highly unlikely to be wanted.
The gist of it is that for Etc and Font props, the assignment
operator (eg. 'sprite.color=') does not take a reference of the
right hand parameter and replaces its previous one with it (this
was the old behavior). Rather, it keeps its internal property
object and copies the parameter object into it by value.
The getter is unchanged; it still returns a reference to the
internal property object.
s = Sprite.new
c = Color.new
s.color = c
p s.color == c # => true
p s.color.object_id == c.object_id # => false (true before)
c = s.color
p s.color.object_id == c.object_id # => true
Previously, when the script names in the backtrace were in the form
'SectionXXX'/'{XXXX}' (default RMXP behavior), this same name would
be shown in the error message box, whereas RMXP always displays the
actual script name (eg. 'Scene_Map') instead; only with
useScriptNames=true was mkxp's behavior mostly correct.
Fix this by keeping a backtrace format -> actual script name mapping
and always using the script name in the message box.
The script name and line would also be parsed wrongly if the name
contained any colons, fix this by walking the exception string
back to front instead.
Also prepend the script index to the name when useScriptNames=true;
this is invaluable when debugging projects where multiple scripts
carry the same name. The format is 'XXX:Script_Name'.
Even though 3.0.1 is the current version, 3.0.0 is used, because mkxp doesn't
implement the changes like not raising a TypeError for 'Color.new == nil' yet.
3.0.1 (finally) returns false. Other changes don't affect mkxp (I think).
See <http://tkool.jp/support/download/rpgvxace/rpgvxace_update> (Japanese).