Add: Allow GameScript to demolish without a company
This allows GameScripts to shrink towns as well as grow them.
This commit is contained in:

committed by
Niels Martin Hansen

parent
9014633866
commit
e4414471dd
@@ -35,6 +35,9 @@
|
||||
* \li AIEngine::HasPowerOnRoad
|
||||
* \li AIRoadTypeList::RoadTypeList
|
||||
*
|
||||
* Other changes:
|
||||
* \li AITile::DemolishTile works without a selected company
|
||||
*
|
||||
* \b 1.9.0
|
||||
*
|
||||
* API additions:
|
||||
|
@@ -262,7 +262,6 @@
|
||||
|
||||
/* static */ bool ScriptTile::DemolishTile(TileIndex tile)
|
||||
{
|
||||
EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY);
|
||||
EnforcePrecondition(false, ::IsValidTile(tile));
|
||||
|
||||
return ScriptObject::DoCommand(tile, 0, 0, CMD_LANDSCAPE_CLEAR);
|
||||
|
@@ -445,7 +445,6 @@ public:
|
||||
* Destroy everything on the given tile.
|
||||
* @param tile The tile to demolish.
|
||||
* @pre ScriptMap::IsValidTile(tile).
|
||||
* @game @pre Valid ScriptCompanyMode active in scope.
|
||||
* @exception ScriptError::ERR_AREA_NOT_CLEAR
|
||||
* @return True if and only if the tile was demolished.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user