#3735: JS API: BEING_DEMOLISHED constant disappeared
-------------------------------------------------+-------------------------
Reporter: aubergine | Owner: Per
Type: bug | Status: new
Priority: normal | Milestone:
Component: Engine: Scripting / AI | unspecified
Keywords: BEING_DEMOLISHED, | Version: 3.1
SS_BEING_DEMOLISHED | and master
Blocking: | Blocked By:
| Operating System: All
| /Non-Specific
-------------------------------------------------+-------------------------
Due to
http://developer.wz2100.net/changeset/8a964f12afbda6d6db25fad69ae1778ce7d3f841
the BEING_DEMOLISHED constant was removed from the JS API.
This constant was the only way for AI scripts to know when a building was
being demolished. If the truck that's demolishing a building gets
destroyed, there's no easy way to detect part-demolished buildings on the
map because they look like they are part-built instead of part-demolished.
The only workaround in JS scripts would be to maintain a lookup table of
what each truck is doing, and updating that every time a truck starts or
stops something, or gets destroyed or retreats for repairs, etc., which
quickly becomes very bloaty and crufty. It requires a lot of extra code
for building management that obfuscates what the script is doing.
As AIs get more advanced, and as already being seen in AIs such as
NullBot, building "recycling" is becoming more common to replace old
buildings with newer buildings, particularly with respect to defences.
See also: http://forums.wz2100.net/viewtopic.php?f=35&t=10022
--
Ticket URL: <http://developer.wz2100.net/ticket/3735>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Warzone2100-project mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/warzone2100-project