siege.package

CorePackageLoading

class CorePackageLoading
First = siege.package.CorePackageLoading.First
Last = siege.package.CorePackageLoading.Last
None = siege.package.CorePackageLoading.None

PackageValidationResult

class PackageValidationResult
ContentMissing = siege.package.PackageValidationResult.ContentMissing
NotInstalled = siege.package.PackageValidationResult.NotInstalled
Success = siege.package.PackageValidationResult.Success
VersionMismatch = siege.package.PackageValidationResult.VersionMismatc...

WorkshopUpdateStatus

class WorkshopUpdateStatus
CommittingChanges = siege.package.WorkshopUpdateStatus.CommittingChang...
Invalid = siege.package.WorkshopUpdateStatus.Invalid
PreparingConfig = siege.package.WorkshopUpdateStatus.PreparingConfig
PreparingContent = siege.package.WorkshopUpdateStatus.PreparingContent
UploadingContent = siege.package.WorkshopUpdateStatus.UploadingContent
UploadingPreviewFile = siege.package.WorkshopUpdateStatus.UploadingPre...

Content

class Content
__eq__(arg2)
Parameters:arg2 (Content) –
Return type:object
__init__(id, package, path)
Parameters:
  • id (int) –
  • package (str) –
  • path (object) –
__repr__()
Return type:str
getEntity()
Return type:Entity
getId()
Return type:int
getName()
Return type:str
getPackage()
Return type:str
getPath()
Return type:str
static nameFromPath(path)
Returns:filename without extension.
Parameters:path (object) –
Return type:str
entity
id

ContentIdMap

class ContentIdMap
__contains__(arg2)
Parameters:arg2 (object) –
Return type:bool
__delitem__(arg2)
Parameters:arg2 (object) –
__getitem__(arg2)
Parameters:arg2 (object) –
Return type:object
__iter__()
Return type:object
__len__()
Return type:int
__setitem__(arg2, arg3)
Parameters:
  • arg2 (object) –
  • arg3 (object) –

ContentMap

class ContentMap
__contains__(arg2)
Parameters:arg2 (object) –
Return type:bool
__delitem__(arg2)
Parameters:arg2 (object) –
__getitem__(arg2)
Parameters:arg2 (object) –
Return type:object
__iter__()
Return type:object
__len__()
Return type:int
__setitem__(arg2, arg3)
Parameters:
  • arg2 (object) –
  • arg3 (object) –

ContentStash

class ContentStash
__setattr__(arg2, arg3)
Parameters:
  • arg2 (str) –
  • arg3 (object) –
discover(packagePath)

Uses this ContentStash’s PackageList instance to discover all packages in the given path.

Parameters:packagePath (object) –
discoverContent()

Discovers all contents in this stash and adds it to the internal list.

get(content)

Searches for Content by name and optional package name.

Parameters:content (str) – either content path or “<package>:<path>”.
Return type:Content
get(contentId)

Searches for Content by id.

Parameters:contentId (int) –
Return type:Content
getContents()
Return type:ContentIdMap
getPackages()
Return type:PackageList
has(content[, onlyEnabled=False])

Returns true if content exists otherwise false:param content: (str) Name of content to check for.:param onlyEnabled: (bool) Only accept content from enabled packages. Defaults to False.

Parameters:
  • content (str) –
  • onlyEnabled (bool) –
Return type:

bool

loadContent(stream)

Currently, calls unpackContent.

Parameters:stream (DataStream) –
Return type:Content
pack(stream)

see siege.package.PackageList.write

Parameters:stream (DataStream) –
packContent(content, stream)

Writes content id to DataStream.

Parameters:
populateContent()

Populates content from all enabled packages.

populateContentEntities(entityManager)

Creates Content entities using the passed EntityManager.

Parameters:entityManager (EntityManager) –
read(stream, version)

(Re)Initializes this ContentStash via siege.package.PackageList.read and also discovers all packages in “mods”

Parameters:
unpack(stream)

(Re)Initializes this ContentStash via siege.package.PackageList.read

Parameters:stream (DataStream) –
unpackContent(stream)

Reads content id from DataStream.

Parameters:stream (DataStream) –
Return type:Content
validate()

