becf6c829331aa8e8b81401e4676b17d410b6ca7
[shipsimu.git] / application / ship-simu / main / parts / class_BaseShipPart.php
1 <?php
2
3 // Dieses kann z.B. der Maschinenraum, die Bruecke, Kabinen, Laderaum, etc. sein
4 class BaseShipPart extends BaseSimulator {
5         // Price of this ship part
6         private $price = 0.00;
7
8         // Konstruktor
9         private function __construct($class) {
10                 // Call parent constructor
11                 parent::constructor($class);
12
13                 // Debug message
14                 if (((defined('DEBUG_SHIPPART')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) {
15                         $this->getDebugInstance()->output(sprintf("[%s:%d:] Kontruktor erreicht.<br />\n",
16                                 __CLASS__,
17                                 __LINE__
18                         ));
19                 }
20
21                 // Beschreibung
22                 $this->setPartDescr("Schiffsteil");
23
24                 // Etwas aufraeumen
25                 $this->removeNumberFormaters();
26         }
27
28         // Konstruktor aufrufen
29         public function constructor ($class) {
30                 $this->__construct($class);
31         }
32
33         // Setter for price
34         public function setPrice ($price) {
35                 $this->price = (float) $price;
36         }
37
38         // Getter for price
39         public function getPrice () {
40                 return $this->price;
41         }
42
43         // Remove price
44         public function removePrice () {
45                 unset($this->price);
46         }
47 }
48
49 // [EOF]
50 ?>