Hivebuff
HIVE BUFFS - XENOMORPH ENDGAME Contains all the class definitons and code for applying hivebuffs to xeno hives. Each buff consists of a /datum/hivebuff And associated on_engage and on_cease procs to handle behaviour of activating and ending the buffs Buffs are divided into 2 tiers, minor and major.
Vars | |
_timer_id_cooldown | Timer id for cooldown duration |
---|---|
apply_on_new_xeno | Apply the buff effect to new xenomorphs who spawn or evolve. |
cease_flavourmessage | Flavour message to announce to the hive on buff expiry. Narrated to all players in the hive. |
cease_timer_id | _on_cease timer id |
cooldown_duration | Time that the buff is on cooldown after ending |
cost | Cost of the buff |
desc | Description of what the buff does. |
duration | Time that the buff is active for if it is a timed buff. |
engage_failure_message | Message to send to the user and queen if we fail for any reason during on_engage() |
engage_flavourmessage | Flavour message to announce to the hive on buff application. Narrated to all players in the hive. |
hive | The hive that this buff is applied to. |
hivebuff_radial_dmi | Path to .dmi with hivebuff radial icons |
is_combineable | If this buff can be used with others |
is_reusable | If this buff can be used more than once a round. |
marine_flavourmessage | Flavour message to give to the marines on buff engage |
must_select_pylon | Ask the buyer where to put the buff |
name | Name of the buff, short and to the point |
number_of_required_pylons | Number of pylons required to buy the buff |
radial_icon | Image to display on radial menu |
roundtime_to_enable | Round time before the buff becomes available to purchase |
special_fail_message | Special fail message |
tier | Minor or Major buff. Governs announcements made and importance. |
Procs | |
_check_can_afford_buff | Checks if the hive can afford to purchase the buff returns TRUE if they can purchase and FALSE if not. |
_check_num_required_pylons | Checks the number of pylons required and if the hive posesses them |
_check_pass_active | Checks if this buff is already active in the hive. Returns TRUE if passed FALSE if not. |
_check_pass_combineable | Checks if the buff is combineable if other buffs are already in use. Return TRUE if passed FALSE if not. |
_check_pass_reusable | Checks if the buff is reusable and if it's already been used. Returns TRUE if passed, FALSE if not. |
_handle_xenomorph_new | Signal handler for new xenomorphs joining the hive |
_on_cease | Wrapper for on_cease() |
_on_cooldown_end | Handler for the end of a cooldown |
_on_engage | Wrapper for on_engage(), handles checking if the buff can be actually purchased as well as adding buff to the active_hivebuffs and used_hivebuffs for the hive. |
_purchase_and_deduct | Deducts points from the hive buff points equal to the cost of the buff |
apply_buff_effects | The actual effects of the buff to apply |
on_cease | Any effects which need to be ended or ceased gracefully, called when a buff expires. |
on_engage | Behaviour for the buff goes in here. IMPORTANT: If you buff has any kind of conditions which can fail. Set an engage_failure_message and return FALSE. If your buff succeeds you must return TRUE |
remove_buff_effects | Reverse the effects here, should be the opposite of apply_effects() |
Var Details
_timer_id_cooldown
Timer id for cooldown duration
apply_on_new_xeno
Apply the buff effect to new xenomorphs who spawn or evolve.
cease_flavourmessage
Flavour message to announce to the hive on buff expiry. Narrated to all players in the hive.
cease_timer_id
_on_cease timer id
cooldown_duration
Time that the buff is on cooldown after ending
cost
Cost of the buff
desc
Description of what the buff does.
duration
Time that the buff is active for if it is a timed buff.
engage_failure_message
Message to send to the user and queen if we fail for any reason during on_engage()
engage_flavourmessage
Flavour message to announce to the hive on buff application. Narrated to all players in the hive.
hive
The hive that this buff is applied to.
hivebuff_radial_dmi
Path to .dmi with hivebuff radial icons
is_combineable
If this buff can be used with others
is_reusable
If this buff can be used more than once a round.
marine_flavourmessage
Flavour message to give to the marines on buff engage
must_select_pylon
Ask the buyer where to put the buff
name
Name of the buff, short and to the point
number_of_required_pylons
Number of pylons required to buy the buff
radial_icon
Image to display on radial menu
roundtime_to_enable
Round time before the buff becomes available to purchase
special_fail_message
Special fail message
tier
Minor or Major buff. Governs announcements made and importance.
Proc Details
_check_can_afford_buff
Checks if the hive can afford to purchase the buff returns TRUE if they can purchase and FALSE if not.
_check_num_required_pylons
Checks the number of pylons required and if the hive posesses them
_check_pass_active
Checks if this buff is already active in the hive. Returns TRUE if passed FALSE if not.
_check_pass_combineable
Checks if the buff is combineable if other buffs are already in use. Return TRUE if passed FALSE if not.
_check_pass_reusable
Checks if the buff is reusable and if it's already been used. Returns TRUE if passed, FALSE if not.
_handle_xenomorph_new
Signal handler for new xenomorphs joining the hive
_on_cease
Wrapper for on_cease()
_on_cooldown_end
Handler for the end of a cooldown
_on_engage
Wrapper for on_engage(), handles checking if the buff can be actually purchased as well as adding buff to the active_hivebuffs and used_hivebuffs for the hive.
_purchase_and_deduct
Deducts points from the hive buff points equal to the cost of the buff
apply_buff_effects
The actual effects of the buff to apply
on_cease
Any effects which need to be ended or ceased gracefully, called when a buff expires.
on_engage
Behaviour for the buff goes in here. IMPORTANT: If you buff has any kind of conditions which can fail. Set an engage_failure_message and return FALSE. If your buff succeeds you must return TRUE
remove_buff_effects
Reverse the effects here, should be the opposite of apply_effects()