@plugify-plugins/s2sdk-types 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +190 -13
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -636,6 +636,187 @@ declare module ":s2sdk" {
636
636
  DoNotEcho = 2
637
637
  }
638
638
 
639
+ /**
640
+ * @description Enum representing the possible reasons a vote creation or processing has failed.
641
+ */
642
+ export enum VoteCreateFailed {
643
+
644
+ /**
645
+ * @description Generic vote failure.
646
+ * */
647
+ Generic = 0,
648
+
649
+ /**
650
+ * @description Vote failed due to players transitioning.
651
+ * */
652
+ TransitioningPlayers = 1,
653
+
654
+ /**
655
+ * @description Vote failed because vote rate limit was exceeded.
656
+ * */
657
+ RateExceeded = 2,
658
+
659
+ /**
660
+ * @description Vote failed because Yes votes must exceed No votes.
661
+ * */
662
+ YesMustExceedNo = 3,
663
+
664
+ /**
665
+ * @description Vote failed due to quorum not being met.
666
+ * */
667
+ QuorumFailure = 4,
668
+
669
+ /**
670
+ * @description Vote failed because the issue is disabled.
671
+ * */
672
+ IssueDisabled = 5,
673
+
674
+ /**
675
+ * @description Vote failed because the map was not found.
676
+ * */
677
+ MapNotFound = 6,
678
+
679
+ /**
680
+ * @description Vote failed because map name is required.
681
+ * */
682
+ MapNameRequired = 7,
683
+
684
+ /**
685
+ * @description Vote failed because a similar vote failed recently.
686
+ * */
687
+ FailedRecently = 8,
688
+
689
+ /**
690
+ * @description Vote to kick failed recently.
691
+ * */
692
+ FailedRecentKick = 9,
693
+
694
+ /**
695
+ * @description Vote to change map failed recently.
696
+ * */
697
+ FailedRecentChangeMap = 10,
698
+
699
+ /**
700
+ * @description Vote to swap teams failed recently.
701
+ * */
702
+ FailedRecentSwapTeams = 11,
703
+
704
+ /**
705
+ * @description Vote to scramble teams failed recently.
706
+ * */
707
+ FailedRecentScrambleTeams = 12,
708
+
709
+ /**
710
+ * @description Vote to restart failed recently.
711
+ * */
712
+ FailedRecentRestart = 13,
713
+
714
+ /**
715
+ * @description Team is not allowed to call vote.
716
+ * */
717
+ TeamCantCall = 14,
718
+
719
+ /**
720
+ * @description Vote failed because game is waiting for players.
721
+ * */
722
+ WaitingForPlayers = 15,
723
+
724
+ /**
725
+ * @description Target player was not found.
726
+ * */
727
+ PlayerNotFound = 16,
728
+
729
+ /**
730
+ * @description Cannot kick an admin.
731
+ * */
732
+ CannotKickAdmin = 17,
733
+
734
+ /**
735
+ * @description Scramble is currently in progress.
736
+ * */
737
+ ScrambleInProgress = 18,
738
+
739
+ /**
740
+ * @description Swap is currently in progress.
741
+ * */
742
+ SwapInProgress = 19,
743
+
744
+ /**
745
+ * @description Spectators are not allowed to vote.
746
+ * */
747
+ Spectator = 20,
748
+
749
+ /**
750
+ * @description Voting is disabled.
751
+ * */
752
+ Disabled = 21,
753
+
754
+ /**
755
+ * @description Next level is already set.
756
+ * */
757
+ NextLevelSet = 22,
758
+
759
+ /**
760
+ * @description Rematch vote failed.
761
+ * */
762
+ Rematch = 23,
763
+
764
+ /**
765
+ * @description Vote to surrender failed due to being too early.
766
+ * */
767
+ TooEarlySurrender = 24,
768
+
769
+ /**
770
+ * @description Vote to continue failed.
771
+ * */
772
+ Continue = 25,
773
+
774
+ /**
775
+ * @description Vote failed because match is already paused.
776
+ * */
777
+ MatchPaused = 26,
778
+
779
+ /**
780
+ * @description Vote failed because match is not paused.
781
+ * */
782
+ MatchNotPaused = 27,
783
+
784
+ /**
785
+ * @description Vote failed because game is not in warmup.
786
+ * */
787
+ NotInWarmup = 28,
788
+
789
+ /**
790
+ * @description Vote failed because there are not 10 players.
791
+ * */
792
+ Not10Players = 29,
793
+
794
+ /**
795
+ * @description Vote failed due to an active timeout.
796
+ * */
797
+ TimeoutActive = 30,
798
+
799
+ /**
800
+ * @description Vote failed because timeout is inactive.
801
+ * */
802
+ TimeoutInactive = 31,
803
+
804
+ /**
805
+ * @description Vote failed because timeout has been exhausted.
806
+ * */
807
+ TimeoutExhausted = 32,
808
+
809
+ /**
810
+ * @description Vote failed because the round can't end now.
811
+ * */
812
+ CantRoundEnd = 33,
813
+
814
+ /**
815
+ * @description Sentinel value. Not a real failure reason.
816
+ * */
817
+ Max = 34
818
+ }
819
+
639
820
  /**
640
821
  * @description Enum representing the possible types of a vote actions.
641
822
  */
