Page 1 of 1

List of data.raw categories that contain entities?

Posted: Tue May 16, 2017 11:30 pm
by sparr
I want to loop over every entity in data.raw in my data-updates.lua. Unfortunately they are categorized, and I can't find a way to tell entity categories from non-entity categories.

My immediate solution is to just copy this list: https://github.com/Suprcheese/Squeak-Th ... lua#L8-L32

I'd love to know if there's a more appropriate way to dynamically build this list.

Re: List of data.raw categories that contain entities?

Posted: Wed May 17, 2017 12:34 am
by DaveMcW
What property are you reading/changing from entities?

You could check to see if the property exists.

Re: List of data.raw categories that contain entities?

Posted: Wed May 17, 2017 8:14 am
by bobingabout
Unlike items where item subtypes are in the list, EG, data.raw.tool is a fairly common alternative to data.raw.item... I thought ALL entities were just under data.raw.entity.

Re: List of data.raw categories that contain entities?

Posted: Wed May 17, 2017 10:36 am
by darkfrei
I have used here this list of entities:
code
And yes, it's now impossible to get them with a one command or iterate them.