Combining ups_based_armor with other use_action

I’m trying to mod in an armor that can both cloak and teleport, which means adding both the use_action teleport and ups_based_armor (with ACTIVE_CLOAKING flag similar to the existing FB51 optical cloak).

The problem is that when I select the 2nd action to activate the cloak, the teleportation also triggers (which I assume is probably because all use_action check for the activated state every turn after testing with adding additional use_action).

I’m kinda hitting a wall on figuring out how to make both work together. So far, the only workaround I have is separating the armor into 2 transform states with their own use_action, but it is kinda clunky like that.

1 Like

If two separate iuse actions are triggered by same cause it is a bug that should be fixed and it can also be an just an unimplemented feature that should be implemented.

1 Like

Thank for the insight. I think I figure out the cause.
It seems that the bug is caused by changing the item to the TOOL_ARMOR type instead of ARMOR.
I had assumed that TOOL_ARMOR is the correct type to put activatable armors under.
My item finally works once I make the conversion. Not exactly sure why as I could not find any related tidbit in the source code.
I’ll be raising this issue on github then.