748 {
750 {
751 Weapon_Base wpn = Weapon_Base.Cast(parent);
752 if (wpn)
753 {
754 GameInventory inventory = parent.GetInventory();
756
757
758
759
760
761
762
763
764
765
766 }
767 else
768 {
769 EntityAI eai = parent.GetInventory().CreateAttachment(att_name);
770 if (eai)
771 {
773 {
776 }
777 return eai;
778 }
779 else
781 }
782 return NULL;
783 }
784 else
785 {
786
787 Param3<string, float, float> params = new Param3<string, float, float>(att_name, health, quantity);
788 player.RPCSingleParam(
ERPCs.DEV_RPC_SPAWN_ITEM_AS_ATTACHMENT, params,
true);
789 }
790 return NULL;
791 }
class GP5GasMask extends MaskBase ItemBase
void SetupSpawnedItem(ItemBase item, float health, float quantity)
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
void OnSpawnErrorReport(string name)