Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: I have some problem when using setSprite in hullmod  (Read 579 times)

cjy4312

  • Ensign
  • *
  • Posts: 40
    • View Profile
I have some problem when using setSprite in hullmod
« 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]
Logged