spy_bounty
Spy Bounty
A datum used to track a single spy bounty. Not a singleton - whenever bounties are re-rolled, the entire list is deleted and new bounty datums are instantiated.
When bounties are completed, they are also not deleted, but instead marked as claimed.
Vars | |
black_market_prob | Probability that the stolen item will be sent to the black market instead of destroyed. Guaranteed if the item is indestructible. |
---|---|
claimed | Whether the bounty has been completed. |
difficulty | Difficult of the bounty, one of SPY_DIFFICULTY_EASY, SPY_DIFFICULTY_MEDIUM, SPY_DIFFICULTY_HARD. Must be set to one of the possible bounties to be picked. |
help | Help text for the bounty. Should include additional information about the bounty to assist the spy in figuring out what to do. Should be punctuated. IE: "Steal the captain's ID. It was last seen in the captain's office." |
initalized | Whether the bounty's been fully initialized. If this is not set, the bounty will be rerolled. |
name | The name of the bounty. Should be a short description without punctuation. IE: "Steal the captain's ID" |
reward_item | What uplink item the bounty will reward on completion. |
theft_time | How long of a do-after must be completed by the Spy to turn in the bounty. |
weight | Weight that the bounty will be selected. |
Procs | |
can_claim | Check if the passed mob can claim this bounty. |
check_dupe | Checks if the passed dupe key is a duplicate of an previously claimed bounty. |
clean_up_stolen_item | Called when the bounty is completed, to handle how the stolen item is "stolen". |
finish_cleanup | Called when cleaning up a stolen atom that was NOT sent to the black market. |
get_dupe_protection_key | What is this bounty's "dupe protection key"? This is used to determine if a duplicate of this bounty has been rolled before / in the last refresh. You can check if a bounty has been duped by accessing the handler's claimed_bounties_from_last_pool or all_claimed_bounty_types list. |
init_bounty | Initializes the bounty, setting up targets and etc. |
is_stealable | Checks if the passed movable is a valid target for this bounty. |
select_reward | Selects what uplink item the bounty will reward on completion. |
send_to_black_market | Handles putting the passed movable up on the black market. |
to_ui_data | Helper that translates the bounty into UI data for TGUI |
Var Details
black_market_prob
Probability that the stolen item will be sent to the black market instead of destroyed. Guaranteed if the item is indestructible.
claimed
Whether the bounty has been completed.
difficulty
Difficult of the bounty, one of SPY_DIFFICULTY_EASY, SPY_DIFFICULTY_MEDIUM, SPY_DIFFICULTY_HARD. Must be set to one of the possible bounties to be picked.
help
Help text for the bounty. Should include additional information about the bounty to assist the spy in figuring out what to do. Should be punctuated. IE: "Steal the captain's ID. It was last seen in the captain's office."
initalized
Whether the bounty's been fully initialized. If this is not set, the bounty will be rerolled.
name
The name of the bounty. Should be a short description without punctuation. IE: "Steal the captain's ID"
reward_item
What uplink item the bounty will reward on completion.
theft_time
How long of a do-after must be completed by the Spy to turn in the bounty.
weight
Weight that the bounty will be selected.
Proc Details
can_claim
Check if the passed mob can claim this bounty.
check_dupe
Checks if the passed dupe key is a duplicate of an previously claimed bounty.
- handler - The handler that is handling the bounty.
- dupe_key - The key to check for dupes
- dupe_prob - The probability of a dupe being allowed when checking all_claimed_bounty_types. This allows you to have a chance that distant dupes allowed depending on how many times they've been done.
Returns TRUE if the bounty is a dupe, FALSE if it is not.
clean_up_stolen_item
Called when the bounty is completed, to handle how the stolen item is "stolen".
By default, stolen items are simply deleted.
- stealing - The item that was stolen.
- spy - The spy that stole the item.
finish_cleanup
Called when cleaning up a stolen atom that was NOT sent to the black market.
- stealing - The item that was stolen.
get_dupe_protection_key
What is this bounty's "dupe protection key"? This is used to determine if a duplicate of this bounty has been rolled before / in the last refresh. You can check if a bounty has been duped by accessing the handler's claimed_bounties_from_last_pool or all_claimed_bounty_types list.
- stealing - The item that was stolen.
- handler - The handler that is handling the bounty.
Return a string key, what this uses for dupe protection.
init_bounty
Initializes the bounty, setting up targets and etc.
- handler - The bounty handler that is creating this bounty.
Returning FALSE will cancel initialization and force it to reroll the bounty.
is_stealable
Checks if the passed movable is a valid target for this bounty.
- stealing - The movable to check.
Returning FALSE simply means that the passed movable is not valid for this bounty.
select_reward
Selects what uplink item the bounty will reward on completion.
send_to_black_market
Handles putting the passed movable up on the black market.
By the end of this proc, the item should either be deleted (if failure) or in nullspace (on the black market).
- thing - The item to put up on the black market.
to_ui_data
Helper that translates the bounty into UI data for TGUI