Bläddra i källkod

Feat: cumulative update

dzp 1 år sedan
förälder
incheckning
214160dc37
4 ändrade filer med 11 tillägg och 7 borttagningar
  1. 3 0
      TODO
  2. 5 6
      src/draw.c
  3. 1 1
      src/list.c
  4. 2 0
      src/tables.c

+ 3 - 0
TODO

@@ -1,5 +1,8 @@
 - #draw tile 1 1 1 1 {\x7B}
 
+#draw RED ROUNDED BOX {1 1 2 2} gives a poor error message
+
+
 - With internet down, #session reconnect events might fail
 
 - Add an example script to display time left on tickers using #info tickers save

+ 5 - 6
src/draw.c

@@ -457,12 +457,11 @@ DO_COMMAND(do_draw)
 
 			if (!is_math(ses, arg1) || !is_math(ses, arg2) || !is_math(ses, arg3) || !is_math(ses, arg4))
 			{
-				show_error(ses, LIST_COMMAND, "#ERROR: #DRAW: NON-NUMERIC SQUARE: %s {%s %s %s %s}",
-					draw_table[index].name,
-					is_math(ses, arg1) ? ntos(top_row) : arg1,
-					is_math(ses, arg2) ? ntos(top_col) : arg2,
-					is_math(ses, arg3) ? ntos(bot_row) : arg3,
-					is_math(ses, arg4) ? ntos(bot_col) : arg4);
+				show_error(ses, LIST_COMMAND, "#ERROR: #DRAW: INVALID SQUARE: %s {%s} {%s} {%s} {%s}", draw_table[index].name, arg1, arg2, arg3, arg4);
+//					is_math(ses, arg1) ? ntos(top_row) : arg1,
+//					is_math(ses, arg2) ? ntos(top_col) : arg2,
+//					is_math(ses, arg3) ? ntos(bot_row) : arg3,
+//					is_math(ses, arg4) ? ntos(bot_col) : arg4);
 
 				return ses;
 			}

+ 1 - 1
src/list.c

@@ -601,7 +601,7 @@ DO_ARRAY(array_indexate)
 
 	arg = sub_arg_in_braces(ses, arg, arg1, GET_ALL, SUB_VAR|SUB_FUN);
 
-	if (list->root == NULL || list->root->list[0]->root == NULL)
+	if (list->root == NULL || list->root->used == 0 || list->root->list[0]->root == NULL)
 	{
 		show_error(ses, LIST_COMMAND, "#ERROR: #LIST {%s} INDEXATE: NOT AN INDEXABLE LIST TABLE.", var);
 

+ 2 - 0
src/tables.c

@@ -794,7 +794,9 @@ struct event_type event_table[] =
 	{    "HOUR",                                   0, EVENT_FLAG_TIME,     "TIME",      "every hour or given hour"   },
 	{    "IAC ",                                   0, EVENT_FLAG_TELNET,   "TELNET",    "prefix for telnet events"   },
 	{    "LONG-CLICKED ",                          0, EVENT_FLAG_MOUSE,    "MOUSE",     "mouse is long-clicked"      },
+	{    "MAP CREATE EXIT",                        0, EVENT_FLAG_MAP,      "MAP",       "an exit is created"         },
 	{    "MAP CREATE ROOM",                        0, EVENT_FLAG_MAP,      "MAP",       "a room is created"          },
+	{    "MAP DELETE EXIT",                        0, EVENT_FLAG_MAP,      "MAP",       "an exit is deleted"         },
 	{    "MAP DELETE ROOM",                        0, EVENT_FLAG_MAP,      "MAP",       "a room is deleted"          },
 	{    "MAP DOUBLE-CLICKED ",                    0, EVENT_FLAG_MOUSE,    "MOUSE",     "vt map click"               },
 	{    "MAP ENTER MAP",                          0, EVENT_FLAG_MAP,      "MAP",       "entering the map"           },