Skip to content

Commit

Permalink
boomshot stages stuff
Browse files Browse the repository at this point in the history
Move remaining shavit-rankings dependent calls (#1043)

If the shavit-rankings plugin isn't loaded, the calls to its natives will cause an exception and the client's messages will not be formatted correctly.

Add native for getting the number of stages

Implemented native for getting number of stages and allowed practice mode to view stage times.

Added WR stage time comparisons for when a user enters a stage zone.

It's important that the stage zone number starts at two. It may be preferred to remove the user input of stage numbers and just auto increment as stages are added. Stage 1 should be the start zone and just have any additional stages increment from there. I'll readdress this if it's necessary.

Add translations for WR stage time comparison messages

Accidentally undid a change from a previous commit.

I didn't have a merge conflict, so I'm unsure why it got replaced.

Combine stage time translations into one

Implemented suggestions to translations and changed the stagetimes table

The stagetimes table no longer uses auth as a primary key, so it will now replace the old WR stage time.
However, the auth is still stored, so it can be used to reference the player and potentially a players PB.

Update callback name for replacing stage time for logging.
  • Loading branch information
BoomShotKapow authored and rtldg committed Apr 19, 2021
1 parent 2c9904c commit 2697e6c
Show file tree
Hide file tree
Showing 4 changed files with 229 additions and 18 deletions.
8 changes: 8 additions & 0 deletions addons/sourcemod/scripting/include/shavit.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,13 @@ native TimerStatus Shavit_GetTimerStatus(int client);
*/
native int Shavit_GetStageZone(int stage);

/**
* Retrieve the number of stages for the current map.
*
* @return Number of stages.
*/
native int Shavit_GetStageCount();

/**
* Retrieve the amount of strafes done since the timer started.
* Will return 0 if timer isn't running.
Expand Down Expand Up @@ -2339,6 +2346,7 @@ public void __pl_shavit_SetNTVOptional()
MarkNativeAsOptional("Shavit_GetReplayStatus");
MarkNativeAsOptional("Shavit_GetReplayTime");
MarkNativeAsOptional("Shavit_GetStageZone");
MarkNativeAsOptional("Shavit_GetStageCount");
MarkNativeAsOptional("Shavit_GetStrafeCount");
MarkNativeAsOptional("Shavit_GetStyleCount");
MarkNativeAsOptional("Shavit_GetStyleSetting");
Expand Down
Loading

0 comments on commit 2697e6c

Please sign in to comment.