123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- #ifndef __OF_MINE_H
- #define __OF_MINE_H
- #ifndef __OFIRM_H
- #include <OFIRM.h>
- #endif
- #ifndef __ORAWRES_H
- #include <ORAWRES.h>
- #endif
- #define DEFAULT_MINE_MAX_STOCK_QTY 500
- #pragma pack(1)
- class FirmMine : public Firm
- {
- public:
- short raw_id;
- short site_recno;
- float reserve_qty;
- float stock_qty;
- float max_stock_qty;
- short next_output_link_id;
- short next_output_firm_recno;
- float cur_month_production;
- float last_month_production;
- float production_30days() { return last_month_production*(30-info.game_day)/30 +
- cur_month_production; }
- int is_operating() { return productivity > 0 && reserve_qty > 0; }
- int ai_has_excess_worker();
- public:
- FirmMine();
- ~FirmMine();
- void init_derived();
- void change_nation(int newNationRecno);
- void draw(int displayLayer=1);
- void put_info(int refreshFlag);
- void detect_info();
- void disp_mine_info(int dispY1, int refreshFlag);
- void next_day();
- void next_month();
- virtual FirmMine* cast_to_FirmMine() { return this; };
- void process_ai();
-
- virtual UCHAR crc8();
- virtual void clear_ptr();
- private:
- void produce_raw();
- Location* scan_raw_site();
- void set_next_output_firm();
-
- int think_build_market();
- int think_inc_productivity();
- };
- #pragma pack()
- #endif
|