699 {
701 {
702 Weapon_Base wpn = Weapon_Base.Cast(parent);
703 if (wpn)
704 {
705 GameInventory inventory = parent.GetInventory();
707
708
709
710
711
712
713
714
715
716
717 }
718 else
719 {
720 EntityAI eai = parent.GetInventory().CreateAttachment(att_name);
721 if (eai)
722 {
724 {
727 }
728 return eai;
729 }
730 else
732 }
733 return NULL;
734 }
735 else
736 {
737
738 Param3<string, float, float> params = new Param3<string, float, float>(att_name, health, quantity);
739 player.RPCSingleParam(
ERPCs.DEV_RPC_SPAWN_ITEM_AS_ATTACHMENT, params,
true);
740 }
741 return NULL;
742 }
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)