mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-10 04:31:34 -10:00
Follow-up to #4602. Overall the PR was good, but there are a few extra small changes that should go in. In order of priority: 1) The `exitLoop`, `skipMission`, and `skipTraining` functions should check for campaign mode. 2) The `isVisible` virtvar should be changed to a function, because calling it may have side effects. In standard usage, the briefing formula is evaluated exactly once per stage on briefing initialization, so scripts should follow this convention. 3) The `hasGoalsSlide` function should be called `hasGoalsStage`, because "stage" is the common terminology in FSO. 4) Paging out mission messages is already done in `game_level_close` and should be removed from not only the scripting method but the method it was based on. 5) For consistency, unused parameters should use the `SCP_UNUSED` macro. 6) The `isTraining` flag check can be slightly streamlined using the double-not trick.
26 lines
486 B
C++
26 lines
486 B
C++
#pragma once
|
|
|
|
#include "mission/missionbriefcommon.h"
|
|
#include "mission/missiongoals.h"
|
|
#include "scripting/ade_api.h"
|
|
|
|
namespace scripting {
|
|
namespace api {
|
|
|
|
struct brief_stage_h {
|
|
int br_brief, br_stage;
|
|
brief_stage_h();
|
|
explicit brief_stage_h(int brief, int stage);
|
|
bool IsValid() const;
|
|
brief_stage* getStage() const;
|
|
};
|
|
|
|
DECLARE_ADE_OBJ(l_BriefStage, brief_stage_h);
|
|
|
|
DECLARE_ADE_OBJ(l_Brief, int);
|
|
|
|
DECLARE_ADE_OBJ(l_Goals, int);
|
|
|
|
} // namespace api
|
|
} // namespace scripting
|