Skip to content

Commit

Permalink
and it works
Browse files Browse the repository at this point in the history
  • Loading branch information
RikuTheKiller committed Sep 14, 2024
1 parent 4587399 commit 885b7b7
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 19 deletions.
4 changes: 2 additions & 2 deletions config/monkestation/antag-tokens.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
low = ["traitor", "florida_man", "paradox_clone"]
medium = ["heretic", "bloodsucker"]
low = ["traitor", "florida_man", "paradox_clone", "cortical_borer"]
medium = ["heretic", "bloodsucker", "cortical_borer/hivemind"]
high = ["cult", "rev/head", "wizard", "clock_cultist", "ninja"]
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
count_against_dynamic_roll_chance = FALSE // there are thousands of them, we do not need them to be the only antagonist
prevent_roundtype_conversion = FALSE
show_to_ghosts = TRUE

/// Our linked borer, used for the antagonist panel TGUI
var/mob/living/basic/cortical_borer/cortical_owner

/// Borer mob type, used for antag token spawns.
var/borer_mob_type = /mob/living/basic/cortical_borer/neutered

/datum/antagonist/cortical_borer/antag_token(datum/mind/hosts_mind, mob/spender)
var/list/vents = list()
if(isliving(spender) && hosts_mind)
hosts_mind.current.unequip_everything()
new /obj/effect/holy(hosts_mind.current.loc)
QDEL_IN(hosts_mind.current, 20)
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/components/unary/vent_pump))
if(QDELETED(temp_vent))
continue
Expand All @@ -29,14 +29,20 @@
vents += temp_vent

if(!length(vents))
message_admins("Spawning in as a borer failed!")
message_admins(span_adminnotice("[spender] ([ckey(spender.key)]) tried spawning in as a borer, but no suitable vents were found!"))
return MAP_ERROR

if(isliving(spender) && hosts_mind)
hosts_mind.current.unequip_everything()
new /obj/effect/holy(hosts_mind.current.loc)
QDEL_IN(hosts_mind.current, 1 SECOND)

var/mob/dead/observer/new_borer = spender
var/turf/vent_turf = get_turf(pick(vents))
var/mob/living/basic/cortical_borer/spawned_cb = new(vent_turf)
var/vent = pick(vents)
var/mob/living/basic/cortical_borer/spawned_cb = new borer_mob_type(get_turf(vent))
spawned_cb.move_into_vent(vent)
spawned_cb.ckey = new_borer.ckey
spawned_cb.mind.add_antag_datum(/datum/antagonist/cortical_borer/hivemind)
spawned_cb.mind.add_antag_datum(type)
notify_ghosts(
"Someone has become a borer due to spending an antag token ([spawned_cb])!",
source = spawned_cb,
Expand All @@ -56,6 +62,8 @@

/datum/antagonist/cortical_borer/hivemind
roundend_category = "cortical borers"
borer_mob_type = /mob/living/basic/cortical_borer

/// The team of borers
var/datum/team/cortical_borers/borers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@
for(var/repeating_code in 1 to choosing_number)
var/mob/dead/observer/new_borer = pick(candidates)
candidates -= new_borer
var/turf/vent_turf = get_turf(pick(vents))
var/mob/living/basic/cortical_borer/spawned_cb = new /mob/living/basic/cortical_borer(vent_turf)
var/vent = pick(vents)
var/mob/living/basic/cortical_borer/spawned_cb = new /mob/living/basic/cortical_borer(get_turf(vent))
spawned_cb.move_into_vent(vent)
spawned_cb.ckey = new_borer.ckey
spawned_cb.mind.add_antag_datum(/datum/antagonist/cortical_borer/hivemind)
announce_to_ghosts(spawned_cb)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@
action = NOTIFY_ORBIT,
header = "Someone just got a new friend!"
)
message_admins("[ADMIN_LOOKUPFLW(new_mob)] has been made into a borer via a traitor item used by [user]")
log_game("[key_name(new_mob)] was spawned as a borer by [key_name(user)]")
message_admins("[ADMIN_LOOKUPFLW(new_mob)] has been made into a borer via a traitor item used by [user].")
log_game("[key_name(new_mob)] was spawned as a borer by [key_name(user)].")
visible_message("A borer wriggles out of the [src]!")

var/obj/item/cortical_cage/empty_cage = new(drop_location())
Expand Down
8 changes: 5 additions & 3 deletions monkestation/code/modules/client/verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,18 @@ GLOBAL_LIST_INIT(antag_token_config, load_antag_token_config())
/datum/antagonist/rev/head,
/datum/antagonist/wizard,
/datum/antagonist/clock_cultist,
/datum/antagonist/ninja
/datum/antagonist/ninja,
)),
MEDIUM_THREAT = init_antag_list(list(
/datum/antagonist/heretic,
/datum/antagonist/bloodsucker
/datum/antagonist/bloodsucker,
/datum/antagonist/cortical_borer/hivemind,
)),
LOW_THREAT = init_antag_list(list(
/datum/antagonist/florida_man,
/datum/antagonist/traitor,
/datum/antagonist/paradox_clone
/datum/antagonist/paradox_clone,
/datum/antagonist/cortical_borer,
))
)
var/static/list/toml_keys = list(
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/AntagInfoBorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const MainPage = () => {
<Stack vertical>
<Stack.Item textColor="red" fontSize="20px">
You are a Cortical Borer, a creature that crawls into peoples
ear&#39;s to then settle on the brain
ears to then settle in the brain.
</Stack.Item>
<Stack.Item>
<ObjectivePrintout />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const CorticalBorer: Antagonist = {
multiline`
You are a slug that crawls into peoples ears and
then manipulates them in various ways
to make sure your species survives and thrives
to make sure your species survives and thrives.
`,
],
category: Category.Midround,
Expand Down

0 comments on commit 885b7b7

Please sign in to comment.