From e25dbf0f27722002c9502f64f36ceb16738b83f7 Mon Sep 17 00:00:00 2001 From: Matt Atlas Date: Sun, 5 Jan 2020 10:39:42 +0100 Subject: [PATCH] Fixes borers and antag spawning. (#7917) Fixed bughunt for real. Bughunt now tries to spawn four mercenaries and two borers. Added some more intro text to Renegade. --- code/game/antagonist/alien/borer.dm | 55 ++++++++++++------- code/game/antagonist/antagonist_add.dm | 2 +- code/game/antagonist/station/renegade.dm | 2 +- code/game/gamemodes/mixed/bughunt.dm | 4 +- code/modules/mob/living/carbon/human/death.dm | 4 +- code/modules/mob/living/carbon/human/human.dm | 2 +- .../mob/living/simple_animal/borer/borer.dm | 32 ++--------- .../simple_animal/borer/borer_powers.dm | 36 ++++-------- code/modules/organs/internal/brain.dm | 2 +- code/modules/organs/misc.dm | 4 +- html/changelogs/mattatlas-borerfixesagain.yml | 44 +++++++++++++++ maps/aurora/aurora-3_sublevel.dmm | 6 ++ maps/aurora/aurora-4_mainlevel.dmm | 25 ++++++++- 13 files changed, 133 insertions(+), 85 deletions(-) create mode 100644 html/changelogs/mattatlas-borerfixesagain.yml diff --git a/code/game/antagonist/alien/borer.dm b/code/game/antagonist/alien/borer.dm index d81e9b89b2f..acd3f0d32c5 100644 --- a/code/game/antagonist/alien/borer.dm +++ b/code/game/antagonist/alien/borer.dm @@ -10,12 +10,16 @@ var/datum/antagonist/xenos/borer/borers antag_indicator = "brainworm" antaghud_indicator = "hudborer" + flags = ANTAG_OVERRIDE_MOB | ANTAG_OVERRIDE_JOB + + landmark_id = "borerstart" + faction_role_text = "Borer Thrall" faction_descriptor = "Unity" faction_welcome = "You are now a thrall to a cortical borer. Please listen to what they have to say; they're in your head." - initial_spawn_req = 3 - initial_spawn_target = 5 + initial_spawn_req = 2 + initial_spawn_target = 3 /datum/antagonist/xenos/borer/New() ..(TRUE) @@ -28,24 +32,33 @@ var/datum/antagonist/xenos/borer/borers player.objectives += new /datum/objective/borer_reproduce() player.objectives += new /datum/objective/escape() -/datum/antagonist/xenos/borer/place_mob(var/mob/living/mob) - var/mob/living/simple_animal/borer/borer = mob - if(istype(borer)) - var/mob/living/carbon/human/host +/datum/antagonist/xenos/borer/place_mob(var/mob/living/M) + if(istype(M, /mob/living/simple_animal/borer)) + var/mob/living/simple_animal/borer/borer = M + + var/list/hosts = list() for(var/mob/living/carbon/human/H in mob_list) - if(H.stat != DEAD && !H.has_brain_worms()) - var/obj/item/organ/external/head = H.get_organ(BP_HEAD) - if(head && !(head.status & ORGAN_ROBOT)) - host = H - break - if(istype(host)) - var/obj/item/organ/external/head = host.get_organ(BP_HEAD) - borer.host = host + if(!H.mind) + continue + if(H.mind?.special_role) + continue + if(H.stat == DEAD) + continue + if(H.has_brain_worms()) + continue + hosts += H + + if(length(hosts)) + var/mob/living/carbon/human/chosen_host = pick(hosts) + + borer.host = chosen_host + borer.host.status_flags |= PASSEMOTES + borer.forceMove(chosen_host) + + if(borer.host.mind) + borers.add_antagonist_mind(borer.host.mind, 1, borers.faction_role_text, borers.faction_welcome) + + var/obj/item/organ/external/head = borer.host.get_organ(BP_HEAD) head.implants += borer - borer.forceMove(head) - if(!borer.host_brain) - borer.host_brain = new(borer) - borer.host_brain.name = host.name - borer.host_brain.real_name = host.real_name - return - ..() // Place them at a vent if they can't get a host. + else + ..() \ No newline at end of file diff --git a/code/game/antagonist/antagonist_add.dm b/code/game/antagonist/antagonist_add.dm index 3d93786f471..c4dd18d57d1 100644 --- a/code/game/antagonist/antagonist_add.dm +++ b/code/game/antagonist/antagonist_add.dm @@ -33,7 +33,7 @@ if(faction_verb && player.current) player.current.verbs |= faction_verb - player.current?.client.verbs += /client/proc/aooc + player.current?.verbs += /client/proc/aooc to_chat(player.current, "Once you decide on a goal to pursue, you can optionally display it to everyone at the end of the shift with the Set Ambition verb, located in the IC tab. You can change this at any time, and it otherwise has no bearing on your round.") player.current.verbs += /mob/living/proc/write_ambition diff --git a/code/game/antagonist/station/renegade.dm b/code/game/antagonist/station/renegade.dm index c5dcb867112..eccf2ab5317 100644 --- a/code/game/antagonist/station/renegade.dm +++ b/code/game/antagonist/station/renegade.dm @@ -3,7 +3,7 @@ var/datum/antagonist/renegade/renegades /datum/antagonist/renegade role_text = "Renegade" role_text_plural = "Renegades" - welcome_text = "You're extremely paranoid today. Something's here to kill you, but you don't know what... Remember that you're not a full antagonist. You can prepare to murder someone and kill, but you shouldn't actively seek conflict." + welcome_text = "You're extremely paranoid today. For your entire life, you've theorized about a shadow corporation out for your blood and yours only. Something's here to kill you, but you don't know what... Remember that you're not a full antagonist. You can prepare to murder someone and kill, but you shouldn't actively seek conflict." id = MODE_RENEGADE flags = ANTAG_SUSPICIOUS | ANTAG_IMPLANT_IMMUNE | ANTAG_VOTABLE hard_cap = 5 diff --git a/code/game/gamemodes/mixed/bughunt.dm b/code/game/gamemodes/mixed/bughunt.dm index 9423923cd94..e9c606843a3 100644 --- a/code/game/gamemodes/mixed/bughunt.dm +++ b/code/game/gamemodes/mixed/bughunt.dm @@ -4,9 +4,9 @@ extended_round_description = "Mercenaries and borers spawn in this game mode." config_tag = "bughunt" required_players = 20 - required_enemies = 5 + required_enemies = 6 end_on_antag_death = FALSE antag_tags = list(MODE_BORER, MODE_MERCENARY) require_all_templates = TRUE - votable = FALSE + votable = TRUE ert_disabled = TRUE diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 0e98e89d7c6..efa647cc774 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -39,7 +39,7 @@ var/obj/item/organ/external/head = get_organ(BP_HEAD) var/mob/living/simple_animal/borer/B - if (head) + if(head) for(var/I in head.implants) if(istype(I,/mob/living/simple_animal/borer)) B = I @@ -47,7 +47,7 @@ if(!B.ckey && ckey && B.controlling) B.ckey = ckey B.controlling = 0 - if(B.host_brain.ckey) + if(B.host_brain?.ckey) ckey = B.host_brain.ckey B.host_brain.ckey = null B.host_brain.name = "host brain" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index c93dee2e635..4613e243de0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1714,7 +1714,7 @@ /mob/living/carbon/human/proc/get_traumas() . = list() var/obj/item/organ/internal/brain/B = internal_organs_by_name[BP_BRAIN] - if(istype(B, /obj/item/organ/borer)) + if(istype(B, /obj/item/organ/internal/borer)) return if(B && should_have_organ(BP_BRAIN) && !isipc(src)) . = B.traumas diff --git a/code/modules/mob/living/simple_animal/borer/borer.dm b/code/modules/mob/living/simple_animal/borer/borer.dm index 23e54d40af9..89574f8d3d1 100644 --- a/code/modules/mob/living/simple_animal/borer/borer.dm +++ b/code/modules/mob/living/simple_animal/borer/borer.dm @@ -31,7 +31,6 @@ var/truename // Name used for brainworm-speak. var/mob/living/captive_brain/host_brain // Used for swapping control of the body back and forth. var/controlling // Used in human death check. - var/docile = 0 // Sugar can stop borers from acting. var/has_reproduced var/roundstart @@ -59,32 +58,10 @@ ..() if(host) if(!stat && !host.stat) - if(host.reagents.has_reagent("sugar")) - if(!docile) - if(controlling) - to_chat(host, span("notice", "You feel the soporific flow of sugar in your host's blood, lulling you into docility.")) - else - to_chat(src, span("notice", "You feel the soporific flow of sugar in your host's blood, lulling you into docility.")) - docile = TRUE - else - if(docile) - if(controlling) - to_chat(host, span("notice", "You shake off your lethargy as the sugar leaves your host's blood.")) - else - to_chat(src, span("notice", "You shake off your lethargy as the sugar leaves your host's blood.")) - docile = FALSE - if(chemicals < 250) chemicals++ - - if(controlling) - if(docile) - to_chat(host, span("notice", "You are feeling far too docile to continue controlling your host...")) - host.release_control() - return - - if(prob(host.getBrainLoss()/20)) - host.say("*[pick(list("blink","blink_r","choke","drool","twitch","twitch_s","gasp"))]") + if(controlling && prob(host.getBrainLoss()/20)) + host.say("*[pick(list("blink","blink_r","choke","drool","twitch","twitch_s","gasp"))]") /mob/living/simple_animal/borer/Stat() ..() @@ -109,7 +86,10 @@ controlling = FALSE - host.remove_language("Cortical Link") + host.remove_language(LANGUAGE_BORER) + host.remove_language(LANGUAGE_BORER_HIVEMIND) + + to_chat(host, "You feel your nerves again as your control over your own body is restored.") host.verbs -= /mob/living/carbon/proc/release_control host.verbs -= /mob/living/carbon/proc/punish_host host.verbs -= /mob/living/carbon/proc/spawn_larvae diff --git a/code/modules/mob/living/simple_animal/borer/borer_powers.dm b/code/modules/mob/living/simple_animal/borer/borer_powers.dm index a288cf0ee16..f2794209a7d 100644 --- a/code/modules/mob/living/simple_animal/borer/borer_powers.dm +++ b/code/modules/mob/living/simple_animal/borer/borer_powers.dm @@ -9,9 +9,6 @@ if(stat) to_chat(src, span("notice", "You cannot leave your host in your current state.")) return - if(docile) - to_chat(src, span("notice", "You are feeling far too docile to do that.")) - return to_chat(src, span("notice", "You begin disconnecting from [host]'s synapses and prodding at their internal ear canal.")) @@ -140,9 +137,6 @@ if(host.stat != DEAD) to_chat(src, span("warning", "Your host is still alive.")) return - if(docile) - to_chat(src, span("warning", "You are feeling far too docile to do that.")) - return to_chat(src, span("danger", "It only takes a few moments to render the dead brain down into a nutrient-rich slurry...")) replace_brain() @@ -157,7 +151,8 @@ to_chat(src, span("warning", "You settle into the empty brainpan and begin to expand, fusing inextricably with the dead flesh of [H].")) - H.add_language("Cortical Link") + H.add_language(LANGUAGE_BORER) + H.add_language(LANGUAGE_BORER_HIVEMIND) if(host.stat == DEAD) H.verbs |= /mob/living/carbon/human/proc/jumpstart @@ -173,11 +168,11 @@ src.mind.special_role = "Borer Husk" src.mind.transfer_to(host) - var/obj/item/organ/borer/B = new(H) - H.internal_organs_by_name[BP_BRAIN] = B - H.internal_organs |= B - + var/obj/item/organ/internal/borer/B = new(H) var/obj/item/organ/external/affecting = H.get_organ(BP_HEAD) + H.internal_organs_by_name[BP_BRAIN] = B + affecting.internal_organs |= B + affecting.implants -= src var/s2h_id = src.computer_id @@ -206,16 +201,13 @@ if(stat) to_chat(src, span("notice", "You cannot secrete chemicals in your current state.")) return - if(docile) - to_chat(src, span("notice", "You are feeling far too docile to do that.")) - return if(chemicals < 20) to_chat(src, span("warning", "You don't have enough chemicals!")) return var/chem = input("Select a chemical to secrete.", "Chemicals") as null|anything in list("Inaprovaline", "Bicaridine", "Hyperzine", "Synaptizine", "Peridaxon", "Tramadol", "Oxycodone", "Fluvoxamine") - if(!chem || docile || chemicals < 20 || !host || controlling || !src || stat) //Sanity check. + if(!chem || chemicals < 20 || !host || controlling || !src || stat) //Sanity check. return to_chat(src, span("notice", "You squirt a measure of [chem] from your reservoirs into [host]'s bloodstream.")) @@ -247,7 +239,7 @@ to_chat(src, span("notice", "You cannot use that ability again so soon.")) return - var/mob/living/carbon/M = input(src,"Who do you wish to dominate?") in null|choices + var/mob/living/carbon/M = input(src, "Who do you wish to dominate?") in null|choices if(!M || !src) return @@ -275,9 +267,6 @@ if(src.stat) to_chat(src, span("notice", "You cannot do that in your current state.")) return - if(docile) - to_chat(src, span("notice", "You are feeling far too docile to do that.")) - return to_chat(src, span("warning", "You begin delicately adjusting your connection to the host brain...")) to_chat(host, span("warning", "You feel a tingling sensation at the back of your head.")) @@ -290,7 +279,8 @@ to_chat(src, span("danger", "You plunge your probosci deep into the cortex of the host brain, interfacing directly with their nervous system.")) to_chat(host, span("danger", "You feel a strange shifting sensation behind your eyes as an alien consciousness displaces yours.")) - host.add_language("Cortical Link") + host.add_language(LANGUAGE_BORER) + host.add_language(LANGUAGE_BORER_HIVEMIND) // host -> brain var/h2b_id = host.computer_id @@ -425,9 +415,6 @@ if(stat) to_chat(src, span("notice", "You cannot do that in your current state.")) return - if(docile) - to_chat(src, span("notice", "You are feeling far too docile to do that.")) - return if(chemicals < 100) to_chat(src, span("warning", "You don't have enough chemicals!")) return @@ -455,9 +442,6 @@ if(stat) to_chat(src, span("notice", "You cannot do that in your current state.")) return - if(docile) - to_chat(src, span("notice", "You are feeling far too docile to do that.")) - return if(chemicals < 75) to_chat(src, span("warning", "You don't have enough chemicals!")) return diff --git a/code/modules/organs/internal/brain.dm b/code/modules/organs/internal/brain.dm index 9940e77dd2e..5fea46c624c 100644 --- a/code/modules/organs/internal/brain.dm +++ b/code/modules/organs/internal/brain.dm @@ -166,7 +166,7 @@ /obj/item/organ/internal/brain/proc/brain_damage_callback(var/damage) //Confuse them as a somewhat uncommon aftershock. Side note: Only here so a spawn isn't used. Also, for the sake of a unique timer. to_chat(owner, "I can't remember which way is forward...") - owner.confused += damage + owner?.confused += damage /obj/item/organ/internal/brain/proc/handle_severe_brain_damage() set waitfor = FALSE diff --git a/code/modules/organs/misc.dm b/code/modules/organs/misc.dm index 4b67999ef30..83d44db70d1 100644 --- a/code/modules/organs/misc.dm +++ b/code/modules/organs/misc.dm @@ -1,5 +1,5 @@ // This borer is the worm that replaced the host's brain, not the brainworm latched onto a brain -/obj/item/organ/borer +/obj/item/organ/internal/borer name = "cortical borer" icon = 'icons/obj/objects.dmi' icon_state = "borer" @@ -8,7 +8,7 @@ parent_organ = BP_HEAD vital = TRUE -/obj/item/organ/borer/removed(var/mob/living/user) +/obj/item/organ/internal/borer/removed(var/mob/living/user) ..() var/mob/living/simple_animal/borer/B = owner.has_brain_worms() diff --git a/html/changelogs/mattatlas-borerfixesagain.yml b/html/changelogs/mattatlas-borerfixesagain.yml new file mode 100644 index 00000000000..b0e0b4fa66d --- /dev/null +++ b/html/changelogs/mattatlas-borerfixesagain.yml @@ -0,0 +1,44 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: MattAtlas, Geeves + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Fixed bughunt for real." + - tweak: "Bughunt now tries to spawn four mercenaries and two borers." + - tweak: "Added some more intro text to Renegade." + diff --git a/maps/aurora/aurora-3_sublevel.dmm b/maps/aurora/aurora-3_sublevel.dmm index 899cd762d2a..85f31174e55 100644 --- a/maps/aurora/aurora-3_sublevel.dmm +++ b/maps/aurora/aurora-3_sublevel.dmm @@ -6050,6 +6050,9 @@ pixel_y = 25; req_access = null }, +/obj/effect/landmark{ + name = "borerstart" + }, /turf/simulated/floor/tiled/white, /area/rnd/xenobiology) "amf" = ( @@ -31842,6 +31845,9 @@ icon_state = "corner_white"; dir = 10 }, +/obj/effect/landmark{ + name = "borerstart" + }, /turf/simulated/floor/tiled/white, /area/medical/quarantine) "ksI" = ( diff --git a/maps/aurora/aurora-4_mainlevel.dmm b/maps/aurora/aurora-4_mainlevel.dmm index 483f5d4e484..5e5892f6771 100644 --- a/maps/aurora/aurora-4_mainlevel.dmm +++ b/maps/aurora/aurora-4_mainlevel.dmm @@ -40901,6 +40901,9 @@ /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 4 }, +/obj/effect/landmark{ + name = "borerstart" + }, /turf/simulated/floor/tiled/white, /area/medical/main_storage) "bsl" = ( @@ -45331,6 +45334,9 @@ /obj/structure/disposalpipe/segment{ dir = 4 }, +/obj/effect/landmark{ + name = "borerstart" + }, /turf/simulated/floor/tiled, /area/bridge) "bzy" = ( @@ -59589,6 +59595,9 @@ dir = 4 }, /obj/machinery/atmospherics/pipe/simple/hidden/supply, +/obj/effect/landmark{ + name = "borerstart" + }, /turf/simulated/floor/tiled/dark, /area/maintenance/disposal) "cdf" = ( @@ -64099,6 +64108,12 @@ /obj/effect/decal/cleanable/dirt, /turf/simulated/floor/tiled, /area/maintenance/security_starboard) +"fYe" = ( +/obj/effect/landmark{ + name = "borerstart" + }, +/turf/simulated/floor/plating, +/area/storage/tech) "fZq" = ( /obj/structure/closet, /obj/random/junk, @@ -66564,6 +66579,12 @@ }, /turf/simulated/floor/plating, /area/maintenance/substation/supply) +"mIp" = ( +/obj/effect/landmark{ + name = "borerstart" + }, +/turf/simulated/floor/carpet, +/area/crew_quarters/heads/cryo) "mIZ" = ( /obj/machinery/atmospherics/pipe/manifold/hidden, /turf/simulated/floor/plating, @@ -89569,7 +89590,7 @@ aCf bav bbq bcR -bex +fYe bex bex bip @@ -117839,7 +117860,7 @@ baj bbm bcI ben -bcI +mIp bgY aRi bih