- star_type.png (138.27 KiB) Viewed 1917 times
All star types are unknown in objects window?!
Moderator: Oberlus
Forum rules
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
All star types are unknown in objects window?!
version: with-FreeOrionSDK-v12-1085-g580d50d4d
Re: All star types are unknown in objects window?!
Probably a bug.
In FOCS you can query ships and planets for their star type (Star type = BlackHole/NoStar/...).
In FOCS you can query ships and planets for their star type (Star type = BlackHole/NoStar/...).
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: All star types are unknown in objects window?!
Arguably a bug in the sense that it's not really "unknown" but rather "not applicable" or "none" or somesuch. Planets don't have a star type, even if their system does.
Difference with conditions is that they have some built-in logic to check the star type of the containing system, rather than just giving up when testing the star type of a planet. But the objects list columns aren't using condition, but rather value refs, and and the StarType property only returns a meaningful value for System objects, not planets or ship etc.
Could probably rewrite the column value ref to check the type of the object in the row and adjust the queried property accordingly.
Alternatively, go to the filters dialog and show systems, and then with suitable ordering set for the rows, you can see the system rows that contain the planets, and the system rows will have the correct star type shown.
Difference with conditions is that they have some built-in logic to check the star type of the containing system, rather than just giving up when testing the star type of a planet. But the objects list columns aren't using condition, but rather value refs, and and the StarType property only returns a meaningful value for System objects, not planets or ship etc.
Could probably rewrite the column value ref to check the type of the object in the row and adjust the queried property accordingly.
Alternatively, go to the filters dialog and show systems, and then with suitable ordering set for the rows, you can see the system rows that contain the planets, and the system rows will have the correct star type shown.
Re: All star types are unknown in objects window?!
Makes sense.
Speaking of that, a few days ago I tried filtering systems by star type and then by planet count, but apparently having two filters simultaneously is not possible?
Speaking of that, a few days ago I tried filtering systems by star type and then by planet count, but apparently having two filters simultaneously is not possible?
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: All star types are unknown in objects window?!
By filter, I guess you mean sort?
At least for me, the sorting is stable, so if you sort first by ID and then by owner, the order of the planets by ID within the owner groupings is retained.
I'm not sure what you mean by "simultaneous", or how you get a "planet count" to sort by, though...
At least for me, the sorting is stable, so if you sort first by ID and then by owner, the order of the planets by ID within the owner groupings is retained.
I'm not sure what you mean by "simultaneous", or how you get a "planet count" to sort by, though...
Re: All star types are unknown in objects window?!
yes, sort. I guess what I wanted to do was "select all red star systems" and then "sort by planet count" to get a quick overview over suitable locations for artificial black hole. But there is no planet count property I think.
Re: All star types are unknown in objects window?!
That would be very useful for Phototropic/phobic Species and for optimal use of Stellar Tomography...Geoff the Medio wrote: ↑Wed Mar 02, 2022 11:53 am
Could probably rewrite the column value ref to check the type of the object in the row and adjust the queried property accordingly.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: All star types are unknown in objects window?!
If anyone wants to look at it, start here: https://github.com/freeorion/freeorion/ ... d.cpp#L245