-
Notifications
You must be signed in to change notification settings - Fork 0
/
planetp.mare
73 lines (60 loc) · 3.04 KB
/
planetp.mare
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
72
73
@@ Planet Parent v1.0
@addparent2 Planet Parent=Space Object Parent
@addparent2 Planet Parent=Enterable Space Object Parent
@echo [ansi(g+,Ignore the 'More than one parent found' warning. See comments for details.)]
@@ @addparent2 me=Space Object Parent will match both Space Object Parent and
@@ Enterable Space Object Parent. This isn't a concern since we want both anyway.
@plane Planet Parent=-1
@@ Keep the parent from executing anything
@set Planet Parent=haven
@set Planet Parent=alias:planet
@set Planet Parent=raw_types:1 1 1 2 2 3 3 4 5 5 6 7
@set Planet Parent=color_list:2 10 3 4 12 8 14
@set Planet Parent=color:[get_color()]
@set Planet Parent=cname:[get_color()]
@set Planet Parent=types:alive lush dirt cold~water water rock ice
@set Planet Parent=celestial_type:planet
@@ Plane 1073674629 = Location 0,0. It's ugly to hard code it, but it;
@@ seemed like a bad idea to make the Planet Parent a child of the;
@@ 2D Coordinate System Parent, when it existed in 3D Space. This;
@@ really ought to be sorted out some time.;
@set Planet Parent=tr_teldown:@tel %#=[roomid()]:1073674629
@defattr Planet Parent/tr_configroom=inherit
#mupdate on
@set Planet Parent=tr_configroom:
@@ @tr_configroom=#roomid,#zoneid,#playerid ;
@switch [land(eq(wcount(v(0)),1),land(eq(wcount(v(1)),1),eq(wcount(v(2)),1)))]=1,{
@name [v(0)]=Planet;
@name [v(1)]=[setunion(Planet,name(v(1)),_)];
@addparent [v(0)]=[cross_mare_id(proomparent)];
@addparent [first(zone(v(0)))]=[cross_mare_id(pzoneparent)];
@fo [v(0)]={
@open {East <E>;east;e}=Variable;
@addparent East <E>=[cross_mare_id(2dexitparent)];
@open {South <S>;south;s}=Variable;
@addparent South <S>=[cross_mare_id(2dexitparent)];
@open {Space <U>;space;up;u}=Variable;
@vlink Space <U>=[loc(me)]:[plane(v(2))];
@plane Space <U>=1073674629;
@open {North <N>;north;n}=Variable;
@addparent North <N>=[cross_mare_id(2dexitparent)];
@open {West <W>;west;w}=Variable;
@addparent West <W> =[cross_mare_id(2dexitparent)];
};
@tr me/tr_log=[num(me)],[plane(v(2))],{New planet landing room [unparse(v(0))] in zone [unparse(first(zone(v(0))))] triggered by [unparse(v(2))]};
@@ Plane 1073674629 = Location 0,0. It's ugly to hard code it, but it;
@@ seemed like a bad idea to make the Planet Parent a child of the;
@@ 2D Coordinate System Parent, when it existed in 3D Space. This;
@@ really ought to be sorted out some time.;
@wait 1=@tel [v(2)]=[v(0)]:1073674629;
},{
@tr me/tr_log=%#,,{Invalid input to tr_configroom: 0='[v(0)]' 1='[v(1)]' 2='[v(2)]'};
};
.
#mupdate off
@defattr Planet Parent/room_types=inherit function
@set Planet Parent=room_types:field hills hill peak gorge hollow
@@ Auto config check @@
@switch isdbref(cross_mare_id(proomparent))=0,@echo [ansi(r+,ERROR: The Planet Room Parent is not on the Cross-MARE ID list!)]
@switch isdbref(cross_mare_id(pzoneparent))=0,@echo [ansi(r+,ERROR: The Planet Zone Parent is not on the Cross-MARE ID list!)]
@switch isdbref(cross_mare_id(2dexitparent))=0,@echo [ansi(r+,ERROR: The 2D Exit Parent is not on the Cross-MARE ID list!)]