gameflow: add unobtainable secrets property (#1380)

Resolves #1379.
This commit is contained in:
walkawayy 2024-05-31 18:53:22 -04:00 committed by GitHub
parent 3f4b452700
commit 3886f56bdc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 18 additions and 2 deletions

View file

@ -4,6 +4,7 @@
- `/hp`
- `/hp [num]`
- `/heal`
- added unobtainable secrets stat support in the gameflow (#1379)
- fixed config tool and installer missing icons (#1358, regression from 4.0)
- fixed looking forward too far causing an upside down camera frame (#1338)
- fixed the enemy bear behavior in demo mode (#1370, regression since 2.16)

View file

@ -538,6 +538,16 @@ Following are each of the properties available within a level.
A count of items that will be excluded from pickup statistics.
</td>
</tr>
<tr valign="top">
<td>
<code>unobtainable_secrets</code>
</td>
<td>Integer</td>
<td>No</td>
<td colspan="2">
A count of secrets that will be excluded from secret statistics. Useful for level demos.
</td>
</tr>
<tr valign="top">
<td>
<code>water_color</code>

View file

@ -358,7 +358,7 @@ Not all options are turned on by default. Refer to `TR1X_ConfigTool.exe` for det
- added optional final statistics screen
- added optional deaths counter
- added optional total pickups and kills per level
- added unobtainable pickups and kills stats support in the gameflow
- added unobtainable pickups, kills, and secrets stats support in the gameflow
#### Visuals
- added optional shotgun flash sprites

View file

@ -672,6 +672,9 @@ static bool GameFlow_LoadScriptLevels(struct json_object_s *obj)
cur->unobtainable.kills =
json_object_get_int(jlvl_obj, "unobtainable_kills", 0);
cur->unobtainable.secrets =
json_object_get_int(jlvl_obj, "unobtainable_secrets", 0);
struct json_object_s *jlbl_strings_obj =
json_object_get_object(jlvl_obj, "strings");
if (!jlbl_strings_obj) {

View file

@ -48,6 +48,7 @@ typedef struct GAMEFLOW_LEVEL {
struct {
uint32_t pickups;
uint32_t kills;
uint32_t secrets;
} unobtainable;
struct {
int length;

View file

@ -258,6 +258,7 @@ void Stats_CalculateStats(void)
m_LevelPickups -= g_GameFlow.levels[g_CurrentLevel].unobtainable.pickups;
m_LevelKillables -= g_GameFlow.levels[g_CurrentLevel].unobtainable.kills;
m_LevelSecrets -= g_GameFlow.levels[g_CurrentLevel].unobtainable.secrets;
}
int32_t Stats_GetPickups(void)

View file

@ -239,7 +239,7 @@
},
"enable_detailed_stats": {
"Title": "Show total kills and pickups",
"Description": "Enables showing the maximum pickup count and kill count on each level. This includes unobtainable items."
"Description": "Enables showing the maximum pickup count and kill count on each level."
},
"enable_cine": {
"Title": "Enable cutscenes",