From c36a0845aff6945816f85020979a3cd82dbcf0c9 Mon Sep 17 00:00:00 2001 From: ktccd Date: Sat, 1 Apr 2017 02:48:16 +0200 Subject: [PATCH 1/4] Traitors/nukeops can now buy borers This adds a subtype of borers to the traitor uplink. This version cannot reproduce and is loyal to the owner who released it. The borer's objectives are tied to the objectives of their owner and will greentext together with them. --- code/game/gamemodes/antag_spawner.dm | 52 +++++++++++++++++++ code/game/gamemodes/miniantags/borer/borer.dm | 13 +++-- .../gamemodes/miniantags/borer/syndi_borer.dm | 19 +++++++ code/game/gamemodes/objective.dm | 12 +++++ code/modules/uplink/uplink_item.dm | 9 ++++ tgstation.dme | 1 + 6 files changed, 102 insertions(+), 4 deletions(-) create mode 100644 code/game/gamemodes/miniantags/borer/syndi_borer.dm diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm index d1a357e5a7..94ab50557c 100644 --- a/code/game/gamemodes/antag_spawner.dm +++ b/code/game/gamemodes/antag_spawner.dm @@ -292,3 +292,55 @@ veil_msg = "You sense an adorable presence lurking just beyond the veil..." objective_verb = "Hug and Tickle" demon_type = /mob/living/simple_animal/slaughter/laughter + + +////////////Syndicate Cortical Borer +obj/item/weapon/antag_spawner/syndi_borer + name = "syndicate brain-slug container" + desc = "Releases a modified cortical borer to assist the user." + icon_state = "locator" + +obj/item/weapon/antag_spawner/syndi_borer/spawn_antag(client/C, turf/T, mob/owner) + var/mob/living/simple_animal/borer/syndi_borer/B = new /mob/living/simple_animal/borer/syndi_borer(T) + + B.key = C.key + if (owner) + B.owner = owner + B.faction = B.faction | owner.faction.Copy() + + B.mind.assigned_role = B.name + B.mind.special_role = B.name + ticker.mode.traitors += B.mind + var/datum/objective/syndi_borer/new_objective + new_objective = new /datum/objective/syndi_borer + new_objective.owner = B.mind + new_objective.target = owner.mind + B.mind.objectives += new_objective + + to_chat(B, "You are awake at last! Seek out whoever released you and aid them as best you can!") + if(new_objective) + to_chat(B, "Objective #[1]: [new_objective.explanation_text]") + +/obj/item/weapon/antag_spawner/syndi_borer/proc/check_usability(mob/user) + if(used) + to_chat(user, "[src] appears to be empty!") + return 0 + return 1 + +/obj/item/weapon/antag_spawner/syndi_borer/attack_self(mob/user) + if(!(check_usability(user))) + return + + var/list/borer_candidates = pollCandidatesForMob("Do you want to play as a syndicate cortical borer?", ROLE_BORER, null, ROLE_BORER, 150, src) + if(borer_candidates.len) + if(!(check_usability(user))) + return + used = 1 + var/mob/dead/observer/theghost = pick(borer_candidates) + spawn_antag(theghost.client, get_turf(src), user) + var/datum/effect_system/spark_spread/S = new /datum/effect_system/spark_spread + S.set_up(4, 1, src) + S.start() + qdel(src) + else + to_chat(user, "Unable to connect to release specimen. Please wait and try again later or use the container on your uplink to get your points refunded.") diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index a4dda8145f..a44160619f 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -110,10 +110,14 @@ var/total_borer_hosts_needed = 10 var/datum/action/innate/borer/punish_victim/punish_victim_action = new var/datum/action/innate/borer/jumpstart_host/jumpstart_host_action = new + var/is_team_borer = TRUE + var/borer_alert = "Become a cortical borer? (Warning, You can no longer be cloned!)" + /mob/living/simple_animal/borer/Initialize(mapload, gen=1) ..() generation = gen - notify_ghosts("A cortical borer has been created in [get_area(src)]!", enter_link = "(Click to enter)", source = src, action = NOTIFY_ATTACK) + if(is_team_borer) + notify_ghosts("A cortical borer has been created in [get_area(src)]!", enter_link = "(Click to enter)", source = src, action = NOTIFY_ATTACK) real_name = "Cortical Borer [rand(1000,9999)]" truename = "[borer_names[min(generation, borer_names.len)]] [rand(1000,9999)]" borer_chems += /datum/borer_chem/epinephrine @@ -128,8 +132,9 @@ var/total_borer_hosts_needed = 10 //borer_chems += /datum/borer_chem/creagent borer_chems += /datum/borer_chem/ethanol borer_chems += /datum/borer_chem/rezadone - - borers += src + + if(is_team_borer) + borers += src GrantBorerActions() @@ -146,7 +151,7 @@ var/total_borer_hosts_needed = 10 return if(stat != CONSCIOUS) return - var/be_borer = alert("Become a cortical borer? (Warning, You can no longer be cloned!)",,"Yes","No") + var/be_borer = alert(borer_alert,,"Yes","No") if(be_borer == "No" || !src || QDELETED(src)) return if(key) diff --git a/code/game/gamemodes/miniantags/borer/syndi_borer.dm b/code/game/gamemodes/miniantags/borer/syndi_borer.dm new file mode 100644 index 0000000000..0678970814 --- /dev/null +++ b/code/game/gamemodes/miniantags/borer/syndi_borer.dm @@ -0,0 +1,19 @@ +/mob/living/simple_animal/borer/syndi_borer + var/mob/owner = null + borer_alert = "Serve as a syndicate cortical borer? (Warning, You can no longer be cloned!)" + +/mob/living/simple_animal/borer/syndi_borer/Initialize(mapload, gen=1) + ..() + real_name = "Syndicate Borer [rand(1000,9999)]" + truename = "[borer_names[min(generation, borer_names.len)]] [rand(1000,9999)]" + + GrantBorerActions() + make_larvae_action.Remove(src) + +/mob/living/simple_animal/borer/syndi_borer/GrantControlActions() + talk_to_brain_action.Grant(victim) + give_back_control_action.Grant(victim) + +/mob/living/simple_animal/borer/syndi_borer/RemoveControlActions() + talk_to_brain_action.Remove(victim) + give_back_control_action.Remove(victim) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index e4b44fa4aa..43244f8d32 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -902,4 +902,16 @@ var/global/list/possible_items_special = list() command_staff_only = TRUE +//Syndicate borer objective, relies on their owner getting a greentext, no matter if they themselves did anything really. +/datum/objective/syndi_borer + explanation_text = "You are a modified syndicate cortical borer, assist your owner with their objectives." + martyr_compatible = 1 +/datum/objective/syndi_borer/check_completion() + if(target) + for(var/datum/objective/objective in target.objectives) + if(!objective.check_completion()) + return 0 + return 1 + else + return 1 //Not sure if we should greentext if we somehow don't even have an owner. diff --git a/code/modules/uplink/uplink_item.dm b/code/modules/uplink/uplink_item.dm index 67fc9ea1b5..9ab5d9bc3b 100644 --- a/code/modules/uplink/uplink_item.dm +++ b/code/modules/uplink/uplink_item.dm @@ -822,6 +822,15 @@ var/list/uplink_items = list() // Global list so we only initialize this once. cost = 1 surplus = 1 +/datum/uplink_item/stealthy_tools/syndi_borer + name = "Syndicate Brain Slug" + desc = "A small cortical borer, modified to be completely loyal to the owner. \ + Genetically infertile, these brain slugs can assist medically in a support role, or take direct action \ + to assist their host." + item = /obj/item/weapon/antag_spawner/syndi_borer + refundable = TRUE + cost = 5 + //Space Suits and Hardsuits /datum/uplink_item/suits category = "Space Suits and Hardsuits" diff --git a/tgstation.dme b/tgstation.dme index 46d56db0e0..2494eb4489 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -489,6 +489,7 @@ #include "code\game\gamemodes\miniantags\borer\borer_event.dm" #include "code\game\gamemodes\miniantags\borer\borer_html.dm" #include "code\game\gamemodes\miniantags\borer\borer_topic.dm" +#include "code\game\gamemodes\miniantags\borer\syndi_borer.dm" #include "code\game\gamemodes\miniantags\bot_swarm\swarmer.dm" #include "code\game\gamemodes\miniantags\bot_swarm\swarmer_event.dm" #include "code\game\gamemodes\miniantags\monkey\monkey.dm" From 03080424738f3eeb261fa91886a89801accc903c Mon Sep 17 00:00:00 2001 From: ktccd Date: Sat, 1 Apr 2017 02:49:59 +0200 Subject: [PATCH 2/4] More borer work Couple of changes. Hopefully the objective is clearly defined now, and it is separate from the team borers you normally have. --- code/game/gamemodes/antag_spawner.dm | 2 ++ code/game/gamemodes/miniantags/borer/syndi_borer.dm | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm index 94ab50557c..2b3fc33bd9 100644 --- a/code/game/gamemodes/antag_spawner.dm +++ b/code/game/gamemodes/antag_spawner.dm @@ -298,6 +298,7 @@ obj/item/weapon/antag_spawner/syndi_borer name = "syndicate brain-slug container" desc = "Releases a modified cortical borer to assist the user." + icon = 'icons/obj/device.dmi' //Temporary? Doesn't really look like a container for xenofauna... but IDK what else could work. icon_state = "locator" obj/item/weapon/antag_spawner/syndi_borer/spawn_antag(client/C, turf/T, mob/owner) @@ -315,6 +316,7 @@ obj/item/weapon/antag_spawner/syndi_borer/spawn_antag(client/C, turf/T, mob/owne new_objective = new /datum/objective/syndi_borer new_objective.owner = B.mind new_objective.target = owner.mind + new_objective.explanation_text = "You are a modified cortical borer. You obey [owner.real_name] and must assist them in completing their objectives." B.mind.objectives += new_objective to_chat(B, "You are awake at last! Seek out whoever released you and aid them as best you can!") diff --git a/code/game/gamemodes/miniantags/borer/syndi_borer.dm b/code/game/gamemodes/miniantags/borer/syndi_borer.dm index 0678970814..dc095c084c 100644 --- a/code/game/gamemodes/miniantags/borer/syndi_borer.dm +++ b/code/game/gamemodes/miniantags/borer/syndi_borer.dm @@ -1,5 +1,6 @@ /mob/living/simple_animal/borer/syndi_borer var/mob/owner = null + is_team_borer = FALSE borer_alert = "Serve as a syndicate cortical borer? (Warning, You can no longer be cloned!)" /mob/living/simple_animal/borer/syndi_borer/Initialize(mapload, gen=1) @@ -16,4 +17,4 @@ /mob/living/simple_animal/borer/syndi_borer/RemoveControlActions() talk_to_brain_action.Remove(victim) - give_back_control_action.Remove(victim) + give_back_control_action.Remove(victim) \ No newline at end of file From 37d46e87e6d9746e82f059a810a36cd8df985204 Mon Sep 17 00:00:00 2001 From: ktccd Date: Sat, 1 Apr 2017 03:28:01 +0200 Subject: [PATCH 3/4] Fixed verb problem Now the syndi_borer shouldn't be able to use verbs to reproduce (Previous PR only removed the action button on the HUD). --- code/game/gamemodes/miniantags/borer/borer.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index a44160619f..26ec704c7a 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -701,7 +701,8 @@ var/total_borer_hosts_needed = 10 controlling = TRUE victim.verbs += /mob/living/carbon/proc/release_control - victim.verbs += /mob/living/carbon/proc/spawn_larvae + if(is_team_borer) + victim.verbs += /mob/living/carbon/proc/spawn_larvae victim.verbs -= /mob/living/proc/borer_comm victim.verbs += /mob/living/proc/trapped_mind_comm GrantControlActions() @@ -826,7 +827,8 @@ var/total_borer_hosts_needed = 10 controlling = FALSE victim.verbs -= /mob/living/carbon/proc/release_control - victim.verbs -= /mob/living/carbon/proc/spawn_larvae + if(is_team_borer) + victim.verbs -= /mob/living/carbon/proc/spawn_larvae victim.verbs += /mob/living/proc/borer_comm victim.verbs -= /mob/living/proc/trapped_mind_comm RemoveControlActions() From d471824fba07bd6167f0942fd35687449664d1f6 Mon Sep 17 00:00:00 2001 From: ktccd Date: Sat, 1 Apr 2017 15:31:14 +0200 Subject: [PATCH 4/4] Implemented feedback I'll stick with disabling it entirely on nuke ops, until I see a bit how well this item performs. Possible solutions: Make a variant for nuke ops that has a different cost or just leaving it disabled for them. --- code/modules/uplink/uplink_item.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/uplink/uplink_item.dm b/code/modules/uplink/uplink_item.dm index 9ab5d9bc3b..ae884e6362 100644 --- a/code/modules/uplink/uplink_item.dm +++ b/code/modules/uplink/uplink_item.dm @@ -829,7 +829,9 @@ var/list/uplink_items = list() // Global list so we only initialize this once. to assist their host." item = /obj/item/weapon/antag_spawner/syndi_borer refundable = TRUE - cost = 5 + cost = 10 + surplus = 20 //Let's not have this be too common + exclude_modes = list(/datum/game_mode/nuclear) //Space Suits and Hardsuits /datum/uplink_item/suits