Glowing Laser Beams


Custom colors for laser beams

Tweaks
4 days ago
1.1 - 2.1
12.0K
Combat Armor

b with other mods introducing lasers: The given sprite rectangle (...) is outside the actual sprite size (...)

4 days ago
1490.895 Error ParallelSpriteLoader.cpp:67: Parallel sprite loading failed, falling back to normal sprite loading. The given sprite rectangle (left_top=0x0, right_bottom=64x13) is outside the actual sprite size (left_top=0x0, right_bottom=512x12).
See the log file for more information.: __GlowingLaserBeams__/graphics/beam-body-color.png
         RAM: 23009/32605 MB, page: 33922/76303 MB, virtual: 55011/134217727 MB, extended virtual: 0 MB
1493.991 Error AtlasBuilder.cpp:1383: The given sprite rectangle (left_top=0x0, right_bottom=64x13) is outside the actual sprite size (left_top=0x0, right_bottom=512x12).
See the log file for more information.: __GlowingLaserBeams__/graphics/beam-body-color.png; mods: GlowingLaserBeams selene umrFixed planet-crucible planet_prismaris foliax
         Prototypes using the sprite:
           data.raw["beam"]["umr_laser-beam"]
           data.raw["beam"]["planet-crucible-laser-beam-1"]
           data.raw["beam"]["planet-crucible-laser-beam-2"]
           data.raw["beam"]["planet-crucible-laser-beam-3"]
           data.raw["beam"]["planet-crucible-laser-beam-4"]
           data.raw["beam"]["planet-crucible-laser-beam-0"]
           data.raw["beam"]["selene-laser-beam-blue"]
           data.raw["beam"]["explosion-laser-beam"]
           data.raw["beam"]["planet-crucible-laser-beam-5"]
           data.raw["beam"]["fire-laser-beam"]
           data.raw["beam"]["electric-laser-beam"]
           data.raw["beam"]["acid-laser-beam"]
           data.raw["beam"]["arcane-laser-beam"]
           data.raw["beam"]["poison-laser-beam"]
           data.raw["beam"]["physical-laser-beam"]
           data.raw["beam"]["laser-beam"]

Hi! I've encountered this, and as you can see I've got other mods installed, too. E.g. selene's laser-body.png is 512x13.

I'm not sure what to do here; in https://github.com/Pikachar2/GlowingLaserBeams/blob/6b1bc82ead66dea1d9c208d4eb0b922b61062a81/GlowingLaserBeams/data-updates.lua#L52, you try to iterate over all mods, but you rely on the fact that their pngs are the same as the vanilla beams (which I don't know if it's a fair assumption or if other mods are free to introduce different dimensions). And I reckon you would have to have their greyscale PNGs anyway?

So as a local hack, I cut the effect down to the vanilla beam and did something like this:

local allowed_beams = {
    ["laser-beam"] = true,
    ["laser-beam-no-sound"] = true,
}

For me that's fine, but maybe you can come up with a clever idea how to handle other mod's beams. Thanks for your work! :-)

4 days ago

Hey, sorry for the issue and thanks for the report. I'll take a look at it. Probably will cut out the extra mod stuff for now while I come up with a fix. Can't have things breaking for people in the meantime.

4 days ago

Aight, that took a lot less time than I thought to fix it. Ran a check with the planet mod selene (which I'm hoping is the same one you were having issues with) as well as Rampant Arsenal. Everything looked good. So hopefully it now accounts for non-default-laser sized pngs.

New response