aboutsummaryrefslogtreecommitdiff
path: root/src/environment.h
Commit message (Collapse)AuthorAge
* Add ABM required neighbor checkPerttu Ahola2011-12-03
|
* Fix player double damagePerttu Ahola2011-12-02
|
* Move ServerRemotePlayer to a separate filePerttu Ahola2011-12-02
|
* Player-is-SAO WIPPerttu Ahola2011-12-01
|
* Handle ActiveBlockModifier intervals properly, down to 1sPerttu Ahola2011-11-29
|
* Replace old active block random node modifying things with actual ↵Perttu Ahola2011-11-29
| | | | ActiveBlockModifiers
* Make blocks to be loaded from disk when the active block area reaches themPerttu Ahola2011-11-29
|
* Relatively snappy object-ground collision detectionPerttu Ahola2011-11-29
|
* GameDef compilesPerttu Ahola2011-11-29
|
* Create framework for getting rid of global definitions of ↵Perttu Ahola2011-11-29
| | | | node/tool/item/whatever types
* Scripting WIPPerttu Ahola2011-11-29
|
* Scripting WIPPerttu Ahola2011-11-29
|
* Add /clearobjectsPerttu Ahola2011-10-18
|
* mobv2Perttu Ahola2011-10-15
|
* Removed unused camera_position and camera_direction fields from Client. ↵Kahrl2011-09-07
| | | | Moved ClientEnvironment::drawPostFx to ClientMap::renderPostFx -- this will make the camera management classes easier to write, as ClientMap already knows the camera position but ClientEnvironment doesn't and has to be told about it. This also eliminates the need for Client::getEnv(). Made the post effect color a content feature defined in content_mapnode.h.
* lava!Perttu Ahola2011-08-15
|
* made screen go slightly blue when underwaterPerttu Ahola2011-07-01
|
* reorganized a lot of stuff and modified mapgen and objects slightly while ↵Perttu Ahola2011-06-26
| | | | doing it
* New map generator added (and SQLite, messed up the commits at that time...) ↵Perttu Ahola2011-06-25
| | | | (import from temporary git repo)
* tried to reduce unnecessary map saving disk i/o a bitPerttu Ahola2011-06-05
|
* Reduced server CPU usage on NodeMetadata step()s. Also furnace now cooks ↵Perttu Ahola2011-05-31
| | | | while no players are near it.
* player passwords and privileges in world/auth.txtPerttu Ahola2011-05-29
| | | | | --HG-- extra : rebase_source : 7260636295d9068fbeeddf4143c89f2b8a91446c
* a work-in-progress map modified callback interface (committing because i ↵Perttu Ahola2011-05-24
| | | | want to merge the fence stuff)
* Some work-in-progress stuff and many comment updatesPerttu Ahola2011-05-22
|
* Preliminary "active block" stuff + set up test code to grow grass.Perttu Ahola2011-05-22
|
* Fixed a small memory leak in ServerEnvironment and cleaned the code a bitPerttu Ahola2011-05-21
|
* random comment updatesPerttu Ahola2011-04-30
|
* Some work-in-progress in hp and mobs and a frightening amount of random fixes.Perttu Ahola2011-04-21
|
* changed server to do object management at longer intervals (0.5s)Perttu Ahola2011-04-10
|
* implemented rats in new system to verify that it worksPerttu Ahola2011-04-10
|
* Some progress on transitioning from MapBlockObject to ActiveObject.Perttu Ahola2011-04-08
|
* updated scripting api a bitPerttu Ahola2011-02-23
| | | | | | --HG-- rename : data/luaobjects/test/client.lua => data/scripts/objects/test/client.lua rename : data/luaobjects/test/server.lua => data/scripts/objects/test/server.lua
* mainly work on object scripting apiPerttu Ahola2011-02-23
|
* preliminary lua scripting framework for objectsPerttu Ahola2011-02-21
|
* Temporary commit; lots of test code and stuffPerttu Ahola2011-02-21
|
* Now texture handling is fast. Also now players are saved on disk.Perttu Ahola2011-01-28
|
* fixed erroneus handling of many players with no peer existing at same timePerttu Ahola2011-01-18
|
* Players are left on server while server is running. No passwords yet.Perttu Ahola2011-01-15
|
* added dedicated server build without irrlichtPerttu Ahola2010-12-19
|
* day/night working client sidePerttu Ahola2010-12-19
|
* before daynight mesh cachePerttu Ahola2010-12-18
|
* license stuffPerttu Ahola2010-11-29
| | | | | --HG-- rename : src/licensecomment.txt => licensecomment.txt
* Initial filesPerttu Ahola2010-11-27
">() const { return m_line; } // Get section of line that is currently selected std::wstring getSelection() const { return m_line.substr(m_cursor, m_cursor_len); } // Clear the current line void clear(); // Replace the current line with the given text std::wstring replace(const std::wstring &line); // Select previous command from history void historyPrev(); // Select next command from history void historyNext(); // Nick completion void nickCompletion(const std::list<std::string>& names, bool backwards); // Update console size and reformat the visible portion of the prompt void reformat(u32 cols); // Get visible portion of the prompt. std::wstring getVisiblePortion() const; // Get cursor position (relative to visible portion). -1 if invalid s32 getVisibleCursorPosition() const; // Get length of cursor selection s32 getCursorLength() const { return m_cursor_len; } // Cursor operations enum CursorOp { CURSOROP_MOVE, CURSOROP_SELECT, CURSOROP_DELETE }; // Cursor operation direction enum CursorOpDir { CURSOROP_DIR_LEFT, CURSOROP_DIR_RIGHT }; // Cursor operation scope enum CursorOpScope { CURSOROP_SCOPE_CHARACTER, CURSOROP_SCOPE_WORD, CURSOROP_SCOPE_LINE, CURSOROP_SCOPE_SELECTION }; // Cursor operation // op specifies whether it's a move or delete operation // dir specifies whether the operation goes left or right // scope specifies how far the operation will reach (char/word/line) // Examples: // cursorOperation(CURSOROP_MOVE, CURSOROP_DIR_RIGHT, CURSOROP_SCOPE_LINE) // moves the cursor to the end of the line. // cursorOperation(CURSOROP_DELETE, CURSOROP_DIR_LEFT, CURSOROP_SCOPE_WORD) // deletes the word to the left of the cursor. void cursorOperation(CursorOp op, CursorOpDir dir, CursorOpScope scope); protected: // set m_view to ensure that 0 <= m_view <= m_cursor < m_view + m_cols // if line can be fully shown, set m_view to zero // else, also ensure m_view <= m_line.size() + 1 - m_cols void clampView(); private: // Prompt prefix std::wstring m_prompt = L""; // Currently edited line std::wstring m_line = L""; // History buffer std::vector<std::wstring> m_history; // History index (0 <= m_history_index <= m_history.size()) u32 m_history_index = 0; // Maximum number of history entries u32 m_history_limit; // Number of columns excluding columns reserved for the prompt s32 m_cols = 0; // Start of visible portion (index into m_line) s32 m_view = 0; // Cursor (index into m_line) s32 m_cursor = 0; // Cursor length (length of selected portion of line) s32 m_cursor_len = 0; // Last nick completion start (index into m_line) s32 m_nick_completion_start = 0; // Last nick completion start (index into m_line) s32 m_nick_completion_end = 0; }; class ChatBackend { public: ChatBackend(); ~ChatBackend() = default; // Add chat message void addMessage(const std::wstring &name, std::wstring text); // Parse and add unparsed chat message void addUnparsedMessage(std::wstring line); // Get the console buffer ChatBuffer& getConsoleBuffer(); // Get the recent messages buffer ChatBuffer& getRecentBuffer(); // Concatenate all recent messages EnrichedString getRecentChat() const; // Get the console prompt ChatPrompt& getPrompt(); // Reformat all buffers void reformat(u32 cols, u32 rows); // Clear all recent messages void clearRecentChat(); // Age recent messages void step(float dtime); // Scrolling void scroll(s32 rows); void scrollPageDown(); void scrollPageUp(); // Resize recent buffer based on settings void applySettings(); private: ChatBuffer m_console_buffer; ChatBuffer m_recent_buffer; ChatPrompt m_prompt; };