OpenTTD

Powered by LeaseWeb
Tasklist

FS#2069 - Callback 30 for houses required

Attached to Project: OpenTTD
Opened by George (George) - Thursday, 12 June 2008, 07:08 GMT
Last edited by Remko Bijker (Rubidium) - Tuesday, 27 October 2009, 17:53 GMT
Type Feature Request
Category NewGRF
Status Closed
Assigned To No-one
Operating System All
Severity High
Priority Normal
Reported Version 0.6.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Industry tile can be located on slopes and have special graphics for them. There is a callback 30 to decide if default foundations need to be drawn.
But houses always have foundations drawn. I drew a house that should not use foundations, but I can't code it. Please provide this call back for houses.
This task depends upon

Closed by  Remko Bijker (Rubidium)
Tuesday, 27 October 2009, 17:53 GMT
Reason for closing:  Implemented
Additional comments about closing:  callback 0x14E
Comment by fonsinchen (fonsinchen) - Sunday, 09 November 2008, 10:52 GMT
It should be trivial to implement it, if you know how this is supposed to be specified. See the attached patch for an example.

However, I can't find the needed callback flags in the grfspecs, so I can't tell what CBM_HOUSE_DRAW_FOUNDATIONS and CBID_HOUSE_DRAW_FOUNDATIONS are supposed to be. There is no such thing as Action0HouseTiles and the callbacks for Action0Houses (property 14 and 1D) don't provide a means to query for foundations. Action0IndustryTiles does provide such a flag, but I don't see how this should apply to houses. You can't just use bit 5 in the house callback flags as this decides about the cargo amounts accepted.

Does this work in TTDPatch? If so, can anyone document it, please?
Comment by frosch (frosch) - Sunday, 09 November 2008, 12:08 GMT
No, there is nothing about that in the specs, as neither OTTD nor TTDP implemented that yet.

TTDP has some experimental support for custom foundations for stations though. (I call it experimental as it lacks most of the needed stuff mentioned below)

When it shall behave the same as for industries, we need
1) A custom-foundation callback.
2) A slope-check callback during construction.
3) A autoslope callback.
4) Maybe some flags to activate them, if needed.

Problems:
a) The slope-check cannot be done in the current allow-house-construction callback, as it is called only once for the house, and the exact position is not defined yet. (IIRC)
b) The current autoslope callback cannot detect in what way the slope will change. So currently all industries deny every autosloping, when they use custom foundations. This would mean a great impact on gameplay, when that would be the case for a lot of town houses.
c) The topic of "steep slopes" is very inconsistent across every aspect of slope checking.

Loading...