/client

Every player has a client object representing their connection to the game. In turn, every client has a /mob, representing the player physically on the map - this is on the /client/var/mob. If this, the /mob/var/client or the /mob/var/key is reassigned, the client will be switched to the new mob.

// when this object is clicked
/obj/body_swapper/Click() 
    // create a new /mob
    var/mob/new_body = new(loc) 

    // and reassign our clickers client to the new body
    new_body.client = = usr.client 
    // this could also be represented as
    usr.client.mob = new_body
    // or
    new_body.key = usr.key

When this operation occurs, /mob/proc/Logout() will be called on the old mob, and /mob/proc/Login() will be called on the new mob.

/proc

/AllowUpload(filename, filelength)
/CheckPassport(passport_identifier)
/Click(/atom/object, location, control, params)
/Command(command)
/DblClick(/atom/object, location, control, params)
/Export(file)
/GetAPI(Api, Name)
/Import(Query)
/MeasureText(text, style, width)
/MouseDown(/atom/object, location, control, params)
/MouseDrag(/atom/src_object, over_object, src_location, over_location, src_control, over_control, params)
/MouseDrop(/atom/src_object, over_object, src_location, over_location, src_control, over_control, params)
/MouseEntered(/atom/object, location, control, params)
/MouseExited(/atom/object, location, control, params)
/MouseMove(/atom/object, location, control, params)
/MouseUp(/atom/object, location, control, params)
/MouseWheel(/atom/object, delta_x, delta_y, location, control, params)
/Move(loc, dir)
/New(TopicData)
/RenderIcon(object)
/SendPage(msg, recipient, options)
/SetAPI(Api, Key, Value)
/Topic(href, /list/href_list, /datum/hsrc)