Skip to content

Commit eec4e04

Browse files
author
Blecki
committed
Should have committed long ago. See MispGame hanging out there; requires XNA 4.0. Rebuild the solution for x86 to make it work. (Build the solution as AnyCPU for the mud server.) Build everything and run the .bat in MispGameTest.
1 parent 5460b15 commit eec4e04

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1713
-290
lines changed

Alchemy/Alchemy.csproj

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,25 @@
3232
<ErrorReport>prompt</ErrorReport>
3333
<WarningLevel>4</WarningLevel>
3434
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
36+
<DebugSymbols>true</DebugSymbols>
37+
<OutputPath>bin\x86\Debug\</OutputPath>
38+
<DefineConstants>DEBUG;TRACE</DefineConstants>
39+
<DebugType>full</DebugType>
40+
<PlatformTarget>x86</PlatformTarget>
41+
<ErrorReport>prompt</ErrorReport>
42+
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
43+
</PropertyGroup>
44+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
45+
<OutputPath>bin\x86\Release\</OutputPath>
46+
<DefineConstants>TRACE</DefineConstants>
47+
<Optimize>true</Optimize>
48+
<DebugType>pdbonly</DebugType>
49+
<PlatformTarget>x86</PlatformTarget>
50+
<ErrorReport>prompt</ErrorReport>
51+
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
52+
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
53+
</PropertyGroup>
3554
<ItemGroup>
3655
<Reference Include="System" />
3756
<Reference Include="System.Core" />

DefaultDatabase/DefaultDatabase.csproj

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,26 @@
3030
<ErrorReport>prompt</ErrorReport>
3131
<WarningLevel>4</WarningLevel>
3232
</PropertyGroup>
33+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
34+
<DebugSymbols>true</DebugSymbols>
35+
<OutputPath>bin\x86\Debug\</OutputPath>
36+
<DefineConstants>DEBUG;TRACE</DefineConstants>
37+
<DebugType>full</DebugType>
38+
<PlatformTarget>x86</PlatformTarget>
39+
<ErrorReport>prompt</ErrorReport>
40+
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
41+
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
42+
</PropertyGroup>
43+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
44+
<OutputPath>bin\x86\Release\</OutputPath>
45+
<DefineConstants>TRACE</DefineConstants>
46+
<Optimize>true</Optimize>
47+
<DebugType>pdbonly</DebugType>
48+
<PlatformTarget>x86</PlatformTarget>
49+
<ErrorReport>prompt</ErrorReport>
50+
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
51+
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
52+
</PropertyGroup>
3353
<ItemGroup>
3454
<Reference Include="System" />
3555
<Reference Include="System.Core" />
@@ -55,6 +75,18 @@
5575
<None Include="database\static\basic.mud">
5676
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
5777
</None>
78+
<None Include="database\static\character-generation.mud">
79+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
80+
</None>
81+
<None Include="database\static\wear-remove.mud">
82+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
83+
</None>
84+
<None Include="database\static\open-close.mud">
85+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
86+
</None>
87+
<None Include="database\static\stats.mud">
88+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
89+
</None>
5890
<None Include="database\static\verb.mud">
5991
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
6092
</None>

DefaultDatabase/MudEngine2012.dll

0 Bytes
Binary file not shown.

DefaultDatabase/MudServer.exe

0 Bytes
Binary file not shown.

DefaultDatabase/database/static/basic-formatter.mud

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
(defun "basic-formatter-list-links" ^("list links")
2727
(strcat
2828
$(map "link" links
29-
"(link) "
29+
"(link.name) (if link.door "[through (link.door:a)] " "")"
3030
)
3131
)
3232
)
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
/* Implements an instanced character generation area. Since it's instanced, it can't just be a set of rooms.
2+
Instead, it's a function that returns a room. */
3+
(depend "door")
4+
5+
(defun "create-character-generation-area" [actor]
6+
(let [
7+
[start-room (record)]
8+
[scanning-room (record)]
9+
[locker-room (record)]
10+
[random-order-number "TK3399R2M"]
11+
]
12+
(lastarg
13+
14+
(lfun "voice-sequence" [actor]
15+
(if actor.creation-finished (nop)
16+
(nop
17+
(echo actor "The voice says \"Proceed east from the locker room to the termination center for recycling.\"\n")
18+
(invoke 10 voice-sequence actor)
19+
)
20+
)
21+
)
22+
23+
(lfun "scan-sequence-four" [actor]
24+
(nop
25+
(echo actor "The voice says \"Order unacceptable. Continue to termination center for recycling.\"\n")
26+
(echo actor "The door at the end of the hall slides open.\n")
27+
(set scanning-room.door "open" true)
28+
(set scanning-room.door "locked" false)
29+
(invoke 10 voice-sequence actor)
30+
)
31+
)
32+
33+
(lfun "scan-sequence-three" [actor]
34+
(nop
35+
(echo actor "The voice continues \"Actual Specification: (actor.gender), (
36+
(load "stats").calculate-height actor.age actor.height actor.gender) inches, body type: (actor.body-type).\"\n")
37+
(invoke 5 scan-sequence-four actor)
38+
)
39+
)
40+
41+
(lfun "scan-sequence-two" [actor] (nop
42+
(echo actor "A mechanical voice recites \"Order (random-order-number) Specification: Male, 72 inches, body type: Muscular. Intelligence: N/A. Trainability: 12. Independence: 0.\"\n")
43+
(invoke 5 scan-sequence-three actor)
44+
))
45+
46+
(lfun "scan-sequence-one" [actor]
47+
(nop
48+
(echo actor "A laser shoots from the far end of the hall and sweeps up and down your body.\n")
49+
(invoke 5 scan-sequence-two actor)
50+
)
51+
)
52+
53+
(lfun "start-scan-sequence" [actor]
54+
(nop
55+
((load "stats").generate-character-stats actor)
56+
(invoke 5 scan-sequence-one actor)
57+
)
58+
)
59+
60+
(multi-set start-room [
61+
[@base (load "room")]
62+
[short "Dank tiled stall"]
63+
[long "A thousand streams of dirty water run down the walls, which might once have been white tile, to a drain nearly clogged with muck and slime. A single florescent light flickers overhead."]
64+
])
65+
(open-direct-link start-room scanning-room ^("left" "l" "girl")
66+
(lambda "lchoose-girl" [actor]
67+
(nop
68+
(echo actor "You have chosen to be a girl.")
69+
(set actor "gender" "female")
70+
(set actor "pronoun" "she")
71+
(start-scan-sequence actor)
72+
))
73+
)
74+
(open-direct-link start-room scanning-room ^("right" "r" "boy")
75+
(lambda "lchoose-boy" [actor]
76+
(nop
77+
(echo actor "You have chosen to be a boy.")
78+
(set actor "gender" "male")
79+
(start-scan-sequence actor)
80+
)
81+
)
82+
)
83+
(add-object start-room "contents" (record
84+
^("@base" (load "object"))
85+
^("short" "dirty sign")
86+
^("nouns" ^("sign"))
87+
^("adjectives" ^("dirty"))
88+
^("description" "The sign says, girls to the left, boys to the right.")
89+
^("can-read" true) /* Allow the 'read' verb to be applied to the sign. */
90+
^("on-get" (lambda "" [actor] (echo actor "That appears to be attached to the wall.\n")))
91+
))
92+
93+
(multi-set scanning-room [
94+
[@base (load "room")]
95+
[short "Glass hallway"]
96+
[long "Dark glass lines both sides of this narrow hallway. You can't see through it, either because it is too filthy or because the other side is dark."]
97+
])
98+
99+
(multi-set locker-room [
100+
[@base (load "room")]
101+
[short "Musty Locker Room"]
102+
[long ""]
103+
])
104+
105+
(set scanning-room "door" (create-direct-door scanning-room locker-room ^("north" "n")))
106+
(multi-set scanning-room.door [
107+
["locked" true]
108+
["short" "steel door"]
109+
["adjectives" ^("steel")]
110+
])
111+
112+
/* Clothe the player */
113+
(add-object actor "worn" (record
114+
^("@base" (load "object"))
115+
^("short" "paper gown")
116+
^("nouns" ^("gown"))
117+
^("adjectives" ^("paper"))
118+
^("description" "This is a slightly crumpled paper gown that ties closed in the back.")
119+
^("can-wear" true)
120+
))
121+
122+
(set locker-room "in-door" (create-direct-door locker-room null ^("south" "s")))
123+
(multi-set locker-room.in-door [
124+
["locked" true]
125+
["short" "steel door"]
126+
["adjectives" ^("steel")]
127+
])
128+
129+
(multi-set (create-direct-door locker-room null ^("east" "e")) [
130+
["locked" true]
131+
["short" "striped door"]
132+
["description" "This door is painted in diagonal yellow stripes."]
133+
["adjectives" ^("striped")]
134+
])
135+
136+
start-room)
137+
)
138+
)

