mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-10 12:41:35 -10:00
52 lines
1.4 KiB
C++
52 lines
1.4 KiB
C++
#include "fictionviewer.h"
|
|
|
|
namespace scripting {
|
|
namespace api {
|
|
|
|
//**********HANDLE: cmd_briefing
|
|
ADE_OBJ(l_FictionViewerStage, fiction_viewer_stage, "fiction_viewer_stage", "Fiction Viewer stage handle");
|
|
|
|
ADE_VIRTVAR(TextFile, l_FictionViewerStage, nullptr, "The text file of the stage", "fiction_viewer_stage", "The text file")
|
|
{
|
|
fiction_viewer_stage* stage = nullptr;
|
|
if (!ade_get_args(L, "o", l_FictionViewerStage.GetPtr(&stage))) {
|
|
return ADE_RETURN_NIL;
|
|
}
|
|
|
|
if (ADE_SETTING_VAR) {
|
|
LuaError(L, "This property is read only.");
|
|
}
|
|
|
|
return ade_set_args(L, "s", stage->story_filename);
|
|
}
|
|
|
|
ADE_VIRTVAR(FontFile, l_FictionViewerStage, nullptr, "The text file of the stage", "fiction_viewer_stage", "The text file")
|
|
{
|
|
fiction_viewer_stage* stage = nullptr;
|
|
if (!ade_get_args(L, "o", l_FictionViewerStage.GetPtr(&stage))) {
|
|
return ADE_RETURN_NIL;
|
|
}
|
|
|
|
if (ADE_SETTING_VAR) {
|
|
LuaError(L, "This property is read only.");
|
|
}
|
|
|
|
return ade_set_args(L, "s", stage->font_filename);
|
|
}
|
|
|
|
ADE_VIRTVAR(VoiceFile, l_FictionViewerStage, nullptr, "The text file of the stage", "fiction_viewer_stage", "The text file")
|
|
{
|
|
fiction_viewer_stage* stage = nullptr;
|
|
if (!ade_get_args(L, "o", l_FictionViewerStage.GetPtr(&stage))) {
|
|
return ADE_RETURN_NIL;
|
|
}
|
|
|
|
if (ADE_SETTING_VAR) {
|
|
LuaError(L, "This property is read only.");
|
|
}
|
|
|
|
return ade_set_args(L, "s", stage->voice_filename);
|
|
}
|
|
|
|
} // namespace api
|
|
} // namespace scripting
|