diff --git a/CommandAmmo.cs b/CommandAmmo.cs index ecca6e5..50d2ea5 100644 --- a/CommandAmmo.cs +++ b/CommandAmmo.cs @@ -42,12 +42,12 @@ public void Execute(IRocketPlayer caller, string[] command) currentEquiped = Uplayer.Player.equipment.asset; if (currentEquiped == null) { - UnturnedChat.Say(caller, "you dont have anything equipped!"); + UnturnedChat.Say(caller, EasyAmmo.Instance.Translate("nothing_equipped")); return; } if (currentEquiped.ItemType != SDG.Unturned.EItemType.GUN ) { - UnturnedChat.Say(caller, "you dont have a gun equipped currently!"); + UnturnedChat.Say(caller, EasyAmmo.Instance.Translate("no_gun_equipped")); return; } @@ -57,7 +57,7 @@ public void Execute(IRocketPlayer caller, string[] command) currentWeapon = (SDG.Unturned.ItemGunAsset)currentEquiped; if (currentWeapon == null) { - UnturnedChat.Say(caller, "Gun asset is not found!!"); + UnturnedChat.Say(caller, EasyAmmo.Instance.Translate("gun_asset_not_found")); return; } @@ -80,7 +80,7 @@ public void Execute(IRocketPlayer caller, string[] command) public string Help { - get { return "return gives you the specified number of clips for yuor current weapon."; } + get { return "gives you the specified number of clips for your currently equipped weapon."; } } public string Name @@ -102,11 +102,11 @@ public void SpawnMags(ushort ammoAmountToSpawn, IRocketPlayer caller, SDG.Unturn { if (Uplayer.GiveItem(currentWeapon.magazineID, (byte)ammoAmountToSpawn)) { - UnturnedChat.Say(caller, "Giving you " + ammoAmountToSpawn.ToString() + " of " + UnturnedItems.GetItemAssetById(currentWeapon.magazineID).Name); + UnturnedChat.Say(caller, EasyAmmo.Instance.Translate("giving_mags", ammoAmountToSpawn.ToString(), UnturnedItems.GetItemAssetById(currentWeapon.magazineID).Name)); } else { - UnturnedChat.Say(caller, "Failed to spawn a magazine for the gun your holding!"); + UnturnedChat.Say(caller, EasyAmmo.Instance.Translate("failed_to_spawn_mags")); } } @@ -116,11 +116,11 @@ public void SpawnMagsWithLimit(ushort ammoAmountToSpawn, IRocketPlayer caller, S { if (Uplayer.GiveItem(currentWeapon.magazineID, (byte)ammoAmountToSpawn)) { - UnturnedChat.Say(caller, "Giving you " + ammoAmountToSpawn.ToString() + " of " + UnturnedItems.GetItemAssetById(currentWeapon.magazineID).Name); + UnturnedChat.Say(caller, EasyAmmo.Instance.Translate("giving_mags", ammoAmountToSpawn.ToString(), UnturnedItems.GetItemAssetById(currentWeapon.magazineID).Name)); } else { - UnturnedChat.Say(caller, "Failed to spawn a magazine for the gun your holding!"); + UnturnedChat.Say(caller, EasyAmmo.Instance.Translate("failed_to_spawn_mags")); } } else @@ -134,7 +134,7 @@ public void SpawnMagsWithLimit(ushort ammoAmountToSpawn, IRocketPlayer caller, S } else { - UnturnedChat.Say(caller, "Failed to spawn a magazine for the gun your holding!"); + UnturnedChat.Say(caller, EasyAmmo.Instance.Translate("failed_to_spawn_mags")); } } } diff --git a/EasyAmmo.cs b/EasyAmmo.cs index 696010a..c554785 100644 --- a/EasyAmmo.cs +++ b/EasyAmmo.cs @@ -20,10 +20,7 @@ protected override void Load() Logger.Log("EasyAmmo loaded!"); Logger.Log("ClipLimitEnabled : " + Instance.Configuration.Instance.ClipLimitEnabled); - if (Instance.Configuration.Instance.ClipLimitEnabled) - { - Logger.Log("ClipLimit : " + Instance.Configuration.Instance.ClipLimit.ToString()); - } + Logger.Log("ClipLimit : " + Instance.Configuration.Instance.ClipLimit.ToString()); } protected override void Unload() @@ -37,7 +34,12 @@ public override Rocket.API.Collections.TranslationList DefaultTranslations { return new Rocket.API.Collections.TranslationList { - {"over_clip_spawn_limit", "{0} is over the spawn limit, giving you {1} of \"{2}\" instead"} + {"over_clip_spawn_limit", "{0} is over the spawn limit, giving you {1} of \"{2}\" instead"}, + {"no_gun_equipped", "You dont have any guns equipped!"}, + {"nothing_equipped", "You dont have anything equipped!"}, + {"gun_asset_not_found","Gun asset is not found!"}, + {"giving_mags", "Giving you {0} of {1}"}, + {"failed_to_spawn_mags", "Failed to spawn a magazine for the gun you are holding!"} }; } }