aboutsummaryrefslogtreecommitdiff
path: root/README.txt
Commit message (Expand)AuthorAge
* Extend CMake variable descriptionsSmallJoker2015-07-27
* Add AreaStore data structureest312015-07-27
* Add LibGMPest312015-05-11
* Replaced libjpeg dependency on apt-get, it should be libjpeg-dev instead of l...Megaf2015-05-11
* Clean up and tweak build systemShadowNinja2015-03-27
* Standalone bundle for OSX (w/ dependencies!)Pavel Puchkin2015-03-17
* update README.txtNer'zhul2015-02-20
* README.txt: Simplify initial build steps by using git to fetch sourcesest312015-02-10
* Fix download URLSteven Smith2015-02-04
* Add ZLIBWAPI_DLL and LEVELDB_DLL CMake options Remove legacy MINGWM10_DLL CMa...sfan52014-07-29
* Update default control documentationBlockMen2014-07-07
* Add redis options to documentationsfan52014-06-29
* Document CMake options in READMESfan52014-03-03
* Add fallback font support for some languages.Ilya Zhuravlev2013-09-08
* Update wiki urlBlockMen2013-07-03
* Higher resolution menuheaderPilzAdam2013-05-25
* Remove common from CMakeLists.txt, README.txt, lua-api.txt and buildwin.shPilzAdam2013-05-18
* Update default controls in README and pause menuPilzAdam2013-05-07
* Fix shader license headers to be LGPLBrent Hull2013-05-06
* README.txt: Add some build stuffPerttu Ahola2013-03-26
* Update README.txt to instruct to get minetest/common tooPerttu Ahola2013-03-21
* Update Copyright YearsSfan52013-02-24
* Update READMEPilzAdam2013-02-24
* Add Freetype supportIlya Zhuravlev2013-02-14
* Update READMEIlya Zhuravlev2012-12-07
* Clean and optimize clouds.cpp enough to not really contain any of the small a...Perttu Ahola2012-06-05
* Switch the license to be LGPLv2/later, with small parts still remaining as GP...Perttu Ahola2012-06-05
* Minimally update compiling on Windows in README.txtPerttu Ahola2012-04-04
* Add to README.txt's example dependencies on Linux: libogg-dev libvorbis-dev l...Perttu Ahola2012-04-04
* Add license of Lua in README.txtPerttu Ahola2012-03-31
* Move games/minetest to games/minimal and update README.txtPerttu Ahola2012-03-26
* Update vc10 build script example in README.txtPerttu Ahola2012-03-20
* Update README.txt a bitPerttu Ahola2012-03-19
* Chat console, including a number of rebases and modifications.Kahrl2012-03-10
* Fix mod licensing and add a mention about sound licensing in README.txtPerttu Ahola2011-12-02
* Add a note about mods being under CC BY-SA 3.0 like texturesPerttu Ahola2011-12-02
* Improve "compile on Windows" section in readmePerttu Ahola2011-11-05
* Update /README.txt, remove duplicate /doc/README.txt and update CMakeLists.tx...Perttu Ahola2011-11-03
* Update README.txtPerttu Ahola2011-08-22
* added gettext supportConstantin Wenger2011-07-20
* Reorganizing stuff (import from temporary git repo)Perttu Ahola2011-06-25
st std::string &name_) { type = PLAYER; name = name_; } void setNodeMeta(v3s16 p_) { type = NODEMETA; p = p_; } void setDetached(const std::string &name_) { type = DETACHED; name = name_; } bool operator==(const InventoryLocation &other) const { if(type != other.type) return false; switch(type){ case UNDEFINED: return false; case CURRENT_PLAYER: return true; case PLAYER: return (name == other.name); case NODEMETA: return (p == other.p); case DETACHED: return (name == other.name); } return false; } bool operator!=(const InventoryLocation &other) const { return !(*this == other); } void applyCurrentPlayer(const std::string &name_) { if(type == CURRENT_PLAYER) setPlayer(name_); } std::string dump() const; void serialize(std::ostream &os) const; void deSerialize(std::istream &is); void deSerialize(std::string s); }; struct InventoryAction; class InventoryManager { public: InventoryManager(){} virtual ~InventoryManager(){} // Get an inventory (server and client) virtual Inventory* getInventory(const InventoryLocation &loc){return NULL;} // Set modified (will be saved and sent over network; only on server) virtual void setInventoryModified(const InventoryLocation &loc, bool playerSend = true){} // Send inventory action to server (only on client) virtual void inventoryAction(InventoryAction *a){} }; #define IACTION_MOVE 0 #define IACTION_DROP 1 #define IACTION_CRAFT 2 struct InventoryAction { static InventoryAction * deSerialize(std::istream &is); virtual u16 getType() const = 0; virtual void serialize(std::ostream &os) const = 0; virtual void apply(InventoryManager *mgr, ServerActiveObject *player, IGameDef *gamedef) = 0; virtual void clientApply(InventoryManager *mgr, IGameDef *gamedef) = 0; virtual ~InventoryAction() {}; }; struct IMoveAction : public InventoryAction { // count=0 means "everything" u16 count; InventoryLocation from_inv; std::string from_list; s16 from_i; InventoryLocation to_inv; std::string to_list; s16 to_i; bool move_somewhere; // treat these as private // related to movement to somewhere bool caused_by_move_somewhere; u32 move_count; IMoveAction() { count = 0; from_i = -1; to_i = -1; move_somewhere = false; caused_by_move_somewhere = false; move_count = 0; } IMoveAction(std::istream &is, bool somewhere); u16 getType() const { return IACTION_MOVE; } void serialize(std::ostream &os) const { if (!move_somewhere) os << "Move "; else os << "MoveSomewhere "; os << count << " "; os << from_inv.dump() << " "; os << from_list << " "; os << from_i << " "; os << to_inv.dump() << " "; os << to_list; if (!move_somewhere) os << " " << to_i; } void apply(InventoryManager *mgr, ServerActiveObject *player, IGameDef *gamedef); void clientApply(InventoryManager *mgr, IGameDef *gamedef); }; struct IDropAction : public InventoryAction { // count=0 means "everything" u16 count; InventoryLocation from_inv; std::string from_list; s16 from_i; IDropAction() { count = 0; from_i = -1; } IDropAction(std::istream &is); u16 getType() const { return IACTION_DROP; } void serialize(std::ostream &os) const { os<<"Drop "; os<<count<<" "; os<<from_inv.dump()<<" "; os<<from_list<<" "; os<<from_i; } void apply(InventoryManager *mgr, ServerActiveObject *player, IGameDef *gamedef); void clientApply(InventoryManager *mgr, IGameDef *gamedef); }; struct ICraftAction : public InventoryAction { // count=0 means "everything" u16 count; InventoryLocation craft_inv; ICraftAction() { count = 0; } ICraftAction(std::istream &is); u16 getType() const { return IACTION_CRAFT; } void serialize(std::ostream &os) const { os<<"Craft "; os<<count<<" "; os<<craft_inv.dump()<<" "; } void apply(InventoryManager *mgr, ServerActiveObject *player, IGameDef *gamedef); void clientApply(InventoryManager *mgr, IGameDef *gamedef); }; // Crafting helper bool getCraftingResult(Inventory *inv, ItemStack& result, std::vector<ItemStack> &output_replacements, bool decrementInput, IGameDef *gamedef); #endif