[DNM] Light Replacer Snazzification
Created by: Exxion
I started working on this yesterday. It's almost finished, but not quite. To do:
-
Change the one in the janitor's locker to loaded/mixed -
Make borg light replacers... work -
Possibly make advanced variant with more customizability in where it puts removed lights (ex: option to only put HE lights in supply and put normal lights in waste whether they work or not)Nah I'll do that later (if ever) -
Think of more things for this list -
Fix silly description error and huge space in interface window -
Changelog -
Re-add manufacturing of bulbs from glass -
target.rigged = emagged || best_light.rigged
This PR greatly alters the light replacer. Rather than magically transmuting all lights and glass sheets into whatever light it happens to be used on and dropping the old one on the ground, the light replacer now draws lights from an inventory and places the ones taken from fixtures into an inventory.
- Light replacer now holds two boxes
- Only accepts /obj/item/weapon/storage/box/lights and its subtypes for these boxes
- One box is its light supply
- Lights inserted into fixtures are drawn from this supply
- Chooses the "best" light in its supply box that is compatible with the fixture it is used on
- At the moment, it just prioritizes HE lights over regular ones
- If it has a light that is "better" than the current one in the fixture, it will replace the one in the fixture, regardless of whether or not the one in the fixture works
- If it does work, it is placed into the supply box
- Interface popup (accessed by clicking the light replacer in your active hand) says how many of each type of light the supply box has
- The other box is its waste container
- Broken or burnt-out lights inserted into the light replacer go in here
- Interface readout says how full this is, but not what types of lights it contains, as they should all be broken
- Interface popup allows either box to be ejected
- Boxes can, of course, be inserted
- If you attempt to insert a box, it first tries to use it as the supply, then tries to use it as the waste container if it already has a supply container. Obviously fails if it has both.
- Lights can be inserted the same way as before, too, though it's generally much slower than just replacing the supply/waste box
- Working ones inserted this way go into the supply box, broken/burnt-out ones go into the waste box
Webm demo: https://www.dropbox.com/s/8s2hployrjt155y/2015-06-01_16-20-05.webm?dl=0
Fixes #4972 (closed) Fixes #4988 (closed)