feat: implement basic fairy tracker
This commit is contained in:
parent
1e46ad269e
commit
8109bacb0d
27 changed files with 290 additions and 7 deletions
2
app/helpers/fairy_helper.rb
Normal file
2
app/helpers/fairy_helper.rb
Normal file
|
@ -0,0 +1,2 @@
|
|||
module FairyHelper
|
||||
end
|
|
@ -19,4 +19,20 @@ module InstanceHelper
|
|||
end
|
||||
false
|
||||
end
|
||||
|
||||
def get_map_x(zone)
|
||||
case zone
|
||||
when "anemos" then 1584
|
||||
end
|
||||
end
|
||||
|
||||
def get_map_y(zone)
|
||||
case zone
|
||||
when "anemos" then 1249
|
||||
end
|
||||
end
|
||||
|
||||
def has_fairy?(instance, fairy)
|
||||
instance.fairies.any? { |f| "#{fairy[:x]},#{fairy[:y]}" == f.location }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue