summaryrefslogtreecommitdiffstats
path: root/src/UI/SlotArea.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-10-03Remove SetProperty(...cPlayer)Tiger Wang1-1/+1
Enchantment table, anvil windows are already opened one per-player.
2020-10-01Enchanting table shows detail on hover. Enchanting is deterministic. (#4937)KingCol131-2/+8
* Use lapis for enchanting, subtract correct number of levels, ClientHandle now selects from pregenerated list. Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-07-14Introduce recipe book functionality (#4493)Tobias Wilken1-4/+5
* Introduce recipe book functionality The recipe book helps especially new players. Missing it gives the impression that cuberite is not as advanced as it is. The handling of the recipe book uses the following functions: - Unlock Recipes (https://wiki.vg/index.php?title=Protocol&oldid=14204#Unlock_Recipes) to make recipes available and show the notification for new recipes. Initialization is done on player login for known ones, the update is done when new items are discovered. - Craft Recipe Request (https://wiki.vg/index.php?title=Protocol&oldid=14204#Craft_Recipe_Request) when the user selects a recipe from the recipe book to fill the slots. Known recipes are initialized on player login via `Unlock Recipes` with `Action` 0. As soon as a new recipe is discovered this is added via `Unlock Recipes` with `Action` 1. To be able to know and recognize new recipes the player class is extended with `KnownItems` and `KnownRecipes`. As soon as a player touches an item this is compared to the list of `KnownItems`, if the item is unknown the recipes are checked for this item and the other ingredients are checked with the list of `KnownItems`. If a full match is discovered the recipe is unlocked with the client and stored in the `KnownRecipes`. To unlock recipes the recipe ID is sent to the client. A mapping file (for protocol 1.12.2) translated the minecraft recipe names to ids. The crafting.txt is extended with and minecraft recipe names is possible. Limitations: Only a single recipe is added to the crafting area. Multiple clicks or shift click does not increase the number of builds. Co-authored-by: peterbell10 <peterbell10@live.co.uk> * Address first issues mentioned by @peterbell10 - Some linting - Extract loading of recipe specific protocol mapping into a function - Build `RecipeNameMap` only once - Use `std::optional` - Extract `LoadRecipe` from `Window` * Start to implement new suggestions * Update with suggestions from @peterbell10 * Some minor cleanup * Update protocol packet IDs * Remove unused include * Include header in cmake * Change a vector to integer counter * Change dromedaryCase method names to PascalCase * Address suggestions from @madmaxoft * Read Protocol subdirectories to load recipe books To load all recipebooks iterate over the `Protocol` subdirectories to find mapping files. Co-authored-by: peterbell10 <peterbell10@live.co.uk>
2020-07-04cWindow: Convert XYZ to Vector3 (#4764)MaxwellScroggs1-2/+2
2020-04-16Using Super.Mattes D1-34/+48
2017-10-21Implement horse inventory (#4053)peterbell101-0/+25
* Implement horse inventory * Fix sign conversions * Add API doc for ItemCategory::IsHorseArmor * Improve HandleOpenHorseInventory comment and style fixes.
2017-08-13Replaced includes with forward declarationsLukas Pioch1-1/+2
2017-05-24Off-hand/shield slot functional, save and load slot, bow + arrow functional (#3725)Pablo Beltrán1-0/+17
Fixes #3714.
2017-05-21Clang 5.0 fixesLukas Pioch1-4/+4
- Added override keyword - Removed inherited member variables
2017-05-08Corrected brewingstand and added support for fuelLukas Pioch1-1/+1
2017-02-05Fixed bindings for cBlockArea:Read and Write. (#3568)Mattes D1-1/+1
The original bindings accepted nil as the World param, causing a crash.
2016-02-05Bulk clearing of whitespaceLogicParrot1-39/+39
2015-11-03Implemented brewingLukas Pioch1-0/+30
2015-07-31Unified the doxy-comment format.Mattes D1-24/+22
2015-07-29Silenced and fixed many warning messages across multiple files.Samuel Barney1-1/+1
2015-05-23Fixed missing overrides and added a ignore flag for reserved macro for clang version 3.6 and higher.Lukas Pioch1-1/+1
2015-05-09More style checking.Mattes D1-1/+1
Spaces around some operators are checked.
2015-03-21Changed cEntity::m_UniqueID to UInt32.Mattes D1-7/+10
2014-12-13Implemented vanilla-like shift click.Howaner1-8/+8
This fixes many visual bugs.
2014-12-13Own classes for all windows.Howaner1-4/+2
2014-09-13e.t.c. -> etc.Tiger Wang1-1/+1
etcetera, not egg tray conglomerate :P
2014-09-13Added newlinesTiger Wang1-1/+5
2014-09-13Implemented Chest MinecartsTiger Wang1-0/+14
2014-08-28Enchanting table improvements.Hownaer1-2/+5
2014-07-30Added beacon.Howaner1-0/+29
2014-07-20Add armor items directly to the armor slots.Howaner1-1/+1
2014-07-17Fixed tabs used for alignment.madmaxoft1-2/+2
2014-07-09Added inventory number click.Howaner1-1/+5
2014-07-06Fixed crafting grid updating.Mattes D1-0/+1
Fixes #1152.
2014-07-06Added drop window action.Howaner1-0/+6
2014-07-05Add middle click.Howaner1-2/+5
2014-06-01Players can't set items in the result slot, when they shift a item.Howaner1-0/+1
2014-05-12cEntity::Killed(cEntity *) Handler; Achievement triggers; cPlayer::AwardAchievement()andrew1-0/+6
2014-05-05Add doxycomments to cSlotAreaAnvil functions.Howaner1-0/+2
2014-05-05Add anvil shift click.Howaner1-1/+3
2014-05-05Add clicks, exp subtraction, item check, ...Howaner1-1/+8
2014-05-05Add MC|ItemName plugin message.Howaner1-2/+0
2014-05-05Add anvil window and slot area.Howaner1-0/+29
2014-04-24Fix armor in survival mode.Howaner1-1/+6
2014-04-15Add more checks to cSlotAreaEnchantingHowaner1-10/+13
2014-04-14Added ItemPlaceCount in SlotAreadaniel09161-0/+3
Thanks to Howaner for helping
2014-04-14Blocked enchanting a item twicedaniel09161-2/+2
2014-04-14Bug fixesdaniel09161-6/+2
2014-02-28Fixed multiple gcc warnings about unused params.madmaxoft1-3/+3
2014-01-20first changes for enchanting (not finished)daniel09161-0/+28
- added enchanting table block handler and added it to the blockhandler - added enchanting window - drop item in the slot 0 when the player close the window - added enchanting packet (1.7 only) - some more...
2013-12-07Added basic ender chestsTiger Wang1-0/+18
Note that they just mirror chests now, so no per player inventory.
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-11-11Fixed dblclicking in crafting slot area.madmaxoft1-0/+1
Fixes #229.
2013-11-10Implemented inventory dblclick.madmaxoft1-1/+10
Implements #229.
2013-07-29Changed everyting to Unix line endings.Alexander Harkness1-303/+303
2013-06-16Rewritten furnacesmadmaxoft@gmail.com1-20/+7
Furnaces now smelt the correct number of items. Furnaces store their contents in a cItemGrid. Furnace window is updated with correct items and progressbars. Furnace recipes now use ticks instead of milliseconds. Furnaces save and load their state completely, not missing a smelt operation. Hoppers take items out of furnaces. Dropped the cSlotAreaDropSpenser class, replaced it with generic cSlotAreaItemGrid git-svn-id: http://mc-server.googlecode.com/svn/trunk@1601 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-13Added hopper entity, it can suck items out of chests, dispensers, droppers and other hopppers above it.madmaxoft@gmail.com1-1/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1587 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-30LuaWindow: Initial code, the window can be opened, but not much manipulatedmadmaxoft@gmail.com1-3/+23
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1532 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-30Implemented left-click inventory paintingmadmaxoft@gmail.com1-7/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1529 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-26Implemented droppersmadmaxoft@gmail.com1-5/+4
Added a common ancestor class "DropSpenser" that has the common code for dropper and dispenser and is Lua-accessible, too. The Debuggers plugin now triggers both droppers and dispensers when rclking them with a redstone torch. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1514 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-24Refactored cInventory to use cItemGrid for the actual Storagemadmaxoft@gmail.com1-4/+4
This makes the API more orthogonal and is easier to use in the plugins. Also changes in the inventory are now propagated to the needed places (armor updates to BroadcastEntityEquipment etc.) even when the inventory is changed by a plugin. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1503 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-08Refactored window clicking code to use different click actionsmadmaxoft@gmail.com1-5/+5
First part of solving FS #371; should fix #370. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1459 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-08Fixed rclk in doublechestsmadmaxoft@gmail.com1-0/+18
FS #284 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1127 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-19Added dispensers (they can't dispense items yet)luksor111@gmail.com1-0/+21
Fixed crash when digging snow Moved BlockPlace hook check, so Core plugin will no longer block item usage Player chat messages are now visible in the console git-svn-id: http://mc-server.googlecode.com/svn/trunk@1081 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-25Sockets are now owned by SocketThreads instead of ClientHandle (FS #246 and FS #247)madmaxoft@gmail.com1-0/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@891 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-21Working shift-click support in crafting areas; window update working in 1.3.2madmaxoft@gmail.com1-1/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@869 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-20UI: Added shift-click support to most slot areas, except crafting.madmaxoft@gmail.com1-16/+72
Also fixed survival inventory's crafting grid not working. git-svn-id: http://mc-server.googlecode.com/svn/trunk@868 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-20Refactored windows.madmaxoft@gmail.com1-0/+192
As described on the forum: http://forum.mc-server.org/showthread.php?tid=561 For now, only basic clicking works; shift-click not implemented yet. git-svn-id: http://mc-server.googlecode.com/svn/trunk@867 0a769ca7-a7f5-676a-18bf-c427514a06d6