#include "mech.h"
#include "mech.events.h"
#include "mech.tech.h"
#include "mech.tech.damages.h"
#include "coolmenu.h"
#include "mycool.h"
#include "failures.h"
#include "p.mech.tech.h"
#include "p.mech.build.h"
#include "p.mech.status.h"
Include dependency graph for mech.tech.repairs.c:
Go to the source code of this file.
Functions | |
static void | describe_repairs (MUXEVENT *e) |
void | tech_repairs (dbref player, MECH *mech, char *buffer) |
Variables | |
static coolmenu * | c |
static void describe_repairs | ( | MUXEVENT * | e | ) | [static] |
Definition at line 30 of file mech.tech.repairs.c.
References my_event_type::data, my_event_type::data2, EVENT_REPAIR_FIX, EVENT_REPAIR_FIXI, EVENT_REPAIR_MOB, EVENT_REPAIR_REAT, EVENT_REPAIR_RELO, EVENT_REPAIR_REPAG, EVENT_REPAIR_REPAP, EVENT_REPAIR_REPENHCRIT, EVENT_REPAIR_REPL, EVENT_REPAIR_REPLG, EVENT_REPAIR_REPSUIT, EVENT_REPAIR_SCRG, EVENT_REPAIR_SCRL, EVENT_REPAIR_SCRP, EVENT_REPAIR_UMOB, my_event_type::function, game_lag_time(), LBUF_SIZE, loc, MBUF_SIZE, MechMove, MechType, muxevent_tick, PLAYERPOS, pos_part_name(), ShortArmorSectionString(), my_event_type::tick, my_event_type::type, UNPACK_LOCPOS_E, very_fake_func(), and vsi.
Referenced by tech_repairs().
00031 { 00032 int type = e->type; 00033 MECH *mech = (MECH *) e->data; 00034 int earg = ((int) e->data2) % PLAYERPOS; 00035 dbref player = ((int) e->data2) / PLAYERPOS; 00036 int loc, pos, extra; 00037 char buf[MBUF_SIZE]; 00038 char buf2[LBUF_SIZE]; 00039 int fail = (e->function == very_fake_func); 00040 00041 UNPACK_LOCPOS_E(earg, loc, pos, extra); 00042 sprintf(buf, "%s%s", ShortArmorSectionString(MechType(mech), 00043 MechMove(mech), loc % 8), 00044 loc >= 8 ? "(R)" : ""); 00045 sprintf(buf2, "%-5d ", player); 00046 sprintf(buf2 + strlen(buf2), "%-4d ", 00047 game_lag_time((e->tick - muxevent_tick) / 60)); 00048 switch (type) { 00049 case EVENT_REPAIR_REPL: 00050 sprintf(buf2 + strlen(buf2), "%5s:%-2d Replacement of %s", buf, 00051 pos + 1, pos_part_name(mech, loc, pos)); 00052 if(fail) 00053 sprintf(buf2 + strlen(buf2), " (Failure)"); 00054 break; 00055 case EVENT_REPAIR_REPLG: 00056 sprintf(buf2 + strlen(buf2), "%5s:%-2d Replacement of %s", buf, 00057 pos + 1, pos_part_name(mech, loc, pos)); 00058 if(fail) 00059 sprintf(buf2 + strlen(buf2), " (Failure)"); 00060 break; 00061 case EVENT_REPAIR_REAT: 00062 sprintf(buf2 + strlen(buf2), "%5s Reattachment", buf); 00063 if(fail) 00064 sprintf(buf2 + strlen(buf2), " (Failure)"); 00065 break; 00066 case EVENT_REPAIR_RELO: 00067 sprintf(buf2 + strlen(buf2), "%5s:%-2d %sload of %s", buf, pos + 1, 00068 extra ? "Un" : "Re", pos_part_name(mech, loc, pos)); 00069 if(fail) 00070 sprintf(buf2 + strlen(buf2), " (Failure)"); 00071 break; 00072 case EVENT_REPAIR_FIX: 00073 if(fail) 00074 sprintf(buf2 + strlen(buf2), "%5s:%-2d Failed armor repair", 00075 buf, 0); 00076 else 00077 sprintf(buf2 + strlen(buf2), 00078 "%5s:%-2d Repair of armor - possibly next point", buf, 00079 pos); 00080 break; 00081 case EVENT_REPAIR_FIXI: 00082 if(fail) 00083 sprintf(buf2 + strlen(buf2), "%5s:%-2d Failed internal repair", 00084 buf, 0); 00085 else 00086 sprintf(buf2 + strlen(buf2), 00087 "%5s:%-2d Repair of internals - possibly next point", buf, 00088 pos); 00089 break; 00090 case EVENT_REPAIR_SCRL: 00091 sprintf(buf2 + strlen(buf2), "%5s Removal", buf); 00092 break; 00093 case EVENT_REPAIR_SCRP: 00094 sprintf(buf2 + strlen(buf2), "%5s:%-2d Scrapping of %s", buf, 00095 pos + 1, pos_part_name(mech, loc, pos)); 00096 break; 00097 case EVENT_REPAIR_SCRG: 00098 sprintf(buf2 + strlen(buf2), "%5s:%-2d Scrapping of %s", buf, 00099 pos + 1, pos_part_name(mech, loc, pos)); 00100 break; 00101 case EVENT_REPAIR_REPAG: 00102 sprintf(buf2 + strlen(buf2), "%5s:%-2d Repair of %s", buf, pos + 1, 00103 pos_part_name(mech, loc, pos)); 00104 if(fail) 00105 sprintf(buf2 + strlen(buf2), " (Failure)"); 00106 break; 00107 case EVENT_REPAIR_REPAP: 00108 sprintf(buf2 + strlen(buf2), "%5s:%-2d Repair of %s", buf, pos + 1, 00109 pos_part_name(mech, loc, pos)); 00110 if(fail) 00111 sprintf(buf2 + strlen(buf2), " (Failure)"); 00112 break; 00113 case EVENT_REPAIR_REPENHCRIT: 00114 sprintf(buf2 + strlen(buf2), "%5s:%-2d Repair of %s", buf, pos + 1, 00115 pos_part_name(mech, loc, pos)); 00116 if(fail) 00117 sprintf(buf2 + strlen(buf2), " (Failure)"); 00118 break; 00119 case EVENT_REPAIR_MOB: 00120 sprintf(buf2 + strlen(buf2), "%5s:%-2d Mounting of %s", buf, 00121 pos + 1, pos_part_name(mech, loc, pos)); 00122 if(fail) 00123 sprintf(buf2 + strlen(buf2), " (Failure)"); 00124 break; 00125 case EVENT_REPAIR_UMOB: 00126 sprintf(buf2 + strlen(buf2), "%5s:%-2d Removing of %s", buf, 00127 pos + 1, pos_part_name(mech, loc, pos)); 00128 if(fail) 00129 sprintf(buf2 + strlen(buf2), " (Failure)"); 00130 break; 00131 case EVENT_REPAIR_REPSUIT: 00132 sprintf(buf2 + strlen(buf2), "%5s Replacing suit", buf); 00133 if(fail) 00134 sprintf(buf2 + strlen(buf2), " (Failure)"); 00135 break; 00136 } 00137 00138 /* sprintf(buf2+strlen(buf2), " - %s", */ 00139 00140 /* get_uptime_to_string(e->tick - muxevent_tick)); */ 00141 vsi(buf2); 00142 }
Definition at line 144 of file mech.tech.repairs.c.
References addline, c, cent, describe_repairs(), DOCHECK, figure_latest_tech_event(), FIRST_TECH_EVENT, GetMechID(), IsDS, KillCoolMenu(), LAST_TECH_EVENT, muxevent_gothru_type_data(), ShowCoolMenu(), TECHCOMMANDD, tprintf(), and vsi.
00145 { 00146 int i, isds = IsDS(mech); 00147 00148 TECHCOMMANDD; 00149 00150 DOCHECK(!figure_latest_tech_event(mech), 00151 "This 'mech has no repairs pending!"); 00152 c = NULL; 00153 addline(); 00154 cent(tprintf("Repairs/Scrapping in progress (%s)", GetMechID(mech))); 00155 vsi(tprintf("%-5s %-4s %s", "Plr", "Time", "Location + Description")); 00156 addline(); 00157 for(i = FIRST_TECH_EVENT; i <= LAST_TECH_EVENT; i++) 00158 muxevent_gothru_type_data(i, (void *) mech, describe_repairs); 00159 addline(); 00160 vsi("Note: Time = Time remaining in minutes. Plr = Tech's dbref"); 00161 addline(); 00162 ShowCoolMenu(player, c); 00163 KillCoolMenu(c); 00164 }
Definition at line 28 of file mech.tech.repairs.c.
Referenced by add_commac(), ArmorEvaluateSerious(), ArmorSectionFromString(), auto_listcommands(), bomb_list(), bv2text(), check_for_damage(), clear_macro_set(), colourize_tac_map(), Commer(), compute_length(), count_following_with(), create_brandname(), create_new_commac(), CreateMenuEntry_Killer(), debug_xptop(), del_commac(), destroy_commac(), display_entries(), display_entry(), do_add_macro(), do_addcom(), do_allcom(), do_clear_macro(), do_clearcom(), do_comconnect(), do_comdisconnect(), do_comlist(), do_comprintf(), do_comsend(), do_comwho(), do_create_macro(), do_del_macro(), do_delcom(), do_delcomchannel(), do_doing(), do_edit_macro(), do_leavechannel(), do_process_macro(), do_status_macro(), do_ugly_things(), DoSpecialObjectHelp(), Dump_Decrease(), DumpMechSpecialObjects(), DumpWeapons(), eval_boolexp(), fix_entry(), fun_art(), fun_index(), fun_merge(), fun_scramble(), generic_retrieve_stuff(), generic_store_stuff(), get_channel_from_alias(), get_commac(), get_list(), get_macro_set(), getboolexp(), getboolexp1(), GetLRSMech(), GetLRSMechChar(), getstring_noalloc(), HexLOSBroadcast(), initialize_colorize(), initialize_partname_tables(), initialize_pc(), KillCoolMenu(), list_matching(), list_xcodestuff(), listtic_sub(), load_commac(), load_comsystem(), load_macros(), loading_bay_whine(), LRSElevation(), LRSTerrain(), MakeCoolMenuText(), map_save_bits(), map_underlying_terrain(), mech_brief(), mech_contacts(), mech_list_maker(), mech_mechprefs(), mech_underlying_terrain(), mech_weaponspecs(), mech_weight_sub_mech(), mech_weight_sub_veh(), MechCargoMaxSpeed(), mechrep_Rrestore(), mmdb_db_read(), mmdb_db_write(), multi_weap_sel(), my_shortform(), number_of_entries(), part_name(), part_name_long(), pos_part_name(), purge_commac(), retrieve_attrs(), retrieve_health(), retrieve_matching_letter(), save_commac(), save_template(), SelCol_FunStringMenuK(), SelCol_Menu(), sendNetworkMessage(), ShortArmorSectionString(), show_charstatus(), show_mechs_damage(), ShowCoolMenu(), silly_get_uptime_to_string(), sketch_tac_cliffs(), sort_com_aliases(), stuff_change_sub(), tech_parsegun(), tech_repairs(), text2bv(), translate_string(), try_to_find_name(), update_entry(), update_entry_set(), and update_entry_toggle().