ish_models 0.0.33.170 → 0.0.33.172

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gameui/map.rb +6 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 411adafeb7c2632e78c97d10b851b9b957161ebb5626c95e451d86db86ca2a5b
4
- data.tar.gz: 562dd7d7ba8db2acc414096ef8b1ab9c3b93e9f915b1aa1e650340b12054df02
3
+ metadata.gz: b5769b6b8a2b8a37d133dc1f7b189ae2c57dfaa027ac75eeb1504fdf43ea625e
4
+ data.tar.gz: 93bb7323be666fe6c16be74bf092459d371f9b35c393d846e1028a9efcc22dd9
5
5
  SHA512:
6
- metadata.gz: 2367b28798662b398d6be6e73a11ff0c1866b631e4208d8c97ccbe88d29b5b873850a10706be4672378de9178267d6314a52c46107932e56658bea4b6f8267ac
7
- data.tar.gz: 7b17156567dcd8ffe6920782ecbc05c6bdadc20518e4752dbdcc0fd05eaaf645bcb8221503e1f1fd778dac0fa52ce7ebc181d5418fe8f1edc0c24db3c1d08ea5
6
+ metadata.gz: 757dc8e96ba6f354039339b66f85a4e5a6bd7ff34405fd41621216330848bcccbbdf0c3093adea3d9434e06b70aeee1ba452fef5214bebf4483d3a06baba3ef7
7
+ data.tar.gz: 4e9bfc050504f1b79fc19c0ec977bf96ed2ffcd28067457dc1828c3b52d45fe779a0bf2358c258ff81cd954719f31e01c782525c90a672cd8c31f0d74ae99872
data/lib/gameui/map.rb CHANGED
@@ -17,10 +17,11 @@ class ::Gameui::Map
17
17
  field :slug
18
18
  validates :slug, uniqueness: true, presence: true
19
19
 
20
+ # @TODO: remove field, replace with relation. _vp_ 2022-09-13
20
21
  field :parent_slug
21
-
22
22
  belongs_to :parent, class_name: '::Gameui::Map', inverse_of: :childs, optional: true
23
23
  has_many :childs, class_name: '::Gameui::Map', inverse_of: :parent
24
+
24
25
  has_one :image, class_name: '::Ish::ImageAsset', inverse_of: :location
25
26
  belongs_to :creator_profile, class_name: '::Ish::UserProfile', inverse_of: :my_maps
26
27
 
@@ -33,7 +34,7 @@ class ::Gameui::Map
33
34
 
34
35
  field :version, type: String, default: '0.0.0'
35
36
 
36
- ## @TODO: what is this?
37
+ ## @TODO: or self, right? and refactor this, seems N+1. _vp_ 2022-09-13
37
38
  field :map_slug
38
39
  def map
39
40
  ::Gameui::Map.where( slug: map_slug ).first
@@ -59,6 +60,9 @@ class ::Gameui::Map
59
60
  field :h, type: Integer
60
61
  validates :h, presence: true
61
62
 
63
+ MAP_TYPES = [ :map_2d, :map_3d, :map_geospatial, :map_gallery, :map_toc ] ## Mostly not implemented. _vp_ 2022-09-06
64
+ field :map_type, default: :map_2d
65
+
62
66
  ## @TODO: abstract this into a module
63
67
  field :x, :type => Float
64
68
  field :y, :type => Float
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33.170
4
+ version: 0.0.33.172
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox