player.ship.hudAllowsBigGui returns true when HUD is hidden

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
phkb
Commodore
Commodore
Posts: 2433
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

player.ship.hudAllowsBigGui returns true when HUD is hidden

Post by phkb » Wed Sep 21, 2016 10:24 pm

I'm not sure if this should be catergorised as a bug or a "feature" but anyway...

If I do this when using the default HUD:

Code: Select all

log(this.name, "Big Allowed: " + player.ship.hudAllowsBigGui);
I get this
[MyOXP]: Big Allowed: false
But if I do this:

Code: Select all

player.ship.hudHidden;
log(this.name, "Big Allowed: " + player.ship.hudAllowsBigGui);
I get this:
[MyOXP]: Big Allowed: true
This appears to be a mix-up in concepts. On the one hand, the HUD definition says it doesn't allow big GUIs. Using this logic, hudAllowsBigGui should always return false. Here we are referring to the allow_big_gui property of the HUD plist file that is currently selected, not the current state of the players view. On the other hand, if the HUD is hidden it by definition allows for big GUI's, so hudAllowsBigGui should always return true. Here we are referring to the current view the player has of the HUD.

Given that hudHidden is already giving us the current view the player has of the HUD, I think hudAllowsBigGui should be corrected to always report on the allow_big_gui property of the currently selected HUD.

Anonymissimus
---- E L I T E ----
---- E L I T E ----
Posts: 299
Joined: Mon Apr 27, 2015 9:03 pm

Re: player.ship.hudAllowsBigGui returns true when HUD is hidden

Post by Anonymissimus » Thu Sep 22, 2016 4:00 pm

Is this the root cause of the issue with the email system and HUD dissappearance which I reported in your thread ?
warning sound if a missile is inbound: Missile warning

User avatar
phkb
Commodore
Commodore
Posts: 2433
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: player.ship.hudAllowsBigGui returns true when HUD is hidden

Post by phkb » Thu Sep 22, 2016 8:22 pm

It's possible although I struggled to reproduce the scenario on my system. What I ended up doing is always turning the HUD back on whenever the player leaves the screen.

Post Reply