Make Creature class variables mostly protected instead of private.
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is failing
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	continuous-integration/drone/push Build is failing
				
			This commit is contained in:
		@@ -17,6 +17,7 @@ namespace CreatureLib::Battling {
 | 
			
		||||
    class BattleLibrary;
 | 
			
		||||
 | 
			
		||||
    class Creature : public ScriptSource {
 | 
			
		||||
    protected:
 | 
			
		||||
        const BattleLibrary* _library;
 | 
			
		||||
 | 
			
		||||
        GetProperty(const Library::CreatureSpecies*, Species);
 | 
			
		||||
@@ -30,7 +31,7 @@ namespace CreatureLib::Battling {
 | 
			
		||||
        GetProperty(const Library::Item*, HeldItem);
 | 
			
		||||
        GetProperty(uint32_t, CurrentHealth);
 | 
			
		||||
 | 
			
		||||
    private:
 | 
			
		||||
    protected:
 | 
			
		||||
        Core::StatisticSet<int8_t> _statBoost;
 | 
			
		||||
        Core::StatisticSet<uint32_t> _flatStats;
 | 
			
		||||
        Core::StatisticSet<uint32_t> _boostedStats;
 | 
			
		||||
@@ -52,6 +53,7 @@ namespace CreatureLib::Battling {
 | 
			
		||||
        Script* _status = nullptr;
 | 
			
		||||
        ScriptSet _volatile = {};
 | 
			
		||||
 | 
			
		||||
    private
 | 
			
		||||
        void OnFaint();
 | 
			
		||||
 | 
			
		||||
    public:
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
\brief GetProperty creates a simple wrapper for a field, creating a private field, and a public getter method.
 | 
			
		||||
 */
 | 
			
		||||
#define GetProperty(type, name)                                                                                        \
 | 
			
		||||
private:                                                                                                               \
 | 
			
		||||
protected:                                                                                                             \
 | 
			
		||||
    type __##name;                                                                                                     \
 | 
			
		||||
                                                                                                                       \
 | 
			
		||||
public:                                                                                                                \
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user