Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Chasmical committed Sep 9, 2020
1 parent 9fccff5 commit 6f43194
Show file tree
Hide file tree
Showing 11 changed files with 140 additions and 61 deletions.
101 changes: 68 additions & 33 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion SuggestionGen/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public List<string> GenerateCode()
List<string> code = new List<string>();

string summarySub = original.Length > 0 ? " (translated from " + languageTextBox.Text.ToLower() + ")" : "";
code.Add("<details><summary>Suggestion" + summarySub + "</summary>");
code.Add("<details open><summary>Suggestion" + summarySub + "</summary>");

string blockquoteSub = sourceLinkTextBox.Text.Length > 0 ? " cite=\"" + sourceLinkTextBox.Text + "\"" : "";
code.Add("<blockquote" + blockquoteSub + "><p>");
Expand Down
10 changes: 10 additions & 0 deletions aTonOfItems/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions aTonOfItems/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@
<data name="SPYTRON3000" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SPYTRON3000.bin;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="Toolkit" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Toolkit.bin;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="Voodoo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Voodoo.bin;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
Expand Down
Binary file added aTonOfItems/Resources/Toolkit.bin
Binary file not shown.
84 changes: 57 additions & 27 deletions aTonOfItems/aToI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class ATOI : BaseUnityPlugin
{
public const string pluginGuid = "abbysssal.streetsofrogue.atoi";
public const string pluginName = "a Ton of Items";
public const string pluginVersion = "1.0";
public const string pluginVersion = "0.2";

public void Awake()
{
Expand All @@ -21,8 +21,8 @@ public void Awake()
#region Quantum Fud
QuantumFudCooldowns = new Dictionary<InvItem, float>();

Sprite sprite1 = RogueUtilities.ConvertToSprite(Properties.Resources.QuantumFud);
CustomItem quantumFud = RogueLibs.CreateCustomItem("QuantumFud", sprite1, false,
Sprite sprite = RogueUtilities.ConvertToSprite(Properties.Resources.QuantumFud);
CustomItem quantumFud = RogueLibs.CreateCustomItem("QuantumFud", sprite, false,
new CustomNameInfo("Quantum Fud",
null, null, null, null,
"Квантовый хафчик",
Expand Down Expand Up @@ -84,8 +84,8 @@ public void Awake()
#endregion

#region Wild Bypasser
Sprite sprite2 = RogueUtilities.ConvertToSprite(Properties.Resources.WildBypasser);
CustomItem wildBypasser = RogueLibs.CreateCustomItem("WildBypasser", sprite2, false,
sprite = RogueUtilities.ConvertToSprite(Properties.Resources.WildBypasser);
CustomItem wildBypasser = RogueLibs.CreateCustomItem("WildBypasser", sprite, false,
new CustomNameInfo("Wild Bypasser",
null, null, null, null,
"Универсальный проход сквозь стены",
Expand Down Expand Up @@ -145,8 +145,8 @@ public void Awake()
VoodooCooldowns = new Dictionary<InvItem, float>();
VoodooUpdateList = new Dictionary<InvItem, Agent>();

Sprite sprite3 = RogueUtilities.ConvertToSprite(Properties.Resources.VoodooInactive);
CustomItem blankVoodooDoll = RogueLibs.CreateCustomItem("BlankVoodooDoll", sprite3, false,
sprite = RogueUtilities.ConvertToSprite(Properties.Resources.VoodooInactive);
CustomItem blankVoodooDoll = RogueLibs.CreateCustomItem("BlankVoodooDoll", sprite, false,
new CustomNameInfo("Blank Voodoo Doll",
null, null, null, null,
"Непривязанная кукла Вуду",
Expand Down Expand Up @@ -190,13 +190,13 @@ public void Awake()
"Привязать",
null, null));

Sprite sprite4 = RogueUtilities.ConvertToSprite(Properties.Resources.Voodoo);
CustomItem voodooDoll = RogueLibs.CreateCustomItem("VoodooDoll2", sprite4, false,
sprite = RogueUtilities.ConvertToSprite(Properties.Resources.Voodoo);
CustomItem voodooDoll = RogueLibs.CreateCustomItem("VoodooDoll2", sprite, false,
new CustomNameInfo("Voodoo Doll",
null, null, null, null,
"Кукла Вуду",
null, null),
new CustomNameInfo("Combine the doll with any weapon/consumable to inflict damage/effects on the victim. Combine with itself to remove the bond.",
new CustomNameInfo("Combine the doll with any weapon/consumable to inflict damage/effects on the victim. Combine with itself to unbind.",
null, null, null, null,
"Объедините куклу с любым оружием/расходником для нанесения урона/эффектов жертве. Объедините с самой собой, чтобы убрать связь.",
null, null),
Expand Down Expand Up @@ -326,8 +326,8 @@ public void Awake()
#endregion

#region SPYTRON 3000
Sprite sprite5 = RogueUtilities.ConvertToSprite(Properties.Resources.SPYTRON3000);
CustomItem spytron3000 = RogueLibs.CreateCustomItem("SPYTRON3000", sprite5, false,
sprite = RogueUtilities.ConvertToSprite(Properties.Resources.SPYTRON3000);
CustomItem spytron3000 = RogueLibs.CreateCustomItem("SPYTRON3000", sprite, false,
new CustomNameInfo("SPYTRON 3000",
null, null, null, null,
"Шпионотрон 3000",
Expand Down Expand Up @@ -397,8 +397,8 @@ public void Awake()
#endregion

#region Cup of Molten Chocolate
Sprite sprite6 = RogueUtilities.ConvertToSprite(Properties.Resources.CupOfMoltenChocolate);
CustomItem cupOfMoltenChocolate = RogueLibs.CreateCustomItem("CupOfMoltenChocolate", sprite6, false,
sprite = RogueUtilities.ConvertToSprite(Properties.Resources.CupOfMoltenChocolate);
CustomItem cupOfMoltenChocolate = RogueLibs.CreateCustomItem("CupOfMoltenChocolate", sprite, false,
new CustomNameInfo("Cup of Molten Chocolate",
null, null, null, null,
"Кружка расплавленного шоколада",
Expand Down Expand Up @@ -431,8 +431,8 @@ public void Awake()
#endregion

#region Portable Ammo Dispenser
Sprite sprite7 = RogueUtilities.ConvertToSprite(Properties.Resources.PortableAmmoDispenser);
CustomItem portableAmmoDispenser = RogueLibs.CreateCustomItem("PortableAmmoDispenser", sprite7, false,
sprite = RogueUtilities.ConvertToSprite(Properties.Resources.PortableAmmoDispenser);
CustomItem portableAmmoDispenser = RogueLibs.CreateCustomItem("PortableAmmoDispenser", sprite, false,
new CustomNameInfo("Portable Ammo Dispenser",
null, null, null, null,
"Портативный раздатчик боеприпасов",
Expand Down Expand Up @@ -512,15 +512,15 @@ public void Awake()
#endregion

#region Ammo Box
Sprite sprite8 = RogueUtilities.ConvertToSprite(Properties.Resources.AmmoBox);
CustomItem ammoBox = RogueLibs.CreateCustomItem("AmmoBox", sprite8, false,
sprite = RogueUtilities.ConvertToSprite(Properties.Resources.AmmoBox);
CustomItem ammoBox = RogueLibs.CreateCustomItem("AmmoBox", sprite, false,
new CustomNameInfo("Ammo Box",
null, null, null, null,
"Ящик с боеприпасами",
null, null),
new CustomNameInfo("Combine with any refillable weapon to refill it.",
new CustomNameInfo("Combine with any refillable weapon to refill it. Limited ammo.",
null, null, null, null,
"Объедините с любым пополняемым оружием для пополнения.",
"Объедините с любым пополняемым оружием для пополнения. Ограниченный запас.",
null, null),
item =>
{
Expand Down Expand Up @@ -581,8 +581,8 @@ public void Awake()
#endregion

#region Joke Book
Sprite sprite9 = RogueUtilities.ConvertToSprite(Properties.Resources.JokeBook);
CustomItem jokeBook = RogueLibs.CreateCustomItem("JokeBook", sprite9, false,
sprite = RogueUtilities.ConvertToSprite(Properties.Resources.JokeBook);
CustomItem jokeBook = RogueLibs.CreateCustomItem("JokeBook", sprite, false,
new CustomNameInfo("Joke Book",
null, null, null, null,
"Сборник шуток",
Expand Down Expand Up @@ -621,8 +621,8 @@ public void Awake()
#endregion

#region Grindstone
Sprite sprite10 = RogueUtilities.ConvertToSprite(Properties.Resources.Grindstone);
CustomItem grindstone = RogueLibs.CreateCustomItem("Grindstone", sprite10, false,
sprite = RogueUtilities.ConvertToSprite(Properties.Resources.Grindstone);
CustomItem grindstone = RogueLibs.CreateCustomItem("Grindstone", sprite, false,
new CustomNameInfo("Grindstone",
null, null, null, null,
"Точильный камень",
Expand Down Expand Up @@ -674,7 +674,33 @@ public void Awake()
null, null));
#endregion


#region Toolkit
sprite = RogueUtilities.ConvertToSprite(Properties.Resources.Toolkit);
CustomItem toolkit = RogueLibs.CreateCustomItem("Toolkit", sprite, false,
new CustomNameInfo("Toolkit",
null, null, null, null,
"Набор инструментов",
null, null),
new CustomNameInfo("Combines the effects of Wrench, crowbar, window cutter, lockpick and safe buster. Infinite use.",
null, null, null, null,
"Объединяет эффекты Гаечного ключа, Монтировки, Стеклореза, Отмычки и Взрывателя сейфов. Бесконечный.",
null, null),
item =>
{
item.itemType = "Tool";
item.Categories.Add("Usable");
item.Categories.Add("Technology");
item.Categories.Add("Stealth");
item.itemValue = 80;
item.initCount = 1;
item.rewardCount = 1;
});
toolkit.Prerequisites.Add("SkeletonKey");

toolkit.UnlockCost = 10;
toolkit.CostInCharacterCreation = 10;
toolkit.CostInLoadout = 10;
#endregion



Expand Down Expand Up @@ -742,8 +768,10 @@ public void FixedUpdate()
public static Dictionary<InvItem, float> VoodooCooldowns { get; set; }
public void VoodooCheck()
{
Dictionary<InvItem, float> newDic = new Dictionary<InvItem, float>();
foreach (KeyValuePair<InvItem, float> pair in VoodooCooldowns)
VoodooCooldowns[pair.Key] = Mathf.Max(pair.Value - Time.fixedDeltaTime, 0f);
newDic.Add(pair.Key, Mathf.Max(pair.Value - Time.fixedDeltaTime, 0f));
VoodooCooldowns = newDic;

List<InvItem> removal = new List<InvItem>();
foreach (KeyValuePair<InvItem, Agent> pair in VoodooUpdateList)
Expand Down Expand Up @@ -771,8 +799,10 @@ public void VoodooCheck()
public static Dictionary<InvItem, float> QuantumFudCooldowns { get; set; }
public void QuantumFudCheck()
{
Dictionary<InvItem, float> newDic = new Dictionary<InvItem, float>();
foreach (KeyValuePair<InvItem, float> pair in QuantumFudCooldowns)
QuantumFudCooldowns[pair.Key] = Mathf.Max(pair.Value - Time.fixedDeltaTime, 0f);
newDic.Add(pair.Key, Mathf.Max(pair.Value - Time.fixedDeltaTime, 0f));
QuantumFudCooldowns = newDic;
}
}
}
1 change: 1 addition & 0 deletions aTonOfItems/aTonOfItems.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<None Include="Resources\JokeBook.bin" />
<None Include="Resources\PortableAmmoDispenser.bin" />
<None Include="Resources\QuantumFud.bin" />
<None Include="Resources\Toolkit.bin" />
<None Include="Resources\Voodoo.bin" />
<None Include="Resources\VoodooInactive.bin" />
<None Include="Resources\WildBypasser.bin" />
Expand Down
Binary file added img/AmmoBox2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/AmmoBox3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/AmmoBox4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/Toolkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6f43194

Please sign in to comment.