I'm sorry, my point was not clear.
I wanted to say about more simple function.
Currently workers harvesting resources don't return to main building until their load become full, or once cancel their harvesting order and command harvesting order again. It's inconvenient when the emergent need of correct resources and evacuate workers.
So I want that order workers to return to main building and drop off resources by selecting the target workers, then simply clicking main building like castles.
But "Ringing alarm bell" like feature which Ishmaru mentioned will be also very interesting. I remember Rise of Nations and AOE had such features. If possible, I also want it.
Concerning the original feature proposal, I agree that it would be useful. I didn't realize we didn't already have such a feature. However, I fail to see how well an "alarm bell" feature like that of AoE would work. If it only affects idle workers, then it's likely useless in most cases (dunno about most of you, but if a sizable portion of my workers are idle, I'm probably doing something wrong). As well, that only really worked in AoE because the workers would enter the main building and shoot arrows out from it. MegaGlest doesn't have transport units. And if the ringing bell did affect harvesting units (we'll assume we want to keep repairing/building units where they are), there's still the question of where the units will go. If the workers are all outside of the foe's range, then they're just losing production to abandon their harvesting while they weren't threatened.
The way I see it, in order for a ringing bell function to have any plausible use, there'd need to be transport units (to garrison the workers inside the building), units would have to be able to fire out of garrisoned buildings (hint, steal GAE's code), it'd have to be possible to add an attack skill to units only when they're inside that building (don't want workers normally attacking, right?), and the workers would have to be able to return to their locations once the alarm bell function is turned off (that means continuing the resource they were building, etc). Preferably there'd also be an option to determine whether or not resource harvesting units are affected by that, preferably an ingame toggle. Overall? Sounds like an awful lot of work. But the "right click a building to return carried resources" function definitely sounds good.