109 if (resupplyRocketAction)
112 if (!rocketMuzzleComp || !rocketMuzzleComp.CanReloadNextBarrel())
116 if (!resource.IsValid())
127 rocketMuzzleComp.ReloadNextBarrel(spawnedRocket);
128 super.OnExecutedServer(actionOwner, actionUser, action);
135 if (resupplyMagazineAction)
138 if (!currentMagazine)
141 int count = currentMagazine.GetAmmoCount();
142 int maxCount = currentMagazine.GetMaxAmmoCount();
149 if (count + added < maxCount)
150 currentMagazine.SetAmmoCount(count + added);
152 currentMagazine.SetAmmoCount(maxCount);
154 super.OnExecutedServer(actionOwner, actionUser, action);
161 if (refundAmmoAction)
164 if (!rocketMuzzleComp)
168 int count = rocketMuzzleComp.GetBarrelsCount();
169 for (
int i = count - 1; i >= 0; i--)
171 if (!rocketMuzzleComp.CanReloadBarrel(i))
173 IEntity projectile = rocketMuzzleComp.GetBarrelProjectile(i);
177 rocketMuzzleComp.UnloadBarrel(i);
183 super.OnExecutedServer(actionOwner, actionUser, action);
193 if (attachPylonAction)
196 if (turrentController)
199 if (!weaponSlot || weaponSlot.GetWeaponEntity())
203 if (!resource.IsValid())
211 weaponSlot.GetSlotInfo().GetWorldTransform(
params.Transform);
217 turrentController.AddWeapon(actionUser, weaponSlot.GetWeaponSlotIndex(), spawnedWeapon);
218 super.OnExecutedServer(actionOwner, actionUser, action);
226 if (refundPylonAction)
229 if (!turrentController)
236 const IEntity attachedWeapon = weaponSlot.GetWeaponEntity();
241 turrentController.RemoveWeapon(null, weaponId, null);
247 super.OnExecutedServer(actionOwner, actionUser, action);
249 RplComponent.DeleteRplEntity(attachedWeapon,
false);
260 super.OnExecute(actionOwner, actionUser, playerId, action);
263 string soundEffectName;
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.