For binary systems, has_star_flag checks the system, not the specific star being targeted. When I use has_planet_flag, the check always succeeds. In order to allow one dyson sphere for each star, I need a way to check if the specific target has either a megastructure, or a flag. Is there a way to do this? Is there anything I can do to the star with on_build_complete that can then be checked with the placement rules?