Skip to content

Commit

Permalink
fix: tooltips and steam gift tooltip behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
ryantanrk committed Jun 8, 2024
1 parent 289da28 commit 43b924f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Behaviours/SteamGiftPhysicsProp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ private void ChangeTooltip()
{
if (base.IsOwner)
{
HUDManager.Instance.ChangeControlTip(2, scrapValue <= 0 ? "ALREADY REDEEMED" : "Redeem : [ LMB ]");
HUDManager.Instance.ChangeControlTip(2, scrapValue <= 0 ? "ALREADY REDEEMED" : "Redeem: [LMB]");
}
}

Expand Down
2 changes: 1 addition & 1 deletion CustomScriptableObject/MyHeartItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static void Register()
/// My Heart
int rarity = 40;
Item item = bundle.LoadAsset<Item>("Assets/DingusThings/Items/MyHeart.asset");
item.toolTips = ["What she said : [ LMB ]"];
item.toolTips = ["What she said: [LMB]"];
// add custom behavior
MyHeartPhysicsProp myHeartProp = item.spawnPrefab.AddComponent<MyHeartPhysicsProp>();
myHeartProp.grabbable = true;
Expand Down
2 changes: 1 addition & 1 deletion CustomScriptableObject/SteamGiftCardItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static void Register()
Harmony.CreateAndPatchAll(typeof(SteamGiftPatch));
int rarity = 60;
Item item = bundle.LoadAsset<Item>("Assets/DingusThings/Items/SteamGiftCard.asset");
item.toolTips = ["Inspect : [ Z ]"];
item.toolTips = ["Inspect: [Z]"];
SteamGiftPhysicsProp steamGiftPhysicsProp = item.spawnPrefab.AddComponent<SteamGiftPhysicsProp>();
steamGiftPhysicsProp.grabbable = true;
steamGiftPhysicsProp.grabbableToEnemies = true;
Expand Down
7 changes: 5 additions & 2 deletions Patches/SteamGiftPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ public static void GrabbableObject_EquipItem(GrabbableObject __instance)
{
if (__instance.itemProperties.itemName == "Steam Gift Card")
{
// change tooltip on grab
HUDManager.Instance.ChangeControlTip(2, __instance.scrapValue <= 0 ? "ALREADY REDEEMED" : "Redeem : [ LMB ]");
if (__instance.IsOwner)
{
// change tooltip on grab
HUDManager.Instance.ChangeControlTip(2, __instance.scrapValue <= 0 ? "ALREADY REDEEMED" : "Redeem: [LMB]");
}
}
}
}
Expand Down

0 comments on commit 43b924f

Please sign in to comment.