All star types are unknown in objects window?!

Describe your experience with the latest version of FreeOrion to help us improve it.

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.
Post Reply
Message
Author
ThinkSome
Psionic Snowflake
Posts: 460
Joined: Sun Mar 29, 2020 11:13 pm

All star types are unknown in objects window?!

#1 Post by ThinkSome »

star_type.png
star_type.png (138.27 KiB) Viewed 1917 times
version: with-FreeOrionSDK-v12-1085-g580d50d4d

User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: All star types are unknown in objects window?!

#2 Post by Oberlus »

Probably a bug.
In FOCS you can query ships and planets for their star type (Star type = BlackHole/NoStar/...).

User avatar
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?!

#3 Post by Geoff the Medio »

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.

ThinkSome
Psionic Snowflake
Posts: 460
Joined: Sun Mar 29, 2020 11:13 pm

Re: All star types are unknown in objects window?!

#4 Post by ThinkSome »

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?

User avatar
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?!

#5 Post by Geoff the Medio »

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...

ThinkSome
Psionic Snowflake
Posts: 460
Joined: Sun Mar 29, 2020 11:13 pm

Re: All star types are unknown in objects window?!

#6 Post by ThinkSome »

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.

User avatar
LienRag
Cosmic Dragon
Posts: 2148
Joined: Fri May 17, 2019 5:03 pm

Re: All star types are unknown in objects window?!

#7 Post by LienRag »

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.
That would be very useful for Phototropic/phobic Species and for optimal use of Stellar Tomography...

User avatar
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?!

#8 Post by Geoff the Medio »

If anyone wants to look at it, start here: https://github.com/freeorion/freeorion/ ... d.cpp#L245

Post Reply