public bool ReloadAmmo(DirectItem charge, int weaponNumber, double Range) { if (!IsReloadingAmmo) { if (!IsChangingAmmo) { if (!InLimboState) { Logging.Log("ReloadAmmo", "Reloading [" + weaponNumber + "] [" + _module.TypeName + "] with [" + charge.TypeName + "][" + Math.Round(Range / 1000, 0) + "]", Logging.Teal); _module.ReloadAmmo(charge); Cache.Instance.LastReloadedTimeStamp[ItemId] = DateTime.UtcNow; if (Cache.Instance.ReloadTimePerModule.ContainsKey(ItemId)) { Cache.Instance.ReloadTimePerModule[ItemId] = Cache.Instance.ReloadTimePerModule[ItemId] + Time.Instance.ReloadWeaponDelayBeforeUsable_seconds; } else { Cache.Instance.ReloadTimePerModule[ItemId] = Time.Instance.ReloadWeaponDelayBeforeUsable_seconds; } return(true); } Logging.Log("ReloadAmmo", "[" + weaponNumber + "][" + _module.TypeName + "] is currently in a limbo state, waiting", Logging.Teal); return(false); } Logging.Log("ReloadAmmo", "[" + weaponNumber + "][" + _module.TypeName + "] is already changing ammo, waiting", Logging.Teal); return(false); } Logging.Log("ReloadAmmo", "[" + weaponNumber + "][" + _module.TypeName + "] is already reloading, waiting", Logging.Teal); return(false); }
public void ReloadAmmo(DirectItem charge) { _module.ReloadAmmo(charge); }