Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Feature] Item Ability Labels
#1
This patch appends (ITEM NAME) to the end of the name of any item ability toggles associated with the item.

For example, if you're holding an emergency o2 tank and a jetpack, you'll have two buttons, both labeled "Toggle Tank Valve". This patch makes them say "Toggle Tank Valve (jetpack)" and "Toggle Tank Valve (emergency oxygen tank)", respectively.

http://puu.sh/shv80/ce5c74b3ce.patch


DO NOT COPY PASTE FROM THIS BOX; IT HAS HAD TABS REMOVED
Code:
--- a/code/WorkInProgress/AbilityItem.dm
+++ b/code/WorkInProgress/AbilityItem.dm
@@ -294,7 +294,10 @@
var/obj/ability_button/NB = new A(src)
ability_buttons += NB

- for(var/obj/ability_button/B in ability_buttons) B.the_item = src
+ for(var/obj/ability_button/B in ability_buttons)
+ B.the_item = src
+ B.name = B.name + " ([src.name])"
+
// if(ability_buttons.len > 0)
// spawn(0) check_abilities()
..()

Credit for this goes to drsingh, who originally suggested it. I just decided to figure out how to implement it. There's probably a better way of doing this, and if so, i encourage anyone who would like to do so to do that. Consider this patch a suggestion+.
Reply
#2
Add it please. Too many times I have wanted to breath a handheld air tank instead of my emergency oxygen tank I was gonna refill.
Reply
#3
Yes please christ
this would be a great qol change especially for when you have multiple oxy tanks and one is drained, you don't want to suffocate yourself
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)