Fractal Softworks Forum

Starsector => Mods => Modding => Topic started by: cjy4312 on November 24, 2020, 09:42:07 PM

Title: I have some problem when using setSprite in hullmod
Post by: cjy4312 on November 24, 2020, 09:42:07 PM

I'm not good at English,I can't describe this issue exactly,So I uploaded a video https://www.bilibili.com/video/BV1eK4y1f7BV


I'm trying to use this code to change my ship's sprite and improve flux dissipation when all wings removed


Code
public void applyEffectsAfterShipCreation(ShipAPI ship, String id){
        if(ship.getVariant().getWings().isEmpty()){
            ship.setSprite("CTB_Ship", "ctb_mycarrier_redrunway");
            ship.getMutableStats().getFluxDissipation().modifyMult(id, 2f);
        }else{
            ship.getMutableStats().getFluxDissipation().unmodify(id);
        }
    }


[attachment deleted by admin]