ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Wish List (https://www.esoui.com/forums/forumdisplay.php?f=177)
-   -   [outdated] Housing API Follow-up Request :) (https://www.esoui.com/forums/showthread.php?t=7943)

Cardinal05 07/21/18 09:42 PM

[outdated] Housing API Follow-up Request :)
 
This is a follow up, related to:
Housing API Request (Furniture State Management)

@ZOS_ChipHilseberg Thank you so much for the new API functions for housing -- I really, really appreciate it!

If I may just request a follow up for the functions added regarding Furniture State -- would it be at all possible to have a function that returns the State Names for the various State Indices for a given item?

This would help tremendously in ensuring that when we write features to, say, turn all lights "On," that we are, in fact, choosing the State that is labeled "On" or at least has the word "On" in it.

And again, thank you so much for everything! :banana:

Shinni 07/22/18 03:39 AM

I haven't tested this, but I think what you are looking for are variation names.
When you preview an object, you can preview its different variations. In case of furniture these variations are the different states. E.g. when previewing a light source, you can toggle the light on/off by selecting a different variation.
So I think GetPlacedFurniturePreviewVariationDisplayName(furnitureId, variationIndex) does already do what you are looking for.

Cardinal05 08/01/18 07:04 AM

Quote:

Originally Posted by Shinni (Post 35381)
I haven't tested this, but I think what you are looking for are variation names.
When you preview an object, you can preview its different variations. In case of furniture these variations are the different states. E.g. when previewing a light source, you can toggle the light on/off by selecting a different variation.
So I think GetPlacedFurniturePreviewVariationDisplayName(furnitureId, variationIndex) does already do what you are looking for.

Sorry -- I am just seeing this. I will check this and let you know. Thank you so much! :banana:

Cardinal05 08/01/18 09:04 AM

Quote:

Originally Posted by Shinni (Post 35381)
I haven't tested this, but I think what you are looking for are variation names.
When you preview an object, you can preview its different variations. In case of furniture these variations are the different states. E.g. when previewing a light source, you can toggle the light on/off by selecting a different variation.
So I think GetPlacedFurniturePreviewVariationDisplayName(furnitureId, variationIndex) does already do what you are looking for.

You were 100% correct. The only detail I would point out (for anyone that's interested) is that the Object State Index is 0-based and the Preview Variation Index is 1-based. So just pass Object State Index + 1 to the GetPlacedFurniturePreviewVariationDisplayName function for variationIndex and you're good to go.

And with your help in finding that... this thread can now be closed. <3 :banana:


All times are GMT -6. The time now is 07:36 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI