#WW# Looms and Spinning wheels now process entire stacks.

This commit is contained in:
WarrentyExpired 2026-08-07 19:43:22 -04:00
parent 791f82b4d0
commit 743e84145c
4 changed files with 117 additions and 32 deletions

View file

@ -66,8 +66,7 @@ namespace Server.Items
{
m_Flax = flax;
}
protected override void OnTarget( Mobile from, object targeted )
protected override void OnTarget( Mobile from, object targeted )
{
if ( m_Flax.Deleted )
return;
@ -91,8 +90,28 @@ namespace Server.Items
}
else
{
m_Flax.Consume();
wheel.BeginSpin( new SpinCallback( Flax.OnSpun ), from, m_Flax.Hue );
int amount = m_Flax.Amount;
int hue = m_Flax.Hue;
m_Flax.Delete();
wheel.BeginSpin( ( w, m, h ) =>
{
int totalThread = 6 * amount;
while ( totalThread > 0 )
{
int threadToGive = Math.Min( totalThread, 60000 );
Item spools = new SpoolOfThread( threadToGive );
spools.Hue = h;
m.AddToBackpack( spools );
totalThread -= threadToGive;
}
m.SendLocalizedMessage( 1010577 ); // You put the spools of thread in your backpack.
}, from, hue );
}
}
else
@ -102,4 +121,4 @@ namespace Server.Items
}
}
}
}
}