So I have been trying to fix the dome light in my truck for a while now and cannot seem to figure out how it works. The housing lens was missing when I bought the truck so the inside of the fixture was clear to see. The original fixture was in shambles and the metal pieces were corroded. I first tried to just put in a new bulb to see if that would fix it however it did not. I then decided to unmount the fixture from the chasis and noticed that there is only one lead to the bulb which I found very strange. The light had been rigged in a peculiar way. The positive lead met at the bulb and the switch was grounded to the bare metal of the cab, making it appear as though current actually ran through the chasis itself and when the switch was turned on it created a circuit between the positive lead and the negative lead.(the chasis) How is this possible? The bulb did indeed come on after having fiddled with the corroded switch. I figured, ok I guess Ill just fabricate a new fixture and install a new switch with the same wiring as the old one. But it did not work?
Ultimately my question is: How does the dome light function, and what is the proper way of wiring it?
The picture below shows what I am going for.