The International Simutrans Forum

 

Author Topic: get demolition cost  (Read 1818 times)

0 Members and 1 Guest are viewing this topic.

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1193
    • Simutrans-BLOG
  • Languages: ES
get demolition cost
« on: February 22, 2018, 06:35:19 PM »



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

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4587
  • Languages: EN, DE, AT
Re: get demolition cost
« Reply #1 on: February 22, 2018, 08:14:13 PM »
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/

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1193
    • Simutrans-BLOG
  • Languages: ES
Re: get demolition cost
« Reply #2 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? ... and if so, then if it makes sense to add a function that determines the price of demolition do not believe ??

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4587
  • Languages: EN, DE, AT
Re: get demolition cost
« Reply #3 on: February 23, 2018, 06:37:05 AM »
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.

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.