DefaultDatabase/database/static/chat.mud

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
(defun "add-channel" [name can-subscribe description]
88
(nop
9-
(let ^(^("chat" (load "chat")))
9+
(let (^("chat" (load "chat")))
1010
(prop-add chat "channels" (record ^("name" name) ^("can-subscribe" can-subscribe) ^("description" description)))
1111
)
1212
(add-global-verb name (m-if-exclusive (m-rest "text") (m-nop) (m-fail "And what message were you going to send to that channel?"))
Lines changed: 59 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
(depend "move-object")
22

3-
(defun "make-door-link-lambda" ^("door" "name" "function ?on-follow")
4-
*(lambda "lgo" ^("matches" "actor")
5-
*(let ^(^("previous" actor.location.object))
6-
*(nop
7-
(echo (load door.to).contents "^(actor:short) arrived.\n")
8-
(move-object actor (load door.to) "contents")
3+
(lfun "implement-door-link" [door to name actor "function ?on-follow"]
4+
(let ^(^("previous" actor.location.object))
5+
(if (not door.open)
6+
(echo actor "^(door:the) is closed.\n")
7+
(nop
8+
(echo to.contents "^(actor:short) arrived.\n")
9+
(move-object actor door.to "contents")
910
(echo previous.contents "^(actor:short) went (name). [Through (door:the)]\n")
1011
(echo actor "You went (name). [Through (door:the)]\n")
1112
(if on-follow (on-follow actor))
@@ -15,15 +16,25 @@
1516
)
1617
)
1718

18-
(defun "create-door" ^("from" "to" "names" "function ?on-follow")
19-
(let ^(^("door" (record
19+
(lfun "make-door-link-lambda" ^("door" "name" "function ?on-follow")
20+
(lambda "lgo" ["matches" "actor"] (implement-door-link door (load door.to) name actor on-follow))
21+
)
22+
23+
(lfun "make-door-record" [to]
24+
(record
2025
^("short" "door")
2126
^("nouns" ^("door"))
2227
^("to" to)
2328
^("@base" (load "object"))
24-
)))
29+
^("can-open" true)
30+
^("open" null)
31+
)
32+
)
33+
34+
(defun "create-door" ^("from" "to" "names" "function ?on-follow")
35+
(let ^(^("door" (make-door-record to)))
2536
(lastarg
26-
(prop-add from "links" (first names))
37+
(prop-add from "links" (record ^("name" (first names)) ^("door" door)))
2738
(for "name" names
2839
*(nop
2940
(add-verb from name (m-nothing)
@@ -36,7 +47,10 @@
3647
)
3748
(add-verb from "look" (m-complete (m-keyword name))
3849
(lambda "llook-direction" ^("matches" "actor")
39-
*(echo actor "To the (first names) you see...\n\n((load to):description)")
50+
(if door.open
51+
(echo actor "To the (first names) you see...\n\n((load to):description)")
52+
(echo actor "The door is closed.\n")
53+
)
4054
)
4155
"Look (name)."
4256
)
@@ -46,3 +60,37 @@
4660
(door)
4761
))
4862
)
63+
64+
(lfun "make-direct-door-link-lambda" ^("door" "name" "function ?on-follow")
65+
*(lambda "lgo" ^("matches" "actor") (implement-door-link door door.to name actor on-follow))
66+
)
67+
68+
(defun "create-direct-door" [from to names "function ?on-follow"]
69+
(let ^(^("door" (make-door-record to)))
70+
(lastarg
71+
(prop-add from "links" (record ^("name" (first names)) ^("door" door)))
72+
(for "name" names
73+
*(nop
74+
(add-verb from name (m-nothing)
75+
(make-direct-door-link-lambda door (first names) on-follow)
76+
"Move (name)."
77+
)
78+
(add-verb from "go" (m-complete (m-keyword name))
79+
(make-direct-door-link-lambda door (first names) on-follow)
80+
"Move (name)."
81+
)
82+
(add-verb from "look" (m-complete (m-keyword name))
83+
(lambda "llook-direction" ^("matches" "actor")
84+
(if door.open
85+
(echo actor "To the (first names) you see...\n\n(to:description)")
86+
(echo actor "The door is closed.\n")
87+
)
88+
)
89+
"Look (name)."
90+
)
91+
)
92+
)
93+
(add-object from "contents" door)
94+
(door)
95+
))
96+
)

0 commit comments

Comments
 (0)