Spitter data prototype tint inconsistency

Post Reply
User avatar
lovely_santa
Filter Inserter
Filter Inserter
Posts: 502
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

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2247
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Spitter data prototype tint inconsistency

Post by boskid »

This is minor enough and possibly mod breaking enough that i decided to fix this for 2.0.

Post Reply

Return to “Fixed for 2.0”