Syndicate Hub

Describes and manages the contracts and rewards for a single contractor.
Vars | |
completed_contracts | The number of completed contracts. |
---|---|
contractor_uplink | The contractor uplink associated to this hub. |
contracts | The contracts offered by the hub. |
current_contract | The current contract in progress. |
dead_penalty | TC reward multiplier if the target was extracted DEAD. Should be a penalty so between 0 and 1. The final amount is rounded up. |
difficulty_tc_thresholds | Completing every contract at a given difficulty will always result in a sum of TC greater or equal than the difficulty's threshold. Structure: EXTRACTION_DIFFICULTY_(EASY|MEDIUM|HARD) => number |
num_contracts | The number of contracts to generate initially. |
owner | The contractor associated to this hub. |
page | Current UI page index. |
purchases | List of purchases that can be done for Rep. |
rep | Amount of Contractor Rep available for spending. |
rep_per_completion | How much Contractor Rep to earn per contract completion. |
reward_tc_available | Amount of telecrystals available for redeeming. |
reward_tc_paid_out | Total amount of paid out telecrystals since the start. |
targets | List of targets from each contract in /datum/contractor_hub/var/contracts. Used to make sure two contracts from the same hub don't have the same target. |
tc_variation | Maximum variation a single contract's TC reward can have upon generation. In other words: final_reward = CEILING((tc_threshold / num_contracts) * (1 - (rand(0, 100) / 100) * tc_variation), 1) |
Procs | |
calculate_tc_reward | Generates an amount of TC to be used as a contract reward for the given difficulty. |
claim_tc | Gives any unclaimed TC to the given mob. |
first_login | Called when the loading animation completes for the first time. |
generate_contracts | Regenerates a list of contracts for the contractor to take up. |
is_user_authorized | Returns whether the given mob is allowed to connect to the uplink. |
on_completion | Called when a /datum/syndicate_contract has been completed. |
Var Details
completed_contracts

The number of completed contracts.
contractor_uplink

The contractor uplink associated to this hub.
contracts

The contracts offered by the hub.
current_contract

The current contract in progress.
dead_penalty

TC reward multiplier if the target was extracted DEAD. Should be a penalty so between 0 and 1. The final amount is rounded up.
difficulty_tc_thresholds

Completing every contract at a given difficulty will always result in a sum of TC greater or equal than the difficulty's threshold. Structure: EXTRACTION_DIFFICULTY_(EASY|MEDIUM|HARD) => number
num_contracts

The number of contracts to generate initially.
owner

The contractor associated to this hub.
page

Current UI page index.
purchases

List of purchases that can be done for Rep.
rep

Amount of Contractor Rep available for spending.
rep_per_completion

How much Contractor Rep to earn per contract completion.
reward_tc_available

Amount of telecrystals available for redeeming.
reward_tc_paid_out

Total amount of paid out telecrystals since the start.
targets

List of targets from each contract in /datum/contractor_hub/var/contracts. Used to make sure two contracts from the same hub don't have the same target.
tc_variation

Maximum variation a single contract's TC reward can have upon generation. In other words: final_reward = CEILING((tc_threshold / num_contracts) * (1 - (rand(0, 100) / 100) * tc_variation), 1)
Proc Details
calculate_tc_reward
Generates an amount of TC to be used as a contract reward for the given difficulty.
Arguments:
- total_contracts - The number of contracts being generated.
- difficulty - The difficulty to base the threshold from.
claim_tc
Gives any unclaimed TC to the given mob.
Arguments:
- M - The mob to give the TC to.
first_login
Called when the loading animation completes for the first time.
generate_contracts
Regenerates a list of contracts for the contractor to take up.
is_user_authorized
Returns whether the given mob is allowed to connect to the uplink.
Arguments:
- M - The mob.
on_completion
Called when a /datum/syndicate_contract has been completed.
Arguments:
- tc - The final amount of TC to award.
- creds - The final amount of credits to award.