freg  0.3
Free-Roaming Elementary Game
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Bucket.h
Go to the documentation of this file.
1  /* freg, Free-Roaming Elementary Game with open and interactive world
2  * Copyright (C) 2012-2014 Alexander 'mmaulwurff' Kromm
3  * mmaulwurff@gmail.com
4  *
5  * This file is part of FREG.
6  *
7  * FREG is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * FREG is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with FREG. If not, see <http://www.gnu.org/licenses/>. */
19 
20 #ifndef BUCKET_H
21 #define BUCKET_H
22 
23 #include "Block.h"
24 #include "Inventory.h"
25 
26 class Bucket : public Block, public Inventory {
27 public:
28  Bucket(int sub, int id);
29  Bucket(QDataStream & str, int sub, int id);
30 
31  int Weight() const override;
32  void ReceiveSignal(QString str) override;
33  bool Get(Block * block, int start) override;
34  void Damage(int dmg, int dmg_kind) override;
35  QString FullName() const override;
36  usage_types Use(Block *) override;
37  Inventory * HasInventory() override final;
38 
39 protected:
40  void SaveAttributes(QDataStream & out) const override;
41 };
42 
43 #endif // BUCKET_H
Bucket(int sub, int id)
Definition: Bucket.cpp:22
usage_types Use(Block *) override
Definition: Bucket.cpp:35
Inventory * HasInventory() overridefinal
Definition: Bucket.cpp:34
QString FullName() const override
Definition: Bucket.cpp:37
Definition: Bucket.h:26
Provides declaration for class Inventory for freg.
bool Get(Block *block, int start) override
Returns true on success.
Definition: Bucket.cpp:53
void ReceiveSignal(QString str) override
Receive text signal.
Definition: Bucket.cpp:33
void Damage(int dmg, int dmg_kind) override
Definition: Bucket.cpp:32
usage_types
Definition: header.h:196
void SaveAttributes(QDataStream &out) const override
Definition: Bucket.cpp:64
Provides block ability to contain other blocks inside.
Definition: Inventory.h:33
const quint8 sub
Definition: Block.h:177
Block without special physics and attributes.
Definition: Block.h:89
Provides definition for class Block.
int Weight() const override
Definition: Bucket.cpp:68