aboutsummaryrefslogtreecommitdiff
Commit message (Expand)AuthorAge
...
* Fix particle spawners not visible since CSM spawner implementation (#8289)Loïc Blot2019-03-01
* Revert "Revert CSM particles commit to fix particle spawner bug for 5.0.0 (#8...Loïc Blot2019-02-26
* Fix build since translation updatesLoïc Blot2019-02-26
* Revert CSM particles commit to fix particle spawner bug for 5.0.0 (#8288)Paramat2019-02-26
* Run updatepo.shTranslations2019-02-24
* Update translationsTranslations2019-02-24
* Update minetest.conf.example and settings_translation_file.cpp (#8278)Paramat2019-02-23
* Fix files with CRLF line endings in translations (#8280)Nathanaël Courant2019-02-23
* Minimap: Fix radar restriction broken by 9649e47SmallJoker2019-02-23
* Settingtypes.txt: Remove 2 lines missed in a recent commit (#8277)Paramat2019-02-23
* Attend to LINT sillyness (#8276)Paramat2019-02-23
* Remove 's' from 'automatic forwards' (#8272)ANAND2019-02-23
* Content store: Ignore '_game' in game names in ID generation (#8270)rubenwardy2019-02-22
* Update gamebar on tab enter (#8192)Paul Ouellette2019-02-18
* Fix games not updating on deletionrubenwardy2019-02-18
* Fix content store crash (#8244)Paul Ouellette2019-02-18
* lua_api.txt, settingtypes.txt: Various improvements (#8252)Paramat2019-02-18
* Update many things in Lua API docs (#8236)Wuzzy2019-02-17
* lua_api.txt: Various additions and improvements (#8245)Paramat2019-02-17
* Fix profiler crash by builtin since eea1fda (#8239)Paul Ouellette2019-02-16
* Update credits (#8162)rubenwardy2019-02-16
* Revert RTT fixes (#8187)ANAND2019-02-15
* Fix coloured fog in main menu (#8181)random-geek2019-02-15
* LINT fixLoïc Blot2019-02-15
* Don't regain breath while in ignore node (#8218)Wuzzy2019-02-15
* Update minetest.conf.example, settings strings and locale files (#8230)Wuzzy2019-02-14
* Fix extract zip writing lowercase files (#8221)rubenwardy2019-02-14
* Run updatepo.shTranslation2019-02-14
* Update translationsTranslations2019-02-14
* Statbars: Reduce initial update intervalSmallJoker2019-02-12
* Consistent HP and damage types (#8167)SmallJoker2019-02-10
* Slippery: Do not apply when swimming (#8198)SmallJoker2019-02-10
* Builtin: Fix grayed-out but enabled modpacksSmallJoker2019-02-09
* Autojump: Disable in fly mode, support continuous forward (#8200)SmallJoker2019-02-09
* Remove fgettext("") in builtinWuzzy2019-02-09
* Fix Address::isLocalhost algorithmLoic Blot2019-02-09
* Disable confirmation dialog on localhostrubenwardy2019-02-09
* numeric: Fix clang, broken since d5456daSmallJoker2019-02-09
* Don't append itemname to itemname in tooltip (#8176)Wuzzy2019-02-09
* Use true pitch/yaw/roll rotations without loss of precision by pgimeno (#8019)Paul Ouellette2019-02-07
* Fix cloud color in loading screen and main menu (#8174)random-geek2019-02-04
* Update color of main menu clouds (#8172)random-geek2019-02-04
* Update manpage (#8169)Paul Ouellette2019-02-04
* Content store: Fix assertion failed on unsuccessful package list fetchrubenwardy2019-02-03
* Rename 'Content Store' to 'Online Content Repository' in Advanced Settingsrubenwardy2019-02-03
* Add setting to hide mature content from ContentDBrubenwardy2019-02-03
* Fix core.download_file() creating empty files on HTTP errorrubenwardy2019-02-03
* Fix rename modpack dialog not appearing to take affectrubenwardy2019-02-03
* Fix modpack rename dialog selecting the wrong modnumber Zero2019-02-03
* DragonFly BSD is somewhat identical to FreeBSD (#8159)Leonid Bobrov2019-02-03
class="hl opt">* create(ActiveObjectType type, ServerEnvironment *env, u16 id, v3f pos, const std::string &data); /* Some simple getters/setters */ v3f getBasePosition(){ return m_base_position; } void setBasePosition(v3f pos){ m_base_position = pos; } ServerEnvironment* getEnv(){ return m_env; } /* Some more dynamic interface */ virtual void setPos(v3f pos) { setBasePosition(pos); } // continuous: if true, object does not stop immediately at pos virtual void moveTo(v3f pos, bool continuous) { setBasePosition(pos); } // If object has moved less than this and data has not changed, // saving to disk may be omitted virtual float getMinimumSavedMovement(); virtual std::string getDescription(){return "SAO";} /* Step object in time. Messages added to messages are sent to client over network. send_recommended: True at around 5-10 times a second, same for all objects. This is used to let objects send most of the data at the same time so that the data can be combined in a single packet. */ virtual void step(float dtime, bool send_recommended){} /* The return value of this is passed to the client-side object when it is created */ virtual std::string getClientInitializationData(u16 protocol_version){return "";} /* The return value of this is passed to the server-side object when it is created (converted from static to active - actually the data is the static form) */ virtual std::string getStaticData() { assert(isStaticAllowed()); return ""; } /* Return false in here to never save and instead remove object on unload. getStaticData() will not be called in that case. */ virtual bool isStaticAllowed() const {return true;} // Returns tool wear virtual int punch(v3f dir, const ToolCapabilities *toolcap=NULL, ServerActiveObject *puncher=NULL, float time_from_last_punch=1000000) { return 0; } virtual void rightClick(ServerActiveObject *clicker) {} virtual void setHP(s16 hp) {} virtual s16 getHP() const { return 0; } virtual void setArmorGroups(const ItemGroupList &armor_groups) {} virtual ItemGroupList getArmorGroups() { return ItemGroupList(); } virtual void setPhysicsOverride(float physics_override_speed, float physics_override_jump, float physics_override_gravity) {} virtual void setAnimation(v2f frames, float frame_speed, float frame_blend, bool frame_loop) {} virtual void getAnimation(v2f *frames, float *frame_speed, float *frame_blend, bool *frame_loop) {} virtual void setBonePosition(const std::string &bone, v3f position, v3f rotation) {} virtual void getBonePosition(const std::string &bone, v3f *position, v3f *lotation) {} virtual void setAttachment(int parent_id, const std::string &bone, v3f position, v3f rotation) {} virtual void getAttachment(int *parent_id, std::string *bone, v3f *position, v3f *rotation) {} virtual void addAttachmentChild(int child_id) {} virtual void removeAttachmentChild(int child_id) {} virtual std::set<int> getAttachmentChildIds() { return std::set<int>(); } virtual ObjectProperties* accessObjectProperties() { return NULL; } virtual void notifyObjectPropertiesModified() {} // Inventory and wielded item virtual Inventory* getInventory() { return NULL; } virtual const Inventory* getInventory() const { return NULL; } virtual InventoryLocation getInventoryLocation() const { return InventoryLocation(); } virtual void setInventoryModified() {} virtual std::string getWieldList() const { return ""; } virtual int getWieldIndex() const { return 0; } virtual ItemStack getWieldedItem() const; virtual bool setWieldedItem(const ItemStack &item); /* Number of players which know about this object. Object won't be deleted until this is 0 to keep the id preserved for the right object. */ u16 m_known_by_count; /* - Whether this object is to be removed when nobody knows about it anymore. - Removal is delayed to preserve the id for the time during which it could be confused to some other object by some client. - This is set to true by the step() method when the object wants to be deleted. - This can be set to true by anything else too. */ bool m_removed; /* This is set to true when an object should be removed from the active object list but couldn't be removed because the id has to be reserved for some client. The environment checks this periodically. If this is true and also m_known_by_count is true, object is deleted from the active object list. */ bool m_pending_deactivation; /* Whether the object's static data has been stored to a block */ bool m_static_exists; /* The block from which the object was loaded from, and in which a copy of the static data resides. */ v3s16 m_static_block; /* Queue of messages to be sent to the client */ std::queue<ActiveObjectMessage> m_messages_out; protected: // Used for creating objects based on type typedef ServerActiveObject* (*Factory) (ServerEnvironment *env, v3f pos, const std::string &data); static void registerType(u16 type, Factory f); ServerEnvironment *m_env; v3f m_base_position; private: // Used for creating objects based on type static std::map<u16, Factory> m_types; }; #endif