mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 06:40:42 -07:00
6de122c9f8
## Link to GitHub Issue, if one exists Fixes https://github.com/spice2x/spice2x.github.io/issues/179 ## Description of change Previously, lights.read() did not accept any parameters, instead it returned all lights implemented by the current game. Problem is that this is too large for some embedded implementations; also just inefficient. Add code to accept light names as strings and only return those in the result. For performance, use `robin_hood::unordered_map` to speed up the lookup operation, which was previously a linear search. Add this to Python wrapper library. Did not bother with others. Also, as a bonus - update lights.write_reset() to also accept a flat list of strings, as opposed to array containing a string, which was silly. ## Compiling ➕ ## Testing Tested using spiceremote and writing a short Python program.