HomeWildfire Games

Not so small input.js (originally been batch training) cleanup

Description

Not so small input.js (originally been batch training) cleanup

  • Move selection_panels.js helper functions into a separate file
  • Move unit_action helper functions from input.js into unit_actions.js
  • Rearrange some functions, to better represent the execution flow
  • Make batch training use g_NumberOfBatches instead of g_BatchTrainingCount so remember the number of batches instead of the number of units to train (needed for finishing P60)
  • Simplify the batch training code a bit
  • Also cleanup the moved functions a bit

Reviewed by: bb, Commented by elexis
Differential Revision: https://code.wildfiregames.com/D753

Event Timeline

vladislavbelov added inline comments.
/ps/trunk/binaries/data/mods/public/gui/session/selection_panels_helpers.js
180

It seems the wrong file for this, because there is nothing related to panels or selections.

Imarok added inline comments.Jun 10 2018, 3:28 PM
/ps/trunk/binaries/data/mods/public/gui/session/selection_panels_helpers.js
180

Where else would you put it in?

vladislavbelov added inline comments.Jun 10 2018, 3:38 PM
/ps/trunk/binaries/data/mods/public/gui/session/selection_panels_helpers.js
180

I'd prefer to leave it in the input.js or session.js until we have a better place (something for camera).