Hi! The mighty light chair is returning for another appearance. This time, it seems after some quick testing, it seems tearing down and adding new walls works properly in regards to light sources being associated with the right positions. Turns out having a std::map that cannot work properly due to a faulty condition in operator<() in a containing type is not a good thing that may lead to overlapping mappings. While debugging that I had a minor epiphany about a potential off-by-one problem, but the code broke before that even mattered. Now both should be fixed though. 🙂
Still wrong is the calculation that should take the size of the containing room into consideration when calculating the ambient light intensity, same goes for light colour, which is not used at all yet. One step at a time. Bye!
Add the new configuration options for light information, move the data all the way to the python script, make it possible to use job messages even after an object was destroyed, implement add/move/remove light in the abstract light class
Hello! Once again a rather heavy commit touching many different files and places. After a lot of preparation the point to actually have a visual difference has come, still very much WiP and slightly buggy, but..behold
As you can see there is no model for light sources yet, so the chair model will have to do for now. When adding and removing rooms it will easily glitch out right now and not reset it tiles to their proper values. There is a problem with the light intensity calculation and the colour of light sources is still simply completely ignored. But it’s still quite nice to finally see a visual difference when adding a new light source. 🙂 Hopefully these bugs won’t take too long to resolve so that the system can be fleshed out more. Bye!
Hi! Finally being able to check a ticket off again, that’s nice! The life cycle callbacks work as intended, it looks something like this:
That’s all for today! Next up, exposing (some of) the object configuration to object scripts and then wiring up the light creation code to Python as well, let’s see if we can finally bring some (rudimentary) light to the nights. 🙂
Add callbacks to object scripts. Refactor object scripts to improve non-controllable script objects. Expose Pos3 class to Python (and refactor it on the C++ end to make it explicit). Add new object categories.
Hello! I’m pleased to announce that no scope creep whatsoever occurred in this commit. None. Anyway, here’s Wonde in this commit some things were prepared/started, while others almost finished. The big ticket item this time is probably the almost complete support for callbacks into an object’s Python script. The part I am not yet happy with are the passed arguments, but besides that the basic principle seems more or less sane. Also a lot of refactoring happened on the Python end, not as much in terms of code, but the actual class hierarchies and what exactly gets passed to object script constructors. Good stuff. Some more code is also being exposed to the Python API, that too is nice. New object categories (LightSource, FewTicksRequired, Togglable) were introduced, some only in name, others (half)implemeneted.. so.. no scope creep. Nothing to see here. Move along. Bye.
Hi! Once more nothing too exciting happening here, just the sudden realisation it’s probably a good idea to keep proper track of mappings when removing elements. One of these days this code will actually get to run. Stay tuned. 🙂