Skip to content

Commit

Permalink
Prep for release of v6
Browse files Browse the repository at this point in the history
  • Loading branch information
MinchinWeb committed Jan 1, 2013
1 parent 7790dfb commit 9ea0058
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 99 deletions.
51 changes: 40 additions & 11 deletions Dominion.Roads.nut
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Dominion Land System Roads v.1 [2012-12-28],
/* Dominion Land System Roads v.1 [2012-12-31],
* part of Minchinweb's MetaLibrary v.6,
* Copyright © 2012 by W. Minchin. For more info,
* please visit https://github.com/MinchinWeb/openttd-metalibrary
Expand All @@ -14,14 +14,43 @@
* + You accept that this software is provided to you "as is", without warranty.
*/

// *Domian Land System* refers to the system of survey in Western Canada. Land
// was surveyed into 1/2 mile x 1/2 mile "quarter sections" that would be sold
// to settlers. Roads were placed on a 1 mile x 2 mile grid along the edges of
// these quarter sections.
//
// Here, we follow the same idea, although on a square grid. The default grid
// is 8x8 tiles. This is designed to run as a wrapper on the main road
// pathfinder.
/* *Domian Land System* refers to the system of survey in Western Canada. Land
* was surveyed into 1/2 mile x 1/2 mile "quarter sections" that would be sold
* to settlers. Roads were placed on a 1 mile x 2 mile grid along the edges of
* these quarter sections.
*
* Here, we follow the same idea, although on a square grid. The default grid
* is 8x8 tiles. This is designed to run as a wrapper on the main road
* pathfinder.
*/

/* This file provides the following functions
MinchinWeb.DLS()
.DLS.Info.GetVersion()
.GetRevision()
.GetDate()
.GetName()
.DLS.SetDatum()
.GetDatum()
.IsGridPoint(Point)
.GridPoints(End1, End2)
.AllGridPoints()
.FindPath(cycles=10000)
.InitializePath(StartArray, EndArray)
.BuildPath()
.InitializePathOnTowns(StartTown, EndTown)
.GetPath()
.GetPathLength()
.PathToTilePairs()
.PathToTiles()
.TilePairsToBuild()
.GetBuildCost()
.PresetOriginal()
.PresetPerfectPath()
.PresetQuickAndDirty()
.PresetMode6()
.PresetStreetcar()
*/

// Requires *Pathfinder.Road.nut*

Expand Down Expand Up @@ -52,8 +81,8 @@ class _MinchinWeb_DLS_.Info

function GetVersion() { return 1; }
// function GetMinorVersion() { return 0; }
function GetRevision() { return 0; }
function GetDate() { return "2012-12-28"; }
function GetRevision() { return 121231; }
function GetDate() { return "2012-12-21"; }
function GetName() { return "Dominion Land System Road"; }

constructor(main)
Expand Down
2 changes: 1 addition & 1 deletion Pathfinder.Road.nut
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ class _MinchinWeb_RoadPathfinder_.Info

function GetVersion() { return 9; }
// function GetMinorVersion() { return 0; }
function GetRevision() { return 0; }
function GetRevision() { return 121228; }
function GetDate() { return "2012-12-28"; }
function GetName() { return "Road Pathfinder (Wm)"; }

Expand Down
164 changes: 83 additions & 81 deletions ReadMe.txt
Original file line number Diff line number Diff line change
@@ -1,124 +1,126 @@
MinchinWeb's MetaLibrary Read-me
v.6, 2012-12-28
Copyright © 2011-12 by W. Minchin. For more info, please visit
https://github.com/MinchinWeb/openttd-metalibrary
MinchinWeb's MetaLibrary Read-me
v.6, 2012-12-31
Copyright © 2011-12 by W. Minchin. For more info, please visit
https://github.com/MinchinWeb/openttd-metalibrary

-- About MetaLibrary ----------------------------------------------------------
-- About MetaLibrary ----------------------------------------------------------
MetaLibrary started as a collection of functions from my AI, WmDOT. The hope is
to provide a collection of classes and functions that will be useful to
other AI writers. Your comments, suggestions, and bug reports are welcomed
and encouraged!

-- Requirements ---------------------------------------------------------------
-- Requirements ---------------------------------------------------------------
MetaLibrary requires OpenTTD version 1.2 or newer. This is available as a free
download from OpenTTD.org. It is not particularly useful on its own, but
will hopefully be helpful if you would like to write your own AI.
As dependencies, MetaLib also requires:
- Binary Heap, v.1 ('Queue.BinaryHeap-1.tar')
- Fibonacci Heap, v.2 ('Queue.FibonacciHeap-2.tar')
- Graph.AyStar, v.6 ('Graph.AyStar-6.tar')

