slot

package
v0.0.0-...-fe84f33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List[S Type] struct {
	XMLName xml.Name `xml:"slots"`
	Slots   []S
}

type PaginatedSlotList

type PaginatedSlotList[S Type] struct {
	XMLName   xml.Name `xml:"slots"`
	Total     uint64   `xml:"total,attr"`
	HintStart uint64   `xml:"hint_start,attr"`
	Slots     []S
}

type Score

type Score struct {
	ID       uuid.UUID       `xml:"-" db:"id"`
	UserID   uuid.UUID       `xml:"-" db:"user_id"`
	Time     time.Time       `xml:"-" db:"achieved_time"`
	Platform common.Platform `xml:"-" db:"platform"`

	Type       int      `xml:"type" db:"type"`
	PlayerIds  []string `xml:"playerIds" db:"players"`
	MainPlayer string   `xml:"mainPlayer" db:"main_player"`
	Rank       uint64   `xml:"rank" db:"-"`
	Score      uint32   `xml:"score" db:"score"`
}

type ScoreBoard

type ScoreBoard struct {
	XMLName     xml.Name `xml:"scores"`
	PlayRecord  []*Score `xml:"playRecord"`
	TotalScores uint64   `xml:"totalNumScores"`
	YourScore   uint32   `xml:"yourScore"`
	YourRank    uint64   `xml:"yourRank"`
}

type SearchSlot

type SearchSlot struct {
	XMLName xml.Name `xml:"slot" db:"-"`
	Type    string   `xml:"type,attr" db:"-"`

	ID                  string           `xml:"id"`
	NPHandle            *npdata.NpHandle `xml:"npHandle" db:"-"`
	Uploader            uuid.UUID        `xml:"-" db:"uploader"`
	SearchScore         float32          `xml:"searchScore"`
	Location            common.Location  `xml:"location"`
	LocationX           int32            `xml:"-" db:"location_x"`
	LocationY           int32            `xml:"-" db:"location_y"`
	Game                int              `xml:"game"`
	Name                string           `xml:"name,omitempty"`
	Description         string           `xml:"description,omitempty"`
	RootLevel           string           `xml:"rootLevel"`
	Icon                string           `xml:"icon"`
	InitiallyLocked     bool             `xml:"initiallyLocked"`
	IsSubLevel          bool             `xml:"isSubLevel" db:"sub_level"`
	IsLBP1Only          bool             `xml:"isLBP1Only" db:"lbp1only"`
	Background          string           `xml:"background"`
	Shareable           int              `xml:"shareable"`
	MinPlayers          uint             `xml:"minPlayers"`
	MaxPlayers          uint             `xml:"maxPlayers"`
	HeartCount          int64            `xml:"heartCount"`
	ThumbsUp            int64            `xml:"thumbsup" db:"thumbs_up_count"`
	ThumbsDown          int64            `xml:"thumbsdown" db:"thumbs_down_count"`
	AverageRating       float32          `xml:"averageRating"`
	PlayerCount         uint64           `xml:"playerCount"`
	MatchingPlayers     uint64           `xml:"matchingPlayers"`
	MMPick              bool             `xml:"mmpick"`
	IsAdventurePlanet   bool             `xml:"isAdventurePlanet"`
	Ps4Only             bool             `xml:"ps4Only"`
	PlayCount           uint64           `xml:"playCount" db:"total_play_count"`
	CompletionCount     uint64           `xml:"completionCount"`
	Lbp1PlayCount       uint64           `xml:"lbp1PlayCount"`
	Lbp1CompletionCount uint64           `xml:"lbp1CompletionCount"`
	Lbp1UniquePlayCount uint64           `xml:"lbp1UniquePlayCount"`
	Lbp2PlayCount       uint64           `xml:"lbp2PlayCount"`
	Lbp2CompletionCount uint64           `xml:"lbp2CompletionCount"`
	UniquePlayCount     uint64           `xml:"uniquePlayCount" db:"play_count"`
	Lbp3PlayCount       uint64           `xml:"lbp3PlayCount"`
	Lbp3CompletionCount uint64           `xml:"lbp3CompletionCount"`
	Lbp3UniquePlayCount uint64           `xml:"lbp3UniquePlayCount"`
}

type Slot

