If a vehicle costs 21M - 42M, the cast in vehikelbauer have a wrong result. This should be the 'bug' caused the cheat bus. Or is this the intended behaviour? ;)
Index: bauer/vehikelbauer.cc
===================================================================
--- bauer/vehikelbauer.cc (revision 2589)
+++ bauer/vehikelbauer.cc (working copy)
@@ -164,8 +164,8 @@
dbg->fatal("vehikelbauer_t::baue()", "cannot built a vehicle with waytype %i", vb->get_waytype());
}
- sp->buche(-(sint32)vb->get_preis(), k.get_2d(), COST_NEW_VEHICLE );
- sp->buche( (sint32)vb->get_preis(), COST_****ETS );
+ sp->buche(-(sint64)vb->get_preis(), k.get_2d(), COST_NEW_VEHICLE );
+ sp->buche( (sint64)vb->get_preis(), COST_****ETS );
return v;
}
The cheat bus is somehow accepted, although the conversion would be also ok.
We could add a tool, which gives some money to the player - that would also ease the life of the AI :D
That could be named a bank! ;)
How to proceed now? Keep it as it is?
The cheat bus seems to be accepted, thus the consent was aparently to keept thing like they are.
Erm ... no one spoke up on this topic, so we should not jump to conclusions. I'd say we fix the bug, and the players have to use -freeplay, which was intended for money problems.
I also don't like all those "intended bugs"...
I agree with Hajo, it is a bug, there is a fix, if that fix is acceptable, then by all means apply it.
I think way cost and way maintenance cost are also possible to earn money, if you set minus value.
Both are uint32, so no negative value possible. But it maybe depends on the 'long' type:
long get_preis() const { return price; }
long get_wartung() const { return maintenance; }
There are two threds under Simutrans discussion and scenarios where this was discussed. If most people feel like this is needed I can apply it. I have no preferences on this topic.
Try to wrote negative value in .dat file, so that you can see.
Ok, added to trunk