<commit_before>
#ifndef SWGANH_OBJECT_TANGIBLE_INSTALLATION_H_
#define SWGANH_OBJECT_TANGIBLE_INSTALLATION_H_

#include <cstdint>
#include <string>
#include <vector>

#include "swganh/object/tangible.h"

namespace swganh {
namespace object {
namespace tangible {

class Installation : public swganh::object::Tangible
{
public:
    struct Resource
    {
        uint64_t global_id;
        std::string name;
        std::string type;
    };

    struct HopperItem
    {
        uint64_t global_id;
        float quantity;
    };

public:

    bool IsActive() const;
    void Activate();
    void Deactivate();
    void ToggleActive();

    float GetPowerReserve() const;
    void ResetPowerReserve(float power_reserve);

    float GetPowerCost() const;
    void ResetPowerCost(float power_cost);

    std::vector<Resource> GetAvailableResources() const;
    void AddAvailableResource(uint64_t global_id, std::string name, std::string type);
    void RemoveAvailableResourceById(uint64_t global_id);
    void UpdateResource(uint64_t global_id, std::string name, std::string type);
    void ResetAvailableResources(std::vector<Resource> available_resource_pool);
    void ClearAllAvailableResources();

    float GetMaxExtractionRate() const;
    void SetMaxExtractionRate(float extraction_rate);

    float GetCurrentExtractionRate() const;
    void SetCurrentExtractionRate(float extraction_rate);

    float GetCurrentHopperSize() const;
    void SetCurrentHopperSize(float hopper_size);

    float GetMaxHopperSize() const;
    void SetMaxHopperSize(float hopper_size);

    bool IsUpdating() const;
    void StartUpdating();
    void StopUpdating();
    void ToggleUpdating();
    
    std::vector<HopperItem> GetHopperContents() const;
    void AddToHopper(uint64_t global_id, float quantity);
    void RemoveHopperItem(uint64_t global_id);
    void UpdateHopperItem(uint64_t global_id, float quantity);
    void ResetContents(std::vector<HopperItem> hopper);
    void ClearAllHopperContents();

    uint8_t GetConditionPercentage() const;
    void SetConditionPercentage(uint8_t condition);

private:
    virtual void OnReliableUpdate() {
        Tangible::OnReliableUpdate();
    }

    bool is_active_;
    float power_reserve_;
    float power_cost_;
    std::vector<Resource> available_resource_pool_;
    uint64_t selected_resource_;
    float max_extraction_rate_;
    float current_extraction_rate_;
    float current_hopper_size_;
    uint32_t max_hopper_size_;
    bool is_updating_;
    std::vector<HopperItem> hopper_;
    uint8_t condition_percent_;
};

}}}  // namespace swganh::object::tangible

#endif  // SWGANH_OBJECT_TANGIBLE_INSTALLATION_H_<commit_msg>Added type information to Installation<commit_after>
#ifndef SWGANH_OBJECT_TANGIBLE_INSTALLATION_H_
#define SWGANH_OBJECT_TANGIBLE_INSTALLATION_H_

#include <cstdint>
#include <string>
#include <vector>

#include "swganh/object/tangible.h"

namespace swganh {
namespace object {
namespace tangible {

class Installation : public swganh::object::Tangible
{
public:
    struct Resource
    {
        uint64_t global_id;
        std::string name;
        std::string type;
    };

    struct HopperItem
    {
        uint64_t global_id;
        float quantity;
    };

public:
    virtual uint32_t GetType() { return Installation::type; }
    const static uint32_t type = 0x49544e4f;

    bool IsActive() const;
    void Activate();
    void Deactivate();
    void ToggleActive();

    float GetPowerReserve() const;
    void ResetPowerReserve(float power_reserve);

    float GetPowerCost() const;
    void ResetPowerCost(float power_cost);

    std::vector<Resource> GetAvailableResources() const;
    void AddAvailableResource(uint64_t global_id, std::string name, std::string type);
    void RemoveAvailableResourceById(uint64_t global_id);
    void UpdateResource(uint64_t global_id, std::string name, std::string type);
    void ResetAvailableResources(std::vector<Resource> available_resource_pool);
    void ClearAllAvailableResources();

    float GetMaxExtractionRate() const;
    void SetMaxExtractionRate(float extraction_rate);

    float GetCurrentExtractionRate() const;
    void SetCurrentExtractionRate(float extraction_rate);

    float GetCurrentHopperSize() const;
    void SetCurrentHopperSize(float hopper_size);

    float GetMaxHopperSize() const;
    void SetMaxHopperSize(float hopper_size);

    bool IsUpdating() const;
    void StartUpdating();
    void StopUpdating();
    void ToggleUpdating();
    
    std::vector<HopperItem> GetHopperContents() const;
    void AddToHopper(uint64_t global_id, float quantity);
    void RemoveHopperItem(uint64_t global_id);
    void UpdateHopperItem(uint64_t global_id, float quantity);
    void ResetContents(std::vector<HopperItem> hopper);
    void ClearAllHopperContents();

    uint8_t GetConditionPercentage() const;
    void SetConditionPercentage(uint8_t condition);

protected:
    virtual void OnReliableUpdate() {
        Tangible::OnReliableUpdate();
    }

private:
    bool is_active_;
    float power_reserve_;
    float power_cost_;
    std::vector<Resource> available_resource_pool_;
    uint64_t selected_resource_;
    float max_extraction_rate_;
    float current_extraction_rate_;
    float current_hopper_size_;
    uint32_t max_hopper_size_;
    bool is_updating_;
    std::vector<HopperItem> hopper_;
    uint8_t condition_percent_;
};

}}}  // namespace swganh::object::tangible

#endif  // SWGANH_OBJECT_TANGIBLE_INSTALLATION_H_
{'fraction_non_alphanumeric': 0.08265064627707992, 'fraction_numerical': 0.010376843255051884, 'mean_word_length': 4.455809334657398, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7475147', 'n_tokens_mistral': 1763, 'n_tokens_neox': 1657, 'n_words': 370}