There are actually two distinctly different sorts of sys_* functions defined in base/system.lua: blank ones ready to be overridden, and useful ones that already perform useful tasks for the base code. There are also some that are in-between, like sys_character_die.
As many of you have already noticed, base/hooks.lua contains various h_* hook functions. The purpose of these hook functions is that they are called by complex base code functions in order to make changing certain behaviors easier without having to override and copy/paste an entire hugely complicated base code function-- but, to make things even more confusing, some of the complex sys_* functions have their own h_* hooks.
It's a little bit of a mess. I'd like to clean this up so that the functions that can be easily overridden are all in one place, or two places, depending on how useful the distinction is between h_* and sys_* functions (for the dungeon designer, probably almost useless!); perhaps I should move all of the easily overridden sys_* functions into base/hooks.lua as well.
Any thoughts are welcome.
Two different kinds of sys_* functions
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- Gambit37
- Should eat more pies
- Posts: 13719
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Two different kinds of sys_* functions
Since I hardly understood a word of that, I'll let others give you more valuable feedback