PlayerList¶__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: |
|
|---|
append(arg2)¶| Parameters: | arg2 (object) – |
|---|
extend(arg2)¶| Parameters: | arg2 (object) – |
|---|
RealmList¶__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: |
|
|---|
append(arg2)¶| Parameters: | arg2 (object) – |
|---|
extend(arg2)¶| Parameters: | arg2 (object) – |
|---|
RealmLoader¶getLoadedRegions()¶Returns a Python list of all currently loaded regions
| Return type: | list |
|---|
getSegments(arg2)¶| Parameters: | arg2 (int) – |
|---|---|
| Return type: | SegmentList |
isRegionLoaded(arg2)¶| Parameters: | arg2 (int) – |
|---|---|
| Return type: | bool |
isSaving()¶| Return type: | bool |
|---|
loadRegions([callback=None])¶Load all regions in this realm and set call back if necessary
| Parameters: | callback (object) – Function to set as realm loaded callback |
|---|
saveRegion( [shouldUnload=False, asynchronous)¶Saves a region to the file system
| Parameters: |
|
|---|
saveRegions(asynchronous)¶Save all regions in this realm to the file system
| Parameters: | asynchronous (bool) – Set to true to force asynchronous file writing, false otherwise |
|---|
unloadRegion(region)¶Unloads region, saves region and game
| Parameters: | region (int) – Id of the region to unload |
|---|
update(arg2)¶| Parameters: | arg2 (int) – |
|---|
updateRegion(region, handler)¶Reloads a region
| Parameters: |
|
|---|
updateSaving()¶SegmentList¶__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: |
|
|---|
append(arg2)¶| Parameters: | arg2 (object) – |
|---|
extend(arg2)¶| Parameters: | arg2 (object) – |
|---|
World¶__setattr__(attr, value)¶Changes an attribute of this World
| Parameters: |
|
|---|
addPlayerDataHandlers(name, reader, writer)¶Sets player reader and writer functions to parameters
| Parameters: |
|
|---|
createRealm(name, size, groundLevel, options)¶Creates a new realm in this world
| Parameters: |
|
|---|---|
| Return type: |
finishSaving()¶Finishes any current saving and disables asynchronous saving.
getPlayer(client)Returns target client from this world
| Parameters: | client (NetworkId) – Player to search for |
|---|---|
| Return type: | Player |
getPlayer(uid)Returns target player with the matching UID for this world
| Parameters: | uid (int) – The player’s uid to retrieve. |
|---|---|
| Return type: | Player |
getPlayer(entity)Returns target entity from this world
| Parameters: | entity (Entity) – Player to search for |
|---|---|
| Return type: | Player |
getPlayers()¶Return a list of all players in this world
| Return type: | PlayerList |
|---|
getPositionFromWorld(arg2)¶Gets the screen position from the provided world position.
| Parameters: | arg2 (Vector) – |
|---|---|
| Return type: | PixelVector |
getRealm(uid)Return target realm in this world
| Parameters: | uid (int) – Unique identifier for target realm |
|---|---|
| Return type: | Realm |
getRealm(name)Return target realm in this world
| Parameters: | name (str) – Text name for target realm |
|---|---|
| Return type: | Realm |
isActivePlayer(arg2)¶Return True if provided player is the main player otherwise false.
| Parameters: | arg2 (Player) – |
|---|---|
| Return type: | bool |
isActivePlayer(arg2)Return True if provided entity is the main player otherwise false.
| Parameters: | arg2 (Entity) – |
|---|---|
| Return type: | bool |
isInitialized()¶Returns True if the world is fully initialized and ready for full use otherwise False.
| Return type: | bool |
|---|
loadComplete()¶Handle completion of a world load
move(entity, realmUid, layer)¶Removes entity from current realm and puts into a new one
| Parameters: |
|---|
move(entity, realm, layer)Removes entity from current realm and puts into a new one
| Parameters: |
|---|
move(player, realm)Removes player from current realm and puts into a new one
| Parameters: |
|---|
requestRegion(player, realm, position, callback)¶Loads the area around the position for the provided player and once available calls the callback.
| Parameters: |
|---|
save([asynchronous=True[, isExiting=False]])¶Save this world to the file system
| Parameters: |
|
|---|
saveCharacter(arg2, arg3)¶| Parameters: |
|
|---|
setPlayersHomePoint(player, realm, position)¶Set players home position and realm
| Parameters: |
|---|
update(frameTime)¶Update all player and loaded realms in this world
| Parameters: | frameTime (int) – Elapsed time this frame |
|---|
create(game, name, size[, seed=0[, hasServerSideCharacters=False]])¶Creates a new World instance.
| Parameters: |
|
|---|---|
| Return type: |
join(game, uid, name, realmInfos[, hasServerSideCharacters=False])¶Add all realms from realmInfos to this world
| Parameters: |
|
|---|---|
| Return type: |
load(game, path)¶Load the world from the provided file at path
| Parameters: |
|
|---|---|
| Return type: |
reset()¶Clear all sub systems and realms in this world
CONTENT_FILE_VERSION¶DATA_FILE_VERSION¶data¶hasServerSideCharacters¶name¶path¶playerData¶players¶PlayerList of all playersplaytime¶realm¶remnaLevel¶uid¶WorldInfo¶load(worldPath)¶Reads the world information stored at <path>/info.
| Parameters: | worldPath (object) – (str) The world path. |
|---|
packagesAvailable(contentStash)¶Returns true if all enabled packages are available in content stash otherwise false.
| Parameters: | contentStash (ContentStash) – |
|---|---|
| Return type: | bool |
save(path, asynchronous)¶Saves the world information to disk.
| Parameters: |
|
|---|
saveWorld(world, asynchronous)¶Saves the world information to disk.
| Parameters: |
|
|---|
FILE_VERSION¶hasServerSideCharacters¶name¶packages¶playtime¶realms¶RealmInfoList) List of all RealmInfo saved for the world.uid¶WorldPlayerDataList¶__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: |
|
|---|
append(arg2)¶| Parameters: | arg2 (object) – |
|---|
extend(arg2)¶| Parameters: | arg2 (object) – |
|---|
WorldTime¶getAmbientColor(hour)¶Gets the ambient light color for the provided time.
| Parameters: | hour (int) – (Int32) The time for the desired color. |
|---|---|
| Return type: | Color |
getBackgroundColor(hour)¶Gets the background color for the provided time.
| Parameters: | hour (int) – (Int32) The time’s hour to get the background for. |
|---|---|
| Return type: | Color |
getHour()¶Gets the current hour. Will return realm set time if defined.
| Return type: | int |
|---|
getMinutes()¶Gets the current minutes in the hour. Returns 0 if realm has a set time.
| Return type: | int |
|---|
getNextHour()¶Gets the next hour. Will use realm set time if defined.
| Return type: | int |
|---|
handleResize(width, height)¶Recreate rendering context for window resize
| Parameters: |
|
|---|
isDaytime()¶Returns true if hour > 4 and hour < 19, false otherwise
| Return type: | bool |
|---|
isNight()¶Returns true if hour <= 4 and hour >= 19, false otherwise
| Return type: | bool |
|---|
setSkyImage(path, transitionTime)¶Set the sky image to one at path
| Parameters: |
|
|---|
days¶hours¶minutes¶seconds¶HOURS_IN_DAY = 24MINUTES_IN_HOUR = 60TIME_IN_MINUTE = 1000