In several of the mods I am working on I have been looking for ways to suppress the common messages, such as "press [M] for map", "press [D] for docking" etc...
The are a few reasons. Mostly I want to pass some messages to the player myself at the beginning of an adventure, and those other messages keep pushing them offscreen. Also, in some games the player may not need to dock at all, making that message obsolete and potentially confusing.
So, perhaps you already solved this problem with plyRedirectMessage, but since it's function signature is very lacking I am not sure. The only thing I have been able to make it do is kill messages completely, which is not good (no "Pause/Unpause", "Enemy Detected", etc. messages). So, is there some technique I have missed with this?
Also, you have plyClearShowHelpRefuel... but creating one such function for each built in message hardly seems like the right way to go.
So, I have a suggestion:
Deprecate plyClearShowHelpRefuel and enhance plyRedirectMessage to take a lambda as it's second argument, which receives the message to be redirected as it's only argument, and returns the message to be displayed, or nil if it should be suppressed. That would allow us to do:
Code: Select all
(plyRedirectMessage gPlayer (lambda (message)
(switch
(eq message "press [M] to see a map of the system")
(setq message nil)
(eq message "Enemy Detected")
(setq message "Captain, Klingon ships decloaking off port bow")
)
message
))
Any thoughts on this? Is it already possible to kill only some of the built in messages?