carrier
Carrier Component
This component functions as a bridge between the carrier_room
attached to itself and the parented datum.
It handles the creation of new carrier rooms, TGUI, and relaying messages to the parent datum.
If the component is deleted, any carrier rooms inside of carrier_rooms
will be deleted.
Vars | |
able_to_transfer_to_another_carrier | Are you able to move mobs out of this carrier? |
---|---|
carrier_rooms | What rooms are linked to this carrier |
chat_icon | What 16x16 chat icon do we want our carrier to display in chat messages? |
communicate_as_parent | Are are the mobs inside able to emote/speak as the parent? |
component_to_give | What is the path of user component do we want to give to our mob? This needs to be /datum/component/carrier_user or a subtype. |
max_mobs | What is the max number of people we can keep in this carrier? If this is set to FALSE we don't have a limit |
name | What is the name of the carrier? |
no_dolling | Do we want to prevent someone with the same type of carrier from being inside of our carrier? |
require_approval | Do we want to ask the user permission before the mob enters? |
room_limit | Is there a limit on the number of rooms that you can make? |
same_type_only_transfer | If we transfer a mob to another carrier, does it need to be the same type? |
single_owner | Is this carrier going to stay within the possesion of one mob within it's lifespan? |
targeted_carrier_room | What carrier room are verbs sending messages to? |
type_of_room_to_create | What is the type of room that we want to create? |
ui_theme | What theme are we using for our carrier UI? |
Procs | |
add_mob | Adds mob_to_add into the parent carrier, giving them the carrier component and moving their mob into the room. Returns the component added, if successful |
check_for_vacancy | Checks the total number of mobs present and compares it with max_mobs returns TRUE if there is room (or no limit), otherwise returns FALSE |
create_room | Creates a /datum/carrier_room and adds it to the carrier_rooms list. |
get_approval | Attempts to ping the current user of the carrier, asking them if joiner_name is allowed in. If they are, the proc returns TRUE , otherwise returns FALSE |
get_current_holder | Tries to find out who is currently using the carrier, returns the holder. If no holder can be found, returns FALSE |
get_current_mobs | Returns a list containing all of the mobs currently present within a carrier. |
receive_message | receives a message from a carrier room. |
transfer_mob | Transfers a soul from a carrier room to another carrier room. Returns FALSE if the target room or target soul cannot be found. |
update_targeted_carrier | Updates the target carrier component for the carrier me/emote verb to send messages to. |
Var Details
able_to_transfer_to_another_carrier
Are you able to move mobs out of this carrier?
carrier_rooms
What rooms are linked to this carrier
chat_icon
What 16x16 chat icon do we want our carrier to display in chat messages?
communicate_as_parent
Are are the mobs inside able to emote/speak as the parent?
component_to_give
What is the path of user component do we want to give to our mob? This needs to be /datum/component/carrier_user
or a subtype.
max_mobs
What is the max number of people we can keep in this carrier? If this is set to FALSE
we don't have a limit
name
What is the name of the carrier?
no_dolling
Do we want to prevent someone with the same type of carrier from being inside of our carrier?
require_approval
Do we want to ask the user permission before the mob enters?
room_limit
Is there a limit on the number of rooms that you can make?
same_type_only_transfer
If we transfer a mob to another carrier, does it need to be the same type?
single_owner
Is this carrier going to stay within the possesion of one mob within it's lifespan?
targeted_carrier_room
What carrier room are verbs sending messages to?
type_of_room_to_create
What is the type of room that we want to create?
ui_theme
What theme are we using for our carrier UI?
Proc Details
add_mob
Adds mob_to_add
into the parent carrier, giving them the carrier component and moving their mob into the room. Returns the component added, if successful
check_for_vacancy
Checks the total number of mobs present and compares it with max_mobs
returns TRUE
if there is room (or no limit), otherwise returns FALSE
create_room
Creates a /datum/carrier_room
and adds it to the carrier_rooms
list.
Arguments
- target_name - The name that we want to assign to the created room.
- target_desc - The description that we want to assign to the created room.
get_approval
Attempts to ping the current user of the carrier, asking them if joiner_name
is allowed in. If they are, the proc returns TRUE
, otherwise returns FALSE
get_current_holder
Tries to find out who is currently using the carrier, returns the holder. If no holder can be found, returns FALSE
get_current_mobs
Returns a list containing all of the mobs currently present within a carrier.
receive_message
receives a message from a carrier room.
transfer_mob
Transfers a soul from a carrier room to another carrier room. Returns FALSE
if the target room or target soul cannot be found.
update_targeted_carrier
Updates the target carrier component for the carrier me/emote verb to send messages to.