parent
096d39609e
commit
8e9221bb5a
400 changed files with 3688 additions and 5969 deletions
|
|
@ -317,8 +317,7 @@ namespace Server.Engines.Plants
|
|||
{
|
||||
from.Target = new PlantPourTarget(m_Plant);
|
||||
from.SendLocalizedMessage(1060808,
|
||||
"#" + m_Plant
|
||||
.GetLocalizedPlantStatus()); // Target the container you wish to use to water the ~1_val~.
|
||||
$"#{m_Plant.GetLocalizedPlantStatus()}"); // Target the container you wish to use to water the ~1_val~.
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -386,8 +385,7 @@ namespace Server.Engines.Plants
|
|||
|
||||
from.Target = new PlantPourTarget(m_Plant);
|
||||
from.SendLocalizedMessage(1060808,
|
||||
"#" + m_Plant
|
||||
.GetLocalizedPlantStatus()); // Target the container you wish to use to water the ~1_val~.
|
||||
$"#{m_Plant.GetLocalizedPlantStatus()}"); // Target the container you wish to use to water the ~1_val~.
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -444,36 +444,18 @@ namespace Server.Items
|
|||
Item reagents;
|
||||
int amount = Utility.RandomMinMax(10, 25);
|
||||
|
||||
switch (Utility.Random(9))
|
||||
reagents = Utility.Random(9) switch
|
||||
{
|
||||
case 0:
|
||||
reagents = new BlackPearl(amount);
|
||||
break;
|
||||
case 1:
|
||||
reagents = new Bloodmoss(amount);
|
||||
break;
|
||||
case 2:
|
||||
reagents = new Garlic(amount);
|
||||
break;
|
||||
case 3:
|
||||
reagents = new Ginseng(amount);
|
||||
break;
|
||||
case 4:
|
||||
reagents = new MandrakeRoot(amount);
|
||||
break;
|
||||
case 5:
|
||||
reagents = new Nightshade(amount);
|
||||
break;
|
||||
case 6:
|
||||
reagents = new SulfurousAsh(amount);
|
||||
break;
|
||||
case 7:
|
||||
reagents = new SpidersSilk(amount);
|
||||
break;
|
||||
default:
|
||||
reagents = new FertileDirt(amount);
|
||||
break;
|
||||
}
|
||||
0 => (Item)new BlackPearl(amount),
|
||||
1 => new Bloodmoss(amount),
|
||||
2 => new Garlic(amount),
|
||||
3 => new Ginseng(amount),
|
||||
4 => new MandrakeRoot(amount),
|
||||
5 => new Nightshade(amount),
|
||||
6 => new SulfurousAsh(amount),
|
||||
7 => new SpidersSilk(amount),
|
||||
_ => new FertileDirt(amount)
|
||||
};
|
||||
|
||||
if (!SpawnItem(reagents))
|
||||
reagents.Delete();
|
||||
|
|
|
|||
|
|
@ -87,9 +87,9 @@ namespace Server.Engines.Plants
|
|||
int tileID;
|
||||
|
||||
if (obj is Static staticObj && !staticObj.Movable)
|
||||
tileID = (staticObj.ItemID & 0x3FFF) | 0x4000;
|
||||
tileID = staticObj.ItemID & 0x3FFF | 0x4000;
|
||||
else if (obj is StaticTarget staticTarget)
|
||||
tileID = (staticTarget.ItemID & 0x3FFF) | 0x4000;
|
||||
tileID = staticTarget.ItemID & 0x3FFF | 0x4000;
|
||||
else if (obj is LandTarget landTarget)
|
||||
tileID = landTarget.TileID;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -89,13 +89,13 @@ namespace Server.Engines.Plants
|
|||
|
||||
public static PlantHue RandomFirstGeneration()
|
||||
{
|
||||
switch (Utility.Random(4))
|
||||
return Utility.Random(4) switch
|
||||
{
|
||||
case 0: return PlantHue.Plain;
|
||||
case 1: return PlantHue.Red;
|
||||
case 2: return PlantHue.Blue;
|
||||
default: return PlantHue.Yellow;
|
||||
}
|
||||
0 => PlantHue.Plain,
|
||||
1 => PlantHue.Red,
|
||||
2 => PlantHue.Blue,
|
||||
_ => PlantHue.Yellow
|
||||
};
|
||||
}
|
||||
|
||||
public static bool CanReproduce(PlantHue plantHue) => (plantHue & PlantHue.Reproduces) != PlantHue.None;
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ namespace Server.Engines.Plants
|
|||
else if (m_PlantStatus != PlantStatus.BowlOfDirt)
|
||||
{
|
||||
from.SendLocalizedMessage(1080389,
|
||||
"#" + GetLocalizedPlantStatus()); // This bowl of dirt already has a ~1_val~ in it!
|
||||
$"#{GetLocalizedPlantStatus()}"); // This bowl of dirt already has a ~1_val~ in it!
|
||||
}
|
||||
else if (PlantSystem.Water < 2)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -388,13 +388,13 @@ namespace Server.Engines.Plants
|
|||
|
||||
public int GetLocalizedHealth()
|
||||
{
|
||||
switch (Health)
|
||||
return Health switch
|
||||
{
|
||||
case PlantHealth.Dying: return 1060825; // dying
|
||||
case PlantHealth.Wilted: return 1060824; // wilted
|
||||
case PlantHealth.Healthy: return 1060823; // healthy
|
||||
default: return 1060822; // vibrant
|
||||
}
|
||||
PlantHealth.Dying => 1060825, // dying
|
||||
PlantHealth.Wilted => 1060824, // wilted
|
||||
PlantHealth.Healthy => 1060823, // healthy
|
||||
_ => 1060822
|
||||
};
|
||||
}
|
||||
|
||||
public static void Configure()
|
||||
|
|
@ -681,4 +681,4 @@ namespace Server.Engines.Plants
|
|||
writer.Write(m_LeftResources);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,61 +176,61 @@ namespace Server.Engines.Plants
|
|||
|
||||
public static PlantType RandomFirstGeneration()
|
||||
{
|
||||
switch (Utility.Random(3))
|
||||
return Utility.Random(3) switch
|
||||
{
|
||||
case 0: return PlantType.CampionFlowers;
|
||||
case 1: return PlantType.Fern;
|
||||
default: return PlantType.TribarrelCactus;
|
||||
}
|
||||
0 => PlantType.CampionFlowers,
|
||||
1 => PlantType.Fern,
|
||||
_ => PlantType.TribarrelCactus
|
||||
};
|
||||
}
|
||||
|
||||
public static PlantType RandomPeculiarGroupOne()
|
||||
{
|
||||
switch (Utility.Random(6))
|
||||
return Utility.Random(6) switch
|
||||
{
|
||||
case 0: return PlantType.Cactus;
|
||||
case 1: return PlantType.FlaxFlowers;
|
||||
case 2: return PlantType.FoxgloveFlowers;
|
||||
case 3: return PlantType.HopsEast;
|
||||
case 4: return PlantType.CocoaTree;
|
||||
default: return PlantType.OrfluerFlowers;
|
||||
}
|
||||
0 => PlantType.Cactus,
|
||||
1 => PlantType.FlaxFlowers,
|
||||
2 => PlantType.FoxgloveFlowers,
|
||||
3 => PlantType.HopsEast,
|
||||
4 => PlantType.CocoaTree,
|
||||
_ => PlantType.OrfluerFlowers
|
||||
};
|
||||
}
|
||||
|
||||
public static PlantType RandomPeculiarGroupTwo()
|
||||
{
|
||||
switch (Utility.Random(5))
|
||||
return Utility.Random(5) switch
|
||||
{
|
||||
case 0: return PlantType.CypressTwisted;
|
||||
case 1: return PlantType.HedgeShort;
|
||||
case 2: return PlantType.JuniperBush;
|
||||
case 3: return PlantType.CocoaTree;
|
||||
default: return PlantType.SnowdropPatch;
|
||||
}
|
||||
0 => PlantType.CypressTwisted,
|
||||
1 => PlantType.HedgeShort,
|
||||
2 => PlantType.JuniperBush,
|
||||
3 => PlantType.CocoaTree,
|
||||
_ => PlantType.SnowdropPatch
|
||||
};
|
||||
}
|
||||
|
||||
public static PlantType RandomPeculiarGroupThree()
|
||||
{
|
||||
switch (Utility.Random(5))
|
||||
return Utility.Random(5) switch
|
||||
{
|
||||
case 0: return PlantType.Cattails;
|
||||
case 1: return PlantType.PoppyPatch;
|
||||
case 2: return PlantType.SpiderTree;
|
||||
case 3: return PlantType.CocoaTree;
|
||||
default: return PlantType.WaterLily;
|
||||
}
|
||||
0 => PlantType.Cattails,
|
||||
1 => PlantType.PoppyPatch,
|
||||
2 => PlantType.SpiderTree,
|
||||
3 => PlantType.CocoaTree,
|
||||
_ => PlantType.WaterLily
|
||||
};
|
||||
}
|
||||
|
||||
public static PlantType RandomPeculiarGroupFour()
|
||||
{
|
||||
switch (Utility.Random(5))
|
||||
return Utility.Random(5) switch
|
||||
{
|
||||
case 0: return PlantType.CypressStraight;
|
||||
case 1: return PlantType.HedgeTall;
|
||||
case 2: return PlantType.HopsSouth;
|
||||
case 3: return PlantType.CocoaTree;
|
||||
default: return PlantType.SugarCanes;
|
||||
}
|
||||
0 => PlantType.CypressStraight,
|
||||
1 => PlantType.HedgeTall,
|
||||
2 => PlantType.HopsSouth,
|
||||
3 => PlantType.CocoaTree,
|
||||
_ => PlantType.SugarCanes
|
||||
};
|
||||
}
|
||||
|
||||
public static PlantType RandomBonsai(double increaseRatio)
|
||||
|
|
|
|||
|
|
@ -74,13 +74,13 @@ namespace Server.Engines.Plants
|
|||
|
||||
public static Seed RandomPeculiarSeed(int group)
|
||||
{
|
||||
switch (group)
|
||||
return @group switch
|
||||
{
|
||||
case 1: return new Seed(PlantTypeInfo.RandomPeculiarGroupOne(), PlantHue.Plain);
|
||||
case 2: return new Seed(PlantTypeInfo.RandomPeculiarGroupTwo(), PlantHue.Plain);
|
||||
case 3: return new Seed(PlantTypeInfo.RandomPeculiarGroupThree(), PlantHue.Plain);
|
||||
default: return new Seed(PlantTypeInfo.RandomPeculiarGroupFour(), PlantHue.Plain);
|
||||
}
|
||||
1 => new Seed(PlantTypeInfo.RandomPeculiarGroupOne(), PlantHue.Plain),
|
||||
2 => new Seed(PlantTypeInfo.RandomPeculiarGroupTwo(), PlantHue.Plain),
|
||||
3 => new Seed(PlantTypeInfo.RandomPeculiarGroupThree(), PlantHue.Plain),
|
||||
_ => new Seed(PlantTypeInfo.RandomPeculiarGroupFour(), PlantHue.Plain)
|
||||
};
|
||||
}
|
||||
|
||||
private int GetLabel(out string args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue