Ultimately, thingdef should only contain code that is directly related to the DECORATE parser, but that's not the case with this file. It's only function definitions which get used during gameplay and will also be accessed by ZScript.
The change is intentionally on master so that pull requests can adjust to it now instead of creating conflicts later.
- Sets the absolute amount of an inventory actor.
- Limits itself to the range [0, MaxAmount]. Setting beyondMax to true disregards the MaxAmount. Default is false.
- A_OverlayRenderStyle(int layer, int style) - Sets the renderstyle of a layer to one of the STYLE_ types.
- A_OverlayAlpha(int layer, float alphaset) - Sets the alpha of a layer.
- OverlayAlpha(int layer) - Non-action function retrieves the alpha of a layer.
New overlay flags:
- PSPF_ALPHA/STYLE - enables individual alpha and render styles on the layers set with them.
- PSPF_FORCE(ALPHA/STYLE) - Forces the overlay's alpha to be rendered with its own amount instead of multiplying. This does not count towards fuzzy, transsouls, or stencil (use stenciladd, etc. for stencil).
- PSPF_FLIP - Flips the X of the layer over, drawing it in reverse.
Instead of replacing the original, the second class will get renamed now, using the originating file as an identifier. In the vast majority of cases this should do exactly what is needed: Create an unconflicting second class that can coexist with the original. Unless the class is used by name this should eliminate all problems with this, but so far I haven't seen anything that used them by name.
This is choosing the lesser of two evils. While some mod out there may get broken, the old setup meant that the first class of a given name could not be written out to a savegame because it was not retrievable when loading it back.
Ultimately we may have to get a fully qualified name out of this, so Outer should be a type that can handle this feature. The new class for this is currently used as base for PType and PSymbol so that PNamedType inherits from it and maybe later a namespace symbol can, too.
There have been reports about crashes in here with Linux that point to some of the code that gets called here doing unwanted things on the owner, so with these links cleared that should no longer be possible.
- This was fine with fixed point numbers, since they could never be
outside of short range when converted to regular ints. With floating
point numbers now, that condition no longer holds.
- allow recursive linking of $random definitions (as long as they do not link back, see above.)
- fixed the sound precaching which did not handle $alias inside $random. Normally this went undetected but in cases where the random sound index was the same as a sound index in the current link chain this could hang the function.