MerchantPug / apugli

An extension to Apoli for certain mods' use.
MIT License
5 stars 4 forks source link

`modify_scale` becomes unremovable from the entity when updating #71

Open JustCyra opened 6 months ago

JustCyra commented 6 months ago

When a modify_scale power with a resource that is used as a modifier is updated every tick via apoli:action_over_time power for example, the power becomes unremovable via the /power remove command, only way to remove it is via /power clear @s command. Error message printed in chat when attempting to: An unexpected error occurred trying to execute that command

I wasn't able to test if it is also unremovable when updating outside of the 1 tick example but if so that could be troublesome

Used power:

{
    "type": "apoli:multiple",
    "hidden": false,

    "resource": {
        "type": "apoli:resource",
        "min": 0,
        "max": 5000,
        "start_value": 5000,
        "hud_render": {
            "should_render": true
        }
    },
    "tick_resource":{
        "type": "apoli:action_over_time",
        "interval": 1,
        "condition": {
            "type": "apoli:resource",
            "resource": "*:*_resource",
            "comparison": "<",
            "compare_to": 5000
        },
        "entity_action": {
            "type": "apoli:change_resource",
            "resource": "*:*_resource",
            "operation": "add",
            "change": 1
        }
    },

    "scale_height": {
          "type": "apugli:modify_scale",
          "delay": 0,
          "scale_type": "pehkui:height",
          "modifier": {
              "operation": "multiply_base_multiplicative",
              "value": 0.3
          }
    },
    "scale_width": {
          "type": "apugli:modify_scale",
          "delay": 0,
          "scale_type": "pehkui:width",
          "modifier": {
              "operation": "multiply_base_multiplicative",
              "value": -0.2
          }
    },
    "scale_resource": {
          "type": "apugli:modify_scale",
          "delay": 0.0,
          "scale_type": "pehkui:width",
          "modifier": {
              "operation": "multiply_base_multiplicative",
              "value": 0.0,
              "resource": "*:*_resource",
              "modifier": {
                  "operation": "multiply_total_multiplicative",
                  "value": -0.99995
              }
          }
    }
}
MerchantPug commented 6 months ago

Is there a log associated with the command? Just wondering.

JustCyra commented 6 months ago

Huh oddly enough I am unable to reproduce this bug even with the exact same setup I had...