/
Entity.h
41 lines (32 loc) · 1.1 KB
/
Entity.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
#include "icommandsystem.h"
#include "inode.h"
#include <string>
namespace selection
{
namespace algorithm
{
/**
* Applies the key/value combination to the currently selected entities.
* It's safe to set a "classname" key through this method.
* This doesn't open an UndoableCommand session, take care of this in the
* client code.
*
* Throws a cmd::ExecutionFailure in case the keyvalue cannot be applied.
*/
void setEntityKeyValue(const std::string& key, const std::string& value);
// Command adaptor wrapping the setEntityKeyvalue function above
void setEntityKeyValueOnSelection(const cmd::ArgumentList& args);
/**
* greebo: "Binds" the selected entites together by setting the "bind"
* spawnarg on both entities. Two entities must be highlighted for this
* command to function correctly.
*/
void bindEntities(const cmd::ArgumentList& args);
/**
* greebo: Sets up the target spawnarg of the selected entities such that
* the first selected entity is targetting the second.
*/
void connectSelectedEntities(const cmd::ArgumentList& args);
} // namespace algorithm
} // namespace selection