News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

get demolition cost

Started by Yona-TYT, February 22, 2018, 06:35:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT




I need a function that allows me to obtain the demolition cost of an object.

Dwachs

For stuff with descriptors, it is usually equal to get_price. But there are exceptions. Removing of trees and fields are magic numbers. There is no function doing this right now. You can check the cleanup routines of the classes inside obj/
Parsley, sage, rosemary, and maggikraut.

Yona-TYT

It's funny, but the stations seem to have a fixed demolition price of 1,000.00 .... I wonder if this varies depending on the pakset? ... and if so, then if it makes sense to add a function that determines the price of demolition do not believe ??

Dwachs

Of course it makes sense to add such a function. However, as the calculation of demolition cost is scattered throughout the code, it is not that easy.

Quote from: Yona-TYT on February 22, 2018, 08:54:26 PM
It's funny, but the stations seem to have a fixed demolition price of 1,000.00 .... I wonder if this varies depending on the pakset?
This is intended. It is equal to the setting cst_multiply_remove_haus (haus == building), so can be set by pakset.
Parsley, sage, rosemary, and maggikraut.