/*note In torquescript they used a classname call to the weapon class to perform * the onPickUp and onUse. Unfortunately, we don't have that ability in CSharp. */ public override bool onPickup(Item obj, ShapeBase user, int amount) { if (!base.onPickup(obj, user, amount)) return false; Audio.AudioServerPlay3D("WeaponPickupSound", user.getTransform()); //todo do really like this, I guess they didn't want aiPlayer picking shit up. if (user.getClassName() == "Player" && user.getMountedImage(Constants.WeaponSlot) == 0) return user.Use(this); return false; }
/*note In torquescript they used a classname call to the weapon class to perform * the onPickUp and onUse. Unfortunately, we don't have that ability in CSharp. */ public override bool onPickup(Item obj, ShapeBase user, int amount) { if (!base.onPickup(obj, user, amount)) { return(false); } Audio.AudioServerPlay3D("WeaponPickupSound", user.getTransform()); //todo do really like this, I guess they didn't want aiPlayer picking shit up. if (user.getClassName() == "Player" && user.getMountedImage(Constants.WeaponSlot) == 0) { return(user.Use(this)); } return(false); }