From 6ecb511a24c0f1434fd2218217ecf99bbba3d109 Mon Sep 17 00:00:00 2001 From: ChuckTheSheep Date: Sun, 23 Feb 2014 23:43:45 -0500 Subject: [PATCH] TC use count appears on round end --- code/datums/uplink_item.dm | 1 + code/game/gamemodes/traitor/traitor.dm | 11 +++++++++-- code/game/objects/items/devices/uplinks.dm | 3 +++ .../objects/items/weapons/implants/implantuplink.dm | 1 + 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 3ccc010cdf1..8cf4afd700d 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -51,6 +51,7 @@ var/list/uplink_items = list() /datum/uplink_item/proc/spawn_item(var/turf/loc, var/obj/item/device/uplink/U) if(item) U.uses -= max(cost, 0) + U.used_TC += cost feedback_add_details("traitor_uplink_items_bought", "[item]") return new item(loc) diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 8eabd6a71e3..dace956719b 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -211,11 +211,16 @@ else special_role_text = "antagonist" + var/TC_uses = 0 + for(var/obj/item/device/uplink/hidden/H) + if(H.uplink_owner && H.uplink_owner==traitor.name) + TC_uses += H.used_TC + if(traitorwin) - text += "
The [special_role_text] was successful!" + text += "
The [special_role_text] was successful![TC_uses>0 ? " (used [TC_uses] TC)" : ""]" feedback_add_details("traitor_success","SUCCESS") else - text += "
The [special_role_text] has failed!" + text += "
The [special_role_text] has failed![TC_uses>0 ? " (used [TC_uses] TC)" : ""]" feedback_add_details("traitor_success","FAIL") text += "
" @@ -257,6 +262,7 @@ var/obj/item/device/uplink/hidden/T = new(R) target_radio.hidden_uplink = T + T.uplink_owner = "[traitor_mob]" target_radio.traitor_frequency = freq traitor_mob << "The Syndicate have cunningly disguised a Syndicate Uplink as your [R.name] [loc]. Simply dial the frequency [format_frequency(freq)] to unlock its hidden features." traitor_mob.mind.store_memory("Radio Freq: [format_frequency(freq)] ([R.name] [loc]).") @@ -266,6 +272,7 @@ var/obj/item/device/uplink/hidden/T = new(R) R.hidden_uplink = T + T.uplink_owner = "[traitor_mob]" var/obj/item/device/pda/P = R P.lock_code = pda_pass diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm index c929a933a70..56e53be8bc7 100644 --- a/code/game/objects/items/devices/uplinks.dm +++ b/code/game/objects/items/devices/uplinks.dm @@ -14,6 +14,9 @@ A list of items and costs is stored under the datum of every game mode, alongsid var/show_description = null var/active = 0 + var/uplink_owner = null//text-only unless + var/used_TC = 0 + /obj/item/device/uplink/New() ..() welcome = ticker.mode.uplink_welcome diff --git a/code/game/objects/items/weapons/implants/implantuplink.dm b/code/game/objects/items/weapons/implants/implantuplink.dm index a7fa3c643f0..325e53cce16 100644 --- a/code/game/objects/items/weapons/implants/implantuplink.dm +++ b/code/game/objects/items/weapons/implants/implantuplink.dm @@ -14,6 +14,7 @@ activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink") source.mind.store_memory("Uplink implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0) source << "The implanted uplink implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate." + hidden_uplink.uplink_owner="[source]" return 1