ID:2670163
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
Very low priority, but any chance of having access to the command that gets called when taking a screenshot so we could override it / edit what happens when it gets called.

A couple of examples would be:
- disable the "screenshot has been saved to [location]" from appearing in the default output.
- allow us to add an overlay to it prior to the screenshot being taken.

The second example is currently possible with a basic, not-so-great workaround, but the first example is kind of annoying.
You can override it by editing the skin and making a macro for f2.
Not what I meant by overriding it. I want to have access to the command itself and override what happens when you take a screenshot.

e.g.
world/Screenshot()
do stuff
...
call default behavior
The client-side command is .screenshot, which you can call server-side via winset().

The command is client-side, so it doesn't call on any DM code or communicate with the server at all. To have any DM code run in response to the macro, you have to replace it with a verb that calls .screenshot via winset(). There's no possibility of a proc to override because procs are server-side.

For example, you can set a macro to this ("screenshot" instead of ".screenshot"):
client
verb/screenshot()
BeforeScreenshot()
winset(src, null, "command=.screenshot")
AfterScreenshot()

proc/BeforeScreenshot()
proc/AfterScreenshot()

I'm not sure if the server will wait for the screenshot command to finish before continuing, so you'll have to test it out.

As for avoiding the message to the default output, it'll have to be added as a flag somewhere, probably an argument to the .screenshot command. It wouldn't be something you specify in an override of a proc in DM since no proc exists. Or, you could avoid using a default output at all, sending all your messages via output() to a non-default output.
In response to Kaiochao
I'm not sure if the server will wait for the screenshot command to finish before continuing

It will not.