Also, just to add a note. Not saying it couldn't be done, but from a programming stand point Line-Of-Sight calculations eat more CPU cycles than straight distance calculations.
Since GavJ actually mentioned the other side of the coin (source changes)
The actual change to the COMPUTER CODE on Toady's end is exactly identical in both of the usages you described above -- the suggestion is merely to add the tags for players to choose to add as they see fit.
I thought I would provide an example.
There are 4 cases of breeding under discussion [The original, the current, proposed x range, x range + los/wall detection]
The first being the easiest:
IF map.unitList contains validMate THEN pregnant = true;
followed closely by:
IF map.unitList contains validMate AND distance <= 1 THEN humpaHumpa = true;
just adding a Raw_tag:
IF map.unitList contains validMate AND distance <= distanceTagValue THEN getDownTonight = true;
finally:
IF map.unitList contains validMate AND distance <= distanceTagValue THEN
src = getPosition(unit)
des = getPosition(target)
distanceX = des.x - src.x
distanceZ = des.z - src.z
distanceY = des.y - src.y
floorMatrix = array()
foreach(x in distanceX)
foreach(z in distanceZ)
foreach(y in distanceY){
floorMatrix[x][z][y] = isWalkable(x,z,y) // true/false
}
foundPath = computePath( floorMatrix ) // run each combination of values looking for a valid path
IF foundPath = true THEN notTonightDearIHaveAHeadache = true
This is all just short hand pseudo code, I'm generalizing and simplifying of course the first 3 probably require more than 1 line of code each, but they reasonably could be single statements. But to have every animal on the map check for walls each mating cycle, easily double or triple my example in lines of real code, and potentially hundreds of iterations for each loop.
Heh, ok this really turned out longer than intended, please don't take it as a rant I'm just demonstrating what the different styles of breeding code might look like.