@@ -4520,11 +4701,14 @@ declare module ":s2sdk" {
4520
4701
  * @param caller Player slot of the vote caller. Use VOTE_CALLER_SERVER for 'Server'.
4521
4702
  * @param voteTitle Translation string to use as the vote message. (Only '#SFUI_vote' or '#Panorama_vote' strings)
4522
4703
  * @param detailStr Extra string used in some vote translation strings.
4704
+ * @param votePassTitle Translation string to use as the vote message. (Only '#SFUI_vote' or '#Panorama_vote' strings)
4705
+ * @param detailPassStr Extra string used in some vote translation strings when the vote passes.
4706
+ * @param failReason Reason for the vote to fail, used in some translation strings.
4523
4707
  * @param filter Recipient filter with all the clients who are allowed to participate in the vote.
4524
4708
  * @param result Called when a menu action is completed.
4525
4709
  * @param handler Called when the vote has finished.
4526
4710
  */
4527
- export function PanoramaSendYesNoVote(duration: number, caller: number, voteTitle: string, detailStr: string, filter: number, result: typeof Callbacks.YesNoVoteResult, handler: typeof Callbacks.YesNoVoteHandler): boolean;
4711
+ export function PanoramaSendYesNoVote(duration: number, caller: number, voteTitle: string, detailStr: string, votePassTitle: string, detailPassStr: string, failReason: VoteCreateFailed, filter: number, result: typeof Callbacks.YesNoVoteResult, handler: typeof Callbacks.YesNoVoteHandler): boolean;
4528
4712
 
4529
4713
  /**
4530
4714
  * @description Start a new Yes/No vote with all players included
@@ -4535,10 +4719,13 @@ declare module ":s2sdk" {
4535
4719
  * @param caller Player slot of the vote caller. Use VOTE_CALLER_SERVER for 'Server'.
4536
4720
  * @param voteTitle Translation string to use as the vote message. (Only '#SFUI_vote' or '#Panorama_vote' strings)
4537
4721
  * @param detailStr Extra string used in some vote translation strings.
4722
+ * @param votePassTitle Translation string to use as the vote message. (Only '#SFUI_vote' or '#Panorama_vote' strings)
4723
+ * @param detailPassStr Extra string used in some vote translation strings when the vote passes.
4724
+ * @param failReason Reason for the vote to fail, used in some translation strings.
4538
4725
  * @param result Called when a menu action is completed.
4539
4726
  * @param handler Called when the vote has finished.
4540
4727
  */
4541
- export function PanoramaSendYesNoVoteToAll(duration: number, caller: number, voteTitle: string, detailStr: string, result: typeof Callbacks.YesNoVoteResult, handler: typeof Callbacks.YesNoVoteHandler): boolean;
4728
+ export function PanoramaSendYesNoVoteToAll(duration: number, caller: number, voteTitle: string, detailStr: string, votePassTitle: string, detailPassStr: string, failReason: VoteCreateFailed, result: typeof Callbacks.YesNoVoteResult, handler: typeof Callbacks.YesNoVoteHandler): boolean;
4542
4729
 
4543
4730
  /**
4544
4731
  * @description Removes a player from the current vote.
@@ -5793,10 +5980,9 @@ declare module ":s2sdk" {
5793
5980
  *
5794
5981
  * @param msgSerializable The serializable message.
5795
5982
  * @param message The network message.
5796
- * @param nRecipientCount The number of recipients.
5797
5983
  * @param recipientMask The recipient mask.
5798
5984
  */
5799
- export function UserMessageCreateFromSerializable(msgSerializable: number, message: number, nRecipientCount: number, recipientMask: number): number;
5985
+ export function UserMessageCreateFromSerializable(msgSerializable: number, message: number, recipientMask: number): number;
5800
5986
 
5801
5987
  /**
5802
5988
  * @description Creates a UserMessage from a message name.
@@ -5908,15 +6094,6 @@ declare module ":s2sdk" {
5908
6094
  */
5909
6095
  export function UserMessageSetRecipientMask(userMessage: number, mask: number): void;
5910
6096
 
5911
- /**
5912
- * @description Checks if the UserMessage was manually allocated.
5913
- *
5914
- * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-UserMessageIsManuallyAllocated|Docs}
5915
- *
5916
- * @param userMessage The UserMessage instance.
5917
- */
5918
- export function UserMessageIsManuallyAllocated(userMessage: number): boolean;
5919
-
5920
6097
  /**
5921
6098
  * @description Gets a nested message from a field in the UserMessage.
5922
6099
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plugify-plugins/s2sdk-types",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "generated typescript types to write plugins on plugify",
5
5
  "types": "index.d.ts",
6
6
  "scripts": {},