00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "config.h"
00022
00023
00024 #ifndef _GLUE_H
00025 #define _GLUE_H
00026
00027 #define VERIFY 0
00028 #define SAVE 1
00029 #define LOAD 2
00030
00031 #define XCODE_VERSION 2
00032
00033 #define SPECIAL_FREE 0
00034 #define SPECIAL_ALLOC 1
00035
00036 #define GFLAG_ALL 0
00037 #define GFLAG_MECH 1
00038 #define GFLAG_GROUNDVEH 2
00039 #define GFLAG_AERO 4
00040 #define GFLAG_DS 8
00041 #define GFLAG_VTOL 16
00042 #define GFLAG_NAVAL 32
00043 #define GFLAG_BSUIT 64
00044 #define GFLAG_MW 128
00045
00046 #include "glue_types.h"
00047
00048 #define Have_MechPower(a,b) (((Powers2((Owner(a))) & (b)) || Wizard(Owner(a))) && Inherits((a)))
00049
00050 typedef struct CommandsStruct {
00051 int flag;
00052 char *name;
00053 char *helpmsg;
00054 void (*func) ();
00055 } CommandsStruct;
00056
00057 typedef struct SpecialObjectStruct {
00058 char *type;
00059 CommandsStruct *commands;
00060 long datasize;
00061 void (*allocfreefunc) ();
00062 int updateTime;
00063 void (*updatefunc) ();
00064 int power_needed;
00065 } SpecialObjectStruct;
00066
00067 #ifdef _GLUE_C
00068
00069 #include "p.mech.move.h"
00070 #include "p.debug.h"
00071 #include "turret.h"
00072 #include "p.aero.move.h"
00073 #include "p.mech.maps.h"
00074 #include "p.ds.bay.h"
00075 #include "p.mech.notify.h"
00076 #include "p.mech.utils.h"
00077 #include "p.mech.combat.h"
00078 #include "p.mech.update.h"
00079 #include "p.mechrep.h"
00080 #include "p.mech.restrict.h"
00081 #include "p.mech.advanced.h"
00082 #include "p.mech.tic.h"
00083 #include "p.ds.turret.h"
00084 #include "p.mech.contacts.h"
00085 #include "p.mech.status.h"
00086 #include "p.mech.scan.h"
00087 #include "p.mech.sensor.h"
00088 #include "p.map.h"
00089 #include "p.mech.pickup.h"
00090 #include "p.eject.h"
00091 #include "p.mech.c3.h"
00092 #include "p.bsuit.h"
00093 #include "p.mech.startup.h"
00094 #include "p.mech.consistency.h"
00095 #include "p.mech.physical.h"
00096 #include "mech.tech.h"
00097 #include "p.mech.tech.repairs.h"
00098 #include "p.glue.scode.h"
00099 #include "mechrep.h"
00100 #include "p.mine.h"
00101 #include "p.btechstats.h"
00102 #include "autopilot.h"
00103 #include "p.events.h"
00104 #include "p.mech.tag.h"
00105 #include "p.mech.c3i.h"
00106 #include "p.mech.fire.h"
00107 #include "p.mech.enhanced.criticals.h"
00108 #include "p.mech.spot.h"
00109 #include "p.mech.ammodump.h"
00110 #include "p.mech.damage.h"
00111
00112 void newturret(dbref, void **, int);
00113 void newfreemech(dbref, void **, int);
00114
00115 ECMD(f_mapblock_set);
00116 ECMD(f_mapblock_setxy);
00117 ECMD(ListForms);
00118 ECMD(initiate_ood);
00119 ECMD(mech_Raddstuff);
00120 ECMD(mech_Rfixstuff);
00121 ECMD(mech_Rremovestuff);
00122 ECMD(mech_Rresetstuff);
00123 ECMD(mech_bomb);
00124 ECMD(mech_loadcargo);
00125 ECMD(mech_losemit);
00126 ECMD(mech_manifest);
00127 ECMD(mech_stores);
00128 ECMD(mech_domystuff);
00129 ECMD(mech_unloadcargo);
00130 ECMD(tech_magic);
00131 ECMD(mech_inferno);
00132 ECMD(mech_swarm);
00133 ECMD(mech_swarm1);
00134 ECMD(mech_dig);
00135 ECMD(mech_vector);
00136 ECMD(mech_sguided);
00137 ECMD(f_map_loadmap);
00138
00139 ECMD(f_draw);
00140 ECMD(f_sheath);
00141 ECMD(f_hold);
00142 ECMD(f_put);
00143
00144 ECMD(f_shout);
00145 ECMD(f_emote);
00146 ECMD(f_say);
00147 ECMD(f_whisper);
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176 #define SHEADER(a,b) \
00177 { a, b, b, NULL }
00178 #define HEADER(a) SHEADER(0,a)
00179
00180 CommandsStruct mechcommands[] = {
00181
00182 HEADER("Movement"),
00183
00184 {0, "HEADING [num]",
00185 "Shows/Changes your heading to <NUM> (<NUM> in degrees)",
00186 mech_heading},
00187 {0, "SPEED [num | walk | run | stop | back | flank | cruise]",
00188 "Without arguments shows your present speed, otherwise changes your speed to <NUM> or the specified speed (run/cruise = 1x maxspeed, walk/flank = 2/3x maxspeed, stop = 0, back = -2/3x maxspeed)",
00189 mech_speed},
00190 {48, "VERTICAL [num]", "Shows/Changes your vertical speed to <NUM>.",
00191 mech_vertical},
00192
00193 {12, "CLIMB [angle]", "Shows/Changes the climbing angle to <NUM>.",
00194 aero_climb},
00195 {12, "DIVE [angle]", "Shows/Changes the diving angle to <NUM>.",
00196 aero_dive},
00197 {12, "THRUST [num]", "Shows/Changes the thrust to <NUM>.",
00198 aero_thrust},
00199 {1, "LATERAL [fl|fr|rl|rr|-]",
00200 "Change your lateral movement mode (quad only). fl/fr/rl/rr = Directions, - = Disable lateral movement.",
00201 mech_lateral},
00202 {129, "STAND", "Stand up after a fall or dropping prone.", mech_stand},
00203 {1, "PRONE", "Force your 'mech to drop prone where it is.", mech_drop},
00204 {1, "THRASH", "Thrash around and try to kill nearby battle suits.",
00205 mech_thrash},
00206 {65, "JUMP [<TARGET-ID> | <BEARING> <RANGE>]",
00207 "Jump on default target / given target / bearing + range.",
00208 mech_jump},
00209 {1, "HULLDOWN [- | STOP]",
00210 "ALlows a QUAD to go hull down behind a hill to gain better protection.",
00211 mech_hulldown},
00212 {0, "ENTERBASE [N|W|S|E]",
00213 "Enters base/hangar/whatnever from selected dir.",
00214 mech_enterbase},
00215
00216 {0, "ENTERBAY [REF]",
00217 "Enters bay of a moving(?) hangar (DropShip for example). Ref is target ref, and it is optional.",
00218 mech_enterbay},
00219 {1, "BOOTLEGGER [R|L]",
00220 "Performs a bootlegger turn. This will turn you instantly 90 degrees in the desired direction, but requires a pilot roll. Roll BTH is based on tonnage and speed. Legs must not be recycling.",
00221 mech_bootlegger},
00222 #ifdef BT_MOVEMENT_MODES
00223 {195, "SPRINT",
00224 "Toggles sprinting mode. While sprinting you are easier to hit, cannot attack, but can move 2xWalkSpeed.",
00225 mech_sprint},
00226 {195, "EVADE",
00227 "Toggles evasion mode. While evading you are harder to hit, but cannot attack.",
00228 mech_evade},
00229 {1, "DODGE",
00230 "Toggles dodge mode on. You must have Dodge_Maneuver advantage. While dodging you can counter physical attack rolls. One per turn.",
00231 mech_dodge},
00232 #endif
00233
00234 HEADER("Radio"),
00235 {0, "LISTCHANNELS", "Lists set frequencies + comtitles for them.",
00236 mech_list_freqs},
00237 {0, "SENDCHANNEL <LETTER> = <STRING>",
00238 "Sends <string> on channel <letter>'s freq.", mech_sendchannel},
00239 {0, "RADIO <ID> = <STRING>",
00240 "Radioes (LOS) <ID> with <STRING>", mech_radio},
00241 {0, "SETCHANNELFREQ <LETTER> = <NUMBER>",
00242 "Sets channel <letter> to frequency <number>.",
00243 mech_set_channelfreq},
00244 {0, "SETCHANNELMODE <LETTER> = <STRING>",
00245 "Sets channel <letter> mode <string> (available letters: DIUES, color codes).",
00246 mech_set_channelmode},
00247 {0, "SETCHANNELTITLE <LETTER> = <STRING>",
00248 "Sets channel <letter> comtitle to <string>.",
00249 mech_set_channeltitle},
00250
00251
00252 HEADER("Weapons"),
00253 {0, "LOCK [<TARGET-ID> | <X> <Y> | <X> <Y> <B|H|I|C> | -]",
00254 "Sets the target to the (3rd argument : B = building, C = clear, I = ignite, H = hex (clear/ignite/break ice/destroy bridge)) /, - = Clears present lock.",
00255 mech_settarget},
00256 {0, "SIGHT <WEAPNUM> [<TARGET-ID> | <X> <Y>]",
00257 "Computes base-to-hit for given weapon and target.", mech_sight},
00258 {0, "FIRE <WEAPNUM> [<TARGET-ID> | <X> <Y>]",
00259 "Fires weapon <weapnum> at def. target or specified target.",
00260 mech_fireweapon},
00261 {0, "TARGET <SECTION | ->",
00262 "Sets your aimed shot target / Disables targetting.",
00263 mech_target},
00264 {0, "TAG [ID|-]",
00265 "Lights an enemy unit with your TAG / Disables current TAG.",
00266 mech_tag},
00267
00268
00269 {0, "AMS <weapnum>", "Toggles Anti-Missile System on and off.",
00270 mech_ams},
00271 {0, "AP <weapnum>",
00272 "Sets/Unsets the autocannon to fire armor piercing rounds.",
00273 mech_armorpiercing},
00274 {0, "ARTEMIS <weapnum>", "Sets Weapon to and from ARTEMIS Mode.",
00275 mech_artemis},
00276 {0, "CASELESS <weaponum>", "Sets Weapons to and from CASELESS Mode.",
00277 mech_caseless},
00278 {0, "EXPLOSIVE <weapnum>", "Toggles between explosive/normal rounds",
00279 mech_explosive},
00280 {0, "FIRECLUSTER <weapnum>",
00281 "Sets/unsets artillery weapon to fire cluster rounds.",
00282 mech_cluster},
00283 {0, "FIREMINE <weapnum>",
00284 "Sets/unsets artillery weapon to fire mine rounds.", mech_mine},
00285 {0, "FIRESMOKE <weapnum>",
00286 "Sets/unsets artillery weapon to fire smoke rounds.",
00287 mech_smoke},
00288 {0, "FIRESWARM <weapnum>",
00289 "Sets/Unsets the LRM launcher to shoot swarm missiles",
00290 mech_swarm},
00291 {0, "FIRESWARM1 <weapnum>",
00292 "Sets/Unsets the LRM launcher to shoot swarm missiles",
00293 mech_swarm1},
00294 {0, "FLECHETTE <weapnum>",
00295 "Sets/Unsets the autocannon to fire flechette rounds.",
00296 mech_flechette},
00297 {0, "GATTLING <weapnum>",
00298 "Sets weapon to and from Gattling Mode (machineguns only).",
00299 mech_gattling},
00300 {0, "HEAT <weapnum>", "Sets a flamer to and from heat mode`.",
00301 mech_flamerheat},
00302 {0, "HOTLOAD <weapnum>",
00303 "Sets/Unsets the LRM launcher to hotload missiles, removing short-range penalties, but adding to chance of jamming.",
00304 mech_hotload},
00305
00306 {0, "INARC <weapnum> <-|X|Y|E>",
00307 "Sets the type of ammo to fire from your iNarc weapon. '-': standard Homing, 'X': Explosive, 'Y': Haywire, 'E': ECM",
00308 mech_inarc_ammo_toggle},
00309 {0, "INCENDIARY <weapnum>",
00310 "Sets/Unsets the autocannon to fire incendiary rounds.",
00311 mech_incendiary},
00312 {0, "INFERNO <weapnum>",
00313 "Sets/Unsets the SRM launcher to shoot inferno missiles",
00314 mech_inferno},
00315 {0, "LBX <weapnum>", "Sets weapon to and from LBX Mode.", mech_lbx},
00316 {0, "NARC <weapnum>", "Sets weapon to and from NARC Mode.", mech_narc},
00317 {0, "SGUIDED <weapnum", "Sets weapon to and from Sguide Mode", mech_sguided},
00318 {0, "STINGER <weaponum", "Sets weapon to and from Stinger Mode.",
00319 mech_stinger},
00320 {0, "PRECISION <weapnum>",
00321 "Sets/Unsets the autocannon to fire precision rounds.",
00322 mech_precision},
00323 {0, "RAC <weapnum> <-/2/4/6>",
00324 "Sets the Rotary AutoCannon to fire either 1, 2, 4 or 6 shots at a time.",
00325 mech_rac},
00326 {0, "RAPIDFIRE <weapnum>",
00327 "Sets weapon to and from Rapid Fire Mode (std and light ACs only).",
00328 mech_rapidfire},
00329 {0, "ULTRA <weapnum>", "Sets weapon to and from Ultra Mode.",
00330 mech_ultra},
00331 {0, "DISABLE <weapnum>", "Disables the weapon (Gauss only).",
00332 mech_disableweap},
00333 {0, "UNJAM <weapnum>", "Fixes ammo loader jams.",
00334 mech_unjamammo},
00335 {0, "USEBIN <weapnum> <location>",
00336 "Draw ammo from <location> first for <weapnum>.",
00337 mech_usebin},
00338
00339
00340 {0, "ADDTIC <NUM> <WEAPNUM | LOWNUM-HIGHNUM>",
00341 "Adds weapon <weapnum>, or weapons from <lownum> to <highnum> to TIC <num>.",
00342 mech_addtic},
00343 {0, "CLEARTIC <NUM>", "Clears the TIC <num>.", mech_cleartic},
00344
00345 {0, "DELTIC <NUM> <WEAPNUM>",
00346 "Deletes weapon number <weapnum> from TIC <num>.",
00347 mech_deltic},
00348
00349 {0, "FIRETIC <NUM> [<TARGET> or <X Y>]",
00350 "Fires the weapons in TIC <num>.",
00351 mech_firetic},
00352 {0, "LISTTIC <NUM>", "Lists weapons in the TIC <num>.", mech_listtic},
00353
00354
00355 HEADER("Information"),
00356
00357 {0, "BRIEF [<LTR> <VAL>]",
00358 "Shows brief status / Sets brief for <ltr> to <val>.",
00359 mech_brief},
00360 {0, "CONTACTS [<Prefix> | <TARGET-ID>]", "List all current contacts",
00361 mech_contacts},
00362
00363 {0, "CRITSTATUS <SECTION>", "Shows the Critical hits status",
00364 mech_critstatus},
00365 {0, "REPORT [<TARGET-ID> | <X Y>]",
00366 "Information on default target, num, or x,y", mech_report},
00367 {0, "SCAN [<TARGET-ID> | <X Y> | <X Y> <B|H>]",
00368 "Scans the default target, chosen target, or hex",
00369 mech_scan},
00370
00371 {0, "SENSOR [LONG | [<V|L|I|E|S> <V|L|I|E|S>]]",
00372 "Shows/Changes your sensor mode (1 argument: Long, otherwise Short description about sensor mode)",
00373 mech_sensor},
00374
00375 {0, "STATUS [A(rmor) | I(nfo)] | W(eapons)]",
00376 "Prints the mech's status",
00377 mech_status},
00378 {0, "VIEW [<TARGET-ID>]", "View the war painting on the target",
00379 mech_view},
00380 {0, "WEAPONSPECS", "Shows the specifications for your weapons",
00381 mech_weaponspecs},
00382 {0, "WEAPONSTATUS", "Shows the status of all your weapons",
00383 mech_weaponstatus},
00384
00385
00386 HEADER("Navigation"),
00387 {0, "BEARING [<X Y>] [<X Y>]", "Same format as range.", mech_bearing},
00388
00389 {0, "ETA [<X> <Y>]", "Estimates time to target (/default target)",
00390 mech_eta},
00391 {0, "FINDCENTER", "Shows distance/bearing to center of hex.",
00392 mech_findcenter},
00393 {0, "NAVIGATE", "Shows the hex and surroundings graphically",
00394 mech_navigate},
00395 {0, "RANGE [<X Y>] [<X Y>]",
00396 "Range to def. target / range to x y / range to x,y from x,y",
00397 mech_range},
00398 {0,
00399 "LRS <M|T|E|L|S|H|C> [<BEARING> <RANGE> | <TARGET-ID>]",
00400 "Shows the (Mech/Terrain/Elevation/LOS/Sensors/Height/Combined) long range map", mech_lrsmap},
00401 {0, "TACTICAL [C | T | L] [<BEARING> <RANGE> | <TARGET-ID>]",
00402 "Shows the tactical map at the mech's location / at bearing and range / around chosen target",
00403 mech_tacmap},
00404 {0, "VECTOR [<X Y> <X Y>]", "Same format as range.",mech_vector},
00405
00406
00407 HEADER("Special"),
00408
00409 {12, "CHECKLZ", "Checks if the landing-zone is good for a landing",
00410 aero_checklz},
00411 {0, "@OOD <X> <Y> [Z]",
00412 "@Initiates OOD drop at the orbit altitude to <X> <Y> (optional Z altitude to start from)",
00413 initiate_ood},
00414 {0, "@LOSEMIT <MESSAGE>",
00415 "@Sends message to everyone seeing the 'mech right now",
00416 mech_losemit},
00417 {0, "@DAMAGE <NUM> <CLUSTERSIZE> <ISREAR> <ISCRITICAL>",
00418 "@Causes <NUM> pt of damage to be done to 'mech in <CLUSTERSIZE> point clusters (if <ISREAR> is 1, damage is done to rear arc ; if <ISCRITICAL> is 1, damage does crit-thru-armor)",
00419 mech_damage},
00420 {0, "@WEIGHT", "@Checks the weight allocated in the mech",
00421 mech_weight},
00422 {4, "BOMB [list | drop <num> | aim]",
00423 "Lists bombs / drops bomb <num> / aims where a bomb would fall.",
00424 mech_bomb},
00425 {2, "DIG", "Starts burrowing for cover [non-hovers only].", mech_dig},
00426
00427 {2, "FIXTURRET",
00428 "Starts to fix a turret. Only works on jammed turrets, not locked turrets.",
00429 mech_fixturret},
00430
00431 {0, "EXPLODE <AMMO|REACTOR|STOP>",
00432 "<AMMO|REACTOR> specifies which to ignite ; ammo causes all ammo on your mech to go *bang* (in no particular order), reactor disables control systems. Do note that neither are instant. STOP allows you to stop existing countdown.",
00433 mech_explode},
00434 {0, "SAFETY [ON|OFF]",
00435 "Enable/Disable Safeties against killing MechWarriors.",
00436 mech_safety},
00437 {0, "MECHPREFS [SETTING [ON|OFF]]", "Toggle the mechpref setting of SETTING",
00438 mech_mechprefs},
00439 {51, "TURNMODE [TIGHT | NORMAL]", "Sets turnmode.", mech_turnmode},
00440
00441
00442 {0, "DROPOFF", "Drops the mech you are carrying.", mech_dropoff},
00443 {0, "PICKUP [ID]", "Picks up [ID].", mech_pickup},
00444 {128, "ATTACHCABLES <ID1> <ID2>",
00445 "Attaches tow cables so that [ID1] can tow [ID2].",
00446 mech_attachcables},
00447 {128, "DETACHCABLES <ID>", "Detaches the tow cables from [ID].",
00448 mech_detachcables},
00449
00450
00451 {0, "DUMP <WEAPNUM|LOCATION|ALL|STOP> [<CRIT>]",
00452 "Dumps the ammunition for the weapon / in the location [ crit ] / all ammunition in the 'mech / stops all dumping in progress.",
00453 mech_dump},
00454 {1, "FLIPARMS",
00455 "Flips the arms to and from the rear arcs, if possible.",
00456 mech_fliparms},
00457
00458 {0, "ECM",
00459 "Toggles the ECM status of your Guardian ECM suite (only applicable if you have one)",
00460 mech_ecm},
00461 {0, "ECCM",
00462 "Toggles the ECCM status of your Guardian ECM suite (only applicable if you have one)",
00463 mech_eccm},
00464 {0, "ANGELECM",
00465 "Toggles the ECM status of your Angel ECM suite (only applicable if you have one)",
00466 mech_angelecm},
00467 {0, "ANGELECCM",
00468 "Toggles the ECCM status of your Angel ECM suite (only applicable if you have one)",
00469 mech_angeleccm},
00470
00471 {0, "PERECM",
00472 "Toggles the ECM status of your Personal ECM suite (only applicable if you have one)",
00473 mech_perecm},
00474 {0, "PERECCM",
00475 "Toggles the ECCM status of your Personal ECM suite (only applicable if you have one)",
00476 mech_pereccm},
00477
00478 {0, "STEALTH",
00479 "Toggles status of Stealth Armor for those mechs equipped with it.",
00480 mech_stealtharmor},
00481 {0, "NSS",
00482 "Toggles status of the Null Signature System for those mechs equipped with it.",
00483 mech_nullsig},
00484
00485
00486 {0, "DISEMBARK", "Gets the hell out of the 'mech / vehicle.",
00487 mech_disembark},
00488 {0, "UDISEMBARK", "Get the unit out of it's carrier.", mech_udisembark},
00489 {0, "EMBARK", "Climb into a 'mech / vehicle", mech_embark},
00490 {1, "MASC", "Toggles MASC on and off", mech_masc},
00491 {0, "SCHARGE", "Toggles Supercharger on and off", mech_scharge},
00492
00493 {-2, "LAND", "Terminate your jump or land a VTOL/Aero/DS", mech_land},
00494 {-35, "TAKEOFF", "VTOL/Aero take off command", aero_takeoff},
00495 {1, "ROTTORSO <L(eft) | R(ight) | C(enter)>",
00496 "Rotates the torso 60 degrees right or left.", mech_rotatetorso},
00497
00498 {0, "SLITE", "Turns your searchlight on/off", mech_slite},
00499
00500 {0, "SPOT [ID|-|OWNID]",
00501 "Sets someone as your spotter / makes you stop spotting / sets you as a spotter.",
00502 mech_spot},
00503 {0, "STARTUP [OVERRIDE]", "Commences startup cycle.", mech_startup},
00504 {0, "SHUTDOWN", "Shuts down the mech.", mech_shutdown},
00505 {34, "TURRET", "Set the turret facing.", mech_turret},
00506 {34, "AUTOTURRET",
00507 "Forces your turret to stay facing the locked target.",
00508 mech_auto_turret},
00509 {18, "EXTINGUISH",
00510 "Puts out the fires on your vehicle. You must be shut down to do this.",
00511 vehicle_extinquish_fire},
00512
00513 #ifdef C3_SUPPORT
00514
00515
00516 {0, "C3 [ID|-]",
00517 "Joins/Leaves a C3 network which the target mech is in. You will be assigned to a master computer within the network.",
00518 mech_c3_join_leave},
00519 {0, "C3MESSAGE <MSG>",
00520 "Sends a message to all others in your C3 network",
00521 mech_c3_message},
00522 {0, "C3TARGETS", "Shows available C3 targeting information",
00523 mech_c3_targets},
00524 {0, "C3NETWORK", "Displays information about your C3 network",
00525 mech_c3_network},
00526
00527 {0, "C3I [ID|-]",
00528 "Joins/Leaves the C3i network connected to the target",
00529 mech_c3i_join_leave},
00530 {0, "C3IMESSAGE <MSG>",
00531 "Sends a message to all others in your C3i network",
00532 mech_c3i_message},
00533 {0, "C3ITARGETS", "Shows available C3i targeting information",
00534 mech_c3i_targets},
00535 {0, "C3INETWORK", "Displays information about your C3i network",
00536 mech_c3i_network},
00537 #endif
00538
00539
00540
00541 {0, "HEATCUTOFF",
00542 "Sets your heat dissipation so that you wont go under 9 heat for TSM",
00543 heat_cutoff},
00544 {0, "PODS",
00545 "Shows the location of NARC and iNARC pods that attached to you",
00546 show_narc_pods},
00547 {1, "REMOVEPOD <LOCATION> <TYPE>",
00548 "Remove one of the pods from the selected location. Possible types are: 'H' - Homing, 'Y' - Haywire, 'E' - ECM",
00549 remove_inarc_pods_mech},
00550 {18, "REMOVEPODS",
00551 "Removes all iNARC pods from the unit.",
00552 remove_inarc_pods_tank},
00553
00554
00555 SHEADER(1, "Physical"),
00556 {1, "AXE [R | L | B] [<TARGET-ID>]", "Axes a target", mech_axe},
00557
00558 {3, "CHARGE [<TARGET-ID> | - ]",
00559 "Charges a target. '-' removes charge command.", mech_charge},
00560 {1, "CHOP [R | L | B] [<TARGET-ID>]", "Chops target with a sword",
00561 mech_sword},
00562 {1, "CLUB [<TARGET-ID>]", "Clubs a target with a tree", mech_club},
00563 {1, "MACE [<TARGET-ID>]", "Maces your target", mech_mace},
00564 {1, "SAW [<TARGET-ID>]", "Saws a target with a Dual Saw", mech_saw},
00565 {1, "KICK [R | L] [<TARGET-ID>]", "Kicks a target", mech_kick},
00566 {1, "TRIP [R | L] [<TARGET-ID>]", "Trips a target mech", mech_trip},
00567 {1, "PUNCH [R | L | B] [<TARGET-ID>]", "Punches a target", mech_punch},
00568 {1, "GRABCLUB [R | L | -]",
00569 "Grabs a tree and carries it around as a club", mech_grabclub},
00570
00571 {64, "ATTACKLEG [<TARGET-ID>]",
00572 "Attacks legs of the target battlemech", bsuit_attackleg},
00573 {0, "HIDE",
00574 "Attempts to hide your team ; doesn't work if any hostiles have their eyeballs on you",
00575 bsuit_hide},
00576 {64, "SWARM [<TARGET-ID> | -]",
00577 "Swarms the target / drop off target (-)", bsuit_swarm},
00578 {64, "JETTISON",
00579 "Jettison your backpack", JettisonPacks},
00580
00581
00582 HEADER("Repair"),
00583 {0, "CHECKSTATUS", "Checks mech's techstatus", tech_checkstatus},
00584 {0, "DAMAGES", "Shows the mech's damages",
00585 show_mechs_damage},
00586 {0, "FIX [<NUM> | <LOW-HI>]", "Fixes entry <NUM> from mech's damages",
00587 tech_fix},
00588 {0, "FIXARMOR <LOC>", "Repairs armor in <loc>", tech_fixarmor},
00589 {0, "FIXINTERNAL <LOC>", "Repairs internals in <loc>",
00590 tech_fixinternal},
00591 {0, "REATTACH <LOC>", "Reattaches the limb",
00592 tech_reattach},
00593 {64, "REPLACESUIT <SUIT>", "Replaces the missing suit",
00594 tech_replacesuit},
00595 {0, "RESEAL <LOC>", "Reseals the limb",
00596 tech_reseal},
00597
00598 {0, "RELOAD <LOC> <POS> [TYPE]",
00599 "Reloads the ammo compartment in <loc>/<pos> (optionally with [type])",
00600 tech_reload},
00601 {0, "TOGGLETYPE <loc> <pos> <type>",
00602 "Set the type of ammo in ammobin <loc>/<pos> to type <type>",
00603 tech_toggletype},
00604 {0, "REMOVEGUN <NUM>", "Removes the gun", tech_removegun},
00605 {0, "REMOVEPART <LOC> <POS>", "Removes the part", tech_removepart},
00606 {0, "REMOVESECTION <LOC>", "Removes the section", tech_removesection},
00607
00608
00609 {0, "REPLACEGUN [<NUM> | <LOC> <POS>] [ITEM]",
00610 "Replaces the gun in the position (optionally with [ITEM], like Martell.MediumLaser)",
00611 tech_replacegun},
00612
00613 {0, "REPAIRGUN [<NUM> | <LOC> <POS>]",
00614 "Repairs the gun in the position",
00615 tech_repairgun},
00616 {0, "REPLACEPART <LOC> <POS>", "Replaces the part in the position",
00617 tech_replacepart},
00618 {0, "REPAIRPART <LOC> <POS>", "Repairs the part in the position",
00619 tech_repairpart},
00620 {0, "REPAIRS", "Shows repairs/scrapping in progress", tech_repairs},
00621 {0, "UNLOAD <LOC> <POS>",
00622 "Unloads the ammo compartment in <loc>/<pos>",
00623 tech_unload},
00624
00625 {0, "@MAGIC", "@Fixes the unfixable - skirt crits etc (wiz-only)",
00626 tech_magic},
00627
00628
00629 HEADER("Cargo"),
00630
00631 {0, "LOADCARGO <NAME> <COUNT>",
00632 "Loads up <COUNT> <NAME>s from the bay.",
00633 mech_loadcargo},
00634 {0, "MANIFEST", "Lists stuff carried by mech.", mech_manifest},
00635 {0, "STORES", "Lists stuff in the bay.", mech_stores},
00636 {0, "UNLOADCARGO <NAME> <COUNT>",
00637 "Unloads <COUNT> <NAME>s to the bay.",
00638 mech_unloadcargo},
00639
00640
00641 HEADER("@Restricted"),
00642 {0, "@CREATEBAYS [.. list of DBrefs, seperated by space]",
00643 "@Creates / Disables bays on a DS", mech_createbays},
00644 {0, "@SETMECH <NAME> <VALUE|DATA>", "@Sets xcode value on object",
00645 set_xcodestuff},
00646 {0, "@SETXCODE <NAME> <VALUE|DATA>", "@Sets xcode value on object",
00647 set_xcodestuff},
00648 {0, "@VIEWXCODE", "@Views xcode values on object", list_xcodestuff},
00649
00650 {0, "SNIPE <ID> <WEAPON>",
00651 "@Lets you 'snipe' (=shoot artillery weapons with movement prediction)",
00652 mech_snipe},
00653 {0, "ADDSTUFF <NAME> <COUNT>",
00654 "@Adds <COUNT> <NAME> to mech's inventory",
00655 mech_Raddstuff},
00656
00657 {0, "FIXSTUFF", "@Fixes consistency errors in econ data",
00658 mech_Rfixstuff},
00659 {0, "CLEARSTUFF", "@Removes all stuff from 'mech", mech_Rresetstuff},
00660
00661 {0, "REMOVESTUFF <NAME> <COUNT>",
00662 "@Removes <COUNT> <NAME> from mech's inventory",
00663 mech_Rremovestuff},
00664 {0, "SETMAPINDX <NUM>", "@Sets the mech's map index to num.",
00665 mech_Rsetmapindex},
00666 {0, "SETTEAM <NUM>", "@Sets the teams.", mech_Rsetteam},
00667 {0, "SETXY <X> <Y>", "@Sets the x & y value of the mech.",
00668 mech_Rsetxy},
00669 {0, NULL, NULL, NULL}
00670 };
00671
00672 ECMD(map_addice);
00673 ECMD(map_delice);
00674 ECMD(map_setconditions);
00675
00676 CommandsStruct mapcommands[] = {
00677 {0, "@VIEWXCODE", "@Views xcode values on object", list_xcodestuff},
00678 {0, "@SETXCODE <NAME> <VALUE|DATA>", "@Sets xcode value on object",
00679 set_xcodestuff},
00680 {0, "@SETMAP <NAME> <VALUE|DATA>", "@Sets xcode value on object",
00681 set_xcodestuff},
00682
00683 {0, "ADDICE <NUMBER>",
00684 "@Adds ice (<NUMBER> percent chance for each watery hex connected to land/ice)",
00685 map_addice},
00686 {0, "DELICE <NUMBER>",
00687 "@Deletes first-melting ices at <NUMBER> chance", map_delice},
00688 {0, "PATHFIND <X1> <Y1> <X2> <Y2> [OPTFACT]",
00689 "@Finds shortest path from x1,y1 to x2,y2 using A* approx algorithm (using optfact optimization factor, 0-100, smaller = slower, more accurate)",
00690 map_pathfind},
00691 {0, "SETCOND <GRAV> <TEMP> [CLOUDBASE [VACUUM]]",
00692 "@Sets the map attributes (gravity: in 1/100'ths of Earth gravity, temperature: in Celsius, vacuum: optional, number (0 or 1)",
00693 map_setconditions},
00694 {0, "VIEW <X> <Y>", "@Shows the map centered at X,Y", map_view},
00695
00696 {0, "ADDBLOCK <X> <Y> <DIST> [TEAM#_TO_ALLOW]",
00697 "@Adds no-landings zone of DIST hexes to X Y",
00698 map_add_block},
00699 {0, "ADDMINE <X> <Y> <TYPE> <STRENGTH> [OPT]", "@Adds mine to X,Y",
00700 map_add_mine},
00701 {0, "ADDHEX <X> <Y> <TERRAIN> <ELEV>",
00702 "@Changes the terrain and elevation of the given hex",
00703 map_addhex},
00704 {0, "SETLINKED", "@Sets the map linked", map_setlinked},
00705 {0, "@MAPEMIT <MESSAGE>", "@Emits stuff to the map", map_mapemit},
00706 {0, "FIXMAP", "@Fixes inconsistencies in map", debug_fixmap},
00707 {0, "LOADMAP <NAME>", "@Loads the named map", map_loadmap},
00708 {0, "SAVEMAP <NAME>", "@Saves the map as name", map_savemap},
00709 {0, "SETMAPSIZE <X> <Y>", "@Sets x and y size of map", map_setmapsize},
00710
00711 {0, "LIST [MECHS | OBJS]", "@Lists mechs/objects on the map",
00712 map_listmechs},
00713 {0, "CLEARMECHS [DBNUM]", "@Clears mechs from the map",
00714 map_clearmechs},
00715 {0, "ADDFIRE [X] [Y] [DURATION]",
00716 "@Adds fire that lasts <duration> secs", map_addfire},
00717 {0, "ADDSMOKE [X] [Y] [DURATION]",
00718 "@Adds smoke that lasts <duration> secs", map_addsmoke},
00719 {0, "DELOBJ [[TYPE] | [X] [Y] | [TYPE] [X] [Y]]",
00720 "@Deletes objects of either type or at x/y", map_delobj},
00721 {0, "UPDATELINKS",
00722 "@Updates CodeLinks from the database objs (recursive)",
00723 map_updatelinks},
00724
00725
00726 {0, "STORES", "Lists stuff in the hangar.", mech_manifest},
00727 {0, "ADDSTUFF <NAME> <COUNT>", "@Adds <COUNT> <NAME> to map",
00728 mech_Raddstuff},
00729
00730 {0, "FIXSTUFF", "@Fixes consistency errors in econ data",
00731 mech_Rfixstuff},
00732 {0, "REMOVESTUFF <NAME> <COUNT>", "@Removes <COUNT> <NAME> from map",
00733 mech_Rremovestuff},
00734 {0, "CLEARSTUFF", "@Removes all stuff from map", mech_Rresetstuff},
00735 {0, NULL, NULL, NULL}
00736 };
00737
00738
00739 CommandsStruct mechrepcommands[] = {
00740 {0, "SETTARGET <NUM>", "@Sets the mech to be repaired/built to num",
00741 mechrep_Rsettarget},
00742
00743 {0, "LOADNEW <TYPENAME>", "@Loads a new mech template.",
00744 mechrep_Rloadnew},
00745 {0, "RESTORE", "@Completely repairs and reloads mech. ",
00746 mechrep_Rrestore},
00747
00748
00749 {0, "SAVENEW <TYPENAME>", "@Saves the mech as a new-type template.",
00750 mechrep_Rsavetemp2},
00751 {0, "SETARMOR <LOC> <AVAL> <IVAL> <RVAL>",
00752 "@Sets the armor, int. armor, and rear armor.",
00753 mechrep_Rsetarmor},
00754 {0, "ADDWEAP <NAME> <LOC> <CRIT SECS> [R|T|O]",
00755 "@Adds weapon to the mech, using given loc, crits, and flags.",
00756 mechrep_Raddweap},
00757
00758 {0, "RESETCRITS", "@Resets criticals of the toy to base of type.",
00759 mechrep_Rresetcrits},
00760 {0, "REPAIR <LOC> <TYPE> <[VAL | SUBSECT]>", "@Repairs the mech.",
00761 mechrep_Rrepair},
00762 {0, "RELOAD <NAME> <LOC> <SUBSECT> [L|A|N(|C|M|S)]",
00763 "@Reloads weapon in location and critical subsection.",
00764 mechrep_Rreload},
00765 {0, "FIREMODE <WEAP#> <MODE>",
00766 "Changes firemode of weapon",
00767 mechrep_Rfiremode},
00768 {0, "ADDSP <ITEM> <LOC> <SUBSECT> [<DATA>]",
00769 "@Adds a special item in location & critical subsection.",
00770 mechrep_Raddspecial},
00771 {0, "DISPLAY <LOC>", "@Displays all the items in the location.",
00772 mechrep_Rdisplaysection},
00773 {0, "SHOWTECH", "@Shows the advanced technology of the mech.",
00774 mechrep_Rshowtech},
00775 {0, "ADDTECH <TYPE>",
00776 "@Adds the advanced technology to the mech.", mechrep_Raddtech},
00777 {0, "DELTECH <ALL or [<TECH>]>",
00778 "@Deletes all or one advanced technologies on the mech.",
00779 mechrep_Rdeltech},
00780 {0, "ADDINFTECH <TYPE>",
00781 "@Adds the advanced infantry technology to the mech.",
00782 mechrep_Raddinftech},
00783 {0, "DELINFTECH",
00784 "@Deletes the advanced infantry technology of the mech.",
00785 mechrep_Rdelinftech},
00786 {0, "SETTONS <NUM>", "@Sets the mech tonnage", mechrep_Rsettons},
00787 {0, "SETTYPE <MECH | GROUND | VTOL | NAVAL | AERO | DS | SPHEROIDDS | BSUIT >",
00788 "@Sets the mech type", mechrep_Rsettype},
00789 {0, "SETMOVE <TRACK | WHEEL | HOVER | VTOL | HULL | FOIL | FLY>",
00790 "@Sets the mech movement type", mechrep_Rsetmove},
00791 {0, "SETMAXSPEED <NUM>", "@Sets the max speed of the mech.",
00792 mechrep_Rsetspeed},
00793 {0, "SETHEATSINKS <NUM>", "@Sets the number of heat sinks.",
00794 mechrep_Rsetheatsinks},
00795 {0, "SETJUMPSPEED <NUM>", "@Sets the jump speed of the mech.",
00796 mechrep_Rsetjumpspeed},
00797 {0, "SETLRSRANGE <NUM>", "@Sets the lrs range of the mech.",
00798 mechrep_Rsetlrsrange},
00799 {0, "SETTACRANGE <NUM>", "@Sets the tactical range of the mech.",
00800 mechrep_Rsettacrange},
00801 {0, "SETSCANRANGE <NUM>", "@Sets the scan range of the mech.",
00802 mechrep_Rsetscanrange},
00803 {0, "SETRADIORANGE <NUM>", "@Sets the radio range of the mech.",
00804 mechrep_Rsetradiorange},
00805 {0, "SETCARGOSPACE <VAL> <MAXTON>",
00806 "Sets cargospace and max cargo tonnage", mechrep_setcargospace},
00807 {0, NULL, NULL, NULL}
00808 };
00809
00810 CommandsStruct autopilotcommands[] = {
00811 {0, "ENGAGE", "Engages the autopilot", auto_engage},
00812 {0, "DISENGAGE", "Disengages the autopilot", auto_disengage},
00813
00814 {0, "ADDCOMMAND <NAME> [ARGS]", "Adds a command to queue",
00815 auto_addcommand},
00816 {0, "DELCOMMAND <NUM>", "Removes command <NUM> from queue (-1 = all)",
00817 auto_delcommand},
00818 {0, "LISTCOMMANDS", "Lists whole command queue of the autopilot",
00819 auto_listcommands},
00820 {0, "JUMP <NUM>", "Sets current instruction to <NUM>", auto_jump},
00821 {0, "EVENTSTATS", "Lists current events for this AI", auto_eventstats},
00822 {0, NULL, NULL, NULL}
00823 };
00824
00825 CommandsStruct turretcommands[] = {
00826 {0, "@SETTURRET <NAME> <VALUE|DATA>", "@Sets xcode value on object",
00827 set_xcodestuff},
00828 {0, "@SETXCODE <NAME> <VALUE|DATA>", "@Sets xcode value on object",
00829 set_xcodestuff},
00830 {0, "@VIEWXCODE", "@Views xcode values on object", list_xcodestuff},
00831 {0, "DEINITIALIZE", "De-initializes you as gunner",
00832 turret_deinitialize},
00833 {0, "INITIALIZE", "Sets you as the gunner", turret_initialize},
00834
00835 {0, "ADDTIC <NUM> <WEAPNUM | LOWNUM-HIGHNUM>",
00836 "Adds weapnum, or lownum-highnum to given TIC", turret_addtic},
00837 {0, "BEARING [<X Y>] [<X Y>]", "Same format as range.",
00838 turret_bearing},
00839 {0, "CLEARTIC <NUM>", "Clears the TIC number given ", turret_cleartic},
00840 {0, "CONTACTS [<Prefix> | <TARGET-ID>]", "List all current contacts",
00841 turret_contacts},
00842
00843 {0, "CRITSTATUS <SECTION>", "Shows the Critical hits status",
00844 turret_critstatus},
00845 {0, "DELTIC <NUM> <WEAPNUM>", "Deletes weapnum from given TIC",
00846 turret_deltic},
00847 {0, "ETA [<X> <Y>]", "Estimates time to target (/default target)",
00848 turret_eta},
00849 {0, "FINDCENTER", "Shows distance/bearing to center of hex.",
00850 turret_findcenter},
00851 {0, "FIRE <WEAPNUM> [<TARGET-ID> | <X> <Y>]",
00852 "Fires Weap at loc at def. target or specified target.",
00853 turret_fireweapon},
00854 {0, "FIRETIC <NUM> [<TARGET> or <X Y>]", "Fires the given TIC",
00855 turret_firetic},
00856 {0, "LISTTIC <NUM>", "Lists weapons in the given TIC", turret_listtic},
00857
00858 {0, "LOCK [<TARGET-ID> | <X> <Y> | <X> <Y> <B|H> | -]",
00859 "Sets the target to the arg (in 3rd, B = building, H = hex (clear/ignite)) / Clears lock (-)",
00860 turret_settarget},
00861 {0,
00862 "LRS <M(ech) | T(errain) | E(lev)> [<BEARING> <RANGE> | <TARGET-ID>]",
00863 "Shows the long range map", turret_lrsmap},
00864 {0, "NAVIGATE", "Shows the hex and surroundings graphically",
00865 turret_navigate},
00866 {0, "RANGE [<X Y>] [<X Y>]",
00867 "Range to def. target / range to x y / range to x,y from x,y",
00868 turret_range},
00869 {0, "REPORT [<TARGET-ID> | <X Y>]",
00870 "Information on default target, num, or x,y", turret_report},
00871 {0, "SCAN [<TARGET-ID> | <X Y> | <X Y> <B|H>]",
00872 "Scans the default target, chosen target, or hex",
00873 turret_scan},
00874
00875 {0, "SIGHT <WEAPNUM> [<TARGET-ID> | <X> <Y>]",
00876 "Computes base-to-hit for given weapon and target.",
00877 turret_sight},
00878 {0, "STATUS [A(rmor)|I(nfo)]|W(eapons)|S(hort)]",
00879 "Prints the mech's status",
00880 turret_status},
00881
00882 {0, "TACTICAL [<BEARING> <RANGE> | <TARGET-ID>]",
00883 "Shows the tactical map at the mech's location / at bearing and range / around chosen target",
00884 turret_tacmap},
00885 {0, "WEAPONSPECS", "Shows the specifications for your weapons",
00886 turret_weaponspecs},
00887 {0, NULL, NULL, NULL}
00888 };
00889
00890 ECMD(debug_makemechs);
00891 ECMD(debug_memory);
00892 ECMD(debug_setvrt);
00893 ECMD(debug_setxplevel);
00894
00895 CommandsStruct debugcommands[] = {
00896 {0, "EVENTSTATS", "@Shows event statistics", debug_EventTypes},
00897 {0, "MEMSTATS [LONG]",
00898 "@Shows memory statistics (optionally in long form)",
00899 debug_memory},
00900 {0, "SAVEDB", "@Saves the SpecialObject DB", debug_savedb},
00901 {0,
00902 "MAKEMECHS <FACTION> <TONS> [<TYPES> [<OPT_TONNAGE> [<MAX_VARIATION>]]]",
00903 "@Makes list of 'mechs of <faction> with max tonnage of <tons>, and optimum tonnage for each mech <opt_tonnage> (optional)",
00904 debug_makemechs},
00905 {0, "LISTFORMS", "@Shows forms", ListForms},
00906
00907 {0, "SETVRT <WEAPON> <NUM>",
00908 "@Sets the VariableRecycleTime for weapon <WEAPON> to <NUM>",
00909 debug_setvrt},
00910 {0, "SETXPLEVEL <SKILL> <NUM>",
00911 "@Sets the XP threshold for skill <skill> to <num>",
00912 debug_setxplevel},
00913 {0, "SHUTDOWN <MAP#>", "@Shutdown all mechs on the map and clear it.",
00914 debug_shutdown},
00915
00916 {0, "XPTOP <SKILL>", "@Shows list of people champ in the <SKILL>",
00917 debug_xptop},
00918 {0, NULL, NULL, NULL}
00919 };
00920
00921 CommandsStruct sscommands[] = {
00922 {0, "@SETXCODE <NAME> <VALUE|DATA>", "@Sets xcode value on object",
00923 set_xcodestuff},
00924 {0, "@VIEWXCODE", "@Views xcode values on object", list_xcodestuff},
00925 {0, NULL, NULL, NULL}
00926 };
00927
00928 #define LINEB(txt,cmd,str,func,upd,updfunc,power) \
00929 { txt, cmd, str, func, upd, updfunc, power }
00930 #define LINE(txt,cmd,str,func,upd,updfunc,power) \
00931 LINEB(txt,cmd,sizeof(str),func,upd,updfunc,power)
00932
00933
00934 #define LINE_NU(txt,cmd,str,fu,power) \
00935 LINE(txt,cmd,str,fu,0,NULL,power)
00936
00937
00938 #define LINE_ND(txt,cmd,power) \
00939 LINEB(txt,cmd,0,NULL,0,NULL,power)
00940
00941
00942 #define LINE_NFS(txt,cmd,t,power) \
00943 LINEB(txt,cmd,sizeof(t),NULL,0,NULL,power)
00944
00945 SpecialObjectStruct SpecialObjects[] = {
00946 LINE("MECH", mechcommands, MECH, newfreemech, HEAT_TICK, mech_update, POW_MECH),
00947 LINE_ND("DEBUG", debugcommands, POW_SECURITY),
00948 LINE_NU("MECHREP", mechrepcommands, struct mechrep_data, newfreemechrep, POW_MECHREP),
00949 LINE("MAP", mapcommands, MAP, newfreemap, LOS_TICK, map_update, POW_MAP),
00950 LINE_NU("AUTOPILOT", autopilotcommands, AUTO, auto_newautopilot, POW_SECURITY),
00951 LINE_NU("TURRET", turretcommands, TURRET_T, newturret, POW_SECURITY),
00952 };
00953
00954 #define NUM_SPECIAL_OBJECTS \
00955 ((sizeof(SpecialObjects))/(sizeof(struct SpecialObjectStruct)))
00956
00957 #undef HEADER
00958
00959
00960 #endif
00961
00962
00963
00964 #ifdef memcpy
00965 #undef memcpy
00966 #endif
00967
00968 void send_channel(char *, const char *, ...);
00969
00970 #endif