mifki / df-twbt

Text Will Be Text
192 stars 30 forks source link

Material flags for overrides. #76

Closed RosaryMala closed 6 years ago

RosaryMala commented 6 years ago

This update allows overrides to optionally check the material flags of whatever is being overridden.

Currently, any overrides that use material flags need to be set first, before overrides that apply to all materials.

I also made some changes to the visual studio files to make it easier to build in windows.

pronvit commented 6 years ago

Please set mat_overrides = true; right when reading the config file.

Also, I don't really like MapCache being used here - you will probably need material info just for a few tiles while MapCache will collect all data (some of which is not used) for all tiles in corresponding map blocks. It also does some expensive processing of FROZEN_LIQUID tiles which also seems to be not required for our needs. So someone will need to change this eventually to direct reads for only the tiles you need.

RosaryMala commented 6 years ago

Yeah, mapcache can be a bit expensive, but it does do a lot of stuff for us that would otherwise make reading the material per tile rather difficult. Probably the best course of action would be to make a lite version of the mapcache class that only reads the material and does nothing else.

That sad, I already only invoke mapcache at all once a tile is encountered with an override that references the material flags, in which case, it does the calculations once per block.