-- Installation ---------------------------------------------------------------
will hopefully be helpful if you would like to write your own AI.
As dependencies, MetaLib also requires:
- Binary Heap, v.1 ('Queue.BinaryHeap-1.tar')
- Fibonacci Heap, v.2 ('Queue.FibonacciHeap-2.tar')
- Graph.AyStar, v.6 ('Graph.AyStar-6.tar')
-- Installation ---------------------------------------------------------------
The easiest (and recommended) way to install MetaLibrary is use OpenTTD's
'Check Online Content' inferface. Search for 'MetaLibrary.' If you have not
already installed the required dependant libraries, OpenTTD will prompt you
to download them at the same time. This also makes it very easy for me to
provide updates.
provide updates.
Manual installation can be accomplished by putting the
'MinchinWebs_MetaLibrary-5.tar' file you downloaded in the
'..\OpenTTD\ai\library' folder. If you are manually installing,
the libraries mentioned above need to be in the same folder.
the libraries mentioned above need to be in the same folder.

To make use of the library in your AIs, add the line:
import("util.MinchinWeb", "MetaLib", 5);
which will make the library available as the "MetaLib" class (or whatever
you change that to).

-- Noteable Changes in Version 6 ----------------------------------------------
* Road Pathfinder no longer chockes if a bridge doesn't have a parent path
* moved source to GitHub

-- Version History ------------------------------------------------------------
Version 6 [ date ]
Update license statement
Moved source code to GitHub and updated URL's
Road Pathfinder no longer chockes if a bridge doesn't have a parent path

Version 5 [2012-06-27]
Added MinchinWeb.Station.IsNextToDock(TileID)
Added MinchinWeb.Marine.RankShips(EngineID, Life, Cargo)
Added MinchinWeb.Marine.NearestDepot(TileID)
Ship depot builder no longer will build the depot next to a dock
you change that to).

-- Noteable Changes in Version 6 ----------------------------------------------
* Added Dominion Land System (DLS) which allows for grid based pathfinding
* Road Pathfinder no longer chockes if a bridge doesn't have a parent path
* moved source to GitHub

-- Version History ------------------------------------------------------------
Version 6 [2012-12-31]
Added Dominion Land System (DLS) which allows for grid based pathfinding
Update license statement
Moved source code to GitHub and updated URL's
Road Pathfinder no longer chockes if a bridge doesn't have a parent path

Version 5 [2012-06-27]
Added MinchinWeb.Station.IsNextToDock(TileID )
Added MinchinWeb.Marine.RankShips(EngineID, Life, Cargo)
Added MinchinWeb.Marine.NearestDepot(TileID)
Ship depot builder no longer will build the depot next to a dock

Version 4 [2012-01-30]
Added Log
Bug fix to Spiral Walker

Version 3 [2012-01-14]
Minor update; released to coincide with the release of WmDOT v8
Bug fixes and improvements to the Ship and Road Pathfinder
Road Pathfinder can now bridge over canals, rivers, and railroads

Version 2 [2012-01-11]
Major update; released to coincide with the release of WmDOT v7
Added the Ship Pathfinder (v2), Line Walker (v1), and Atlas (v1) classes
Added Constants, Station, Industry, and Marine (v1) class functions
Updated Extras (v.2) and Arrays (v.3)
Version 4 [2012-01-30]
Added Log
Bug fix to Spiral Walker
Version 3 [2012-01-14]
Minor update; released to coincide with the release of WmDOT v8
Bug fixes and improvements to the Ship and Road Pathfinder
Road Pathfinder can now bridge over canals, rivers, and railroads
Version 2 [2012-01-11]
Major update; released to coincide with the release of WmDOT v7
Added the Ship Pathfinder (v2), Line Walker (v1), and Atlas (v1) classes
Added Constants, Station, Industry, and Marine (v1) class functions
Updated Extras (v.2) and Arrays (v.3)

Version 1 [2011-04-28]
Initial public release; released to coincide with the release of WmDOT v6
Version 1 [2011-04-28]
Initial public release; released to coincide with the release of WmDOT v6
Included Arrays v2, Extras v1, Road Pathfinder v7, Spiral Walker v2,
and Waterbody Check v1

-- Roadmap --------------------------------------------------------------------
and Waterbody Check v1
-- Roadmap --------------------------------------------------------------------
These are features I hope to add to MetaLibrary shortly. However, this is
subject to change without notice. However, I am open to suggestions!
subject to change without notice. However, I am open to suggestions!
Road Pathfinder improvements (prebuild bridges and tunnels, upgrade
bridges)
Ship Pathfinder improvements
Replace Waterbody Check
bridges)
Ship Pathfinder improvements
Replace Waterbody Check

-- Known Issues ---------------------------------------------------------------
-- Known Issues ---------------------------------------------------------------
Pathfinding can take an exceptionally long time if there is no possible path.
This is most often an issue when the two towns in question are on different
islands.

-- Help! It broke! (Bug Report) -----------------------------------------------
islands.
-- Help! It broke! (Bug Report) -----------------------------------------------
If MetaLibrary cause crashes, please help me fix it! Save a screenshot (under
the ? on the far right of the in-game toolbar) and, if possible, the
offending AI, and report the bug to either:
offending AI, and report the bug to either:
http://www.tt-forums.net/viewtopic.php?f=65&t=57903
http://code.google.com/p/openttd-noai-wmdot/issues/

-- Helpful Links --------------------------------------------------------------
Get OpenTTD! www.openttd.org
TT-Forums - all things Transport Tycoon related www.tt-forums.net
-- Helpful Links --------------------------------------------------------------
Get OpenTTD! www.openttd.org
TT-Forums - all things Transport Tycoon related www.tt-forums.net
MetaLibrary's thread on TT-Forums: release announcements, bug reports,
suggetions, and general commentary
http://www.tt-forums.net/viewtopic.php?f=65&t=57903
http://www.tt-forums.net/viewtopic.php?f=65&t=57903
MetaLibrary and WmDOT on GitHub (source code, and Bleeding Edge edition)
https://github.com/MinchinWeb/openttd-metalibrary
To report issues: https://github.com/MinchinWeb/openttd-metalibrary/issues

My other projects (for OpenTTD):
WmDOT (an AI) http://www.tt-forums.net/viewtopic.php?f=65&t=53698
Alberta Town Names http://www.tt-forums.net/viewtopic.php?f=67&t=53313
https://github.com/MinchinWeb/openttd-metalibrary
To report issues: https://github.com/MinchinWeb/openttd-metalibrary/issues
My other projects (for OpenTTD):
WmDOT (an AI) http://www.tt-forums.net/viewtopic.php?f=65&t=53698
Alberta Town Names http://www.tt-forums.net/viewtopic.php?f=67&t=53313
MinchinWeb's Random Town Name Generator
http://www.tt-forums.net/viewtopic.php?f=67&t=53579
Progressive Rail Set http://www.tt-forums.net/viewtopic.php?f=67&t=63182

-- Licence -------------------------------------------------------------------
http://www.tt-forums.net/viewtopic.php?f=67&t=53579
Progressive Rail Set http://www.tt-forums.net/viewtopic.php?f=67&t=63182
-- Licence -------------------------------------------------------------------
Permission is granted to you to use, copy, modify, merge, publish, distribute,
sublincense, and/or sell this software, and provide these rights to others,
provided:
provided:
+ The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the software.
in all copies or substantial portions of the software.
+ Attribution is provided in the normal place for recognition of 3rd party
contributions.
contributions.
+ You accept that this software is provided to you "as is", without
warranty.

-- Included Functions ---------------------------------------------------------
warranty.
-- Included Functions ---------------------------------------------------------
Detailed descirptions of each of the function is given within the code files.
See them for further details of each function.

Expand Down
6 changes: 3 additions & 3 deletions library.nut
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Minchinweb's MetaLibrary v.6 [2012-12-24],
/* Minchinweb's MetaLibrary v.6 [2012-12-31],
* originally part of WmDOT v.10
* Copyright © 2011-12 by W. Minchin. For more info,
* please visit https://github.com/MinchinWeb/openttd-metalibrary
Expand All @@ -18,9 +18,9 @@ class MinchinWeb extends AILibrary {
function GetAuthor() { return "W. Minchin"; }
function GetName() { return "MinchinWeb"; }
function GetShortName() { return "LMmW"; } // William's MetaLibrary
function GetDescription() { return "Minchinweb's MetaLibrary for AI development. See the README for included functions. (v.6, 2012-12-24)"; }
function GetDescription() { return "Minchinweb's MetaLibrary for AI development. See the README for included functions. (v.6, 2012-12-31)"; }
function GetVersion() { return 6; }
function GetDate() { return "2012-06-27"; }
function GetDate() { return "2012-12-31"; }
function CreateInstance() { return "MinchinWeb"; }
function GetCategory() { return "Util"; }
// function GetURL() { return "http://www.tt-forums.net/viewtopic.php?f=65&t=57903"; }
Expand Down
6 changes: 3 additions & 3 deletions main.nut
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Minchinweb's MetaLibrary v.6 [2012-12-21],
/* Minchinweb's MetaLibrary v.6 [2012-12-31],
* originally part of, WmDOT v.10
* Copyright © 2011-12 by W. Minchin. For more info,
* please visit https://github.com/MinchinWeb/openttd-metalibrary
Expand Down Expand Up @@ -79,8 +79,8 @@ require("Dominion.Roads.nut")

class MinchinWeb {
function GetVersion() { return 6; }
function GetRevision() { return 0; }
function GetDate() { return "2012-12-21"; }
function GetRevision() { return 121231; }
function GetDate() { return "2012-12-31"; }
function GetName() { return "MinchinWeb's MetaLibrary"; }

static RoadPathfinder = _MinchinWeb_RoadPathfinder_;
Expand Down

0 comments on commit 9ea0058

Please sign in to comment.