From d60f0a85f1199f47ed4c6181f1d3312083c1eb43 Mon Sep 17 00:00:00 2001 From: "Gergely Polonkai (W00d5t0ck)" Date: Fri, 30 Mar 2012 20:36:29 +0200 Subject: [PATCH] Added menu table and its contents to the SQL files Signed-off-by: Gergely Polonkai (W00d5t0ck) --- iminiru/data.sql | 16 ++++++++++++++++ sql/menu.sql | 9 +++++++++ 2 files changed, 25 insertions(+) create mode 100644 sql/menu.sql diff --git a/iminiru/data.sql b/iminiru/data.sql index 022ab9b..3dcbbcd 100644 --- a/iminiru/data.sql +++ b/iminiru/data.sql @@ -1,3 +1,19 @@ +-- id menuchar need_active_char placement display_text fnctn +INSERT INTO menu (id, menuchar, need_active_char, placement, display_text, fnctn) VALUES (NULL, 'w', 0, 0, 'Enter the world', 'enter-world'); +INSERT INTO menu (id, menuchar, need_active_char, placement, display_text, fnctn) VALUES (NULL, 'p', 0, 1, 'Change password', 'change-password'); +INSERT INTO menu (id, menuchar, need_active_char, placement, display_text, fnctn) VALUES (NULL, 'c', 0, 2, 'Toggle colour', 'toggle-colour'); +INSERT INTO menu (id, menuchar, need_active_char, placement, display_text, fnctn) VALUES (NULL, 'd', 0, 3, 'Read the documentation', 'documentation'); +INSERT INTO menu (id, menuchar, need_active_char, placement, display_text, fnctn) VALUES (NULL, 'a', 0, 4, 'Change active character', 'caracter-select'); +INSERT INTO menu (id, menuchar, need_active_char, placement, display_text, fnctn) VALUES (NULL, 'n', 0, 5, 'Create new character', 'character-create'); +INSERT INTO menu (id, menuchar, need_active_char, placement, display_text, fnctn) VALUES (NULL, 'r', 1, 6, 'Delete active character', 'character-delete'); +INSERT INTO menu (id, menuchar, need_active_char, placement, display_text, fnctn) VALUES (NULL, 'i', 0, 7, 'Enter the chat rooms', 'chat'); +INSERT INTO menu (id, menuchar, need_active_char, placement, display_text, fnctn) VALUES (NULL, 'm', 0, 8, 'Check your player mail', 'player-mail'); +INSERT INTO menu (id, menuchar, need_active_char, placement, display_text, fnctn) VALUES (NULL, 't', 0, 9, 'Colour test', 'colour-test'); +INSERT INTO menu (id, menuchar, need_active_char, placement, display_text, fnctn) VALUES (NULL, 'e', 0, 10, 'Change e-mail address', 'change-email'); +INSERT INTO menu (id, menuchar, need_active_char, placement, display_text, fnctn) VALUES (NULL, 'g', 0, 11, 'Change real name', 'change-name'); +INSERT INTO menu (id, menuchar, need_active_char, placement, display_text, fnctn) VALUES (NULL, 'q', 0, 12, 'Return to the real world', 'quit'); +INSERT INTO menu (id, menuchar, need_active_char, placement, display_text, fnctn) VALUES (NULL, '?', 0, 13, 'Redisplay menu', 'redisplay-menu'); + INSERT INTO directions (id, short_name, name) VALUES (1, 'n', 'north'); INSERT INTO directions (id, short_name, name) VALUES (2, 'nw', 'northwest'); INSERT INTO directions (id, short_name, name) VALUES (3, 'w', 'west'); diff --git a/sql/menu.sql b/sql/menu.sql new file mode 100644 index 0000000..6a69a5d --- /dev/null +++ b/sql/menu.sql @@ -0,0 +1,9 @@ +CREATE TABLE menu ( + id integer UNIQUE PRIMARY KEY, -- ID of the menu item + menuchar char(1) UNIQUE NOT NULL, -- The choice character of the menu item. It will be highlighted in the menu text if found, prepended to the menu text in braces otherwise + need_active_char boolean NOT NULL DEFAULT FALSE, -- Menu item is displayed only if the player has a character selected + placement integer UNIQUE NOT NULL, -- The menu is ordered based on this field + display_text varchar(70) NOT NULL UNIQUE, -- The text to be displayed (see also the menuchar field) + fnctn varchar(40) NOT NULL -- The in-game function to execute +); +