Restrict the teleportation notification to actual teleportations

teleds() is used for more than just teleportations, the teleportation message
was also given when mounting a steed.

Trying out a new bit flags method parameter design pattern.
This commit is contained in:
Patric Mueller
2020-01-11 12:24:02 +01:00
parent 7c3ae74c27
commit 38fa93df73
9 changed files with 31 additions and 24 deletions

View File

@@ -144,7 +144,7 @@ E void FDECL(Lift_covet_and_placebc, (int, const char *, int));
#define unplacebc_and_covet_placebc() \
Unplacebc_and_covet_placebc(__FUNCTION__, __LINE__)
#define lift_covet_and_placebc(x) \
Lift_covet_and_placebc(x, __FUNCTION__, __LINE__)
Lift_covet_and_placebc(x, __FUNCTION__, __LINE__)
#endif
E void FDECL(set_bc, (int));
E void FDECL(move_bc, (int, int, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P));
@@ -2530,8 +2530,8 @@ E boolean FDECL(goodpos, (int, int, struct monst *, unsigned));
E boolean FDECL(enexto, (coord *, XCHAR_P, XCHAR_P, struct permonst *));
E boolean FDECL(enexto_core, (coord *, XCHAR_P, XCHAR_P,
struct permonst *, unsigned));
E void FDECL(teleds, (int, int, BOOLEAN_P));
E boolean FDECL(safe_teleds, (BOOLEAN_P));
E void FDECL(teleds, (int, int, int));
E boolean FDECL(safe_teleds, (int));
E boolean FDECL(teleport_pet, (struct monst *, BOOLEAN_P));
E void NDECL(tele);
E boolean FDECL(scrolltele, (struct obj *));

View File

@@ -143,7 +143,7 @@ struct cross_target_s {
unsigned long build_time;
};
extern struct cross_target_s cross_target;
#if defined(CROSSCOMPILE_TARGET) && !defined(MAKEDEFS_C)
#if defined(CROSSCOMPILE_TARGET) && !defined(MAKEDEFS_C)
#define BUILD_DATE cross_target.build_date /* "Wed Apr 1 00:00:01 2020" */
#define COPYRIGHT_BANNER_C cross_target.copyright_banner_c
#define NETHACK_GIT_SHA cross_target.git_sha

View File

@@ -490,6 +490,11 @@ enum bodypart_types {
#define MENU_FULL 2
#define MENU_PARTIAL 3
/* flags to control teleds() */
#define TELEDS_NO_FLAGS 0
#define TELEDS_ALLOW_DRAG 1
#define TELEDS_TELEPORT 2
/*
* Option flags
* Each higher number includes the characteristics of the numbers