From: Perttu Ahola Date: Tue, 24 May 2011 17:05:30 +0000 (+0300) Subject: a work-in-progress map modified callback interface (committing because i want to... X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=0c5f58036531e85ab4c0c7d9ad75466c74aaafe7;p=zefram%2Fminetest%2Fminetest_engine.git a work-in-progress map modified callback interface (committing because i want to merge the fence stuff) --- diff --git a/src/environment.h b/src/environment.h index 8993b8e8..ac290f93 100644 --- a/src/environment.h +++ b/src/environment.h @@ -116,13 +116,19 @@ private: Active block modifier interface */ +class ServerEnvironment; + class ActiveBlockModifier { public: ActiveBlockModifier(){}; virtual ~ActiveBlockModifier(){}; - //TODO - //virtual void + + virtual u32 getTriggerContentCount(){ return 1;} + virtual u8 getTriggerContent(u32 i) = 0; + virtual float getActiveInterval() = 0; + virtual u32 getActiveChance() = 0; + virtual void triggerEvent(ServerEnvironment *env, v3s16 p) = 0; }; /* diff --git a/src/main.cpp b/src/main.cpp index 06deb931..f67d5347 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -310,6 +310,8 @@ Stuff to do before release: ActiveBlockModifier stuff) - Protocol version field - Consider getting some textures from cisoun's texture pack +- Add a long step function to objects that is called with the time + difference when block activates ======================================================================