-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for items in shortcuts addon. #2076
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,11 +37,11 @@ validabils = {} | |
-- List of valid prefixes to be interpreted with the resources. The values currently have no use. | ||
command_list = {['ja']='job_abilities',['jobability']='job_abilities',['so']='spells',['song']='spells',['ma']='spells',['magic']='spells',['nin']='spells',['ninjutsu']='spells', | ||
['ra']='Ranged Attack',['range']='Ranged Attack',['throw']='Ranged Attack',['shoot']='Ranged Attack',['monsterskill']='monster_skills',['ms']='monster_skills', | ||
['ws']='weapon_skills',['weaponskill']='weapon_skills',['item']='Ability',['pet']='job_abilities',['mo']='mounts',['mount']='mounts'} | ||
['ws']='weapon_skills',['weaponskill']='weapon_skills',['item']='items',['pet']='job_abilities',['mo']='mounts',['mount']='mounts'} | ||
|
||
in_game_res_commands = {['ja']='/ja',['jobability']='/ja',['pet']='/ja', | ||
['so']='/ma',['song']='/ma',['ma']='/ma',['magic']='/ma',['nin']='/ma',['ninjutsu']='/ma', | ||
['monsterskill']='/ms',['ms']='/ms',['ws']='/ws',['weaponskill']='/ws', | ||
['monsterskill']='/ms',['ms']='/ms',['ws']='/ws',['weaponskill']='/ws',['item']='/item', | ||
['ra']='/ra',['range']='/ra',['throw']='/ra',['shoot']='/ra',['mount']='/mo',['mo']='/mo'} | ||
|
||
-- List of other commands that might use name completion. | ||
|
@@ -161,7 +161,7 @@ command2_list = { | |
['returnfaith']=new_cmd_entry(Party_targets,{all=No_targets}), | ||
['bstpet']=new_cmd_entry(No_targets,{['1']=BST_targets,['2']=BST_targets,['3']=BST_targets,['4']=BST_targets,['5']=BST_targets,['6']=BST_targets,['7']=BST_targets}), | ||
} | ||
|
||
unhandled_list = {['p']=true,['s']=true,['sh']=true,['yell']=true,['echo']=true,['t']=true,['l']=true,['breaklinkshell']=true} | ||
|
||
-- List of commands to be ignored | ||
|
@@ -176,7 +176,7 @@ st_targs = T{'<st>','<stpc>','<stal>','<stnpc>','<stpt>'} | |
targ_reps = {t='<t>',me='<me>',ft='<ft>',scan='<scan>',bt='<bt>',lastst='<lastst>',r='<r>',pet='<pet>',p0='<p0>',p1='<p1>',p2='<p2>',p3='<p3>',p4='<p4>', | ||
p5='<p5>',a10='<a10>',a11='<a11>',a12='<a12>',a13='<a13>',a14='<a14>',a15='<a15>',a20='<a20>',a21='<a21>',a22='<a22>',a23='<a23>',a24='<a24>',a25='<a25>', | ||
st='<st>',stpc='<stpc>',stal='<stal>',stnpc='<stnpc>',stpt='<stpt>',focust='<focust>'} | ||
|
||
language = 'english' -- windower.ffxi.get_info()['language']:lower() | ||
|
||
|
||
|
@@ -198,9 +198,10 @@ end | |
-- Iterate through resources and make validabils. | ||
function validabils_it(resource) | ||
for id,v in pairs(res[resource]) do | ||
if (not v.monster_level and v.prefix) or (v.monster_level and v.monster_level ~= -1 and v.ja:sub(1,1) ~= '#' ) then | ||
if (not v.monster_level and v.prefix) or (v.monster_level and v.monster_level ~= -1 and v.ja:sub(1,1) ~= '#' ) or (v.category == 'Usable') then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This limits the items added to ones in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems okay to me. If someone wants to revisit this decision, they can do it in another PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see a reason why it couldn't shouldn't check equipped items and make those usable via command. |
||
-- Monster Abilities contains a large number of player-usable moves (but not monstrosity-usable). This excludes them. | ||
make_abil(strip(v.english),resource,id) | ||
local name = resource ~= 'items' and strip_non_alphanumeric_convert_digits_to_roman(v.english) or strip_non_alphanumeric_keep_plus(v.english) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are there name collisions if you don't keep the plus and avoid converting digits to roman numerals? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't try, but I felt There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's fine, but you can use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My main concern here is that this adds complexity (two slug paths) without adding any obvious benefit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. If we only used the original, it would be simply /rolandaifuku for both the normal and +1 versions: the plus gets stripped and the 1 gets omitted when converting to Roman numerals. |
||
make_abil(name,resource,id) | ||
end | ||
end | ||
end | ||
|
@@ -209,4 +210,7 @@ validabils_it('spells') | |
validabils_it('job_abilities') | ||
validabils_it('weapon_skills') | ||
validabils_it('monster_skills') | ||
validabils_it('mounts') | ||
validabils_it('mounts') | ||
if settings.include_items then | ||
validabils_it('items') | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding another settings file just to allow people to disable compatibility with items seems like a lot of work for no obvious benefit. I would just make it an always-on feature. No one is going to accidentally type
//proether+3
or//vileelixir+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this because of vague concerns that this would cause problems. https://discord.com/channels/338590234235371531/501099842097905675/883160617706483712
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds complexity without benefit, so I would eliminate it. Make items always-on and don't add a settings file.