NOT_BUILT status for structures

For AI and campaign script related discussions and questions
Post Reply
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

NOT_BUILT status for structures

Post by aubergine »

When structures are being demolished, their .status is BEING_BUILT which is somewhat confusing.

Can we deprecate BEING_BUILT (and plan to remove it in WZ 3.2)?

And add a new NOT_BUILT constant, with same numerical value as BEING_BUILT prior to release of WZ 3.1 (so people can start using it)?

To provide compatibility in the transition period, people can add this to their scripts:

Code: Select all

if (typeof NOT_BUILT == "undefined") {
  const NOT_BUILT = BEING_BUILT;
}
Alternatively, is there some way we can bring back BEING_DEMOLISHED?

Scripts currently have to keep a record of what's being demolished to avoid sending more trucks to DORDER_HELPBUILD a structure that's being demolished... :augh:

Also, a BLUEPRINT constant would be a useful .status to have as it allows construction sites to be identified (important for crazy AIs that are starting to do their own pathfinding).
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Post Reply