// ################################
// ## Vzory predmetu, ze kterych ##
// ## se tahaji konstantni cisla ##
// ################################

#pragma once
#ifndef ITEMS_PATTERNS_H
#define ITEMS_PATTERNS_H

#include "common.h"
#include "cache_list.h"

// ################################
// ################################

#define PATTERN_ID_ENERGETIC_ACCUMULATOR           1

#define PATTERN_ID_NAVIGATION_COMPUTER             2
#define PATTERN_ID_QUARK_GLUON_CORE                3
#define PATTERN_ID_SUBSPACE_BEACON                 4
#define PATTERN_ID_INERTIAL_DAMPERS                5

#define PATTERN_ID_IMPULS_JET_ENGINE               6
#define PATTERN_ID_MECHANICAL_DAMPERS              7

#define PATTERN_ID_DEFLECTOR_SHIELDS               8

#define PATTERN_ID_WEAPON_ENERGY_CIRCUIT           9
#define PATTERN_ID_DRONE_MISSILES                  10
#define PATTERN_ID_DRONE_MISSILE_LAUNCHER          11
#define PATTERN_ID_LASER_GUN                       12

#define PATTERN_ID_TRANSPORT_BEAM_GENERATOR        13

#define PATTERN_ID_MAGNETICAL_COLLECTORS_OF_PLASMA 14
#define PATTERN_ID_SUBMERSIBLE_FILTRATION_TANK     15
#define PATTERN_ID_SUBMARINE_MINING_MACHINE        16
#define PATTERN_ID_UNDERGROUND_DRILLIG_MACHINE     17

#define PATTERN_ID_PROBE                           18

#define PATTERN_ID_HIGH_RESOLUTION_SENSORS         19
#define PATTERN_ID_LONG_RANGE_SENSORS              20

#define PATTERN_ID_CLOAKING_DEVICE                 21

#define PATTERN_ID_ANDROIDS                        22

#define PATTERN_ID_MAGNETICAL_GRID                 23
#define PATTERN_ID_TRANSPORT_CONTAINER             24
#define PATTERN_ID_ENERGETIC_CELL                  25

#define PATTERN_ID_PLASMA_FILTER                   26
#define PATTERN_ID_SCIENTIFIC_LAB                  27
#define PATTERN_ID_LIFE_SUPPORT                    28
#define PATTERN_ID_SUBSPACE_TRANSMITTER            29

#define PATTERN_ID_MAINFRAME                       30

#define PATTERN_ID_HANGAR                          31

#define PATTERN_ID_MAGNETICAL_FILTER               32
#define PATTERN_ID_DEUTERIUM_DECOMPOSER            33
#define PATTERN_ID_ZIRCONIUM_REACTOR               34
#define PATTERN_ID_ILMENITE_FURNACE                35

// ################################

#define ITEMS_CONSTRUCTION_TO_REPAIRABILITY_RATIO  16

#define ANDROIDS_COUNT_FROM_SIZE_EXPONENT          (double)2/(double)3
#define ANDROIDS_COUNT_FROM_SIZE_MULTIPLICATOR     8

// ################################
// ################################

class itemsPatternClass : public dataListObjectClass
{
private:
	unsigned long      minWeight_             ; // minimalni hmotnost itemu dane tridy
	unsigned long      maxWeight_             ; // maximalni hmotnost itemu dane tridy
	unsigned long      density_               ; // hustota vsech itemu teto tridy
	unsigned long long transport_             ; // terajouly potrebne na transport, v absolutnich cislech
	unsigned long long constructionUlrei_     ; // pocet ulrei v absolutnich cislech
	unsigned long long constructionTitanium_  ; // procento vahy predmetu, ktere je vytvorene z titanu (jednotky jsou primo procenta)
	unsigned long long constructionDeuterium_ ; // procento vahy predmetu, ktere je vytvorene z deuteria (jednotky jsou primo procenta)
	unsigned long long constructionHeavyWater_; // procento vahy predmetu, ktere je vytvorene z tezke vody (jednotky jsou primo procenta)
	unsigned long      repairability_         ; // kdyz se timhle vynasobi hmotnost, dostavame potrebne body pro opravu predmetu (a odvozuje se z toho vyroba pres ITEMS_CONSTRUCTION_TO_REPAIRABILITY_RATIO)
	unsigned long      mounting_              ; // jako repairabilita, akorat neni na opravu, ale montovani a odmontovani predmetu
	string             itemName_              ; // jmeno predmetu pro potreby klienta
public:
	bool isItemStackable();
	bool isItemSeparate ();

    itemsPatternClass();
	unsigned long      getMinWeight()              const { return minWeight_;              };
	unsigned long      getMaxWeight()              const { return maxWeight_;              };
	unsigned long      getDensity()                const { return density_;                };
	unsigned long long getTransport()              const { return transport_;              };
	unsigned long long getConstructionUlrei()      const { return constructionUlrei_;      };
	unsigned long long getConstructionTitanium()   const { return constructionTitanium_;   };
	unsigned long long getConstructionDeuterium()  const { return constructionDeuterium_;  };
	unsigned long long getConstructionHeavyWater() const { return constructionHeavyWater_; };
	unsigned long      getRepairability()          const { return repairability_;          };
	unsigned long      getMounting()               const { return mounting_;               };
	string             getItemName()               const { return itemName_;               };
	              void DB_Load(unsigned long ID);
	virtual           ~itemsPatternClass() {};
};

extern itemsPatternClass * nullPattern;

// ################################
// ################################

#endif