The International Simutrans Forum

 

Author Topic: Shouldn't monuments have build_time?  (Read 1983 times)

0 Members and 1 Guest are viewing this topic.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2908
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Shouldn't monuments have build_time?
« on: October 17, 2015, 09:22:15 AM »
Correct me if I'm wrong, but shouldn't monuments have the build_time parameter?

I'm asking because apparently we don't write that info in the pak file: (from \besch\writer\building_writer.cc\)
Code: [Select]
else if (!STRICMP(type_name, "cur")) {
extra_data = obj.get_int("build_time", 0);
level      = obj.get_int("passengers",  level);
utype      = extra_data == 0 ? haus_besch_t::attraction_land : haus_besch_t::attraction_city;
}
else if (!STRICMP(type_name, "mon")) {
utype = haus_besch_t::denkmal;
level = obj.get_int("passengers",  level);
}
else if (!STRICMP(type_name, "tow")) {
level      = obj.get_int("passengers",  level);
extra_data = obj.get_int("build_time", 0);
utype = haus_besch_t::rathaus;
}

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5543
  • Languages: EN, NO
Re: Shouldn't monuments have build_time?
« Reply #1 on: October 17, 2015, 11:19:38 AM »
Since monuments are unique on the whole map, unlike attractions and town halls, they probably have another trigger than the population of a city.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2908
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Shouldn't monuments have build_time?
« Reply #2 on: October 17, 2015, 06:46:56 PM »
From what I can see in simcity.cc, a monument is built as long as:
  • No city attraction can be built at the give moment;
  • The city has more than 512 inhabitants;
  • The monument is not already in the map;

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9566
  • Languages: De,EN,JP
Re: Shouldn't monuments have build_time?
« Reply #3 on: October 17, 2015, 07:57:39 PM »
Monuments will be built everytime a city passes 512 bev. Maybe there was also a random counter involved though.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5543
  • Languages: EN, NO
Re: Shouldn't monuments have build_time?
« Reply #4 on: October 17, 2015, 09:34:04 PM »
In any case, it works differently and doesn't need build_time.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2908
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Shouldn't monuments have build_time?
« Reply #5 on: October 17, 2015, 09:40:49 PM »
Fine, but looks strange as limits the number of monuments built.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5543
  • Languages: EN, NO
Re: Shouldn't monuments have build_time?
« Reply #6 on: October 17, 2015, 09:57:12 PM »
That's precisely the point. Monuments, at least in pak64, is a transcendental thing piercing the fourth wall. One might argue that they should all be present when the map is created, and if one is removed during the game, it should immediately appear somewhere else.