Skip to content

Jetpack compatibility with Scooty's Armor Swap - graphics do not update along with player color changes #338

@scotthmccoy

Description

@scotthmccoy

My own mod, Scooty's Armor Swap, adds a hotkey which cycles through armors in the inventory and updates the player's color to whatever it was when the armor was last worn, effectively allowing armors to be "dyed". Sadly, player color changes do not seem to affect the jetpack.

Expected:
Changing player color while using jetpack will change the color of the jetpack sprites

Observed:
Jetpack sprite color changes do not take effect until the player lands

Proposed Fix:
Insert the following on line 71 of jetpack-graphics-sound.lua:

    rendering.set_color(jetpack.animation_mask, jetpack.character.player and jetpack.character.player.color or jetpack.character.color)

I've tested the fix pretty thoroughly and it doesn't seem to affect UPS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions