#Tintable centrifuge

1 messages · Page 1 of 1 (latest)

terse minnow
#

Could you possibly make this a stand-alone mod? No new recipes or anything, just the tinting

white forge
#
local centri = data.raw["assembling-machine"]["centrifuge"]
centri.module_slots = 6

-- Centrifuge lights
-- primary, secondary, tertiary: thumper color left right center
-- quaternary: light color
local centri_wvs = centri.graphics_set.working_visualisations
local centri_wv_light = centri_wvs[1]
centri_wv_light.apply_recipe_tint = "quaternary"
centri_wv_light.light.color = {1,1,1}

local new_centri_wvs = {
  centri_wv_light,
}

for i,ani_layer in ipairs(centri_wvs[2].animation.layers) do
  local _, _, letter = ani_layer.filename:find("centrifuge%-(%a)%-light%.png")
  letter = letter:lower()
  ani_layer.filename = 
    "__petraspace__/graphics/entities/centrifuge/" .. letter .. "-light.png"

  local cardinals = {"primary", "secondary", "tertiary"}

  local new_wv = {
    effect = "uranium-glow",
    fadeout = true,
    apply_recipe_tint = cardinals[i],
    animation = ani_layer,
  }
  table.insert(new_centri_wvs, new_wv)
end
centri.graphics_set.working_visualisations = new_centri_wvs
#

I can make it a mod if you want though

terse minnow
#

I mostly asked so I wouldn't need to copy your code lol

#

So yeah, I'd prefer you make it a mod

white forge
#

it's MIT licenced! ... once i push this batch of chagnes

terse minnow
#

I still don't like copying code from other mods tho

white forge
#

ok

white forge
#

does this look good? if so i will upload it

#

well i'm doing it anyways bwahahahaha

timid tinsel
#

i was planning to try and retroactively fix the other tintable centrifuge mod for that, but im very glad someone else had the same idea

terse minnow
#

Using default_recipe_tint

tribal aurora
#

I wonder is this is the reason why the centrifuge graphic was split into multiple parts

#

Like maybe they originally wanted different colorization or different animation speed for each bit?

white forge
#

Probably? it makes me life convenient at least

#

ok fixed that jaiden, thx

#

maybe i should make a more dramatic image for the thumbnail -- it's kind of boring like that. but there's no vanilla recipe that could plausibly be violent interesting colors

timid tinsel
#

could do red, blue and green

#

colours often used in factorio, and are obviously different

white forge
#

Sure, but nothing would use those colors

#

I guess i could just make a hidden "technicolor centrifuge" recipe

terse minnow
#

It doesn't need to be a recipe that's actually included in the mod

short tangle