Been experimenting seeing if I can figure out how to use
I think I on the right track, but missing or set it all wrong.planetmaker wrote:WATER_CLASS_XXX XXX = [NONE | SEA | CANAL | RIVER]
I practicing with the Fish Farm to see if can get it to build on lakes and water that not connected to the oceans.
I've manage to work out how to make it and the Oyster Farms build closer to the shore. But not getting the code right to say ok to build at SEA, CANAL and RIVER.
switch (FEAT_INDUSTRIES, SELF, seafoods_grounds_seafoods_grounds, industry_count(seafoods_grounds) * 3 / 4 / industry_clusters != 0 && ( industry_distance(seafoods_grounds) < 16 ||
industry_distance(seafoods_grounds) > 60) ) { 1: return CB_RESULT_LOCATION_DISALLOW; return CB_RESULT_LOCATION_ALLOW; }
switch (FEAT_INDUSTRIES, SELF, seafoods_grounds_fishing_harbour, industry_distance(fishing_harbour)) { 0 .. 16: return CB_RESULT_LOCATION_DISALLOW; seafoods_grounds_seafoods_grounds; }
switch (FEAT_INDUSTRIES, SELF, seafoods_grounds_coastal_distance, water_distance) { 0 .. 10: seafoods_grounds_fishing_harbour; return CB_RESULT_LOCATION_DISALLOW; }
switch (FEAT_INDUSTRIES, SELF, seafoods_grounds_check_location, ( (extra_callback_info2 == IND_CREATION_FUND) || (extra_callback_info2 == IND_CREATION_PROSPECT) ) )
{ 1: return CB_RESULT_LOCATION_ALLOW; seafoods_grounds_coastal_distance; }
switch (FEAT_INDUSTRYTILES, SELF, seafoods_grounds_land_check, nearby_tile_water_class(0,0) == WATER_CLASS_NONE) { return CB_RESULT_LOCATION_DISALLOW; }
switch (FEAT_INDUSTRYTILES, SELF, seafoods_grounds_land_check, nearby_tile_water_class(0,0) == WATER_CLASS_SEA) { return CB_RESULT_LOCATION_ALLOW; }
switch (FEAT_INDUSTRYTILES, SELF, seafoods_grounds_land_check, nearby_tile_water_class(0,0) == WATER_CLASS_CANAL) { return CB_RESULT_LOCATION_ALLOW; }
switch (FEAT_INDUSTRYTILES, SELF, seafoods_grounds_land_check, nearby_tile_water_class(0,0) == WATER_CLASS_RIVER) { return CB_RESULT_LOCATION_ALLOW; }
switch (FEAT_INDUSTRYTILES, SELF, seafoods_grounds_location_check, nearby_tile_water_class(0,0) == WATER_CLASS_RIVER) { seafoods_grounds_land_check;
Get the message seafoods_grounds_land_check has already been defined ..
Can I ask for some help where I going wrong while I still got some hair left on my head.

Thank you kindly
EDIT:
Might have asked to soon as think I found solution. I removed the reference to Canal and River and now it building on the Lakes .. but also wonder maybe first several tests I did for random maps it just happened that they didn't build on any lakes.