-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_DEBUG.dm
71 lines (50 loc) · 1.3 KB
/
_DEBUG.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#define DEBUG
var/HexMap/map
Hex/Doodad/Tree
Click()
..()
del src
Hex/RedGlow
Click()
..()
del src
client
lazy_eye = 0
perspective = MOB_PERSPECTIVE
New()
.=..()
winset(src, "_DEBUG", "is-visible=true")
verb
SAVEMAP()
saveHexMap(map)
LOADMAP(id as text)
loadHexMap(id)
CREATEMAP(x as num, y as num, id as text)
worldInitialization()
if(map != null)
for(var/key in map.hexTurfs)
del map.hexTurfs[key]
del map
map = new/HexMap(id, x, y, 1)
for(var/i = 1, i <= map.size_x, i ++)
for(var/j = 1, j <= map.size_y, j ++)
map.createHexTurf(i, j, /Hex/Turf/Dirt)
var/trees = sqrt(map.size_x * map.size_y)
for(var/i = 1, i <= trees, i ++)
map.hexes |= new /Hex/Doodad/Tree(map, rand(1, map.size_x), rand(1,map.size_y))
mob.loc = locate(1,1,1)
TESTHEXES()
var/HexMap/map = hexMaps[hexMaps[1]]
world<<"TEST MAP:: [map]"
world<<"HEX TURFS: [map.hexes.len]"
var/Hex/H = map.hexTurfs[1][1]
world<<"TEST TURF 1,1: [H.x], [H.y], [H.pixel_x], [H.pixel_y] | [H.z]"
world<<"== WORLD DIMS =="
world<<"[world.maxx], [world.maxy], [world.maxz]"
CREATEHEX(x as num, y as num)
world << "CREATING TEST HEX AT [x], [y]"
var/HexMap/map = hexMaps[hexMaps[1]]
map.createHexTurf(x, y, /Hex/Turf)
mob
icon = 'Test.dmi'
layer = 1000