Skip to content

Commit 5930f78

Browse files
committed
More mxp stuff.
1 parent af50289 commit 5930f78

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

lib/cmds/player/inventory.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void setup_alsos() {
3030

3131
static void main(string str) {
3232
object *inv;
33-
int i;
33+
int i, mxp;
3434
string loc, *lines;
3535

3636
if (!alsos) {
@@ -43,13 +43,18 @@ static void main(string str) {
4343
}
4444

4545
inv = this_player()->query_inventory();
46+
mxp = this_player()->query_mxp();
4647

4748
if (sizeof(inv) == 0) {
4849
write("You are carrying nothing.\n");
4950
} else {
5051
lines = ({ "You are carrying:" });
5152
for (i = 0; i < sizeof(inv); i++) {
52-
loc = " " + inv[i]->query_short();
53+
if (mxp == 1) {
54+
loc = "%^MXP_LSM%^<Itm>" + inv[i]->query_id() + "%^MXP_LSM%^<Itm>";
55+
} else {
56+
loc = " " + inv[i]->query_short();
57+
}
5358
if (inv[i]->is_wielded() || inv[i]->is_worn()) {
5459
loc += " %^CYAN%^[";
5560
if (inv[i]->is_wielded() ) {

lib/daemons/ansi_d.c

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,23 @@
5757
#define SAVE "\x1b[s"
5858
#define RESTORE "\x1b[u"
5959

60+
#define MXP_OPEN "\x1b[0z"
61+
#define MXP_SECURE "\x1b[1z"
62+
#define MXP_LOCKED "\x1b[2z"
63+
#define MXP_RESET "\x1b[3z"
64+
#define MXP_TSM "\x1b[4z"
65+
#define MXP_LOM "\x1b[5z"
66+
#define MXP_LSM "\x1b[6z"
67+
#define MXP_LLM "\x1b[7z"
68+
#define MXP_ROOM_NAME "\x1b[10z"
69+
#define MXP_ROOM_DESC "\x1b[11z"
70+
#define MXP_ROOM_EXITS "\x1b[12z"
71+
6072
static mapping color_trans, attr_trans, terminal_trans;
6173
mapping symbolic_trans;
6274
static mapping translations;
6375
static mapping player_trans;
76+
static mapping mxp_trans;
6477

6578
static void restore_me(void) {
6679
unguarded("restore_object", ANSI_DATA);
@@ -128,6 +141,21 @@ void setup(void) {
128141
"HOME" : HOME,
129142
]);
130143

144+
mxp_trans = ([
145+
"MXP_OPEN" : MXP_OPEN,
146+
"MXP_SECURE" : MXP_SECURE,
147+
"MXP_LOCKED" : MXP_LOCKED,
148+
"MXP_RESET" : MXP_RESET,
149+
"MXP_TSM" : MXP_TSM,
150+
"MXP_LOM" : MXP_LOM,
151+
"MXP_LSM" : MXP_LSM,
152+
"MXP_LLM" : MXP_LLM,
153+
"MXP_ROOM_NAME" : MXP_ROOM_NAME,
154+
"MXP_ROOM_DESC" : MXP_ROOM_DESC,
155+
"MXP_ROOM_EXITS" : MXP_ROOM_EXITS,
156+
]);
157+
158+
131159
tmp = ([
132160
"CHAN_NAME" : BLUE,
133161
"CHAN_DATE" : CYAN,
@@ -158,7 +186,7 @@ void setup(void) {
158186
symbolic_trans = tmp + symbolic_trans;
159187
}
160188

161-
translations = color_trans + attr_trans + terminal_trans;
189+
translations = color_trans + attr_trans + terminal_trans + mxp_trans;
162190
}
163191

164192
void create(void) {

0 commit comments

Comments
 (0)