part 4: the one where i slowly go insane
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
var/name = "team"
|
||||
var/member_name = "member"
|
||||
var/list/objectives = list() //common objectives, these won't be added or removed automatically, subtypes handle this, this is here for bookkeeping purposes.
|
||||
var/show_roundend_report = TRUE
|
||||
|
||||
/datum/team/New(starting_members)
|
||||
. = ..()
|
||||
@@ -25,6 +26,8 @@
|
||||
|
||||
//Display members/victory/failure/objectives for the team
|
||||
/datum/team/proc/roundend_report()
|
||||
if(!show_roundend_report)
|
||||
return
|
||||
var/list/report = list()
|
||||
|
||||
report += "<span class='header'>[name]:</span>"
|
||||
|
||||
@@ -13,10 +13,7 @@
|
||||
var/should_give_codewords = TRUE
|
||||
var/should_equip = TRUE
|
||||
var/traitor_kind = TRAITOR_HUMAN //Set on initial assignment
|
||||
var/datum/syndicate_contract/current_contract
|
||||
var/list/assigned_contracts = list()
|
||||
var/contract_TC_payed_out = 0
|
||||
var/contract_TC_to_redeem = 0
|
||||
var/datum/contractor_hub/contractor_hub
|
||||
hijack_speed = 0.5 //10 seconds per hijack stage by default
|
||||
|
||||
/datum/antagonist/traitor/on_gain()
|
||||
@@ -30,36 +27,6 @@
|
||||
finalize_traitor()
|
||||
..()
|
||||
|
||||
/datum/antagonist/traitor/proc/create_contracts()
|
||||
// 6 contracts
|
||||
var/list/to_generate = list(
|
||||
CONTRACT_PAYOUT_LARGE,
|
||||
CONTRACT_PAYOUT_MEDIUM,
|
||||
CONTRACT_PAYOUT_SMALL,
|
||||
CONTRACT_PAYOUT_SMALL,
|
||||
CONTRACT_PAYOUT_SMALL,
|
||||
CONTRACT_PAYOUT_SMALL
|
||||
)
|
||||
var/lowest_TC_threshold = 30 // We don't want the sum of all the payouts to be under this amount
|
||||
var/total = 0
|
||||
var/lowest_paying_sum = 0
|
||||
var/datum/syndicate_contract/lowest_paying_contract
|
||||
|
||||
to_generate = shuffle(to_generate) // Randomise order, so we don't have contracts always in payout order.
|
||||
var/list/assigned_targets = list()
|
||||
for (var/i = 1; i <= to_generate.len; i++) // Generate contracts, and find the lowest paying.
|
||||
var/datum/syndicate_contract/contract_to_add = new(owner, to_generate[i], assigned_targets)
|
||||
var/contract_payout_total = contract_to_add.contract.payout + contract_to_add.contract.payout_bonus
|
||||
assigned_targets.Add(contract_to_add.contract.target)
|
||||
if(!lowest_paying_contract || (contract_payout_total < lowest_paying_sum))
|
||||
lowest_paying_sum = contract_payout_total
|
||||
lowest_paying_contract = contract_to_add
|
||||
total += contract_payout_total
|
||||
contract_to_add.id = i
|
||||
assigned_contracts.Add(contract_to_add)
|
||||
if(total < lowest_TC_threshold) // If the threshold for TC payouts isn't reached, boost the lowest paying contract
|
||||
lowest_paying_contract.contract.payout_bonus += (lowest_TC_threshold - total)
|
||||
|
||||
/datum/antagonist/traitor/apply_innate_effects()
|
||||
if(owner.assigned_role == "Clown")
|
||||
var/mob/living/carbon/human/traitor_mob = owner.current
|
||||
@@ -447,19 +414,8 @@
|
||||
|
||||
var/special_role_text = lowertext(name)
|
||||
|
||||
var/completed_contracts = 0
|
||||
var/tc_total = contract_TC_payed_out + contract_TC_to_redeem
|
||||
for (var/datum/syndicate_contract/contract in assigned_contracts)
|
||||
if (contract.status == CONTRACT_STATUS_COMPLETE)
|
||||
completed_contracts++
|
||||
|
||||
|
||||
if (completed_contracts > 0)
|
||||
var/pluralCheck = "contract"
|
||||
if (completed_contracts > 1)
|
||||
pluralCheck = "contracts"
|
||||
result += "<br>Completed <span class='greentext'>[completed_contracts]</span> [pluralCheck] for a total of \
|
||||
<span class='greentext'>[tc_total] TC</span>!<br>"
|
||||
if(contractor_hub)
|
||||
result += contractor_round_end()
|
||||
|
||||
if(traitorwin)
|
||||
result += "<span class='greentext'>The [special_role_text] was successful!</span>"
|
||||
@@ -469,12 +425,44 @@
|
||||
|
||||
return result.Join("<br>")
|
||||
|
||||
/// Proc detailing contract kit buys/completed contracts/additional info
|
||||
/datum/antagonist/traitor/proc/contractor_round_end()
|
||||
var result = ""
|
||||
var total_spent_rep = 0
|
||||
|
||||
var/completed_contracts = 0
|
||||
var/tc_total = contractor_hub.contract_TC_payed_out + contractor_hub.contract_TC_to_redeem
|
||||
for(var/datum/syndicate_contract/contract in contractor_hub.assigned_contracts)
|
||||
if(contract.status == CONTRACT_STATUS_COMPLETE)
|
||||
completed_contracts++
|
||||
|
||||
var/contractor_item_icons = "<br>" // Icons of purchases
|
||||
var/contractor_support_unit = "" // Set if they had a support unit - and shows appended to their contracts completed
|
||||
|
||||
for(var/datum/contractor_item/contractor_purchase in contractor_hub.purchased_items) // Get all the icons/total cost for all our items bought
|
||||
contractor_item_icons += "<span class='tooltip_container'>\[ <i class=\"fas [contractor_purchase.item_icon]\"></i><span class='tooltip_hover'><b>[contractor_purchase.name] - [contractor_purchase.cost] Rep</b><br><br>[contractor_purchase.desc]</span> \]</span>"
|
||||
total_spent_rep += contractor_purchase.cost
|
||||
if(istype(contractor_purchase, /datum/contractor_item/contractor_partner)) // Special case for reinforcements, we want to show their ckey and name on round end.
|
||||
var/datum/contractor_item/contractor_partner/partner = contractor_purchase
|
||||
contractor_support_unit += "<br><b>[partner.partner_mind.key]</b> played <b>[partner.partner_mind.current.name]</b>, their contractor support unit."
|
||||
if (contractor_hub.purchased_items.len)
|
||||
result += contractor_item_icons
|
||||
result += "<br>(used [total_spent_rep] Rep)"
|
||||
result += "<br>"
|
||||
if(completed_contracts > 0)
|
||||
var/pluralCheck = "contract"
|
||||
if(completed_contracts > 1)
|
||||
pluralCheck = "contracts"
|
||||
result += "Completed <span class='greentext'>[completed_contracts]</span> [pluralCheck] for a total of \
|
||||
<span class='greentext'>[tc_total] TC</span>!<br>"
|
||||
return result
|
||||
|
||||
/datum/antagonist/traitor/roundend_report_footer()
|
||||
var/phrases = jointext(GLOB.syndicate_code_phrase, ", ")
|
||||
var/responses = jointext(GLOB.syndicate_code_response, ", ")
|
||||
|
||||
var message = "<br><b>The code phrases were:</b> <span class='bluetext'>[phrases]</span><br>\
|
||||
<b>The code responses were:</b> <span class='redtext'>[responses]</span><br>"
|
||||
<b>The code responses were:</b> <span class='redtext'>[responses]</span><br>"
|
||||
|
||||
return message
|
||||
|
||||
|
||||
@@ -76,21 +76,21 @@
|
||||
item_state = "syndicate-black"
|
||||
|
||||
//Black-red syndicate contract varient
|
||||
/obj/item/clothing/head/helmet/space/syndicate/contract/black/red
|
||||
/obj/item/clothing/head/helmet/space/syndicate/contract
|
||||
name = "contractor helmet"
|
||||
desc = "A specialised black and red helmet that's quicker, and more compact that its counterpart. Can be ultra-compressed into even the tightest of spaces."
|
||||
desc = "A specialised black and gold helmet that's more compact than its standard Syndicate counterpart. Can be ultra-compressed into even the tightest of spaces."
|
||||
slowdown = 0.55
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon_state = "syndicate-helm-black-red"
|
||||
item_state = "syndicate-helm-black-red"
|
||||
icon_state = "syndicate-contract-helm"
|
||||
item_state = "syndicate-contract-helm"
|
||||
|
||||
/obj/item/clothing/suit/space/syndicate/contract/black/red
|
||||
/obj/item/clothing/suit/space/syndicate/contract
|
||||
name = "contractor space suit"
|
||||
desc = "A specialised black and red space suit that's quicker, and more compact that its counterpart. Can be ultra-compressed into even the tightest of spaces."
|
||||
desc = "A specialised black and gold space suit that's quicker, and more compact than its standard Syndicate counterpart. Can be ultra-compressed into even the tightest of spaces."
|
||||
slowdown = 0.55
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon_state = "syndicate-black-red"
|
||||
item_state = "syndicate-black-red"
|
||||
icon_state = "syndicate-contract"
|
||||
item_state = "syndicate-contract"
|
||||
|
||||
//Black-green syndicate space suit
|
||||
/obj/item/clothing/head/helmet/space/syndicate/black/green
|
||||
|
||||
@@ -13,7 +13,4 @@
|
||||
|
||||
|
||||
/datum/round_event/grid_check/start()
|
||||
for(var/P in GLOB.apcs_list)
|
||||
var/obj/machinery/power/apc/C = P
|
||||
if(C.cell && is_station_level(C.z))
|
||||
C.energy_fail(rand(30,120))
|
||||
power_fail(30, 120)
|
||||
@@ -12,24 +12,26 @@
|
||||
slot_flags = ITEM_SLOT_ID | ITEM_SLOT_BELT
|
||||
has_light = TRUE //LED flashlight!
|
||||
comp_light_luminosity = 2.3 //Same as the PDA
|
||||
var/has_variants = TRUE
|
||||
var/finish_color = null
|
||||
|
||||
/obj/item/modular_computer/tablet/update_icon()
|
||||
..()
|
||||
if(!finish_color)
|
||||
finish_color = pick("red","blue","brown","green","black")
|
||||
icon_state = "tablet-[finish_color]"
|
||||
icon_state_unpowered = "tablet-[finish_color]"
|
||||
icon_state_powered = "tablet-[finish_color]"
|
||||
if(has_variants)
|
||||
if(!finish_color)
|
||||
finish_color = pick("red","blue","brown","green","black")
|
||||
icon_state = "tablet-[finish_color]"
|
||||
icon_state_unpowered = "tablet-[finish_color]"
|
||||
icon_state_powered = "tablet-[finish_color]"
|
||||
|
||||
/obj/item/modular_computer/tablet/syndicate_contract_uplink
|
||||
name = "tablet computer"
|
||||
icon = 'icons/obj/modular_tablet.dmi'
|
||||
name = "contractor tablet"
|
||||
icon = 'icons/obj/contractor_tablet.dmi'
|
||||
icon_state = "tablet-red"
|
||||
icon_state_unpowered = "tablet"
|
||||
icon_state_powered = "tablet"
|
||||
icon_state_menu = "hostile"
|
||||
icon_state_menu = "assign"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = ITEM_SLOT_ID | ITEM_SLOT_BELT
|
||||
comp_light_luminosity = 4.3
|
||||
finish_color = "red"
|
||||
comp_light_luminosity = 6.3
|
||||
has_variants = FALSE
|
||||
@@ -28,10 +28,14 @@
|
||||
install_component(new /obj/item/computer_hardware/network_card)
|
||||
install_component(new /obj/item/computer_hardware/printer/mini)
|
||||
|
||||
/obj/item/modular_computer/tablet/syndicate_contract_uplink/preset/uplink/Initialize() // Given by the syndicate as part of the contract uplink bundle
|
||||
/obj/item/modular_computer/tablet/syndicate_contract_uplink/preset/uplink/Initialize() // Given by the syndicate as part of the contract uplink bundle - loads in the Contractor Uplink.
|
||||
. = ..()
|
||||
var/obj/item/computer_hardware/hard_drive/small/syndicate/hard_drive = new
|
||||
hard_drive.store_file(new /datum/computer_file/program/contract_uplink)
|
||||
var/datum/computer_file/program/contract_uplink/uplink = new
|
||||
active_program = uplink
|
||||
uplink.program_state = PROGRAM_STATE_ACTIVE
|
||||
uplink.computer = src
|
||||
hard_drive.store_file(uplink)
|
||||
install_component(new /obj/item/computer_hardware/processor_unit/small)
|
||||
install_component(new /obj/item/computer_hardware/battery(src, /obj/item/stock_parts/cell/computer))
|
||||
install_component(hard_drive)
|
||||
|
||||
Reference in New Issue
Block a user