Loading

Paste #pwldz1rs3

  1.         bool is_gs_slot = this->selected_slot == OWNER_DEITY;
  2.         bool invalid_slot = this->selected_slot == INVALID_COMPANY;
  3.         bool is_orange_slot = IsEditable((CompanyID)(this->selected_slot)) && !Company::IsValidID(this->selected_slot);
  4.         bool is_green_slot = IsEditable((CompanyID)(this->selected_slot)) && Company::IsValidID(this->selected_slot) && Company::IsValidAiID(this->selected_slot) && !Company::Get(this->selected_slot)->ai_instance->IsDead();
  5.         bool is_red_slot = IsEditable((CompanyID)(this->selected_slot)) && Company::IsValidID(this->selected_slot) && Company::IsValidAiID(this->selected_slot) && Company::Get(this->selected_slot)->ai_instance->IsDead();
  6.         bool is_silver_slot_above = !IsEditable((CompanyID)(this->selected_slot - 1));
  7.         bool is_silver_slot_below = !IsEditable((CompanyID)(this->selected_slot + 1));
  8.         bool is_orange_slot_above = IsEditable((CompanyID)(this->selected_slot - 1)) && !Company::IsValidID(this->selected_slot - 1);
  9.         bool is_orange_slot_below = IsEditable((CompanyID)(this->selected_slot + 1)) && !Company::IsValidID(this->selected_slot + 1);
  10.         bool is_green_slot_above = IsEditable((CompanyID)(this->selected_slot - 1)) && Company::IsValidID(this->selected_slot - 1) && Company::IsValidAiID(this->selected_slot - 1) && !Company::Get(this->selected_slot - 1)->ai_instance->IsDead();
  11.         bool is_green_slot_below = IsEditable((CompanyID)(this->selected_slot + 1)) && Company::IsValidID(this->selected_slot + 1) && Company::IsValidAiID(this->selected_slot + 1) && !Company::Get(this->selected_slot + 1)->ai_instance->IsDead();
  12.         bool is_red_slot_above = IsEditable((CompanyID)(this->selected_slot - 1)) && Company::IsValidID(this->selected_slot - 1) && Company::IsValidAiID(this->selected_slot - 1) && Company::Get(this->selected_slot - 1)->ai_instance->IsDead();
  13.         bool is_red_slot_below = IsEditable((CompanyID)(this->selected_slot - 1)) && Company::IsValidID(this->selected_slot - 1) && Company::IsValidAiID(this->selected_slot - 1) && Company::Get(this->selected_slot - 1)->ai_instance->IsDead();
  14.  
  15.  
  16. Check first slot:                                                           Check second slot:
  17. is_gs_slot  = false // GS slot isn't selected                               silver:
  18. is_gs_slot  = true  // GS slot is selected, and thus, unmovable             IsEditable  = false // human player in this slot, or outside slot range of 1-15, and thus, unmovable
  19.  
  20. invalid_slot= false // nothing isn't selected                               orange:
  21. invalid_slot= true  // nothing is selected, and thus, unmovable             IsEditable  = true  // slot could be orange, red or green
  22.                                                                             IsValidID   = false // slot is orange, and thus, first and second slots are movable
  23. orange:
  24. IsEditable  = true  // slot could be orange, red or green                   green:
  25. IsValidID   = false // slot is orange, and thus, check second slot          IsEditable  = true  // slot could be orange, red or green
  26.                                                                             IsValidID   = true  // slot could be red or green
  27. green:                                                                      IsValidAiID = true  // slot could be red or green
  28. IsEditable  = true  // slot could be orange, red or green                   IsDead      = false // slot is green, and thus, unmovable
  29. IsValidID   = true  // slot could be red or green
  30. IsValidAiID = true  // slot could be red or green                           red:
  31. IsDead      = false // slot is green, and thus, unmovable                   IsEditable  = true  // slot could be orange, red or green
  32.                                                                             IsValidID   = true  // slot could be red or green
  33. red:                                                                        IsValidAiID = true  // slot could be red or green
  34. IsEditable  = true  // slot could be orange, red or green                   IsDead      = true  // slot is red, and thus, first and second slots are movable
  35. IsValidID   = true  // slot could be red or green
  36. IsValidAiID = true  // slot could be red or green
  37. IsDead      = true  // slot is red, and thus, check second slot

Version history

Revision # Author Created at
pi7dgzowb Anonymous 11 Apr 2016, 12:19:50 UTC Diff

Comments