diff options
author | Bardur Arantsson <bardur@scientician.net> | 2011-02-22 09:02:37 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-03-29 19:59:22 +0200 |
commit | 12661153e56546361be7e002af099fd95b0ac66a (patch) | |
tree | 414410712709b0277c6417a2d1ba1d4127d47707 | |
parent | c6abace58ba0242b9f8565c185ff43d2966f8446 (diff) |
Remove unused Lua function corruption_spoiler_generate()
-rw-r--r-- | lib/core/crpt_aux.lua | 61 | ||||
-rw-r--r-- | lib/mods/theme/core/crpt_aux.lua | 61 | ||||
-rw-r--r-- | src/externs.h | 5 | ||||
-rw-r--r-- | src/lua_bind.c | 32 | ||||
-rw-r--r-- | src/util.pkg | 34 |
5 files changed, 0 insertions, 193 deletions
diff --git a/lib/core/crpt_aux.lua b/lib/core/crpt_aux.lua index e4f16e2a..97f8d4b6 100644 --- a/lib/core/crpt_aux.lua +++ b/lib/core/crpt_aux.lua @@ -180,64 +180,3 @@ function add_corruption(c) return (__corruptions_max - 1) end - - ----------- Corruption spoiler generator ----------- -function corruption_spoiler_generate() - make_temp_file() - print_hook( -[[~~~~~01|Corruptions (Spoiler) -~~~~~02|Spoilers|Corruptions -#####R=== ToME Corruptions Spoiler === - -Sometimes adventurers become exposed to the dark powers of Morgoth. If they -are unable to resist these powers, they become corrupted. Corruptions can -change their physical or mental abilities, some of which can be good, and -some bad. Most corruptions will affect you permanently, although some only -operate when they are activated (whether by player choice or as a random -event). You can check which corruptions you have in the knowledge screen 6 -(accessed through the '~' menu) or in a character dump. - -#####GGaining and (not) losing corruptions -There are several ways that you can become corrupted. - -You can become corrupted by quaffing a Potion of Corruption or by drinking -from a Fountain of Corruption. Also some strange items can be activated -for corruption. - -Corruptions are permanent. Once you have one, you have it for life. - -]]) - local i, e - for i = 0, __corruptions_max - 1 do - print_hook("[[[[[B"..__corruptions[i].name.."]\n") - print_hook(__corruptions[i].desc) - print_hook("[[[[[GGain message: "..__corruptions[i].get_text.."]\n") - if __corruptions[i].removable == TRUE then - print_hook("[[[[[RLose message: "..__corruptions[i].lose_text.."]\n") - else - print_hook("It is not removable.\n") - end - - local ok - ok = nil - for e, _ in __corruptions[i].depends do ok = not nil end - if ok then - print_hook("It depends on:\n") - for e, _ in __corruptions[i].depends do - print_hook(" "..__corruptions[e].name.."\n") - end - end - ok = nil - for e, _ in __corruptions[i].oppose do ok = not nil end - if ok then - print_hook("It is opposed to:\n") - for e, _ in __corruptions[i].oppose do - print_hook(" "..__corruptions[e].name.."\n") - end - end - print_hook("\n\n") - end - close_temp_file() - msg_print("File created as: "..get_temp_name()) -end diff --git a/lib/mods/theme/core/crpt_aux.lua b/lib/mods/theme/core/crpt_aux.lua index e4f16e2a..97f8d4b6 100644 --- a/lib/mods/theme/core/crpt_aux.lua +++ b/lib/mods/theme/core/crpt_aux.lua @@ -180,64 +180,3 @@ function add_corruption(c) return (__corruptions_max - 1) end - - ----------- Corruption spoiler generator ----------- -function corruption_spoiler_generate() - make_temp_file() - print_hook( -[[~~~~~01|Corruptions (Spoiler) -~~~~~02|Spoilers|Corruptions -#####R=== ToME Corruptions Spoiler === - -Sometimes adventurers become exposed to the dark powers of Morgoth. If they -are unable to resist these powers, they become corrupted. Corruptions can -change their physical or mental abilities, some of which can be good, and -some bad. Most corruptions will affect you permanently, although some only -operate when they are activated (whether by player choice or as a random -event). You can check which corruptions you have in the knowledge screen 6 -(accessed through the '~' menu) or in a character dump. - -#####GGaining and (not) losing corruptions -There are several ways that you can become corrupted. - -You can become corrupted by quaffing a Potion of Corruption or by drinking -from a Fountain of Corruption. Also some strange items can be activated -for corruption. - -Corruptions are permanent. Once you have one, you have it for life. - -]]) - local i, e - for i = 0, __corruptions_max - 1 do - print_hook("[[[[[B"..__corruptions[i].name.."]\n") - print_hook(__corruptions[i].desc) - print_hook("[[[[[GGain message: "..__corruptions[i].get_text.."]\n") - if __corruptions[i].removable == TRUE then - print_hook("[[[[[RLose message: "..__corruptions[i].lose_text.."]\n") - else - print_hook("It is not removable.\n") - end - - local ok - ok = nil - for e, _ in __corruptions[i].depends do ok = not nil end - if ok then - print_hook("It depends on:\n") - for e, _ in __corruptions[i].depends do - print_hook(" "..__corruptions[e].name.."\n") - end - end - ok = nil - for e, _ in __corruptions[i].oppose do ok = not nil end - if ok then - print_hook("It is opposed to:\n") - for e, _ in __corruptions[i].oppose do - print_hook(" "..__corruptions[e].name.."\n") - end - end - print_hook("\n\n") - end - close_temp_file() - msg_print("File created as: "..get_temp_name()) -end diff --git a/src/externs.h b/src/externs.h index 49771fe6..ccdc800d 100644 --- a/src/externs.h +++ b/src/externs.h @@ -1824,11 +1824,6 @@ extern void lua_delete_list(list_type *, int size); extern void lua_add_to_list(list_type *, int idx, cptr str); extern void lua_display_list(int y, int x, int h, int w, cptr title, list_type *list, int max, int begin, int sel, byte sel_color); -extern void lua_make_temp_file(void); -extern void lua_close_temp_file(void); -extern void lua_end_temp_file(void); -extern cptr lua_get_temp_name(void); - extern void add_scripted_generator(cptr name, bool_ stairs, bool_ monsters, bool_ objects, bool_ miscs); /* skills.c */ diff --git a/src/lua_bind.c b/src/lua_bind.c index d4751257..0947a01f 100644 --- a/src/lua_bind.c +++ b/src/lua_bind.c @@ -413,38 +413,6 @@ void load_map(bool_ full_text, char *name, int *y, int *x) process_dungeon_file_full = FALSE; } -/* Allow lua to use a temporary file */ -static char lua_temp_name[1025]; -static bool_ lua_temp_file_alloc = FALSE; -void lua_make_temp_file() -{ - if (lua_temp_file_alloc) return; - - if (path_temp(lua_temp_name, 1024)) return; - - /* Open a new file */ - hook_file = my_fopen(lua_temp_name, "w"); - lua_temp_file_alloc = TRUE; -} - -void lua_close_temp_file() -{ - /* Close the file */ - my_fclose(hook_file); -} - -void lua_end_temp_file() -{ - /* Remove the file */ - fd_kill(lua_temp_name); - lua_temp_file_alloc = FALSE; -} - -cptr lua_get_temp_name() -{ - return lua_temp_name; -} - bool_ alloc_room(int by0, int bx0, int ysize, int xsize, int *y1, int *x1, int *y2, int *x2) { int xval, yval, x, y; diff --git a/src/util.pkg b/src/util.pkg index 73dfdff8..b118f2b0 100644 --- a/src/util.pkg +++ b/src/util.pkg @@ -2463,40 +2463,6 @@ $static const char *player_name_lua(void){return (const char *)player_name;} */ const char *player_name_lua@player_name(); -/* Temp files */ -/** @fn make_temp_file(); - * @brief Create a temporary file. - * @note - * If a temp file already exists, or one can't be generated, the function - * will fail. Otherwise a file is created and the temp_file flag is set to - * TRUE. - * @note (see file lua_bind.c, util.c) - */ -extern void lua_make_temp_file@make_temp_file(); - -/** @fn close_temp_file(); - * @brief Close a temporary file. - * @note - * The file is closed but not released. - * @note (see file lua_bind.c, util.c) - */ -extern void lua_close_temp_file@close_temp_file(); - -/** @fn end_temp_file(); - * @brief End a temporary file. - * @note - * The file is released and the temp_file flag is set to FALSE. - * @note (see file lua_bind.c, util.c) - */ -extern void lua_end_temp_file@end_temp_file(); - -/** @fn get_temp_name(); - * @brief Return the name of the temporary file. - * @return String \n The name of the temporary file. - * @note (see file lua_bind.c) - */ -extern cptr lua_get_temp_name@get_temp_name(); - /* Quarks */ /** @fn quark_str(s16b num) * @brief Return a quark (inscription) from the quark array.\n |