-
Notifications
You must be signed in to change notification settings - Fork 0
/
yaro-editroom.muf
56 lines (51 loc) · 1.36 KB
/
yaro-editroom.muf
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
@q
@program yaro-editroom.muf
1 9999 del
i
$include $lib/yaro
$include $lib/editor
: set_description
var description
me @ "Room Description" 80 boxTitle
loc @ "_/de" "(MUF)" 1 parseprop dup if
dup me @ swap 80 boxContent
"\r" explode array_make array_reverse description !
description @ array_vals
else
me @ "This room does not have a description." 80 boxContent
pop 0
then
"^BOX_COLOR^" me @ 80 line strcat tell
" " tell
EDITOR "abort" stringcmp not if
popn
else
array_make loc @ swap "desc" swap setConfig
loc @ "{list:_config/desc," loc @ dtos strcat "}" strcat setdesc
then
;
: edit_menu
begin
me @ "Room Editor"
1 "Set Description" 'set_description
2 "Look And Feel" 2
9 "Quit" 0
3 30 doMenu dup while 2 = if
loc @ "Room Preferences" "This is the tool for setting room-wide preferences.\r\r"
"PROTIP: Running this in a parent room can apply preferences across the environment."
strcat set_look_feel
then repeat
"^NOTE_COLOR^Thank you for using the Room Editor!" tell
;
: main
strip dup "#" instr 1 = if
else pop then
loc @ me @ control? if
edit_menu
else
"^ERROR_COLOR^You do not control this room and cannot edit it." tell
then
;
.
c
q