#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

@ -77,7 +77,7 @@ namespace Server.Items
m_Cotton = cotton;
}
protected override void OnTarget( Mobile from, object targeted )
protected override void OnTarget( Mobile from, object targeted )
{
if ( m_Cotton.Deleted )
return;
@ -101,8 +101,28 @@ namespace Server.Items
}
else
{
m_Cotton.Consume();
wheel.BeginSpin( new SpinCallback( Cotton.OnSpun ), from, m_Cotton.Hue );
int amount = m_Cotton.Amount;
int hue = m_Cotton.Hue;
m_Cotton.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
@ -112,4 +132,4 @@ namespace Server.Items
}
}
}
}
}