ish_models 0.0.33.162 → 0.0.33.163
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gameui/map.rb +4 -0
- data/lib/gameui/marker.rb +4 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68d413825a0a694b0bdfd1a6fee4a85812bb2f3d34e0f431d2b0a30c27b29304
|
4
|
+
data.tar.gz: 3a5a7db6ce515ba7e9711839ab4c10b8f74387abd0e6d38c7bf0510d5e86094b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6b20eb004d674c488b459c23c12ca284bacefb558e1dfcdf03ce2e9b9548fb92ee7ba0c7452dbefb785b05e908a00f4ebdbda6548db7ae9a59df327944032b1
|
7
|
+
data.tar.gz: 2de807a995e6523d7ff0251f26a24daa127b3b13c1a00279baa69f72b78f708ff0e4cf5317255b19b8cc1f4b98fc629b4aede0321342b2baa6ab4b6d454f0596
|
data/lib/gameui/map.rb
CHANGED
@@ -59,6 +59,10 @@ class ::Gameui::Map
|
|
59
59
|
field :h, type: Integer
|
60
60
|
validates :h, presence: true
|
61
61
|
|
62
|
+
## @TODO: abstract this into a module
|
63
|
+
field :x, :type => Float
|
64
|
+
field :y, :type => Float
|
65
|
+
|
62
66
|
# @TODO: this is shared between map and marker, move to a concern.
|
63
67
|
before_validation :compute_w_h
|
64
68
|
def compute_w_h
|
data/lib/gameui/marker.rb
CHANGED
@@ -30,6 +30,10 @@ class ::Gameui::Marker
|
|
30
30
|
|
31
31
|
field :deleted_at, type: Time, default: nil # @TODO: replace with paranoia
|
32
32
|
|
33
|
+
## @TODO: abstract this into a module
|
34
|
+
field :x, :type => Float
|
35
|
+
field :y, :type => Float
|
36
|
+
|
33
37
|
field :is_public, type: Boolean, default: true
|
34
38
|
def self.public
|
35
39
|
where( is_public: true )
|
@@ -94,12 +98,6 @@ class ::Gameui::Marker
|
|
94
98
|
end
|
95
99
|
end
|
96
100
|
|
97
|
-
field :x, type: Integer, default: 0
|
98
|
-
# validates :x, presence: true
|
99
|
-
|
100
|
-
field :y, type: Integer, default: 0
|
101
|
-
# validates :y, presence: true
|
102
|
-
|
103
101
|
field :centerOffsetX, type: Integer, default: 0
|
104
102
|
# validates :centerXOffset, presence: true
|
105
103
|
|