Space Station 13 - Modules - TypesVar Details - Proc Details

Cogbar

Represents that the user is busy doing something.

The cogbar is a visual representation in the game that indicates to other players that a user is currently busy with an action. This class handles the creation, display, and removal of the cog animation.

Vars

blankThe blank image that overlaps the cog - hides it from the source user
cogThe visible element to other players
offset_yThe offset of the icon
userWho's doing the thing
user_clientThe user client

Procs

DestroyCleans up the cogbar instance, removing overlays and images associated with the user.
NewInitializes a new instance of the cogbar for the specified user.
add_cog_to_userAdds the cog to the user, visible by other players Adds the cog overlay to the user, making it visible to other players.
on_user_deleteWhen the user is deleted, remove the cog Handles the cleanup when the associated user is deleted.
removeRemoves the cog from the user Initiates the removal process for the cog overlay.

Var Details

blank

The blank image that overlaps the cog - hides it from the source user

cog

The visible element to other players

offset_y

The offset of the icon

user

Who's doing the thing

user_client

The user client

Proc Details

Destroy

Cleans up the cogbar instance, removing overlays and images associated with the user.

This method ensures that all visual elements are properly removed when the cogbar instance is destroyed

New

Initializes a new instance of the cogbar for the specified user.

This constructor sets up the user and user client properties, adds the cog overlay to the user, and registers a signal to handle user deletion.

@param user - The user for whom the cogbar is created.

add_cog_to_user

Adds the cog to the user, visible by other players Adds the cog overlay to the user, making it visible to other players.

This function creates the cog overlay with appropriate properties and initiates the animation to fade it in. Additionally, a blank image is added to the user's client to hide the cog from the user's own perspective.

on_user_delete

When the user is deleted, remove the cog Handles the cleanup when the associated user is deleted.

This function is triggered by a signal and ensures that the cogbar instance is properly destroyed

remove

Removes the cog from the user Initiates the removal process for the cog overlay.

This function fades out the cog overlay and schedules the cogbar instance for deletion after the animation completes.