I've hacked the trigger system to create a really basic teleport pad,
using the dirt tile as an indicator. This behaviour is not coded into the
engine, but is in fact scripted in lua.
This commit is messy, due to lack of sleep.
There was a bug in the entity API, where getMotion() was pushing the
origin instead of the motion. This has been corrected. Since this is an
important bug, and because the features for this leg is finished, I'll
merge this to master.
I need to devise a way to update the clients about changes to their
characters directly from the lua scripts. This isn't too important per se,
but the pattern will be important for the monster and trigger systems.
I've added a simple edge-smoothing function to debug island's generator. It
doesn't handle all edge cases (pun intended), but the proof of concept is
sound. I just wish I could release this...
I've also added exception checks to region.cpp
This is my solution for handling inheritance via lua. The Entity class is
only a base class, so the entity API is designed to be copied from, rather
than used directly.
linit.c: It should be noted that the Entity API must always be placed
before the utilizing child APIs. I don't know about how lua handles things
internally, but I'm assuming that this is the case.
There's no real meat in the API code yet, since that's just busy-work.
Right now I feel beter about writing the connective tissue. This case
could aslo extend to the waypoint and monster APIs.
The waypoint system had some API and class methods removed for brevity.
I actually don't remember what the RoomData's lua references where for,
but I'm pretty srue it wasn't this. I'll figure something out when I've
had a sleep.
* Manual modifications to the database caused the map to act unusual
* The server's packet must be created and deleted as a char array
* removed UnloadAll() from several singleton destructors
* added SDL_Delay() to BaseScene::RenderFrame(), to reduce heavy CPU use in menus
The APIs have access to the solid data, and I fixed a bug: Basically, the
template parameter for std::bitset expects an integer representing the
number of bits to hold, but I initially misread it as the number of bytes.
This has been corrected.
I've also added a sandy beach to the generated island. I'm tempted to
start working on some simple generators soon.
region_api.cpp had a bug, where a glue function's name was used twice. It
was an easy catch, but there was an issue in the new script, where I was
counting from 0 instead of 1. As a result, I was chasing a segfault for 5
hours.
I've added lua hooks for both pager functor classes. Hopefully, I haven't
missed any corner cases, because it took me a while to hunt everything
down. One issue is that the map's save directory needs to be set in the
Format class, but it'll do for now. I'll review this again when I've got
more than one map running at one time.
There should be enough here for a lua-driven map generator to be
implemented, even if it's a bit rough. I think I'll test this out in the
editor eventually, but getting the base branch's network map code going
comes first.
The current process is extremely convulted, so I need to document
everything that I've done so far, including C++ and lua functions.