In Granite.cs, edit this part:
Code: Select all
public BaseGranite( CraftResource resource ) : base( 0x1779 )
{
Weight = 10.0;
Hue = CraftResources.GetHue( resource );
Stackable = true; //ADD THIS
m_Resource = resource;
}
1) Tools menu -> Art browser
2) look for the granite graphics (found it pretty much in the middle)
3) Right click the graphic -> choose "Show tiledata editor"
4) Check the "Generic/Stackable" option
5) Save the changes
Now you'd need to have everyone download the new tiledata.mul, and replace the old one.
Also scripts for stonekeys and graniteboxes would need to be edited so that they work for
stacked granite i.e. when granite is added, the amount in the stack is added, not just one.
Editing StoneWorkersKeys.cs:
Change this:
Code: Select all
public void EndCombine(Mobile from, object o)
{
if (o is Item && (((Item)o).IsChildOf(from.Backpack) || ((Item)o).IsChildOf(from.BankBox)))
{
Item curItem = o as Item;
if (curItem is BaseGranite)
{
if (curItem is DullCopperGranite)
{
if (DullCopper + curItem.Amount > StorageLimit)
from.SendMessage("You are trying to add "+ ......
else
{
curItem.Delete();
DullCopper = (DullCopper + 1);
from.SendGump(new StoneWorkersKeyGump((PlayerMobile)from, this));
BeginCombine(from);
}
}
.
.
.
Code: Select all
public void EndCombine(Mobile from, object o)
{
if (o is Item && (((Item)o).IsChildOf(from.Backpack) || ((Item)o).IsChildOf(from.BankBox)))
{
Item curItem = o as Item;
if (curItem is BaseGranite)
{
if (curItem is DullCopperGranite)
{
if (DullCopper + curItem.Amount > StorageLimit)
from.SendMessage("You are trying to add "+ .....
else
{
DullCopper = (DullCopper + curItem.Amount); //"+1" -> "curItem.Amount"
curItem.Delete(); // moved this one row down
from.SendGump(new StoneWorkersKeyGump((PlayerMobile)from, this));
BeginCombine(from);
}
}
pretty much the same.