fix: Codegens Food & Beverages (#1021)
- [X] Simplifies beverages - [X] Codegens food & beverages
This commit is contained in:
parent
7b619f23b8
commit
dd95a8a1e3
23 changed files with 965 additions and 1488 deletions
|
|
@ -1,346 +1,144 @@
|
||||||
namespace Server.Items
|
using ModernUO.Serialization;
|
||||||
|
|
||||||
|
namespace Server.Items;
|
||||||
|
|
||||||
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class Wasabi : Food
|
||||||
{
|
{
|
||||||
public class Wasabi : Item
|
[Constructible]
|
||||||
|
public Wasabi() : base(0x24E8) => Weight = 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class WasabiClumps : Food
|
||||||
|
{
|
||||||
|
[Constructible]
|
||||||
|
public WasabiClumps() : base(0x24EB)
|
||||||
{
|
{
|
||||||
[Constructible]
|
Stackable = false;
|
||||||
public Wasabi() : base(0x24E8) => Weight = 1.0;
|
Weight = 1.0;
|
||||||
|
FillFactor = 2;
|
||||||
public Wasabi(Serial serial) : base(serial)
|
}
|
||||||
{
|
}
|
||||||
}
|
|
||||||
|
[SerializationGenerator(0, false)]
|
||||||
public override void Serialize(IGenericWriter writer)
|
public partial class EmptyBentoBox : Item
|
||||||
{
|
{
|
||||||
base.Serialize(writer);
|
[Constructible]
|
||||||
|
public EmptyBentoBox() : base(0x2834) => Weight = 5.0;
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class BentoBox : Food
|
||||||
base.Deserialize(reader);
|
{
|
||||||
|
[Constructible]
|
||||||
var version = reader.ReadInt();
|
public BentoBox() : base(0x2836)
|
||||||
}
|
{
|
||||||
}
|
Stackable = false;
|
||||||
|
Weight = 5.0;
|
||||||
public class WasabiClumps : Food
|
FillFactor = 2;
|
||||||
{
|
}
|
||||||
[Constructible]
|
|
||||||
public WasabiClumps() : base(0x24EB)
|
public override bool Eat(Mobile from)
|
||||||
{
|
{
|
||||||
Stackable = false;
|
if (!base.Eat(from))
|
||||||
Weight = 1.0;
|
{
|
||||||
FillFactor = 2;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WasabiClumps(Serial serial) : base(serial)
|
from.AddToBackpack(new EmptyBentoBox());
|
||||||
{
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
[SerializationGenerator(0, false)]
|
||||||
base.Serialize(writer);
|
public partial class SushiRolls : Food
|
||||||
|
{
|
||||||
writer.Write(0); // version
|
[Constructible]
|
||||||
}
|
public SushiRolls() : base(0x283E)
|
||||||
|
{
|
||||||
public override void Deserialize(IGenericReader reader)
|
Stackable = false;
|
||||||
{
|
Weight = 3.0;
|
||||||
base.Deserialize(reader);
|
FillFactor = 2;
|
||||||
|
}
|
||||||
var version = reader.ReadInt();
|
}
|
||||||
}
|
|
||||||
}
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class SushiPlatter : Food
|
||||||
public class EmptyBentoBox : Item
|
{
|
||||||
{
|
[Constructible]
|
||||||
[Constructible]
|
public SushiPlatter() : base(0x2840)
|
||||||
public EmptyBentoBox() : base(0x2834) => Weight = 5.0;
|
{
|
||||||
|
Stackable = Core.ML;
|
||||||
public EmptyBentoBox(Serial serial) : base(serial)
|
Weight = 3.0;
|
||||||
{
|
FillFactor = 2;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
[SerializationGenerator(0, false)]
|
||||||
base.Serialize(writer);
|
public partial class GreenTeaBasket : Item
|
||||||
|
{
|
||||||
writer.Write(0); // version
|
[Constructible]
|
||||||
}
|
public GreenTeaBasket() : base(0x284B) => Weight = 10.0;
|
||||||
|
}
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
[SerializationGenerator(0, false)]
|
||||||
base.Deserialize(reader);
|
public partial class GreenTea : Food
|
||||||
|
{
|
||||||
var version = reader.ReadInt();
|
[Constructible]
|
||||||
}
|
public GreenTea() : base(0x284C)
|
||||||
}
|
{
|
||||||
|
Stackable = false;
|
||||||
public class BentoBox : Food
|
Weight = 4.0;
|
||||||
{
|
FillFactor = 2;
|
||||||
[Constructible]
|
}
|
||||||
public BentoBox() : base(0x2836)
|
}
|
||||||
{
|
|
||||||
Stackable = false;
|
[SerializationGenerator(0, false)]
|
||||||
Weight = 5.0;
|
public partial class MisoSoup : Food
|
||||||
FillFactor = 2;
|
{
|
||||||
}
|
[Constructible]
|
||||||
|
public MisoSoup() : base(0x284D)
|
||||||
public BentoBox(Serial serial) : base(serial)
|
{
|
||||||
{
|
Stackable = false;
|
||||||
}
|
Weight = 4.0;
|
||||||
|
FillFactor = 2;
|
||||||
public override bool Eat(Mobile from)
|
}
|
||||||
{
|
}
|
||||||
if (!base.Eat(from))
|
|
||||||
{
|
[SerializationGenerator(0, false)]
|
||||||
return false;
|
public partial class WhiteMisoSoup : Food
|
||||||
}
|
{
|
||||||
|
[Constructible]
|
||||||
from.AddToBackpack(new EmptyBentoBox());
|
public WhiteMisoSoup() : base(0x284E)
|
||||||
return true;
|
{
|
||||||
}
|
Stackable = false;
|
||||||
|
Weight = 4.0;
|
||||||
public override void Serialize(IGenericWriter writer)
|
FillFactor = 2;
|
||||||
{
|
}
|
||||||
base.Serialize(writer);
|
}
|
||||||
|
|
||||||
writer.Write(0); // version
|
[SerializationGenerator(0, false)]
|
||||||
}
|
public partial class RedMisoSoup : Food
|
||||||
|
{
|
||||||
public override void Deserialize(IGenericReader reader)
|
[Constructible]
|
||||||
{
|
public RedMisoSoup() : base(0x284F)
|
||||||
base.Deserialize(reader);
|
{
|
||||||
|
Stackable = false;
|
||||||
var version = reader.ReadInt();
|
Weight = 4.0;
|
||||||
}
|
FillFactor = 2;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public class SushiRolls : Food
|
|
||||||
{
|
[SerializationGenerator(0, false)]
|
||||||
[Constructible]
|
public partial class AwaseMisoSoup : Food
|
||||||
public SushiRolls() : base(0x283E)
|
{
|
||||||
{
|
[Constructible]
|
||||||
Stackable = false;
|
public AwaseMisoSoup() : base(0x2850)
|
||||||
Weight = 3.0;
|
{
|
||||||
FillFactor = 2;
|
Stackable = false;
|
||||||
}
|
Weight = 4.0;
|
||||||
|
FillFactor = 2;
|
||||||
public SushiRolls(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SushiPlatter : Food
|
|
||||||
{
|
|
||||||
[Constructible]
|
|
||||||
public SushiPlatter() : base(0x2840)
|
|
||||||
{
|
|
||||||
Stackable = Core.ML;
|
|
||||||
Weight = 3.0;
|
|
||||||
FillFactor = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SushiPlatter(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class GreenTeaBasket : Item
|
|
||||||
{
|
|
||||||
[Constructible]
|
|
||||||
public GreenTeaBasket() : base(0x284B) => Weight = 10.0;
|
|
||||||
|
|
||||||
public GreenTeaBasket(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class GreenTea : Food
|
|
||||||
{
|
|
||||||
[Constructible]
|
|
||||||
public GreenTea() : base(0x284C)
|
|
||||||
{
|
|
||||||
Stackable = false;
|
|
||||||
Weight = 4.0;
|
|
||||||
FillFactor = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GreenTea(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class MisoSoup : Food
|
|
||||||
{
|
|
||||||
[Constructible]
|
|
||||||
public MisoSoup() : base(0x284D)
|
|
||||||
{
|
|
||||||
Stackable = false;
|
|
||||||
Weight = 4.0;
|
|
||||||
FillFactor = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MisoSoup(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class WhiteMisoSoup : Food
|
|
||||||
{
|
|
||||||
[Constructible]
|
|
||||||
public WhiteMisoSoup() : base(0x284E)
|
|
||||||
{
|
|
||||||
Stackable = false;
|
|
||||||
Weight = 4.0;
|
|
||||||
FillFactor = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public WhiteMisoSoup(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class RedMisoSoup : Food
|
|
||||||
{
|
|
||||||
[Constructible]
|
|
||||||
public RedMisoSoup() : base(0x284F)
|
|
||||||
{
|
|
||||||
Stackable = false;
|
|
||||||
Weight = 4.0;
|
|
||||||
FillFactor = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public RedMisoSoup(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class AwaseMisoSoup : Food
|
|
||||||
{
|
|
||||||
[Constructible]
|
|
||||||
public AwaseMisoSoup() : base(0x2850)
|
|
||||||
{
|
|
||||||
Stackable = false;
|
|
||||||
Weight = 4.0;
|
|
||||||
FillFactor = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public AwaseMisoSoup(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.AwaseMisoSoup"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"version": 2,
|
||||||
|
"type": "Server.Items.BaseBeverage",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"name": "Poison",
|
||||||
|
"type": "Server.Poison",
|
||||||
|
"rule": "PrimitiveUOTypeMigrationRule",
|
||||||
|
"ruleArguments": [
|
||||||
|
"Poison"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Poisoner",
|
||||||
|
"type": "Server.Mobile",
|
||||||
|
"rule": "SerializableInterfaceMigrationRule"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "RawContent",
|
||||||
|
"type": "Server.Items.BeverageType",
|
||||||
|
"rule": "EnumMigrationRule"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "RawQuantity",
|
||||||
|
"type": "int",
|
||||||
|
"rule": "PrimitiveTypeMigrationRule",
|
||||||
|
"ruleArguments": [
|
||||||
|
""
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.BentoBox"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.BeverageBottle"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.CeramicMug"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.EmptyBentoBox"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.GlassMug"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Goblet"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.GreenTea"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.GreenTeaBasket"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Jug.v0.json
Normal file
4
Projects/UOContent/Migrations/Server.Items.Jug.v0.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Jug"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.MisoSoup"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.PewterMug"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Pitcher"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.RedMisoSoup"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.SushiPlatter"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.SushiRolls"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Wasabi"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.WasabiClumps"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.WhiteMisoSoup"
|
||||||
|
}
|
||||||
|
|
@ -158,8 +158,8 @@ namespace Server
|
||||||
|
|
||||||
AOS.Damage(m_Mobile, From, damage, 0, 0, 0, 100, 0);
|
AOS.Damage(m_Mobile, From, damage, 0, 0, 0, 100, 0);
|
||||||
|
|
||||||
if (Utility.RandomDouble() >= 0.60
|
// OSI: randomly revealed between first and third damage tick, guessing 60% chance
|
||||||
) // OSI: randomly revealed between first and third damage tick, guessing 60% chance
|
if (Utility.RandomDouble() >= 0.60)
|
||||||
{
|
{
|
||||||
m_Mobile.RevealingAction();
|
m_Mobile.RevealingAction();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue