Infrastructure sharing 2.1.1

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure sharing 2.0 beta 3

Post by planetmaker »

2007Alain2007 wrote:why was a broken patch made if i might ask
The question would be "why do people make mistakes?" Oh well, they do. Also me.

The repository is always available for any person interested in the latest version of the patch. Not every version is worth a posting here - like the last "release" I sadly and erronously produced.
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: Infrastructure sharing 2.0 beta 3

Post by Ammler »

http://bundles.openttdcoop.org/is2/trunk-patches/ does have svn patches, which should work with tortoise too now.
User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: Infrastructure sharing 2.0 beta 3

Post by bigos »

I used openttd-is2-r17973-13760 svn with trunk (r17974) and get assertion failed after clicking Sharing button in company window... Used single player game.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure sharing 2.0 beta 3

Post by planetmaker »

Thanks for reporting. Use the next revision, there it should be fixed.
User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: Infrastructure sharing 2.0 beta 3

Post by bigos »

Hmm...
Why

Code: Select all

enum CargoClass {
	CC_NOAVAILABLE  = 0,       ///< No cargo class has been specified
	CC_PASSENGERS   = 1 <<  0, ///< Passengers
	CC_MAIL         = 1 <<  1, ///< Mail
	CC_EXPRESS      = 1 <<  2, ///< Express cargo (Goods, Food, Candy, but also possible for passengers)
	CC_ARMOURED     = 1 <<  3, ///< Armoured cargo (Valuables, Gold, Diamonds)
	CC_BULK         = 1 <<  4, ///< Bulk cargo (Coal, Grain etc., Ores, Fruit)
	CC_PIECE_GOODS  = 1 <<  5, ///< Piece goods (Livestock, Wood, Steel, Paper)
	CC_LIQUID       = 1 <<  6, ///< Liquids (Oil, Water, Rubber)
	CC_REFRIGERATED = 1 <<  7, ///< Refrigerated cargo (Food, Fruit)
	CC_HAZARDOUS    = 1 <<  8, ///< Hazardous cargo (Nuclear Fuel, Explosives, etc.)
	CC_COVERED      = 1 <<  9, ///< Covered/Sheltered Freight (Transporation in Box Vans, Silo Wagons, etc.)
	CC_SPECIAL      = 1 << 15  ///< Special bit used for livery refit tricks instead of normal cargoes.
};
is moved to src/newgrf_cargo.h ?

I cause this (I think) unnecessary changes:

Code: Select all

in src/cargotype.h
-static inline bool IsCargoInClass(CargoID c, CargoClass cc)
+static inline bool IsCargoInClass(CargoID c, uint16 cc)

and in src/network/network_server.cpp

-			case VEH_ROAD: type = IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? 2 : 1; break;
+			case VEH_ROAD: type = (v->cargo_type != CT_PASSENGERS) ? 1 : 2; break;
And few header missing but easy to find.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure sharing 2.0 beta 3

Post by planetmaker »

Without checking too closely, I'm pretty sure the changes you ask about are changes made to trunk but is nothing we introduce with this branch.
User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: Infrastructure sharing 2.0 beta 3

Post by bigos »

Yea my bad. In last rev they moved it... but now you know what to fix ;) hehe
User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: Infrastructure sharing 2.0 beta 3

Post by bigos »

Maybe you already know but i will report it any way... In multi-player if someone change shearing settings other players get spammed about it... Closing this news doesn't work - it aper one after another. My settings are: "On, individual settings" and Delay 1 month... rest not important here.
Hirundo
Transport Coordinator
Transport Coordinator
Posts: 298
Joined: 27 Jan 2008 13:02

Re: Infrastructure sharing 2.0 beta 3

Post by Hirundo »

bigos wrote:Maybe you already know but i will report it any way... In multi-player if someone change shearing settings other players get spammed about it... Closing this news doesn't work - it aper one after another. My settings are: "On, individual settings" and Delay 1 month... rest not important here.
Thanks for the report, we will look into it.
Create your own NewGRF? Check out this tutorial!
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure sharing 2.0 beta 3

Post by planetmaker »

Salut folks,

there's are now new binaries available thanks to OpenTTD's compile farm which produced them for us for all major platforms (thanks Rubidium for providing them). They're found at the usual place http://bundles.openttdcoop.org/is2/IS2.0-beta5/ (and no one noticed that they're there already for two days... without any announcement ;-) ) The repository is up to trunk r17973.

Please test the patch extensively and report any errors which you find in this thread or at the corresponding project at the DevZone. Most of all though: enjoy! :-)

What did change (wrt beta4)?
13761: [IS] Fix: Properly set the sharing window capacity in all cases, fixing what used to be an assertion failure.
13760: [IS] Doc: More documentation added and existing documentation cleaned up.
13759: [IS] Doc: (closes #607) Document all stuff that wasn't already documented in the infrastructure* files. Fix some line endings in the process.
13758: [IS] Codechange: Use true/false instead of 1/0 in SetFill().
13629: [IS] Fix: (fixed #608) Removing a company could, in some cases, create an invalid state, causing an assertion failure later.
13628: [IS] Codehange/Fix: Compute the scroll count of the sharing window in a separate function. Call this function in the constructor, so the scroll count is set correctly when opening the window.
13627: [IS] Fix: (fix #609) Crash when opening the sharing window.
13626: [IS] Fix: Depot view would cause hang. Better always check things twice after a merge...

and between beta4 and beta3:
13358: [IS] Codechange: Remove some unneeded code.
13357: [IS] Codechange: Use SetStringParameters instead of DrawWidget when appropriate.
13356: [IS] Codechange: Use Window::GetWidget instead of directly referencing window::nested_array.
13195: [IS] Change: use the new shiny toy ScrollBar::IsVisible.
13194: [IS] Cleanup some minor stuff.
13193: [IS] Fix: line endings of company_gui.cpp.
13192: [IS] Add: GPL license text to all IS files.
12958: [IS] Change: Move strings around in english.txt and rename them to stay compatible with the latest changes in trunk.
12832: [IS] Feature: Make the line height in the sharing window dependant on font height.
12831: [IS] Fix: Orders of type OT_GOTO_WAYPOINT now always have a Waypoint as their destination.
12638: [IS] Add: /* $Id$ */ to the top of each new file (infrastructure_xxx).
12637: [IS] Cleanup: some minor cleanups here and there.
12636: [IS] Fix: SharingMOde contained an unneccessary capital.
12635: [IS] Fix: The string 'Changes will take effect in:' should also influence the minimum width of the sharing window.
12634: [IS] Codechange: HandleSharingChange only needs to know whether trains were removed, their number is irrelevant. Therefore some code can be simplified.
12633: [IS] Doc: A "hack" that is used in trunk is not a hack, so do not document it as such.
12632: [IS] Fix: Stations can never be owned by OWNER_WATER, so checking for it is not needed.
12631: [IS] Cleanup: Use MemSetT instead of a for-loop when setting all items in an array to 0.
12630: [IS] Cleanup: don't use this->windownumber when a local variable can be accessed with the same value.
12629: [IS] Fix: Missing IsHangarTile() in CmdBuildAircraft.
12628: [IS] Codechange: move the sharing 'block' in table/settings.h to a different location.
12627: [IS] Codechange: Enumify the possible values for the sharing mode.
12626: [IS] Codechange: a bit of cleanup in UpdateSharingEnabled.
12625: [IS] Codechange: FORCEINLINE the most-used functions of the sharing struct.
12624: [IS] Codechange: Add a break statement when continuing the loop is pointless.
12623: [IS] Don't store pointers to sharing_current and sharing_future in the sharing window class, as we can easily fetch those when we need them. They are now locally cached in OnPaint since that is the place we require them the most.
12622: [IS] Feature: Implement GetWidgetContentSize for the sharing window. In layman's terms, it means that the window now adjusts itself to the size of the text (horizontally at least).
12621: [IS] Fix: Adjust the nested widgets of the sharing window, so it looks better when using a non-standard font size.
12613: [IS] Fix: Remove trailing whitespace.
12612: [IS] Fix: Line endings of smallmap_gui.cpp.
12611: [IS] Change: Improve the doxygen comment for IsStationUsageAllowed.
12610: [IS] Codechange: More codestyle fixes and deduplication in infrastructure_func.h.
12609: [IS] Codechange: Unify IsStationUsageAllowed, removing duplication of code and comments and increasing clarity.
12608: [IS] Fix: The OT_WAYPOINT change for ships made some further adjustments neccesary which I initially missed.
12607: [IS] Revert: (partially) the last commit. IsStationUsageAllowed may not be needed, but it doesn't hurt either and provides some future compatibility.
12606: [IS] Fix: (rLastCommit) Don't commit at 2 am. Buoys have no owner and are always allowed, calling IsStationUsageAllowed() for them is pointless.
12605: [IS] Change: Since buoy orders are now of type OT_WAYPOINT, adjust the IS code code to accommodate that.
12558: [IS] Codechange: Use the new shiny toy Window::DrawWidget a bit.
12512: [IS] Codechange: some signed variables made unsigned in the GUI code.
12511: [IS] Fix: [Bug #289] missing return statement in smallmap code, causing a compile warning.
12510: [IS] Silence some compile warnings. This partially fixes issue #289
12509: [IS] Codechange: [YAPF] Store the owner of the track in the TILE struct.
12508: [IS] Fix: Make the track follower always return EC_OWNER instead of EC_NO_WAY when the tile cannot be accessed due to ownership issues.
12507: [IS] Fix: Use INVALID_TILE and INVALID_TRACK where appropriate.
12482: [IS] Fix: Only sell ships that are *stopped* in a depot on a sharing change, since ships can move through others' depots.
12481: [IS] Codechange: remove some superfluous newlines.
12480: [IS] Fix: move a comment to the appropriate location.
12342: [IS] Codechange: update scroll information on data invalidation instead of on paint. When invalidating a window, invalidate its data where applicable.
12341: [IS] Codechange: Enable/disable buttons in the sharing window only when required.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Infrastructure sharing 2.0 beta 3

Post by petert »

I have updated the Wiki, but I still need the revision for IS2.0-beta4 and the development versions for IS2.0-beta4 and beta5. Where can I find them?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure sharing 2.0 beta 3

Post by planetmaker »

petert wrote:I have updated the Wiki, but I still need the revision for IS2.0-beta4 and the development versions for IS2.0-beta4 and beta5. Where can I find them?
In the repository, of course ;-)

Code: Select all

:~/ottd/is2> hg tags
tip                            13764:fdaf099a0b3e
IS2.0-beta5                    13762:1767ebc9758c
IS2.0-beta4                    13623:2d98b8a58b40
IS2.0-beta3                    12336:56a047d6bab4
IS2.0-beta2                    11863:4cd407daac0d
IS2.0-beta1                    11353:b40dd43fc1f2
EDIT: The revisions shown here before the colon are the mercurial revisions. They bear some relation to the svn revision, but in branches like this one no constant or clear one. After the colon follow the hash codes.

Thanks for updating the wiki!
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Infrastructure sharing 2.0 beta 3

Post by petert »

I'm confused, the wiki already had "(r16532M/h56a047d6)" for IS2.0-beta3, but that is different from yours,

Code: Select all

12336:56a047d6bab4
Why are they different then the hg tags? (Other than mercurial revisions?)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure sharing 2.0 beta 3

Post by planetmaker »

petert wrote:I'm confused, the wiki already had "(r16532M/h56a047d6)" for IS2.0-beta3, but that is different from yours,

Code: Select all

12336:56a047d6bab4
Why are they different then the hg tags? (Other than mercurial revisions?)
The reason is simply that that subversion is used for a longer time, thus has more commits. When development of OpenTTD started, only a subversion repository was available, mercurial only introduced later. SVN r16532 corresponds to the 12336th commit of the mercurial repository.

The leading 'h' in mercurial's hash is of the same use as the leading 'r'.
User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: Infrastructure sharing 2.0 beta 3

Post by bigos »

Tried merge IS2 with current trunk (r18037) but its total mess. Hope you clean it up fast (I'm to lazy ;) ).
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: Infrastructure sharing 2.0 beta 3

Post by Ammler »

bigos wrote:Tried merge IS2 with current trunk (r18037) but its total mess. Hope you clean it up fast (I'm to lazy ;) ).
Please, don't use the release patch for other revision than svn r17973. It has some "special" release changes, which i.e. do change the revision name for multiplayer servers...

You could use the newer patches like http://bundles.openttdcoop.org/is2/trun ... 4.svn.diff for usage in patch packs and such. It is the same patch, except the revision name.

Greets
Ammler
User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: Infrastructure sharing 2.0 beta 5

Post by bigos »

I'm not talking about realise. I'm talking about last trunk from http://mz.openttdcoop.org/hg/is2.
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: Infrastructure sharing 2.0 beta 5

Post by Ammler »

bigos wrote:I'm not talking about realise. I'm talking about last trunk from http://mz.openttdcoop.org/hg/is2.
You don't need to merge with trunk, it is already in.
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Infrastructure sharing 2.0 beta 5

Post by Gremnon »

Ammler, can I ask you rephrase your post right above this one? To me, your post suggests that IS got merged into trunk, not the other way round.
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: Infrastructure sharing 2.0 beta 5

Post by Ammler »

Gremnon wrote:Ammler, can I ask you rephrase your post right above this one? To me, your post suggests that IS got merged into trunk, not the other way round.
The repo from the URL bigos posted does include merges of trunk from time to time, simply run ./findversion.sh on the repo to find out the last openttd trunk merge...

or use the search function...
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 10 guests