mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Refactor texture overrides and add new features (#9600)
* Refactor texture overrides, and add new features: - Texture overrides can support multiple targets in one line - Texture override files can have comment lines - Item images/wield images can be overridden * Formatting changes * Address soime feedback - Pass vectors by const reference - Log syntax errors as warnings - Remove 'C' prefix from TextureOverrideSource * Simplify override target checks with an inline helper function * make linter happy * Apply feedback suggestions Co-Authored-By: rubenwardy <rw@rubenwardy.com> * Remove remaining != 0 checks * Update copyright notice Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: rubenwardy <rw@rubenwardy.com>
This commit is contained in:
parent
7e21b3cd48
commit
5cf6318117
11 changed files with 285 additions and 71 deletions
|
@ -26,6 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include <set>
|
||||
#include "itemgroup.h"
|
||||
#include "sound.h"
|
||||
#include "texture_override.h" // TextureOverride
|
||||
class IGameDef;
|
||||
class Client;
|
||||
struct ToolCapabilities;
|
||||
|
@ -157,6 +158,10 @@ public:
|
|||
Client *client) const=0;
|
||||
#endif
|
||||
|
||||
// Replace the textures of registered nodes with the ones specified in
|
||||
// the texture pack's override.txt files
|
||||
virtual void applyTextureOverrides(const std::vector<TextureOverride> &overrides)=0;
|
||||
|
||||
// Remove all registered item and node definitions and aliases
|
||||
// Then re-add the builtin item definitions
|
||||
virtual void clear()=0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue