Mmm. just thinking out loud.
Sounds there might be a (temporary?) crop/beehive buffer in play here that's not linked directly to the beehive. That buffer might need some time to reset (with no beehive around, or no crop action for that matter.), Or if beehives are swapped relative fast its just continues like there was no beehive swap.
- Thinking that minimap (100x100 map-tile) sectors might have something to do with this.
-- because beehives are limited to a 3x3 sectors area, with the beehive in the center sector (any location in that sector).
- Sectors: see RoB:MvGulik/Other_Stuff#Visibility_Tiling
When you say buffer, do you mean specific to the tile grouping? Or to the hive?
From a game development perspective there's a few ways to do this.
Type A) Tile data stored in a database with tables/rows.
1) A Cron job that runs on the server, and does an update query on all crops at once, and they could easily have a value for a boolean : beehive_radius, and update time accordingly in "ticks" based on the crop type, and the beehive_radius.
2) The same but based on the hives, doing some coordinate math to determine number of crops witin radius, and quality thereof.
Type B) Tile data stored in serialized objects kept in memory for updates, and db for backup/persistence
1) per crop tick that includes a state change (stage) that does an message to its parent object (in this case the beehive) with quality information.
4) per beehive tick simply checks # of crops and quality information within its radius, and accumulate in its object values.
(this one assumes the crop stages happen separately, which seems logical given that plenty of crops don't have beehives).
Based on the data so far, we know the beehive accumulates data beyond a single crop cycle. (Beyond dozens it seems), so its likely its doing an aggregate pollination value on each tick.
Building a new beehive and placing on a existing crop seems to reset this, so the data likely resides in the beehive, not the crops themselves.
High ql crops produce high ql honey/wax (product) regardless of beehive ql.
Same or better crops on multiple cycles see a degradation of product over time, not a natural increase. (this really needs more data points).
Also need data to know if an unused beehive will ever reset. Ie, if we let it run one creation cycle on a small control group of crops. Then put it out of range of any crops for a long time (few weeks), then place it back in rotation with the same control group (same type, number, and ql). That should determine if there is any natural decay on the pollination value, or if its simply a static value incremented based on crop ticks.
Best way to further isolate would be building a fresh beehive, and use a small amount of crops with a short time (carrots) with a static ql across all crops, and slowly increment with fresh beehives until we know the exact number of crops/harvests to see a fresh beehive produce one unit of honey.
Then see if we can reproduce those values with repeat experiments and develop additional tests using that control to find differences (depending on how static it is, if we can determine for example that 15 carrots of ql 20 always results in ql 20 honey after 1 harvest, or if its variable (prolly is, but how much).
Meh, too much typing. I know beehives aren't this big of a deal, but I do game dev on the side, and its fun to figure out how things work. =)
Edit: Typos, grammar.