summary refs log tree commit diff stats
path: root/src/components/automatable.h
blob: d30340a753098bb03ec8caefc298f2fdda05e238 (plain) (blame)
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
#ifndef AUTOMATABLE_H_3D519131
#define AUTOMATABLE_H_3D519131

#include "component.h"
#include <sol.hpp>
#include <memory>

class AutomatableComponent : public Component {
public:

  std::unique_ptr<sol::thread> runner;
  std::unique_ptr<sol::coroutine> behavior;

  sol::environment origBehavior;

  /**
   * If this flag is disabled, the entity will be ignored by the automating
   * system.
   *
   * @managed_by RealizingSystem
   */
  bool active = false;
};

#endif /* end of include guard: AUTOMATABLE_H_3D519131 */