Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extends CanvasLayer
- @onready var message = $Message
- func send_message(item):
- message.append_text(set_hint(item))
- message.append_text(set_image(item) + '\n')
- func set_image(item):
- return "[img=16x16]"+ item.path +"[/img]"
- func set_hint(item):
- var text = "[hint=%s]%s[/hint]" % [item.description, item.name]
- match item.rarity:
- "Rare":
- text = "[color=blue]" + text + "[/color]"
- "Epic":
- text = "[wave amp=15 freq=5][color=purple]" + text + "[/color][/wave]"
- "Legendary":
- text = "[tornado radius=1 freq=4][color=yellow]" + text + "[/color][/tornado]"
- return text
Add Comment
Please, Sign In to add comment