see siege.package.PackageList.validate

Return type:bool
write(stream)

Writes max content id to DataStream and calls see siege.package.PackageList.write

Parameters:stream (DataStream) –
writeContent(content, stream)

Currently, calls packContent.

Parameters:
workshop

Package

class Package
__setattr__(arg2, arg3)
Parameters:
  • arg2 (str) –
  • arg3 (object) –
canPublishOrUpdate()
Return type:bool
get(arg2)
Parameters:arg2 (str) –
Return type:Content
getContents()

(map) The contents this module contains.

Return type:ContentMap
getUrl()
Return type:str
getWorkshopId()
Return type:long
has(arg2)
Returns:true if this package contains the specified content.
Parameters:arg2 (str) –
Return type:bool
isShared()
Return type:bool
isWorkshopInstalled()
Return type:bool
read(arg2, arg3)

Reads the package attributes, content ids and content paths from the passed DataStream.

Parameters:
requestWorkshopDetails(arg2)
Parameters:arg2 (long) –
write(arg2)

Writes this package’s attributes, content ids and content paths to the passed DataStream.

Parameters:arg2 (DataStream) –
author
The python module’s “author” attribute.
description
The python module’s “description” attribute.
enabled
If this mod should be loaded.
name
path
Path to the python module.
priority
If set, the priority at which this module should be loaded.
serverOnly
If this mod is only required by the server.
status
tags
title
The python module’s “title” attribute.
version
The python module’s “version” attribute.

PackageList

class PackageList
__setattr__(arg2, arg3)
Parameters:
  • arg2 (str) –
  • arg3 (object) –
disablePackage(arg2)
Parameters:arg2 (Package) –
discover(arg2)

Discovers all packages in the passed Path.

Parameters:arg2 (object) –
Return type:bool
getOrdered([coreLoading=siege.package.CorePackageLoading.First])

Returns an ordered list of packages.

Parameters:coreLoading (CorePackageLoading) – (optional), order in which to list the core package.
Return type:Packages
getPackage(arg2)
Parameters:arg2 (str) –
Return type:Package
getPackage(arg2)
Parameters:arg2 (long) –
Return type:Package
hasPackage(arg2)
Parameters:arg2 (str) –
Return type:bool
read(arg2, arg3)

see siege.package.Package.read

Parameters:
setPriority(arg2, arg3)

Sets order priority for a package.

Parameters:
  • arg2 (Package) –
  • arg3 (int) –
validate()

see siege.package.Package.validate

Return type:bool
write(arg2)

see siege.package.Package.write

Parameters:arg2 (DataStream) –

PackageMap

class PackageMap
__contains__(arg2)
Parameters:arg2 (object) –
Return type:bool
__delitem__(arg2)
Parameters:arg2 (object) –
__getitem__(arg2)
Parameters:arg2 (object) –
Return type:object
__iter__()
Return type:object
__len__()
Return type:int
__setitem__(arg2, arg3)
Parameters:
  • arg2 (object) –
  • arg3 (object) –

Packages

class Packages
__contains__(arg2)
Parameters:arg2 (object) –
Return type:bool
__delitem__(arg2)
Parameters:arg2 (object) –
__getitem__(arg2)
Parameters:arg2 (object) –
Return type:object
__iter__()
Return type:object
__len__()
Return type:int
__setitem__(arg2, arg3)
Parameters:
  • arg2 (object) –
  • arg3 (object) –
append(arg2)
Parameters:arg2 (object) –
extend(arg2)
Parameters:arg2 (object) –

Workshop

class Workshop
getUpdateProgress()
Return type:WorkshopUpdateResult
publishWorkshopItem(arg2, arg3)
Parameters:
  • arg2 (Package) –
  • arg3 (list) –
subscribe(arg2)
Parameters:arg2 (Package) –
unsubscribe(arg2)
Parameters:arg2 (Package) –
updateWorkshopItem(arg2, arg3)
Parameters:
  • arg2 (Package) –
  • arg3 (list) –
static getTags()
Return type:StringList
onSubscribeFinish

WorkshopUpdateResult

class WorkshopUpdateResult
isFinished
percentage
status