Add sprites for DRLA monsters

master
Marrub 2017-08-09 05:58:21 -04:00
parent 7a6c55d589
commit ddfa488140
1 changed files with 14 additions and 2 deletions

View File

@ -25,9 +25,9 @@ class Mod_DoomRLA < Vrobot4::Module::Module
super
register :c_weaponinfo, "weaponinfo", "Prints DRLA weapon info."
register :c_monsterinfo, "monsterinfo", "Prints DRLA monster info."
register :c_reloadinfo, "reloadinfo", "", roles: "h"
@winfo = JSON.parse(open(info["wep_info"]).read)
@minfo = JSON.parse(open(info["mon_info"]).read)
reload_info
end
def c_weaponinfo m, argv
@ -74,10 +74,22 @@ class Mod_DoomRLA < Vrobot4::Module::Module
m.chan.real.send_embed do |embed|
embed.title = "[%s] %s" % [w["Difficulty"], w["Name"]]
embed.title << " %s" % [w["Weapon"]] if w["Weapon"]
embed.image = Discordrb::Webhooks::EmbedImage.new \
url: w["Sprite"] if w.key? "Sprite"
embed.description = t
end
end
end
def c_reloadinfo m, argv
reload_info
end
private
def reload_info
@winfo = JSON.parse(open(@info["wep_info"]).read)
@minfo = JSON.parse(open(@info["mon_info"]).read)
end
end
## EOF