type Slot struct {
	XMLName     xml.Name         `xml:"slot" db:"-"`
	Type        string           `xml:"type,attr"`
	ID          uint64           `xml:"id"`
	UploaderID  uuid.UUID        `xml:"-" db:"uploader"`
	NpHandle    *npdata.NpHandle `xml:"npHandle"`
	Location    common.Location  `xml:"location"`
	LocationX   int32            `xml:"-" db:"location_x"`
	LocationY   int32            `xml:"-" db:"location_y"`
	Game        uint             `xml:"game"`
	Name        string           `xml:"name,omitempty"`
	Description string           `xml:"description,omitempty"`
	RootLevel   string           `xml:"rootLevel"`
	//Resources         []string        `xml:"resource"`
	Icon              string  `xml:"icon"`
	InitiallyLocked   bool    `xml:"initiallyLocked"`
	IsSubLevel        bool    `xml:"isSubLevel" db:"sub_level"`
	IsLBP1Only        bool    `xml:"isLBP1Only" db:"lbp1only"`
	Background        string  `xml:"background"`
	Shareable         uint    `xml:"shareable"`
	MinPlayers        uint    `xml:"minPlayers"`
	MaxPlayers        uint    `xml:"maxPlayers"`
	HeartCount        uint64  `xml:"heartCount"`
	ThumbsUp          uint64  `xml:"thumbsup" db:"thumbs_up_count"`
	ThumbsDown        uint64  `xml:"thumbsdown" db:"thumbs_down_count"`
	AverageRating     float32 `xml:"averageRating"`
	PlayerCount       uint64  `xml:"playerCount"`
	MatchingPlayers   uint64  `xml:"matchingPlayers"`
	MMPick            bool    `xml:"mmpick"`
	YourRating        int     `xml:"yourRating"`
	YourDPadRating    int     `xml:"yourDPadRating"`
	YourLBP1PlayCount uint64  `xml:"yourlbp1PlayCount"`
	YourLBP2PlayCount uint64  `xml:"yourlbp2PlayCount"`
	ReviewCount       uint64  `xml:"reviewCount"`
	CommentCount      uint64  `xml:"commentCount"`
	PhotoCount        uint64  `xml:"photoCount"`
	AuthorPhotoCount  uint64  `xml:"authorPhotoCount"`

	FirstPublishedXML string `xml:"firstPublished"` // These two are strings because otherwise it integer overflows
	LastUpdatedXML    string `xml:"lastUpdated"`

	FirstPublished      time.Time       `xml:"-"`
	LastUpdated         time.Time       `xml:"-"`
	BadgeURL            string          `xml:"badgeURL"`
	CommentsEnabled     bool            `xml:"commentsEnabled"`
	ReviewsEnabled      bool            `xml:"reviewsEnabled"`
	PublishedIn         common.GameType `xml:"publishedIn"`
	PlayCount           uint64          `xml:"playCount"`
	CompletionCount     uint64          `xml:"completionCount"`
	Lbp1PlayCount       uint64          `xml:"lbp1PlayCount"`
	Lbp1CompletionCount uint64          `xml:"lbp1CompletionCount"`
	Lbp1UniquePlayCount uint64          `xml:"lbp1UniquePlayCount"`
	Lbp2PlayCount       uint64          `xml:"lbp2PlayCount"`
	Lbp2CompletionCount uint64          `xml:"lbp2CompletionCount"`
	UniquePlayCount     uint64          `xml:"uniquePlayCount"`
	Lbp3PlayCount       uint64          `xml:"lbp3PlayCount"`
	Lbp3CompletionCount uint64          `xml:"lbp3CompletionCount"`
	Lbp3UniquePlayCount uint64          `xml:"lbp3UniquePlayCount"`
}

type SlotResource

type SlotResource struct {
	SlotID       int    `db:"slot_id"`
	ResourceHash string `db:"resource_hash"`
}

type StartPublishSlotResponse

type StartPublishSlotResponse struct {
	XMLName  xml.Name `xml:"slot"`
	Resource []string `xml:"resource"`
}

type Type

type Type interface {
	Slot | Upload | SearchSlot | UpdateUserSlot
}

type UpdateUserSlot

type UpdateUserSlot struct {
	Type     string          `xml:"type,attr"`
	Id       uint64          `xml:"id"`
	Location common.Location `xml:"location"`
}

type Upload

type Upload struct {
	XMLName         xml.Name        `xml:"slot" `
	ID              uint64          `xml:"id,omitempty"`
	Type            string          `xml:"type,attr" `
	Name            string          `xml:"name,omitempty"`
	Description     string          `xml:"description,omitempty"`
	Icon            string          `xml:"icon,omitempty"`
	RootLevel       string          `xml:"rootLevel,omitempty"`
	Resources       []string        `xml:"resource"`
	Location        common.Location `xml:"location,omitempty"`
	InitiallyLocked bool            `xml:"initiallyLocked,omitempty"`
	IsSubLevel      bool            `xml:"isSubLevel,omitempty"`
	IsLBP1Only      bool            `xml:"isLBP1Only,omitempty"`
	Shareable       int             `xml:"shareable,omitempty"`
	Background      string          `xml:"background,omitempty"`
	Links           string          `xml:"links,omitempty"`
	InternalLinks   string          `xml:"internalLinks,omitempty"`
	LevelType       string          `xml:"levelType,omitempty"`
	MinPlayers      int             `xml:"minPlayers,omitempty"`
	MaxPlayers      int             `xml:"maxPlayers,omitempty"`
	MoveRequired    bool            `xml:"moveRequired,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL