Code: Select all
function MobileInventoryPack::deployShape(%player, %item)
{
%team = GameBase::getTeam(%player);
%client = Player::getClient(%player);
if($TeamItemCount[%team @ %item] >= $TeamItemMax[%item] && !$build)
{
Client::sendMessage(%client, 0, "Deployable Item limit reached for " @ %descr);
return false;
}
if(!GameBase::getLOSInfo(%player, 5))
{
Client::sendMessage(%client, 0, "Deploy position out of range");
return false;
}
// No more window shopping! -perrinoia
%rot = GameBase::getRotation(%player);
if(getLOSInfo(vector::add($LOS::Position, rotateVector("0 -2.25 1.5", %rot)), vector::add($LOS::Position, rotateVector("2.16 -0.5 1.4", %rot)), 1))
{
Client::sendMessage(%client, 0, "Window shopping is no longer permitted.");
return false;
}
This will also prevent deploying inventory stations in the corner of a room, where it could be used, but could not be seen. Unfortunate side effect, but worth sacrificing, in my opinion.