This piece of code is adding promotion to units with certain promotion, when they set forest plot.
Invisible is based on Submarines' one. Submarines are still quite easily detected.
It is quite hard to check if working at all (how it works, if works, on land units?).
First, check if code is properly adding promotion (just enter this unit on forest, make sure promotion icon is visible).
Second, pick Americanos and observe enemy civilization (i would add this promotion to warriors, so you can check everything in one game), map should have enough forest to not make you bored, but not too much, to make you easily observe.
I was expecting, invisible for land units to be some kind of counter against ranged attacks. I am afraid city is also detecting invisible units. Iirc in vanilla, you had to enter tile with submarine to detect it, now it is already detected if adjancent. You can even display the unit range movement and it will disable the tile with submarine even if not visible...
@Edit
Just checked Civ5UnitPromotions.xml:
You have to add:
Code:
<Invisible>INVISIBLE_SUBMARINE</Invisible>
instead true. It seems that you can make your own "InvisibleType" if you want. (Edit2: Nope, you can't without recompile DLL...)