forked from aburch/simutrans
-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathfield.h
47 lines (33 loc) · 908 Bytes
/
field.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* This file is part of the Simutrans-Extended project under the Artistic License.
* (see LICENSE.txt)
*/
#ifndef OBJ_FIELD_H
#define OBJ_FIELD_H
#include "simobj.h"
#include "../display/simimg.h"
class field_class_desc_t;
class fabrik_t;
class field_t : public obj_t
{
fabrik_t *fab;
const field_class_desc_t *desc;
public:
field_t(const koord3d pos, player_t *player, const field_class_desc_t *desc, fabrik_t *fab);
virtual ~field_t();
const char* get_name() const OVERRIDE { return "Field"; }
#ifdef INLINE_OBJ_TYPE
#else
typ get_typ() const OVERRIDE { return obj_t::field; }
#endif
image_id get_image() const OVERRIDE;
/// @copydoc obj_t::show_info
void show_info() OVERRIDE;
/**
* @return NULL when OK, otherwise an error message
*/
const char * is_deletable(const player_t *) OVERRIDE;
void cleanup(player_t *player) OVERRIDE;
void pre_delete(){fab=NULL;}
};
#endif