3#include "pixelbullet/scene/mission_types.h"
12 if (asset.editor_graph && asset.editor_graph->Empty())
14 asset.editor_graph.reset();
18[[nodiscard]]
inline std::optional<std::size_t> FindMissionStageIndex(
const MissionAsset& asset,
const std::string_view stage_id)
20 for (std::size_t index = 0; index < asset.stages.size(); ++index)
22 if (asset.stages[index].id == stage_id)
33 const auto index = FindMissionStageIndex(asset, stage_id);
34 return index ? &asset.stages[*index] :
nullptr;
39 const auto index = FindMissionStageIndex(asset, stage_id);
40 return index ? &asset.stages[*index] :
nullptr;
47 if (transition.event_id == event_id)
58 if (!asset.editor_graph)
65 if (node.stage_id == stage_id)
75 const std::string_view stage_id)
77 if (!asset.editor_graph)
84 if (node.stage_id == stage_id)
95 if (!asset.editor_graph)
106 .stage_id = std::string(stage_id),
108 return asset.editor_graph->nodes.back();
Definition mission_types.h:66
Definition mission_types.h:54
Definition mission_types.h:46
Definition mission_types.h:24
Definition mission_types.h:32