Quantcast [open] Housing API Follow-up Request :) - ESOUI
Thread Tools Display Modes
07/21/18, 09:42 PM   #1
Cardinal05
AddOn Author - Click to view addons
Join Date: Feb 2018
Posts: 31
[open] 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!
__________________
Geezus Take The Heal (@Cardinal05)
Creator of Essential Housing Tools | Furniture Snap | Guild Alert | Immaculate Construction | Magic Carpet
  Reply With Quote
07/22/18, 03:39 AM   #2
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 123
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.
  Reply With Quote
08/01/18, 07:04 AM   #3
Cardinal05
AddOn Author - Click to view addons
Join Date: Feb 2018
Posts: 31
Originally Posted by Shinni View Post
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!
__________________
Geezus Take The Heal (@Cardinal05)
Creator of Essential Housing Tools | Furniture Snap | Guild Alert | Immaculate Construction | Magic Carpet
  Reply With Quote
08/01/18, 09:04 AM   #4
Cardinal05
AddOn Author - Click to view addons
Join Date: Feb 2018
Posts: 31
Originally Posted by Shinni View Post
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
__________________
Geezus Take The Heal (@Cardinal05)
Creator of Essential Housing Tools | Furniture Snap | Guild Alert | Immaculate Construction | Magic Carpet
  Reply With Quote

ESOUI » Developer Discussions » Wish List » [open] Housing API Follow-up Request :)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off