12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- #ifndef SCRIPTS_H
- #define SCRIPTS_H
- #include "buysell.h"
- #include "dispatchers.h"
- #include "galaxy.h"
- #include <stack>
- class ScriptTerror : public Dispatch {
- private:
- MoveDispatch * md;
- std::shared_ptr<Dispatch> move;
- InputDispatch * id;
- std::shared_ptr<Dispatch> input;
- TraderDispatch * td;
- std::shared_ptr<Dispatch> trader;
- std::string old_trade_end_empty;
-
- public:
- ScriptTerror(Director &);
- ~ScriptTerror();
- int loops;
- int max_loops;
- port_pair_type ppt;
-
- void init(void);
- void activate(void) override;
- void deactivate(void) override;
- void input_notify(void);
- void move_notify(void);
- void trade_notify(void);
- void server_prompt(const std::string &prompt) override;
- };
- class ScriptVoyager : public Dispatch {
- private:
- MoveDispatch * md;
- std::shared_ptr<Dispatch> move;
- InputDispatch * id;
- std::shared_ptr<Dispatch> input;
- void next(void);
-
- public:
- ScriptVoyager(Director &);
- ~ScriptVoyager();
- int loops;
- void init(void);
- void activate(void) override;
- void deactivate(void) override;
- void input_notify(void);
- void move_notify(void);
- void server_prompt(const std::string &prompt) override;
- };
- class ScriptExplore : public Dispatch {
- private:
- MoveDispatch * md;
- std::shared_ptr<Dispatch> move;
- InputDispatch * id;
- std::shared_ptr<Dispatch> input;
- void next(void);
- std::shared_ptr<Dispatch> us;
- public:
- ScriptExplore(Director &);
- ~ScriptExplore();
- int loops;
- bool infinite;
- bool prefer_ports;
- int state;
- std::stack<sector_type> unknown_warps;
-
- void init(void);
- void activate(void) override;
- void deactivate(void) override;
-
- void input_notify(void);
- void move_notify(void);
- void server_prompt(const std::string &prompt) override;
- };
- #endif
|