Skip to main content
Topic: Allow to build elevated road on anywhere (Read 4719 times) previous topic - next topic

Allow to build elevated road on anywhere

First.
In current simutrans, elevated rail/monorail can be built on anywhere - on road, on rail or on canal.
The other hand, elevated road can only be built on road. Building elevated road on  rail or on canal is impossible. But we can build canal or rail under elevated road.

So, I think this limitation is meaningless.



Second.
In current simutrans, we can be built elevated rail/monorail across road, rail, canal or monorail.
The other hand, elevated road can only be built across road or rail. Building elevated road across canal or monorail is impossible. But we can build canal or monorail under elevated road.

This limitation is also meaningless.



Last.
In current simutrans, we can be built elevated rail/monorail across other player's road, rail, canal or monorail.
The other hand, elevated road can only be built across other player's road. Building elevated road across other player's rail, canal or monorail is impossible. But we can build rail, canal or monorail under other player's elevated road.

This limitation is also meaningless.

Is is possible to build elevated road on anywhere as same as elevated rail/monorail ?

Re: Allow to build elevated road on anywhere

Reply #1
Does this
Code: [Select]
Index: bauer/wegbauer.cc
===================================================================
--- bauer/wegbauer.cc   (revision 2568)
+++ bauer/wegbauer.cc   (working copy)
@@ -604,17 +604,19 @@
                case str****e:
                {
                        const weg_t *str=to->get_weg(road_wt);
-                       // we allow connection to any road
-                       ok =    (str  ||  !fundament)  &&  !to->ist_w****er()  &&  check_for_leitung(zv,to);
-                       if(!ok) {
-                               return false;
-                       }
-                       ok = !to->hat_wege()  ||  check_crossing(zv,to,road_wt,sp);
-                       if(!ok) {
-                               const weg_t *sch=to->get_weg(track_wt);
-                               if(sch  &&  sch->get_besch()->get_styp()==7) {
-                                       ok = true;
+                       if((bautyp&elevated_flag)==0) {
+                               // we allow connection to any road
+                               ok =    (str  ||  !fundament)  &&  !to->ist_w****er()  &&  check_for_leitung(zv,to);
+                               if(!ok) {
+                                       return false;
                                }
+                               ok = !to->hat_wege()  ||  check_crossing(zv,to,road_wt,sp);
+                               if(!ok) {
+                                       const weg_t *sch=to->get_weg(track_wt);
+                                       if(sch  &&  sch->get_besch()->get_styp()==7) {
+                                               ok = true;
+                                       }
+                               }
                        }
                        if(ok) {
                                const weg_t *from_str=from->get_weg(road_wt);
fix this issues? I can't test it, because I have no elevated road. Maybe there is the same issue for elevated canals (are there any?) - and rivers  :D

Re: Allow to build elevated road on anywhere

Reply #2
(is it easily possible to add building on ocean? *whimper, whimper* ;D )


Re: Allow to build elevated road on anywhere

Reply #4
ah, I don't have the resources/capability to compile... Is there a chance for this to be done? Should I write up an extension request? (perhaps an option for simuconf if not everyone would want it)?

This would be really really awesome in my book -- bridges on water that don't have to be straight! That would be.... brilliantly awesome. :D

Re: Allow to build elevated road on anywhere

Reply #5
Well but this would make boat and planes useless. Very unlikely that this will end up in trunk.

Re: Allow to build elevated road on anywhere

Reply #6
Well but this would make boat and planes useless. Very unlikely that this will end up in trunk.

What does this means.
For me, this seems to be a bug report rather than an extension request.
What is the reason that road can't be build over track ?

@gerw
Thank you. It's working well.

Re: Allow to build elevated road on anywhere

Reply #7
What does this means.
For me, this seems to be a bug report rather than an extension request.
What is the reason that road can't be build over track?
I think, prissi refers to the "monorail over water".

Quote
@gerw
Thank you. It's working well.
Now we have to wait until it's commited to trunk :)

Re: Allow to build elevated road on anywhere

Reply #8
Well but this would make boat and planes useless. Very unlikely that this will end up in trunk.

Even as an option turned off by default? Because we can have unlimited-length bridges now... that's my logic, anyway.

Well, that's the reply I make, and unless you give me some compelling reason to discuss further, I'll drop the subject... I can see both sides of the argument, I think :)

Re: Allow to build elevated road on anywhere

Reply #9
The patch is incorporated in 2591. Thank you!
Parsley, sage, rosemary, and maggikraut.