Skip to content

Commit

Permalink
added translations for everything
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkbound committed Jun 18, 2016
1 parent f509adc commit 8cd6f55
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
18 changes: 9 additions & 9 deletions CommandAmmo.cs
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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
Expand All @@ -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"));
}
}

Expand All @@ -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
Expand All @@ -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"));
}
}
}
Expand Down
12 changes: 7 additions & 5 deletions EasyAmmo.cs
Expand Up @@ -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()
Expand All @@ -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!"}
};
}
}
Expand Down

0 comments on commit 8cd6f55

Please sign in to comment.