antagonist
Vars | |
antag_datum_blacklist | List of other antag datum types that this type can't coexist with. |
---|---|
antag_hud_name | Holds the name of the hud's icon in the .dmi files, i.e "hudtraitor", "hudvampire", etc. |
antag_hud_type | Holds the type of antagonist hud this datum will get, i.e. ANTAG_HUD_TRAITOR , ANTAG_HUD_VAMPIRE , etc. |
antag_memory | Antagonist datum specific information that appears in the player's notes. Information stored here will be removed when the datum is removed from the player. |
blurb_font | Intro Blurb Font |
blurb_text_color | Intro Blurbs text colour |
blurb_text_outline_width | Intro Blurbs outline width |
clown_gain_text | If the owner is a clown, this text will be displayed to them when they gain this datum. |
clown_removal_text | If the owner is a clown, this text will be displayed to them when they lose this datum. |
clown_text_span_class | The spawn class to use for gain/removal clown text |
delayed_objectives | Do we have delayed objective giving? |
give_objectives | Should we automatically give this antagonist objectives upon them gaining the datum? |
job_rank | Used to determine if the player jobbanned from this role. Things like SPECIAL_ROLE_TRAITOR should go here to determine the role. |
mimicking | If the antagonist can have their spoken voice be something else, this is the "voice" that they will appear as. |
name | The name of the antagonist. |
objective_holder | List of objectives connected to this datum. |
organization | The organization, if any, this antag is associated with |
owner | Mind that owns this datum. |
replace_banned | Should we replace the role-banned player with a ghost? |
roundend_category | Section of roundend report, datums with same category will be displayed together, also default header for the section. |
show_in_roundend | Set to false to hide the antagonists from roundend report. |
silent | Should the owner mob get a greeting text? Determines whether or not the greet() proc is called. |
special_role | The special role that will be applied to the owner's special_role var. i.e. SPECIAL_ROLE_TRAITOR , SPECIAL_ROLE_VAMPIRE . |
wiki_page_name | The url page name for this antagonist, appended to the end of the wiki url in the form of: [GLOB.configuration.url.wiki_url]/index.php/[wiki_page_name] |
Procs | |
add_antag_hud | Adds this datum's antag hud to antag_mob . |
add_antag_objective | Create and add an objective of the given type. |
add_owner_to_gamemode | Adds the owner to their respective gamemode's list. For example SSticker.mode.traitors |= owner . |
apply_innate_effects | This handles the application of antag huds/special abilities. |
can_be_owned | Loops through the owner's antag_datums list and determines if this one is blacklisted by any others. |
create_team | Creates a new antagonist team. |
custom_blurb | This is the custom blurb message used on login for an antagonist. |
detach_from_owner | Removes owner's dependencies on this antag datum.
For example: removal of antag datum from owner's antag_datums , antag datum related teams etc.
If your /datum/antagonist subtype adds more dependencies on owner - they should be cleared there. |
farewell | Displays a message to the antag mob while the datum is being deleted, i.e. "Your powers are gone and you're no longer a vampire!" |
finalize_antag | Give the antag any final information or items. |
forge_basic_objectives | Create and assign a full set of randomized, basic human traitor objectives. can_hijack - If you want the 10% chance for the antagonist to be able to roll hijack, only true for traitors |
forge_single_human_objective | Create and assign a single randomized human traitor objective. |
get_antag_objectives | Get all of this antagonist's objectives, including from the team. |
get_team | Returns the team the antagonist belongs to, if any. |
give_objectives | Give the antagonist their objectives. Base proc, override as needed. |
greet | Displays a message and their objectives to the antag mob after the datum is added to them, i.e. "Greetings you are a traitor! etc. |
handle_clown_mutation | Handles adding and removing the clumsy mutation from clown antags. |
has_antag_objectives | Do we have any objectives at all, including from a team. Faster than get_antag_objectives() |
is_banned | Checks if the person trying to receive this datum is role banned from it. |
on_body_transfer | Removes antagonist datum effects from the old body and applies it to the new one. |
on_gain | Proc called when the datum is given to a mind. |
remove_antag_hud | Removes this datum's antag hud from antag_mob . |
remove_antag_objective | Complement to add_antag_objective that removes the objective. Currently unused. |
remove_innate_effects | This handles the removal of antag huds/special abilities. |
remove_owner_from_gamemode | Removes the owner from their respective gamemode's list. For example SSticker.mode.traitors -= owner . |
replace_banned_player | Attempts to replace the role banned antag with a ghost player. |
restore_last_hud_and_role | Re-sets the antag hud and special_role of the owner to that of the previous antag datum they had before this one was added. |
select_organization | Selects and set the organization this antag is associated with. Base proc, override as needed |
Var Details
antag_datum_blacklist
List of other antag datum types that this type can't coexist with.
antag_hud_name
Holds the name of the hud's icon in the .dmi files, i.e "hudtraitor", "hudvampire", etc.
antag_hud_type
Holds the type of antagonist hud this datum will get, i.e. ANTAG_HUD_TRAITOR
, ANTAG_HUD_VAMPIRE
, etc.
antag_memory
Antagonist datum specific information that appears in the player's notes. Information stored here will be removed when the datum is removed from the player.
blurb_font
Intro Blurb Font
blurb_text_color
Intro Blurbs text colour
blurb_text_outline_width
Intro Blurbs outline width
clown_gain_text
If the owner is a clown, this text will be displayed to them when they gain this datum.
clown_removal_text
If the owner is a clown, this text will be displayed to them when they lose this datum.
clown_text_span_class
The spawn class to use for gain/removal clown text
delayed_objectives
Do we have delayed objective giving?
give_objectives
Should we automatically give this antagonist objectives upon them gaining the datum?
job_rank
Used to determine if the player jobbanned from this role. Things like SPECIAL_ROLE_TRAITOR
should go here to determine the role.
mimicking
If the antagonist can have their spoken voice be something else, this is the "voice" that they will appear as.
name
The name of the antagonist.
objective_holder
List of objectives connected to this datum.
organization
The organization, if any, this antag is associated with
owner
Mind that owns this datum.
replace_banned
Should we replace the role-banned player with a ghost?
roundend_category
Section of roundend report, datums with same category will be displayed together, also default header for the section.
show_in_roundend
Set to false to hide the antagonists from roundend report.
silent
Should the owner mob get a greeting text? Determines whether or not the greet()
proc is called.
special_role
The special role that will be applied to the owner's special_role
var. i.e. SPECIAL_ROLE_TRAITOR
, SPECIAL_ROLE_VAMPIRE
.
wiki_page_name
The url page name for this antagonist, appended to the end of the wiki url in the form of: [GLOB.configuration.url.wiki_url]/index.php/[wiki_page_name]
Proc Details
add_antag_hud
Adds this datum's antag hud to antag_mob
.
Arguments:
- antag_mob - the mob to add the antag hud to.
add_antag_objective
Create and add an objective of the given type.
If the given objective type needs a target, it will try to find a target which isn't already the target of different objective for this antag. If one cannot be found, it tries one more time. If one still cannot be found, it will be added as a "Free Objective" without a target.
Arguments:
- objective_type - A type path of an objective, for example: /datum/objective/steal
- explanation_text - the explanation text that will be passed into the objective's
New()
proc - mob/target_override - a target for the objective
add_owner_to_gamemode
Adds the owner to their respective gamemode's list. For example SSticker.mode.traitors |= owner
.
apply_innate_effects
This handles the application of antag huds/special abilities.
Gives the antag mob their assigned hud. If they're a clown, removes their clumsy mutataion.
Arguments:
- mob/living/mob_override - a mob to apply effects to. Can be null.
can_be_owned
Loops through the owner's antag_datums
list and determines if this one is blacklisted by any others.
If it's in one of their blacklists, return FALSE. It cannot coexist with the datum we're trying to add here.
create_team
Creates a new antagonist team.
custom_blurb
This is the custom blurb message used on login for an antagonist.
detach_from_owner
Removes owner's dependencies on this antag datum.
For example: removal of antag datum from owner's antag_datums
, antag datum related teams etc.
If your /datum/antagonist
subtype adds more dependencies on owner
- they should be cleared there.
farewell
Displays a message to the antag mob while the datum is being deleted, i.e. "Your powers are gone and you're no longer a vampire!"
Called in on_removal()
if silent is set to FALSE.
finalize_antag
Give the antag any final information or items.
forge_basic_objectives
Create and assign a full set of randomized, basic human traitor objectives. can_hijack - If you want the 10% chance for the antagonist to be able to roll hijack, only true for traitors
forge_single_human_objective
Create and assign a single randomized human traitor objective.
get_antag_objectives
Get all of this antagonist's objectives, including from the team.
get_team
Returns the team the antagonist belongs to, if any.
give_objectives
Give the antagonist their objectives. Base proc, override as needed.
greet
Displays a message and their objectives to the antag mob after the datum is added to them, i.e. "Greetings you are a traitor! etc.
Called in on_gain()
if silent it set to FALSE.
handle_clown_mutation
Handles adding and removing the clumsy mutation from clown antags.
Arguments:
- clown - the mob in which to add or remove clumsy from.
- message - the chat message to display to them the clown mob
- granting_datum - TRUE if the datum is being applied to the clown mob.
has_antag_objectives
Do we have any objectives at all, including from a team. Faster than get_antag_objectives()
is_banned
Checks if the person trying to receive this datum is role banned from it.
on_body_transfer
Removes antagonist datum effects from the old body and applies it to the new one.
Called in the/datum/mind/proc/transfer_to()
.
Arguments:
- new_body - the new body the antag mob is transferring into.
- old_body - the old body the antag mob is leaving.
on_gain
Proc called when the datum is given to a mind.
remove_antag_hud
Removes this datum's antag hud from antag_mob
.
Arguments:
- antag_mob - the mob to remove the antag hud from.
remove_antag_objective
Complement to add_antag_objective that removes the objective. Currently unused.
remove_innate_effects
This handles the removal of antag huds/special abilities.
Removes the antag's assigned hud. If they're a clown, gives them back their clumsy mutataion.
Arguments:
- mob/living/mob_override - a mob to remove effects from. Can be null.
remove_owner_from_gamemode
Removes the owner from their respective gamemode's list. For example SSticker.mode.traitors -= owner
.
replace_banned_player
Attempts to replace the role banned antag with a ghost player.
restore_last_hud_and_role
Re-sets the antag hud and special_role
of the owner to that of the previous antag datum they had before this one was added.
For example, if the owner has a traitor datum and a vampire datum, both at index 1 and 2 respectively, After the vampire datum gets removed, it sets the owner's antag hud/role to whatever is set for traitor datum.
select_organization
Selects and set the organization this antag is associated with. Base proc, override as needed