Change flashlights to run on batteries
Created by: dylanstrategie
This changes flashlights and all sub-types (except for flares, slime lamps and penlights for obvious reasons) to run on batteries. They start with a standard 1000 W battery and currently consume 2 W per tick (which lasts for roughly 16 minutes, assuming no lag, battery not changed and constant use, otherwise it naturally lasts much more)
- Updated blinding people with flashlights to actually use eyecheck()
- If you are blinded with eyewear that amplifies blinds (prescription or NVGs), you will be stunned for a short period of time (SHORT, 2.5 seconds for prescription and 5 for NVGs)
- Flashlights, lamps (both types) and lanterns now use batteries. They have sprites specific to it
- You can now open the cover of those three light appliances with a screwdriver, once the cover is open you can examine the light appliance to see the charge level. If the battery runs out the light shuts off. Naturally, high-caps can be put in batteries to have a flashlight that doesn't suck (even a 10 000 W will give a solid flashlight)
- When under a certain power threshold (40 % currently), appliances that run on batteries will start flickering. All flashlight sub-types except slime lamps and flares (due to particular coding) will flicker if a ghost spooks them
- Experimental rework on SetLuminosity code when flashlight sub-types are handled, it seems to work in general, although old problems might still persist (one about force-dropping items apparently)
- Flares start brighter (from 4 to 6) but dim rapidly (goes to 5 near instantly, then slowly degrades). This allows one to estimate how much fuel is left in flares and makes the area moodier as the flare burns out
- Give lanterns a in_hand sprite, and give all flashlight sub-types different in-hand sprites when lit or not (was not tested due to a .rsc file lockup, but it should work, SHOULD)
- Move flares from the generic left/right in_hand file directly to the flashlightsnlamps dmi
- Update descriptions to be less boring
- Flashlights from the autolathe start with no batteries. Apparently systems that use batteries will be included with ghettochem, and free public batteries are not an option, fine then
Discuss below