console: fix reporting mismatched items

This commit is contained in:
Marcin Kurczewski 2024-08-30 16:08:06 +02:00
parent c72a1abff0
commit 08a8705a7b
No known key found for this signature in database
GPG key ID: CC65E6FD28CAE42A
6 changed files with 6 additions and 13 deletions

View file

@ -3,6 +3,7 @@
- fixed Lara's sliding animation sometimes being interrupted by a stumble (#1452, regression from 4.3) - fixed Lara's sliding animation sometimes being interrupted by a stumble (#1452, regression from 4.3)
- fixed cameras with glide values sometimes moving in the wrong direction (#1451, regression from 4.3) - fixed cameras with glide values sometimes moving in the wrong direction (#1451, regression from 4.3)
- fixed `/give` console command giving duplicate items under some circumstances (#1463, regression from 3.0) - fixed `/give` console command giving duplicate items under some circumstances (#1463, regression from 3.0)
- fixed `/give` console command confusing logging around mismatched items (#1463, regression from 3.0)
- improved logs module names readability - improved logs module names readability
- improved crash debug information on Windows - improved crash debug information on Windows

View file

@ -762,7 +762,6 @@
"OSD_PERSPECTIVE_FILTER_OFF": "Perspective filter disabled", "OSD_PERSPECTIVE_FILTER_OFF": "Perspective filter disabled",
"OSD_FPS_COUNTER_ON": "FPS counter enabled", "OSD_FPS_COUNTER_ON": "FPS counter enabled",
"OSD_FPS_COUNTER_OFF": "FPS counter disabled", "OSD_FPS_COUNTER_OFF": "FPS counter disabled",
"OSD_UNAVAILABLE_ITEM": "%s is not currently available",
"OSD_INVALID_ITEM": "Unknown item: %s", "OSD_INVALID_ITEM": "Unknown item: %s",
"OSD_INVALID_ROOM": "Invalid room: %d. Valid rooms are 0-%d", "OSD_INVALID_ROOM": "Invalid room: %d. Valid rooms are 0-%d",
"OSD_INVALID_LEVEL": "Invalid level", "OSD_INVALID_LEVEL": "Invalid level",

View file

@ -258,7 +258,6 @@
"OSD_PERSPECTIVE_FILTER_OFF": "Perspective filter disabled", "OSD_PERSPECTIVE_FILTER_OFF": "Perspective filter disabled",
"OSD_FPS_COUNTER_ON": "FPS counter enabled", "OSD_FPS_COUNTER_ON": "FPS counter enabled",
"OSD_FPS_COUNTER_OFF": "FPS counter disabled", "OSD_FPS_COUNTER_OFF": "FPS counter disabled",
"OSD_UNAVAILABLE_ITEM": "%s is not currently available",
"OSD_INVALID_ITEM": "Unknown item: %s", "OSD_INVALID_ITEM": "Unknown item: %s",
"OSD_INVALID_ROOM": "Invalid room: %d. Valid rooms are 0-%d", "OSD_INVALID_ROOM": "Invalid room: %d. Valid rooms are 0-%d",
"OSD_INVALID_LEVEL": "Invalid level", "OSD_INVALID_LEVEL": "Invalid level",

View file

@ -330,7 +330,6 @@
"OSD_PERSPECTIVE_FILTER_OFF": "Perspective filter disabled", "OSD_PERSPECTIVE_FILTER_OFF": "Perspective filter disabled",
"OSD_FPS_COUNTER_ON": "FPS counter enabled", "OSD_FPS_COUNTER_ON": "FPS counter enabled",
"OSD_FPS_COUNTER_OFF": "FPS counter disabled", "OSD_FPS_COUNTER_OFF": "FPS counter disabled",
"OSD_UNAVAILABLE_ITEM": "%s is not currently available",
"OSD_INVALID_ITEM": "Unknown item: %s", "OSD_INVALID_ITEM": "Unknown item: %s",
"OSD_INVALID_ROOM": "Invalid room: %d. Valid rooms are 0-%d", "OSD_INVALID_ROOM": "Invalid room: %d. Valid rooms are 0-%d",
"OSD_INVALID_LEVEL": "Invalid level", "OSD_INVALID_LEVEL": "Invalid level",

View file

@ -554,22 +554,18 @@ static COMMAND_RESULT Console_Cmd_GiveItem(const char *args)
Inv_AddItemNTimes(obj_id, num); Inv_AddItemNTimes(obj_id, num);
Console_Log( Console_Log(
GS(OSD_GIVE_ITEM), Object_GetCanonicalName(obj_id, args)); GS(OSD_GIVE_ITEM), Object_GetCanonicalName(obj_id, args));
} else { found = true;
Console_Log(
GS(OSD_UNAVAILABLE_ITEM),
Object_GetCanonicalName(obj_id, args));
} }
found = true;
} }
} }
Memory_FreePointer(&matching_objs); Memory_FreePointer(&matching_objs);
if (found) { if (!found) {
return CR_SUCCESS; Console_Log(GS(OSD_INVALID_ITEM), args);
return CR_FAILURE;
} }
Console_Log(GS(OSD_INVALID_ITEM), args); return CR_SUCCESS;
return CR_FAILURE;
} }
static COMMAND_RESULT Console_Cmd_FlipMap(const char *args) static COMMAND_RESULT Console_Cmd_FlipMap(const char *args)

View file

@ -175,7 +175,6 @@ GS_DEFINE(OSD_PERSPECTIVE_FILTER_ON, "Perspective filter enabled")
GS_DEFINE(OSD_PERSPECTIVE_FILTER_OFF, "Perspective filter disabled") GS_DEFINE(OSD_PERSPECTIVE_FILTER_OFF, "Perspective filter disabled")
GS_DEFINE(OSD_FPS_COUNTER_ON, "FPS counter enabled") GS_DEFINE(OSD_FPS_COUNTER_ON, "FPS counter enabled")
GS_DEFINE(OSD_FPS_COUNTER_OFF, "FPS counter disabled") GS_DEFINE(OSD_FPS_COUNTER_OFF, "FPS counter disabled")
GS_DEFINE(OSD_UNAVAILABLE_ITEM, "%s is not currently available")
GS_DEFINE(OSD_INVALID_ITEM, "Unknown item: %s") GS_DEFINE(OSD_INVALID_ITEM, "Unknown item: %s")
GS_DEFINE(OSD_INVALID_ROOM, "Invalid room: %d. Valid rooms are 0-%d") GS_DEFINE(OSD_INVALID_ROOM, "Invalid room: %d. Valid rooms are 0-%d")
GS_DEFINE(OSD_INVALID_LEVEL, "Invalid level") GS_DEFINE(OSD_INVALID_LEVEL, "Invalid level")