public string AiTurretShapeDataOnThrow(coAITurretShapeData thisobj, coPlayer user, int amount)
            {
            if (amount == 0)
                amount = 1;

            if (thisobj["maxInventory"] != "")
                if (amount > thisobj["maxInventory"].AsInt())
                    amount = thisobj["maxInventory"].AsInt();

            if (amount == 0)
                return "0";

            ShapeBaseShapeBaseDecInventory(user, thisobj, amount);
            //console.Call(user, "decInventory", new[] {thisobj, amount});
            TransformF rot = new TransformF(user.getEulerRotation());

            Torque_Class_Helper tc_obj = new Torque_Class_Helper("AITurretShape", "");
            tc_obj.Props.Add("datablock", thisobj);
            tc_obj.Props.Add("rotation", string.Format("{0}0 0 1 {1}{0}", '"', rot.MPosition.z));
            tc_obj.Props.Add("count", "1");
            tc_obj.Props.Add("sourceObject", user);
            tc_obj.Props.Add("client", console.GetVarString(string.Format("{0}.client", user)));
            tc_obj.Props.Add("isAiControlled", "1");

            coAITurretShape obj = tc_obj.Create();
            ((coSimSet)"MissionGroup").pushToBack(obj);
            obj.call("addToIgnoreList", user);


            coGameConnection client = user["client"];
            if (client.isObject())
                {
                if (client["ownedTurrets"] == "")
                    client["ownedTurrets"] = new Torque_Class_Helper("SimSet", "").Create().AsString();

                coSimSet SimSet_id = client["ownedTurrets"];
                int countofitems = SimSet_id.getCount();
                for (uint i = 0; i < countofitems; i++)
                    {
                    coAITurretShape turret = SimSet_id.getObject(i);
                    turret.call("addToIgnoreList", obj);
                    obj.call("addToIgnoreList", turret);
                    }
                SimSet_id.pushToBack(obj);
                }

            return obj;
            }