Spitter data prototype tint inconsistency

Post your bugs and problems so we can fix them.
Post Reply
User avatar
lovely_santa
Filter Inserter
Filter Inserter
Posts: 498
Joined: Sat Feb 18, 2017 9:41 pm
Contact:

Spitter data prototype tint inconsistency

Post by lovely_santa »

Hi,

While modding the spitter, I came across a small inconsistency:
The spitter attack results in a fire splash that adds a sticker to the player (to slow them down).

The way the enemy prototype data is set up, each size of spitter (and worm) have a separate acid stream, each stream has its own (corresponding sized) acid splash. Again, each acid splash has its own (corresponding sized) acid sticker.

The generation of the prototype data itself is generalized in a function for the stream, splash and sticker.
The tints are also generalized on their own, so it can be added as a parameter to the generalized functions.

base/prototypes/entity/spitter-projectiles.lua defines general tints for the stream, splash and sticker.

Further down the same file, the tints are further split up for each sized stream, splash and sticker.

The functions for the acid_stream and the acid_splash_fire are correctly using the parameter data.tint, to make those parts tinted correctly, however the acid_sticker does not use the data.tint parameter, it uses a hardcoded value instead. Furthermore, the hardcoded value is not the same as the specified parameter mentioned earlier.

Solution:
  1. Change the acid_sticker function to use data.tint rather than the hardcoded value.
  2. Change the acid_sticker generic tint to the (currently used) hardcoded value:

    Code: Select all

    sticker_tint = {r = 0.714, g = 0.669, b = 0.291, a = 0.745}, -- #b6aa4abe
The aforementioned solution will have no difference before/after, but this makes the posibility to generate differently tinted stickers using the base game provided function.
You can find all my mods on the mod portal. Also helping on Arch666Angel's mods.
Image

Post Reply

Return to “Bug Reports”