X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fscripting%2Fplayer.hpp;h=431573c33f0c032ecb5198656175cb9149794494;hb=c3c41a343669d375aaa674c7f3ac35f08f24703e;hp=45f3d849d24f709c9bbde0f975c9b6a376d922bd;hpb=7d3004fc6167b7fcd7495dd1ac278f2ac527cbec;p=supertux.git diff --git a/src/scripting/player.hpp b/src/scripting/player.hpp index 45f3d849d..431573c33 100644 --- a/src/scripting/player.hpp +++ b/src/scripting/player.hpp @@ -35,7 +35,7 @@ public: * Set tux bonus. * This can be "grow", "fireflower" or "iceflower" at the moment */ - virtual void add_bonus(const std::string& bonus) = 0; + virtual bool add_bonus(const std::string& bonus) = 0; /** * Give tux more coins */ @@ -73,7 +73,7 @@ public: virtual void kill(bool completely) = 0; /** - * Switches ghost mode on/off. + * Switches ghost mode on/off. * Lets Tux float around and through solid objects. */ virtual void set_ghost_mode(bool enable) = 0; @@ -83,7 +83,7 @@ public: */ virtual bool get_ghost_mode() = 0; - /** + /** * play cheer animation. * This might need some space and behave in an unpredictable way. Best to use this at level end. */ @@ -111,10 +111,23 @@ public: */ virtual void do_jump(float yspeed) = 0; + /** + * Orders the current GameSession to start a sequence + */ + virtual void trigger_sequence(std::string sequence_name) = 0; + + /** + * Uses a scriptable controller for all user input (or restores controls) + */ + virtual void use_scripting_controller(bool use_or_release) = 0; + + /** + * Instructs the scriptable controller to press or release a button + */ + virtual void do_scripting_controller(std::string control, bool pressed) = 0; }; } #endif -