mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-09 13:01:29 -10:00
* Scripting functions required for SCPUI conversion of Loop Brief. * nullptr * Fix documentation and make setting choice optional, defaulting to false. * Documetation fix
67 lines
1.4 KiB
C++
67 lines
1.4 KiB
C++
#include "loop_brief.h"
|
|
|
|
namespace scripting {
|
|
namespace api {
|
|
|
|
//**********HANDLE: loop_briefing
|
|
ADE_OBJ(l_LoopBriefStage, cmission, "loop_brief_stage", "Loop Brief stage handle");
|
|
|
|
ADE_VIRTVAR(Text,
|
|
l_LoopBriefStage,
|
|
nullptr,
|
|
"The text of the stage",
|
|
"loop_brief_stage",
|
|
"The text")
|
|
{
|
|
cmission* current = nullptr;
|
|
if (!ade_get_args(L, "o", l_LoopBriefStage.GetPtr(¤t))) {
|
|
return ADE_RETURN_NIL;
|
|
}
|
|
|
|
if (ADE_SETTING_VAR) {
|
|
LuaError(L, "This property is read only.");
|
|
}
|
|
|
|
return ade_set_args(L, "s", current->mission_branch_desc);
|
|
}
|
|
|
|
ADE_VIRTVAR(AniFilename,
|
|
l_LoopBriefStage,
|
|
nullptr,
|
|
"The ani filename of the stage",
|
|
"loop_brief_stage",
|
|
"The ani filename")
|
|
{
|
|
cmission* current = nullptr;
|
|
if (!ade_get_args(L, "o", l_LoopBriefStage.GetPtr(¤t))) {
|
|
return ADE_RETURN_NIL;
|
|
}
|
|
|
|
if (ADE_SETTING_VAR) {
|
|
LuaError(L, "This property is read only.");
|
|
}
|
|
|
|
return ade_set_args(L, "s", current->mission_branch_brief_anim);
|
|
}
|
|
|
|
ADE_VIRTVAR(AudioFilename,
|
|
l_LoopBriefStage,
|
|
nullptr,
|
|
"The audio file of the stage",
|
|
"loop_brief_stage",
|
|
"The audio filename")
|
|
{
|
|
cmission* current = nullptr;
|
|
if (!ade_get_args(L, "o", l_LoopBriefStage.GetPtr(¤t))) {
|
|
return ADE_RETURN_NIL;
|
|
}
|
|
|
|
if (ADE_SETTING_VAR) {
|
|
LuaError(L, "This property is read only.");
|
|
}
|
|
|
|
return ade_set_args(L, "s", current->mission_branch_brief_sound);
|
|
}
|
|
|
|
} // namespace api
|
|
} // namespace scripting
|