mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 19:14:15 +01:00
[MIRROR] (Hopefully) Stops cryopodded contract targets from breaking contractor uplinks (#6420)
* (Hopefully) Stops cryopodded contract targets from breaking contractor uplinks (#59742) This PR aims to stop contractor uplinks from breaking due to having a target cryopod. When a contract target enters cryosleep, it now manually rerolls the contract. This PR is admittedly somewhat bandaid-y, as contractors are slotted for removal soon, apparently. * (Hopefully) Stops cryopodded contract targets from breaking contractor uplinks Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
@@ -220,8 +220,17 @@ GLOBAL_LIST_EMPTY(cryopod_computers)
|
||||
for(var/datum/mind/mind in objective.team.members)
|
||||
to_chat(mind.current, "<BR>[span_userdanger("Your target is no longer within reach. Objective removed!")]")
|
||||
mind.announce_objectives()
|
||||
else if(objective.target && istype(objective.target, /datum/mind))
|
||||
if(objective.target == mob_occupant.mind)
|
||||
else if(istype(objective.target) && objective.target == mob_occupant.mind)
|
||||
if(istype(objective, /datum/objective/contract))
|
||||
var/datum/antagonist/traitor/affected_traitor = objective.owner.has_antag_datum(/datum/antagonist/traitor)
|
||||
var/datum/contractor_hub/affected_contractor_hub = affected_traitor.contractor_hub
|
||||
for(var/datum/syndicate_contract/affected_contract as anything in affected_contractor_hub.assigned_contracts)
|
||||
if(affected_contract.contract == objective)
|
||||
affected_contract.generate(affected_contractor_hub.assigned_targets)
|
||||
affected_contractor_hub.assigned_targets.Add(affected_contract.contract.target)
|
||||
to_chat(objective.owner.current, "<BR>[span_userdanger("Contract target out of reach. Contract rerolled.")]")
|
||||
break
|
||||
else
|
||||
var/old_target = objective.target
|
||||
objective.target = null
|
||||
if(!objective)
|
||||
|
||||
@@ -165,6 +165,11 @@
|
||||
))
|
||||
|
||||
for (var/datum/syndicate_contract/contract in traitor_data.contractor_hub.assigned_contracts)
|
||||
if(!contract.contract)
|
||||
stack_trace("Syndiate contract with null contract objective found in [traitor_data.owner]'s contractor hub!")
|
||||
contract.status = CONTRACT_STATUS_ABORTED
|
||||
continue
|
||||
|
||||
data["contracts"] += list(list(
|
||||
"target" = contract.contract.target,
|
||||
"target_rank" = contract.target_rank,
|
||||
|
||||
Reference in New Issue
Block a user