Changes between Initial Version and Version 11 of Ticket #4268


Ignore:
Timestamp:
Dec 14, 2016, 12:15:33 AM (7 years ago)
Author:
Itms
Comment:

Style fixes:

  • the PROFILE call has a typo in the name
  • the split line in GetStaticsOnObstruction has bad indentation (coming from copy-paste), see the other function and copy that indentation.
  • remove the comment in GetAllOnObstruction
  • you didn't replace all occurrences in the public mod of GetUnitCollisions that you removed from the API

For me the big problem of this patch is this boolean passed to GetCollisions which has an obfuscated name. It should be clear in the API what this boolean does (i.e. without having to understand the whole code in the Obstruction component).

I suggest calling the boolean onlyConstructionBlocking (and probably making it optional, with a default value of true). Then comments should be detailed more in the function (explain in the first comment that living animals have the flag while dead ones are static obstructions without the flag). Add a remark that if the boolean is false, the filter filters nothing and is equivalent to NullObstructionFilter.

Then I would add a comment in the Foundation.js code to explain that this code cleans everything under the foundation (corpses and other non foundation-blocking obstructions).

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4268

    • Property Keywords patch review beta added
    • Property Milestone BacklogWork In Progress
    • Property Summary Destroy sheep corpses when constructing buildings[PATCH] Destroy sheep corpses when constructing buildings
  • Ticket #4268 – Description

    initial v11  
    11When a sheep or other animal is killed and a building is constructed in the same place, gathering units will try to reach the corpse but never reach it.
    2 
    32When constructing buildings, these corpses should be deleted.