update to 1.6.0
--HG-- branch : openttd
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: ai_changelog.hpp 27433 2015-11-01 12:09:41Z frosch $ */
|
||||
/* $Id: ai_changelog.hpp 27519 2016-03-01 20:06:23Z frosch $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -15,6 +15,10 @@
|
||||
* functions may still be available if you return an older API version
|
||||
* in GetAPIVersion() in info.nut.
|
||||
*
|
||||
* \b 1.6.0
|
||||
*
|
||||
* No changes
|
||||
*
|
||||
* \b 1.5.3
|
||||
*
|
||||
* No changes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: game_changelog.hpp 27433 2015-11-01 12:09:41Z frosch $ */
|
||||
/* $Id: game_changelog.hpp 27519 2016-03-01 20:06:23Z frosch $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -15,6 +15,10 @@
|
||||
* functions may still be available if you return an older API version
|
||||
* in GetAPIVersion() in info.nut.
|
||||
*
|
||||
* \b 1.6.0
|
||||
*
|
||||
* No changes
|
||||
*
|
||||
* \b 1.5.3
|
||||
*
|
||||
* No changes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: script_cargo.hpp 26396 2014-03-10 22:18:53Z zuu $ */
|
||||
/* $Id: script_cargo.hpp 27316 2015-06-21 18:53:23Z frosch $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -90,8 +90,15 @@ public:
|
||||
* @param cargo_type The cargo to get the string representation of.
|
||||
* @pre ScriptCargo::IsValidCargo(cargo_type).
|
||||
* @return The cargo label.
|
||||
* @note Never use this to check if it is a certain cargo. NewGRF can
|
||||
* redefine all of the names.
|
||||
* @note
|
||||
* - The label uniquely identifies a specific cargo. Use this if you want to
|
||||
* detect special cargos from specific industry set (like production booster cargos, supplies, ...).
|
||||
* - For more generic cargo support, rather check cargo properties though. For example:
|
||||
* - Use ScriptCargo::HasCargoClass(..., CC_PASSENGER) to decide bus vs. truck requirements.
|
||||
* - Use ScriptCargo::GetTownEffect(...) paired with ScriptTown::GetCargoGoal(...) to determine
|
||||
* town growth requirements.
|
||||
* - In other words: Only use the cargo label, if you know more about the behaviour
|
||||
* of a specific cargo from a specific industry set, than the API methods can tell you.
|
||||
*/
|
||||
static char *GetCargoLabel(CargoID cargo_type);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: script_execmode.cpp 26482 2014-04-23 20:13:33Z rubidium $ */
|
||||
/* $Id: script_execmode.cpp 27379 2015-08-10 20:04:31Z frosch $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -30,7 +30,7 @@ ScriptExecMode::ScriptExecMode()
|
||||
this->SetDoCommandMode(&ScriptExecMode::ModeProc, this);
|
||||
}
|
||||
|
||||
ScriptExecMode::~ScriptExecMode()
|
||||
void ScriptExecMode::FinalRelease()
|
||||
{
|
||||
if (this->GetDoCommandModeInstance() != this) {
|
||||
/* Ignore this error if the script already died. */
|
||||
@@ -38,5 +38,9 @@ ScriptExecMode::~ScriptExecMode()
|
||||
throw Script_FatalError("ScriptExecMode object was removed while it was not the latest *Mode object created.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ScriptExecMode::~ScriptExecMode()
|
||||
{
|
||||
this->SetDoCommandMode(this->last_mode, this->last_instance);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: script_execmode.hpp 24900 2013-01-08 22:46:42Z planetmaker $ */
|
||||
/* $Id: script_execmode.hpp 27379 2015-08-10 20:04:31Z frosch $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -46,6 +46,8 @@ public:
|
||||
* in when the instance was created.
|
||||
*/
|
||||
~ScriptExecMode();
|
||||
|
||||
virtual void FinalRelease();
|
||||
};
|
||||
|
||||
#endif /* SCRIPT_EXECMODE_HPP */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: script_list.cpp 27272 2015-05-08 17:32:57Z frosch $ */
|
||||
/* $Id: script_list.cpp 27258 2015-04-27 19:28:22Z frosch $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: script_road.cpp 26482 2014-04-23 20:13:33Z rubidium $ */
|
||||
/* $Id: script_road.cpp 27381 2015-08-10 20:24:13Z michi_cc $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -371,8 +371,8 @@ static bool NormaliseTileOffset(int32 *tile)
|
||||
if (!::IsValidTile(tile) || !::IsValidTile(start) || !::IsValidTile(end)) return -1;
|
||||
if (::DistanceManhattan(tile, start) != 1 || ::DistanceManhattan(tile, end) != 1) return -1;
|
||||
|
||||
/* ROAD_NW ROAD_SW ROAD_SE ROAD_NE */
|
||||
static const TileIndex neighbours[] = {::TileDiffXY(0, -1), ::TileDiffXY(1, 0), ::TileDiffXY(0, 1), ::TileDiffXY(-1, 0)};
|
||||
/* ROAD_NW ROAD_SW ROAD_SE ROAD_NE */
|
||||
static const TileIndexDiff neighbours[] = {::TileDiffXY(0, -1), ::TileDiffXY(1, 0), ::TileDiffXY(0, 1), ::TileDiffXY(-1, 0)};
|
||||
Array *existing = (Array*)alloca(sizeof(Array) + lengthof(neighbours) * sizeof(int32));
|
||||
existing->size = 0;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: script_testmode.cpp 26482 2014-04-23 20:13:33Z rubidium $ */
|
||||
/* $Id: script_testmode.cpp 27379 2015-08-10 20:04:31Z frosch $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -30,7 +30,7 @@ ScriptTestMode::ScriptTestMode()
|
||||
this->SetDoCommandMode(&ScriptTestMode::ModeProc, this);
|
||||
}
|
||||
|
||||
ScriptTestMode::~ScriptTestMode()
|
||||
void ScriptTestMode::FinalRelease()
|
||||
{
|
||||
if (this->GetDoCommandModeInstance() != this) {
|
||||
/* Ignore this error if the script already died. */
|
||||
@@ -38,5 +38,9 @@ ScriptTestMode::~ScriptTestMode()
|
||||
throw Script_FatalError("Testmode object was removed while it was not the latest *Mode object created.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ScriptTestMode::~ScriptTestMode()
|
||||
{
|
||||
this->SetDoCommandMode(this->last_mode, this->last_instance);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: script_testmode.hpp 24900 2013-01-08 22:46:42Z planetmaker $ */
|
||||
/* $Id: script_testmode.hpp 27379 2015-08-10 20:04:31Z frosch $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -48,6 +48,8 @@ public:
|
||||
* in when the instance was created.
|
||||
*/
|
||||
~ScriptTestMode();
|
||||
|
||||
virtual void FinalRelease();
|
||||
};
|
||||
|
||||
#endif /* SCRIPT_TESTMODE_HPP */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: script_tilelist.hpp 23615 2011-12-19 20:57:34Z truebrain $ */
|
||||
/* $Id: script_tilelist.hpp 27287 2015-05-16 14:40:45Z alberth $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -65,9 +65,10 @@ class ScriptTileList_IndustryAccepting : public ScriptTileList {
|
||||
public:
|
||||
/**
|
||||
* @param industry_id The industry to create the ScriptTileList around.
|
||||
* @param radius The radius of the station you will be using.
|
||||
* @param radius The coverage radius of the station type you will be using.
|
||||
* @pre ScriptIndustry::IsValidIndustry(industry_id).
|
||||
* @pre radius > 0.
|
||||
* @note A station part built on any of the returned tiles will give you coverage.
|
||||
*/
|
||||
ScriptTileList_IndustryAccepting(IndustryID industry_id, int radius);
|
||||
};
|
||||
@@ -82,9 +83,10 @@ class ScriptTileList_IndustryProducing : public ScriptTileList {
|
||||
public:
|
||||
/**
|
||||
* @param industry_id The industry to create the ScriptTileList around.
|
||||
* @param radius The radius of the station you will be using.
|
||||
* @param radius The coverage radius of the station type you will be using.
|
||||
* @pre ScriptIndustry::IsValidIndustry(industry_id).
|
||||
* @pre radius > 0.
|
||||
* @note A station part built on any of the returned tiles will give you acceptance.
|
||||
*/
|
||||
ScriptTileList_IndustryProducing(IndustryID industry_id, int radius);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: script_window.hpp 27174 2015-03-01 08:17:14Z alberth $ */
|
||||
/* $Id: script_window.hpp 27286 2015-05-16 12:08:06Z alberth $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -529,7 +529,7 @@ public:
|
||||
/**
|
||||
* Generate landscape (newgame); %Window numbers:
|
||||
* - GLWM_SCENARIO = #CreateScenarioWidgets
|
||||
* - #GenenerateLandscapeWindowMode = #GenerateLandscapeWidgets
|
||||
* - #GenerateLandscapeWindowMode = #GenerateLandscapeWidgets
|
||||
*/
|
||||
WC_GENERATE_LANDSCAPE = ::WC_GENERATE_LANDSCAPE,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user