The International Simutrans Forum

Development => Technical Documentation => Topic started by: jamespetts on April 28, 2012, 11:56:51 PM

Title: Location in code for checking elevated ways and upgrading buildings
Post by: jamespetts on April 28, 2012, 11:56:51 PM
I am considering implementing a feature in Experimental that would disallow building elevated ways over buildings of over a certain level (the threshold set in simuconf.tab), and similarly disallow the construction or upgrade of buildings beyond that level underneath elevated ways. May I ask - where can the code for checking whether an elevated way can be built and whether a city building can be built or upgraded be found? Also, are there any things in particular that I should look out for to avoid falling into obvious mistakes when implementing this?

Thank you in advance!
Title: Re: Location in code for checking elevated ways and upgrading buildings
Post by: sdog on April 29, 2012, 05:59:07 AM
this would also be a requirement for half-height bridges, needed for a half-height pak-set
Title: Re: Location in code for checking elevated ways and upgrading buildings
Post by: greenling on April 29, 2012, 08:36:29 AM
Jamespetts
I have be view a photo that be show a house under an elevated railwayline.
That photo was cam out Tokio Japan.
But i have quickly that Photo not to hand!
Title: Re: Location in code for checking elevated ways and upgrading buildings
Post by: jamespetts on April 29, 2012, 11:27:08 AM
Greenling,

indeed - smaller buildings, such as houses, should be permitted but not, say, tower blocks.
Title: Re: Location in code for checking elevated ways and upgrading buildings
Post by: greenling on April 29, 2012, 11:34:32 AM
Thank you.
Jet can in that better understand! :o
Title: Re: Location in code for checking elevated ways and upgrading buildings
Post by: prissi on April 29, 2012, 06:38:54 PM
wegbauer has this, at the same place where it check if the next tile is free to enter.

And citybildings search for  renovation / renovier in simcity.cc. I think it is step_gebaeude().
Title: Re: Location in code for checking elevated ways and upgrading buildings
Post by: jamespetts on April 29, 2012, 07:16:39 PM
Thank you - most helpful!