diff options
author | Alexander Harkness <me@bearbin.net> | 2024-11-02 22:27:47 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2024-11-02 22:27:47 +0100 |
commit | cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a (patch) | |
tree | f647b20e1823f1846af88e832cf82a4a02e96e69 /src/Items/ItemPainting.h | |
parent | Improve clang-format config file, remove automatically enforced code style from contrib guide. (diff) | |
download | cuberite-clang-format-codebase.tar cuberite-clang-format-codebase.tar.gz cuberite-clang-format-codebase.tar.bz2 cuberite-clang-format-codebase.tar.lz cuberite-clang-format-codebase.tar.xz cuberite-clang-format-codebase.tar.zst cuberite-clang-format-codebase.zip |
Diffstat (limited to 'src/Items/ItemPainting.h')
-rw-r--r-- | src/Items/ItemPainting.h | 53 |
1 files changed, 11 insertions, 42 deletions
diff --git a/src/Items/ItemPainting.h b/src/Items/ItemPainting.h index 40e43f87e..80fbac921 100644 --- a/src/Items/ItemPainting.h +++ b/src/Items/ItemPainting.h @@ -10,13 +10,11 @@ -class cItemPaintingHandler final: - public cItemHandler +class cItemPaintingHandler final : public cItemHandler { using Super = cItemHandler; -public: - + public: using Super::Super; @@ -33,11 +31,8 @@ public: ) const override { // Paintings can't be flatly placed: - if ( - (a_ClickedBlockFace == BLOCK_FACE_NONE) || - (a_ClickedBlockFace == BLOCK_FACE_YM) || - (a_ClickedBlockFace == BLOCK_FACE_YP) - ) + if ((a_ClickedBlockFace == BLOCK_FACE_NONE) || (a_ClickedBlockFace == BLOCK_FACE_YM) || + (a_ClickedBlockFace == BLOCK_FACE_YP)) { return false; } @@ -57,40 +52,18 @@ public: } // Define all the possible painting titles - static const AString gPaintingTitlesList[] = - { - { "Kebab" }, - { "Aztec" }, - { "Alban" }, - { "Aztec2" }, - { "Bomb" }, - { "Plant" }, - { "Wasteland" }, - { "Wanderer" }, - { "Graham" }, - { "Pool" }, - { "Courbet" }, - { "Sunset" }, - { "Sea" }, - { "Creebet" }, - { "Match" }, - { "Bust" }, - { "Stage" }, - { "Void" }, - { "SkullAndRoses" }, - { "Wither" }, - { "Fighters" }, - { "Skeleton" }, - { "DonkeyKong" }, - { "Pointer" }, - { "Pigscene" }, - { "BurningSkull" } + static const AString gPaintingTitlesList[] = { + {"Kebab"}, {"Aztec"}, {"Alban"}, {"Aztec2"}, {"Bomb"}, {"Plant"}, {"Wasteland"}, + {"Wanderer"}, {"Graham"}, {"Pool"}, {"Courbet"}, {"Sunset"}, {"Sea"}, {"Creebet"}, + {"Match"}, {"Bust"}, {"Stage"}, {"Void"}, {"SkullAndRoses"}, {"Wither"}, {"Fighters"}, + {"Skeleton"}, {"DonkeyKong"}, {"Pointer"}, {"Pigscene"}, {"BurningSkull"} }; auto PaintingTitle = gPaintingTitlesList[a_World->GetTickRandomNumber(ARRAYCOUNT(gPaintingTitlesList) - 1)]; // A painting, centred so pickups spawn nicely. - auto Painting = std::make_unique<cPainting>(PaintingTitle, a_ClickedBlockFace, Vector3d(0.5, 0.5, 0.5) + PlacePos); + auto Painting = + std::make_unique<cPainting>(PaintingTitle, a_ClickedBlockFace, Vector3d(0.5, 0.5, 0.5) + PlacePos); auto PaintingPtr = Painting.get(); if (!PaintingPtr->Initialize(std::move(Painting), *a_World)) { @@ -104,7 +77,3 @@ public: return true; } }; - - - - |