New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probe Command #169

Merged
merged 20 commits into from Nov 2, 2018
Commits
Jump to file or symbol
Failed to load files and symbols.
+582 −27
Diff settings

Always

Just for now

@@ -0,0 +1,21 @@
UPDATE help_topic SET `body` = "Usage: ^gEXAMINE <object>^n
May give you some valuable information about an item. Depending on
the item type it will display extra information about the item along
with the same information as look. Lodges and circles will display
what it is dedicated to, guns will display ammo and attachments and
containers will show you their contents.
^WSee Also: LOOK, PROBE^n", category=2 WHERE `name` = "EXAMINE";
INSERT INTO help_topic (name, body, category, links) VALUES ("PROBE", "Usage: ^gPROBE <object or vehicle>^n
This command gives you insight into the out-of-character statistics
of the selected item or vehicle. While some values may be referenced
in character (example: weight, material), you should avoid mention
of values that your character would not know or understand. For
example, damage codes and target numbers are not a concept that are
understood by characters in the game.
^WSee Also: LOOK, EXAMINE^n", 2, NULL);
Copy path View file

Large diffs are not rendered by default.

Oops, something went wrong.
Copy path View file

Large diffs are not rendered by default.

Oops, something went wrong.
Copy path View file
@@ -820,17 +820,6 @@ void do_stat_veh(struct char_data *ch, struct veh_data * k)
send_to_char(buf, ch);
}
const char *workshops[] = {

This comment has been minimized.

@luciensadi

luciensadi Oct 31, 2018

Owner

Moved to constants.cpp.

"General",
"Electronics",
"Microtronics",
"Cyberware",
"Vehicle",
"Weaponry",
"Medical",
"Ammunition"
};
void do_stat_object(struct char_data * ch, struct obj_data * j)
{
long virt;
Copy path View file
@@ -1475,6 +1475,9 @@ enum {
#define ACCESS_LOCATION_BARREL 8
#define ACCESS_LOCATION_UNDER 9
#define RECOIL_COMP_VALUE_BIPOD 2
#define RECOIL_COMP_VALUE_TRIPOD 6
#define MOD_NOWHERE 0
#define MOD_INTAKE_FRONT 1
#define MOD_INTAKE_MID 2
@@ -1657,6 +1660,10 @@ enum {
#define SCMD_LOOK 0
#define SCMD_READ 1
/* do_examine */
#define SCMD_EXAMINE 0
#define SCMD_PROBE 1
/* do_qcomm */
#define SCMD_QSAY 0
#define SCMD_QECHO 1
Copy path View file
@@ -2109,3 +2109,80 @@ const char *pgroup_privileges[] =
"Tenant",
"Treasurer"
};
const char *workshops[] = {
"General",
"Electronics",
"Microtronics",
"Cyberware",
"Vehicle",
"Weaponry",
"Medical",
"Ammunition"
};
const char *projectile_ammo_types[] = {
"Arrow",
"Bolt",
"Shuriken",
"Throwing Knife"
};
const char *magic_tool_types[] = {
"Conjuring Library",
"Sorcery Library",
"Hermetic Circle",
"Shamanic Lodge",
"Summoning Materials"
};
const char *holster_types[] = {
"Pistol / SMG",
"Sword",
"Rifle (or larger)"
};
const char *docwagon_contract_types[] = {
"Bugged (alert an imm)", // undefined / 0
"Basic",
"Gold",
"Platinum"
};
const char *gun_accessory_locations[] = {
"top",
"barrel",
"underside"
};
const char *gun_accessory_types[] = {
"Undefined",
"Smartlink",
"Scope",
"Gas Vent",
"Shock Pad",
"Silencer",
"Sound Suppressor",
"Smart Goggles",
"Bipod",
"Tripod",
"Bayonet"
};
const char *mount_types[] = {
"Firmpoint Internal Fixed Mount",
"Firmpoint External Fixed Mount",
"Hardpoint Internal Fixed Mount",
"Hardpoint External Fixed Mount",
"Turret",
"Mini-Turret"
};
const char *deck_accessory_upgrade_types[] = {
"MPCP (replacement)",
"Active Memory",
"Storage Memory",
"Hitcher Jack",
"I/O Speed",
"Reaction Increase"
};
Copy path View file
@@ -100,4 +100,13 @@ extern const char *fire_mode[];
extern const char *weapon_type[];
extern const char *combat_modifiers[];
extern const char *pgroup_privileges[];
extern const char *workshops[];
extern const char *projectile_ammo_types[];
extern const char *magic_tool_types[];
extern const char *holster_types[];
extern const char *docwagon_contract_types[];
extern const char *gun_accessory_locations[];
extern const char *gun_accessory_types[];
extern const char *mount_types[];
extern const char *deck_accessory_upgrade_types[];
#endif
Copy path View file
@@ -2626,9 +2626,9 @@ int check_recoil(struct char_data *ch, struct obj_data *gun)
comp++;
else if (AFF_FLAGGED(ch, AFF_PRONE)) {
if (GET_OBJ_VAL(obj, 1) == ACCESS_BIPOD)
comp += 2;
comp += RECOIL_COMP_VALUE_BIPOD;
else if (GET_OBJ_VAL(obj, 1) == ACCESS_TRIPOD)
comp += 6;
comp += RECOIL_COMP_VALUE_TRIPOD;
}
}
@@ -3191,9 +3191,6 @@ int calculate_vision_penalty(struct char_data *ch, struct char_data *victim) {
return modifier;
}
// TODO: Macro this for compiler speed.
#define IS_DAMTYPE_PHYSICAL(type) !((type) == TYPE_HIT || (type) == TYPE_BLUDGEON || (type) == TYPE_PUNCH || (type) == TYPE_TASER || (type) == TYPE_CRUSH || (type) == TYPE_POUND)

This comment has been minimized.

@luciensadi

luciensadi Oct 31, 2018

Owner

Moved to utils.h.

//todo: single shot weaps can only be fired once per combat phase-- what does this mean for us?
struct combat_data *populate_cyberware(struct char_data *ch, struct combat_data *cd) {
Copy path View file
@@ -559,7 +559,7 @@ struct command_info cmd_info[] =
{ "envy" , POS_LYING , do_action , 0, 0 },
{ "equipment", POS_SLEEPING, do_equipment, 0, 0 },
{ "exits" , POS_LYING , do_exits , 0, 0 },
{ "examine" , POS_RESTING , do_examine , 0, 0 },
{ "examine" , POS_RESTING , do_examine , 0, SCMD_EXAMINE },
{ "exclaim" , POS_LYING , do_exclaim , 0, 0 },
{ "eyebrow" , POS_LYING , do_action , 0, 0 },
{ "extend" , POS_SITTING , do_retract , 0, 0 },
@@ -765,6 +765,7 @@ struct command_info cmd_info[] =
{ "practice" , POS_RESTING , do_practice , 1, 0 },
{ "prance" , POS_STANDING, do_action , 0, 0 },
{ "pray" , POS_SITTING , do_action , 0, 0 },
{ "probe" , POS_RESTING , do_examine , 0, SCMD_PROBE },
This conversation was marked as resolved by luciensadi

This comment has been minimized.

@lmclarke

lmclarke Oct 31, 2018

Do we need to also change the line for examine to SCMD_EXAMINE?

This comment has been minimized.

@luciensadi

luciensadi Oct 31, 2018

Owner

SCMD_EXAMINE is already defined as 0, so there will be no mechanical difference, but that's a good idea for clarity's sake.

This comment has been minimized.

@luciensadi
{ "program" , POS_RESTING , do_program , 0, 0 },
{ "progress" , POS_RESTING , do_progress , 0, 0 },
{ "prone" , POS_FIGHTING, do_prone , 0, 0 },
Copy path View file
@@ -674,6 +674,10 @@ extern bool PLR_TOG_CHK(char_data *ch, dword offset);
#define SEEK_END 2
#endif
/* Misc utils ************************************************************/
#define IS_DAMTYPE_PHYSICAL(type) \
!((type) == TYPE_HIT || (type) == TYPE_BLUDGEON || (type) == TYPE_PUNCH || (type) == TYPE_TASER || (type) == TYPE_CRUSH || (type) == TYPE_POUND)
/*
* Some systems such as Sun's don't have prototyping in their header files.
* Thus, we try to compensate for them.
ProTip! Use n and p to navigate between commits in a pull request.