#W# FarmController work. Added new graphic for farmablecabbage.
This commit is contained in:
parent
4344a81180
commit
3d61b04b72
5 changed files with 52 additions and 11 deletions
|
|
@ -146,11 +146,11 @@
|
|||
<rect x="1465" y="745" width="28" height="64" />
|
||||
</region>
|
||||
<region type="FarmRegion" priority="60" name="the Ranch House" >
|
||||
<rect x="794" y="760" width="22" height="27" />
|
||||
<rect x="813" y="772" width="12" height="12" />
|
||||
<rect x="793" y="759" width="24" height="29" />
|
||||
<rect x="812" y="771" width="12" height="12" />
|
||||
</region>
|
||||
<region type="FarmRegion" priority="60" name="the Farm House" >
|
||||
<rect x="819" y="842" width="27" height="18" />
|
||||
<rect x="818" y="841" width="29" height="20" />
|
||||
<rect x="846" y="842" width="12" height="18" />
|
||||
</region>
|
||||
<region type="CaveRegion" priority="50" name="Cave System">
|
||||
|
|
|
|||
|
|
@ -8,6 +8,12 @@ StrongWoodDoor 1765 (Facing=WestCCW)
|
|||
DarkWoodGate 2152 (Facing=EastCW)
|
||||
814 768 0
|
||||
|
||||
DarkWoodGate 2150 (Facing=WestCW)
|
||||
803 787 0
|
||||
|
||||
DarkWoodGate 2152 (Facing=EastCCW)
|
||||
804 787 0
|
||||
|
||||
LightWoodDoor 1757 (Facing=SouthCCW)
|
||||
857 846 0
|
||||
|
||||
|
|
@ -17,6 +23,24 @@ DarkWoodGate 2150 (Facing=WestCCW)
|
|||
DarkWoodGate 2152 (Facing=EastCW)
|
||||
851 855 0
|
||||
|
||||
DarkWoodGate 2150 (Facing=WestCW)
|
||||
830 860 0
|
||||
|
||||
DarkWoodGate 2152 (Facing=EastCCW)
|
||||
831 860 0
|
||||
|
||||
DarkWoodGate 2160 (Facing=NorthCW)
|
||||
818 849 0
|
||||
|
||||
DarkWoodGate 2158 (Facing=SouthCCW)
|
||||
818 850 0
|
||||
|
||||
DarkWoodGate 2150 (Facing=WestCCW)
|
||||
832 841 0
|
||||
|
||||
DarkWoodGate 2152 (Facing=EastCW)
|
||||
833 841 0
|
||||
|
||||
# North Bastion Dock house
|
||||
RattanDoor 1685 (Facing=WestCW)
|
||||
664 509 0
|
||||
|
|
|
|||
|
|
@ -9,12 +9,21 @@ namespace Server.Items
|
|||
public static class FarmController
|
||||
{
|
||||
// Vegetable Plot Boundaries
|
||||
private static Rectangle2D VeggieRect = new Rectangle2D(795, 771, 17, 15);
|
||||
private static Rectangle2D CabbagePlot = new Rectangle2D(795, 771, 5, 4);
|
||||
private static Rectangle2D CarrotPlot = new Rectangle2D(795, 776, 5, 4);
|
||||
private static Rectangle2D LettucePlot = new Rectangle2D(795, 781, 5, 5);
|
||||
private static Rectangle2D OnionPlot = new Rectangle2D(801, 771, 5, 4);
|
||||
private static Rectangle2D TurnipPlot = new Rectangle2D(801, 776,5 ,4);
|
||||
private static Rectangle2D PumpkinPlot = new Rectangle2D(801, 781, 5, 5);
|
||||
private static Rectangle2D WheatPlot = new Rectangle2D(808, 771, 5, 4);
|
||||
private static Rectangle2D FlaxPlot = new Rectangle2D(808, 776, 5, 4);
|
||||
private static Rectangle2D CottonPlot = new Rectangle2D(808, 781, 5, 5);
|
||||
|
||||
// Reagent Plot Boundaries
|
||||
private static Rectangle2D ReagentRect = new Rectangle2D(820, 843, 23, 16);
|
||||
//private static Rectangle2D ReagentRect = new Rectangle2D(820, 843, 23, 16);
|
||||
|
||||
// Lists must be static now
|
||||
private static List<Type> m_VeggieTypes = new List<Type> { typeof(FarmableCabbage), typeof(FarmableCarrot), typeof(FarmableCotton), typeof(FarmableFlax), typeof(FarmableLettuce), typeof(FarmableOnion), typeof(FarmablePumpkin), typeof(FarmableTurnip), typeof(FarmableWheat) };
|
||||
//private static List<Type> m_VeggieTypes = new List<Type> { typeof(FarmableCabbage), typeof(FarmableCarrot), typeof(FarmableCotton), typeof(FarmableFlax), typeof(FarmableLettuce), typeof(FarmableOnion), typeof(FarmablePumpkin), typeof(FarmableTurnip), typeof(FarmableWheat) };
|
||||
//private static List<Type> m_ReagentTypes = new List<Type> { typeof(FarmableBlackPearl), typeof(FarmableBloodmoss), typeof(FarmableGarlic), typeof(FarmableGinseng), typeof(FarmableMandrakeRoot), typeof(FarmableNightshade), typeof(FarmableSpidersSilk), typeof(FarmableSulfurousAsh) };
|
||||
|
||||
// The core looks for 'Initialize' on startup and runs it automatically
|
||||
|
|
@ -30,8 +39,15 @@ namespace Server.Items
|
|||
private static void SpawnTick()
|
||||
{
|
||||
// Spawn 2 vegetables and 2 reagents each tick if space allows
|
||||
SpawnInArea(VeggieRect, m_VeggieTypes, 2);
|
||||
//SpawnInArea(ReagentRect, m_ReagentTypes, 2);
|
||||
SpawnInArea(CabbagePlot, new List<Type> { typeof(FarmableCabbage) }, 1);
|
||||
SpawnInArea(CarrotPlot, new List<Type> { typeof(FarmableCarrot) }, 1);
|
||||
SpawnInArea(LettucePlot, new List<Type> { typeof(FarmableLettuce) }, 1);
|
||||
SpawnInArea(OnionPlot, new List<Type> { typeof(FarmableOnion) }, 1);
|
||||
SpawnInArea(TurnipPlot, new List<Type> { typeof(FarmableTurnip) }, 1);
|
||||
SpawnInArea(PumpkinPlot, new List<Type> { typeof(FarmablePumpkin) }, 1);
|
||||
SpawnInArea(WheatPlot, new List<Type> { typeof(FarmableWheat) }, 1);
|
||||
SpawnInArea(FlaxPlot, new List<Type> { typeof(FarmableFlax) }, 1);
|
||||
SpawnInArea(CottonPlot, new List<Type> { typeof(FarmableCotton) }, 1);
|
||||
}
|
||||
|
||||
private static void SpawnInArea(Rectangle2D rect, List<Type> types, int count)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ namespace Server.Items
|
|||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 3254;
|
||||
//return 3254;
|
||||
return 0x48E4;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
|
|
@ -48,4 +49,4 @@ namespace Server.Items
|
|||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@ namespace Server
|
|||
public static bool S_MonstersSurprise = true;
|
||||
public static bool S_DungeonTraps = true;
|
||||
public static double S_FarmSpawnTimer = 15.0;
|
||||
public static int S_HarvestRange = 2;
|
||||
public static int S_HarvestRange = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue