mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Implemented GameData::BerryPlant
This commit is contained in:
36
Data/Scripts/011_Data/017_Berry_Plant_Data.rb
Normal file
36
Data/Scripts/011_Data/017_Berry_Plant_Data.rb
Normal file
@@ -0,0 +1,36 @@
|
||||
module GameData
|
||||
class BerryPlant
|
||||
attr_reader :id
|
||||
attr_reader :id_number
|
||||
attr_reader :hours_per_stage
|
||||
attr_reader :drying_per_hour
|
||||
attr_reader :minimum_yield
|
||||
attr_reader :maximum_yield
|
||||
|
||||
DATA = {}
|
||||
DATA_FILENAME = "berry_plants.dat"
|
||||
|
||||
NUMBER_OF_REPLANTS = 9
|
||||
|
||||
extend ClassMethods
|
||||
include InstanceMethods
|
||||
|
||||
def initialize(hash)
|
||||
validate hash => Hash, hash[:id] => Symbol
|
||||
@id = hash[:id]
|
||||
@id_number = hash[:id_number] || -1
|
||||
@hours_per_stage = hash[:hours_per_stage] || 3
|
||||
@drying_per_hour = hash[:drying_per_hour] || 15
|
||||
@minimum_yield = hash[:minimum_yield] || 2
|
||||
@maximum_yield = hash[:maximum_yield] || 5
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Deprecated methods
|
||||
#===============================================================================
|
||||
def pbGetBerryPlantData(item)
|
||||
Deprecation.warn_method('pbGetBerryPlantData', 'v20', 'GameData::BerryPlant.get(item)')
|
||||
return GameData::BerryPlant.get(item)
|
||||
end
|
||||
Reference in New Issue
Block a user