Page MenuHomeWildfire Games

fix miraged properties in GuiInterface changes from rP20875
ClosedPublic

Authored by mimo on Jan 17 2018, 8:10 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP20938: fix miraged properties in GuiInterface changes from rP20875
Summary

As reported by temple, some mirages were not properly taken into account in rP20875.
That is fixed, with in addition some anterior problems:

  • Repairable properties were looked for in getEntityState, but never filled in the mirage component. This is added (although i'm not sure that's really useful)
  • Repairable and Foundation info for mirage was transfered to the gui, but not displayed. This is added now. In both cases, it is the number of builders. As i said, i'm not sure we need it for repairable, but i think it is an important info for Foundations.
  • There was a missing test on the return value of GetEntityState missing in unit_actions.js
Test Plan

Test that everything works as expected.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mimo created this revision.Jan 17 2018, 8:10 PM
Owners added a subscriber: Restricted Owners Package.Jan 17 2018, 8:10 PM
temple added a subscriber: temple.Jan 18 2018, 4:31 PM

Repairable and Foundation info for mirage was transfered to the gui, but not displayed. This is added now.

Sure, why not.

binaries/data/mods/public/gui/session/selection_details.js
251 ↗(On Diff #5360)

Do we need the visibility stuff, i.e. is it possible to select something that's neither visible nor fogged?

binaries/data/mods/public/simulation/components/GuiInterface.js
363–368 ↗(On Diff #5360)

Maybe better to add these properties to mirage?

elexis added a subscriber: elexis.Jan 18 2018, 4:41 PM
elexis added inline comments.
binaries/data/mods/public/gui/session/selection_details.js
251 ↗(On Diff #5360)

maybe if a selected unit goes out of vision.
Could be != "hidden" I suppose

mimo added inline comments.Jan 18 2018, 7:06 PM
binaries/data/mods/public/gui/session/selection_details.js
251 ↗(On Diff #5360)

yes, i'll switch to !hidden

binaries/data/mods/public/simulation/components/GuiInterface.js
363–368 ↗(On Diff #5360)

Can be in another patch, that one was supposed to only fix the previous commit, and already includes some additional changes.

mimo updated this revision to Diff 5368.Jan 18 2018, 7:11 PM

updated patch

This revision was not accepted when it landed; it landed in state Needs Review.Jan 20 2018, 4:09 PM
This revision was automatically updated to reflect the committed changes.
temple added a comment.EditedJan 21 2018, 4:24 AM

We don't have an entState.visibility test in neighboring parts of the code, so my point was that it might not be necessary at all.

(Had computer issues the last few days, sorry for not replying earlier.)

elexis added inline comments.Jan 21 2018, 3:42 PM
binaries/data/mods/public/simulation/components/Mirage.js
87 ↗(On Diff #5368)

/**

ps/trunk/binaries/data/mods/public/gui/session/selection_details.js
251

this one came from rP16281