aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/share/ruby/config.rb
diff options
context:
space:
mode:
Diffstat (limited to 'share/ruby/config.rb')
-rwxr-xr-xshare/ruby/config.rb38
1 files changed, 0 insertions, 38 deletions
diff --git a/share/ruby/config.rb b/share/ruby/config.rb
deleted file mode 100755
index 8484274..0000000
--- a/share/ruby/config.rb
+++ /dev/null
@@ -1,38 +0,0 @@
1# Various config data
2
3class SimConfig
4 attr_reader :cfgSimName, :cfgSimIP, :cfgSimPort, :cfgSimX,
5 :cfgSimX, :cfgSimY, :cfgAssetServerUrl, :cfgUserServerUrl
6
7 def initialize
8 @cfgSimName = "DalienLand"
9 @cfgSimIP = "192.168.1.103"
10 @cfgSimPort = "9000"
11 @cfgSimX = 997
12 @cfgSimY = 996
13 @cfgSimX = 1000
14 @cfgSimY = 1000
15 @cfgAssetServerUrl = "http://192.168.1.103:8003/"
16 @cfgUserServerUrl = "http://192.168.1.103:8003/"
17 end
18
19end
20
21
22class UUID
23 def initialize
24 @uuid = rand(1<<128)
25 end
26 def to_dashed_s
27 part1 = @uuid & 0xFFFFFFFFFFFF
28 part2 = (@uuid >> 48) && 0xFFFF
29 part3 = (@uuid >> (48 + 16)) & 0xFFFF
30 part4 = (@uuid >> (48 + 32)) & 0xFFFF
31 part5 = @uuid >> (128-32)
32 return sprintf "%08x-%04x-%04x-%04x-%012x", part5, part4, part3, part2, part1
33 end
34end
35
36print UUID.new.to_dashed_s
37
38