Are you saying that only one building which uses a particular resource, can be built in a city?
Not quite... this isn't something that should be built into the resource unit effect, it should be specificlaly implemented for the Wonders, for balance reasons.
So for example, there is no balance reason to block both a "spice silo" (+0.15 gold per spice) and a House Spice Corp (+3 gold per spice) from being in the same city.
But we should block having House Spice Corp (+3 gold per spice) and Guild Research Facility (+3 beakers per spice) from being in the same city.
So, the block is not built into the mechanic; it is defined only for very specific wonder combinations, for balance reasons.
The mechanic should be as general as possible; if a mod wants to have 5 different buildings that all give a bonus for a resource (like spice resource) and wants to allow them to all be in the same city, it should do that.
Similarly, there is nothing in the corporation mechanic stopping you from having multiple corps in the same city that use the same resource (I think), its just that the designers deliberately set corps that used the same resource to "compete" with each other, and thus not be present in the same city, for balance reasons. I don't think thats necessary though, is it?
So if you define two buildings which use the same resource but give any different benefits, the user may wish to unbuild the first to build the second, and there is no way to do that. How should we handle this?
a) The ordinary buildings shoudln't block, only the powerful wonders.
b) We handle this by forcing the player to plan; just like how in vanilla you have to plan because you can only have 2 national wonders per city. I don't see this as a problem. And the AI will just build the wonders in its best city that allows it to be built.
"shrines should be buildable even if they use the same resource" in the xml
Does this even need to be done in XML? I don't know how building blocks works, codewise.
But is creating a shrine from a great person the same as building it?
But I would imagine that the blocks would be set up for each wonder.
So: House Spice Firm cannot be built if CHOAM shrine, GRF or Presicence chamber are present in the city.
GRF cannot be built if HSF, PC or CHOAM shrine are present in the city.
CHOAM shrine can always be built (with a great prophet or trader), but only in the Landsraad holy city.
PC cannot be built if HSF, CHOAM shrine or GRF is already present.