ModernUO/Scripts/Engines/Plants/PlantResources.cs
mark@runuo.com fb0368e201 Revision: 1073
Author: eos
Date: Saturday, May 25, 2013 2:53:05 PM
Message:
Fixed guild roster ordering.
----
Modified : /devel/Scripts/Gumps/Guilds/New Guild System/GuildRosterGump.cs

Revision: 1072
Author: eos
Date: Thursday, May 23, 2013 8:36:04 AM
Message:
Plant labeling:
- Added OSI clilocs for cocoa trees and sugar canes.
- Plant hue no longer takes priority over plant category if the plant type is unknown.
----
Modified : /devel/Scripts/Engines/Plants/PlantItem.cs
Modified : /devel/Scripts/Engines/Plants/PlantType.cs
Modified : /devel/Scripts/Engines/Plants/Seed.cs

Revision: 1071
Author: mark
Date: Wednesday, May 22, 2013 10:38:29 AM
Message:
core wait events
----
Modified : /devel/Server/Main.cs
Modified : /devel/Server/Network/Packets.cs

Revision: 1070
Author: eos
Date: Monday, May 20, 2013 3:26:40 PM
Message:
Added support for the High Seas relative drop.
----
Modified : /devel/Scripts/Multis/Boats/BaseBoat.cs
Modified : /devel/Server/Items/BaseMulti.cs
Modified : /devel/Server/Network/PacketHandlers.cs

Revision: 1069
Author: eos
Date: Saturday, May 18, 2013 9:21:10 PM
Message:
Added another missing deserialization fix for plants.
----
Modified : /devel/Scripts/Engines/Plants/PlantSystem.cs

Revision: 1068
Author: eos
Date: Saturday, May 18, 2013 9:03:52 PM
Message:
Added missing deserialization fix for plants.
----
Modified : /devel/Scripts/Engines/Plants/PlantItem.cs
Modified : /devel/Scripts/Engines/Plants/Seed.cs

Revision: 1067
Author: eos
Date: Saturday, May 18, 2013 4:29:20 PM
Message:
T2A arena region fix.
----
Modified : /devel/Data/Regions.xml

Revision: 1066
Author: eos
Date: Saturday, May 18, 2013 2:58:35 PM
Message:
- Sync with GoogleCode repo (sans unix line endings).
- Tab woes.
----
Modified : /devel/Data/Regions.xml
Modified : /devel/Scripts/Engines/Plants/PlantType.cs

Revision: 1065
Author: eos
Date: Saturday, May 18, 2013 2:48:32 PM
Message:
- Added cocoa trees.
- Unifying PlantItem labeling for extensibility and compacter code.
- Misc plant system cleanup.
----
Modified : /devel/Scripts/Engines/Plants/PlantSystem.cs
Modified : /devel/Scripts/Engines/Plants/PlantItem.cs
Modified : /devel/Scripts/Engines/Plants/Seed.cs
Modified : /devel/Scripts/Engines/Plants/PlantType.cs
Modified : /devel/Scripts/Engines/Plants/PlantHue.cs
Modified : /devel/Scripts/Engines/Plants/PlantResources.cs
Modified : /devel/Scripts/Engines/Plants/ReproductionGump.cs
2013-05-28 17:44:07 +00:00

53 lines
No EOL
1.9 KiB
C#

using System;
using Server;
using Server.Items;
namespace Server.Engines.Plants
{
public class PlantResourceInfo
{
private static PlantResourceInfo[] m_ResourceList = new PlantResourceInfo[]
{
new PlantResourceInfo( PlantType.ElephantEarPlant, PlantHue.BrightRed, typeof( RedLeaves ) ),
new PlantResourceInfo( PlantType.PonytailPalm, PlantHue.BrightRed, typeof( RedLeaves ) ),
new PlantResourceInfo( PlantType.CenturyPlant, PlantHue.BrightRed, typeof( RedLeaves ) ),
new PlantResourceInfo( PlantType.Poppies, PlantHue.BrightOrange, typeof( OrangePetals ) ),
new PlantResourceInfo( PlantType.Bulrushes, PlantHue.BrightOrange, typeof( OrangePetals ) ),
new PlantResourceInfo( PlantType.PampasGrass, PlantHue.BrightOrange, typeof( OrangePetals ) ),
new PlantResourceInfo( PlantType.SnakePlant, PlantHue.BrightGreen, typeof( GreenThorns ) ),
new PlantResourceInfo( PlantType.BarrelCactus, PlantHue.BrightGreen, typeof( GreenThorns ) ),
new PlantResourceInfo( PlantType.CocoaTree, PlantHue.Plain, typeof( CocoaPulp ) )
};
public static PlantResourceInfo GetInfo( PlantType plantType, PlantHue plantHue )
{
foreach ( PlantResourceInfo info in m_ResourceList )
{
if ( info.PlantType == plantType && info.PlantHue == plantHue )
return info;
}
return null;
}
private PlantType m_PlantType;
private PlantHue m_PlantHue;
private Type m_ResourceType;
public PlantType PlantType { get { return m_PlantType; } }
public PlantHue PlantHue { get { return m_PlantHue; } }
public Type ResourceType { get { return m_ResourceType; } }
private PlantResourceInfo( PlantType plantType, PlantHue plantHue, Type resourceType )
{
m_PlantType = plantType;
m_PlantHue = plantHue;
m_ResourceType = resourceType;
}
public Item CreateResource()
{
return (Item)Activator.CreateInstance( m_ResourceType );
}
}
}