mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 15:07:28 +00:00
b6af92ef81
* Split out BehaviorMessage class changes from PR #1452 * remove <string_view> inclusion in ActionContext.h * add the arguments nullptr check back in * remove redundant std::string constructor calls * Update AddStripMessage.cpp - change push_back to emplace_back
36 lines
1.0 KiB
C++
36 lines
1.0 KiB
C++
#ifndef __ADDSTRIPMESSAGE__H__
|
|
#define __ADDSTRIPMESSAGE__H__
|
|
|
|
#include "ActionContext.h"
|
|
#include "BehaviorMessageBase.h"
|
|
#include "StripUiPosition.h"
|
|
|
|
#include <vector>
|
|
|
|
class Action;
|
|
class AMFArrayValue;
|
|
|
|
/**
|
|
* @brief Sent in 2 contexts:
|
|
* A player adds an Action A from their toolbox without attaching it to an existing Strip. In this case, only 1 action is sent.
|
|
* A player moves a Strip from BehaviorState A directly to BehaviorState B. In this case, a list of actions are sent.
|
|
*
|
|
*/
|
|
class AddStripMessage : public BehaviorMessageBase {
|
|
public:
|
|
AddStripMessage(const AMFArrayValue* arguments);
|
|
|
|
[[nodiscard]] const StripUiPosition& GetPosition() const noexcept { return m_Position; }
|
|
|
|
[[nodiscard]] const ActionContext& GetActionContext() const noexcept { return m_ActionContext; }
|
|
|
|
[[nodiscard]] const std::vector<Action>& GetActionsToAdd() const noexcept { return m_ActionsToAdd; }
|
|
|
|
private:
|
|
StripUiPosition m_Position;
|
|
ActionContext m_ActionContext;
|
|
std::vector<Action> m_ActionsToAdd;
|
|
};
|
|
|
|
#endif //!__ADDSTRIPMESSAGE__H__
|