289 {
290 if (exclude_quantity)
291 {
292 int maskOriginal = source.m_VariablesMask;
294 target.TransferVariablesFloat(source.GetVariablesFloat());
295 source.m_VariablesMask = maskOriginal;
296 }
297 else
298 {
299 target.TransferVariablesFloat(source.GetVariablesFloat());
300 }
301
302 if (source.IsMagazine() && target.IsMagazine())
303 {
304 Magazine source_mag = Magazine.Cast(source);
305 Magazine target_mag = Magazine.Cast(target);
306
307 target_mag.ServerSetAmmoCount(source_mag.GetAmmoCount());
308 }
309
310 if (source.IsWeapon() && target.IsWeapon())
311 {
314
315 target_wpn.CopyWeaponStateFrom(source_wpn);
316 }
317
318 if (source.HasEnergyManager() && target.HasEnergyManager())
319 {
322
324
327 }
328
332 {
335 }
336 }
Super root of all classes in Enforce script.
void SwitchOn()
Energy manager: Switches ON the device so it starts doing its work if it has enough energy.
float GetEnergy()
Energy manager: Returns the amount of stored energy this device has.
void SetEnergy(float new_energy)
Energy manager: Sets stored energy for this device. It ignores the min/max limit!
bool IsSwitchedOn()
Energy manager: Returns state of the switch. Whenever the device is working or not does not matter....
void TransferFoodStage(notnull Edible_Base source)
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
const int VARIABLE_QUANTITY