Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Cortical borers, in their full worm glory #976

Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
730f9d9
broken initial commit
Gboster-0 Jan 17, 2024
c5722c9
actually working worms
Gboster-0 Jan 17, 2024
8723058
removes the mid-round chance
Gboster-0 Jan 17, 2024
50dd5ec
readme.md changes part 1
Gboster-0 Jan 17, 2024
3281d93
readme.md changes part 2
Gboster-0 Jan 17, 2024
279c9a1
mayhaps we dont support jsx files?
Gboster-0 Jan 17, 2024
1ac9f1c
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 Jan 18, 2024
c471d73
traitor borers & code improvement
Gboster-0 Jan 20, 2024
cfc1eb5
im sorry, but we cant have eggs running around can we?
Gboster-0 Jan 20, 2024
0f68e4d
lets not
Gboster-0 Jan 25, 2024
0887ba7
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 Jan 26, 2024
67f3ea3
post-upstream fixes
Gboster-0 Jan 26, 2024
f0693d2
entering hosts now gives a text
Gboster-0 Jan 27, 2024
7c0e51f
lets learn chemicals by names, and not a path
Gboster-0 Jan 27, 2024
2d7d5f6
fixes
Gboster-0 Jan 27, 2024
03f3529
requested changes
Gboster-0 Jan 27, 2024
228e616
better blood learning
Gboster-0 Jan 27, 2024
914626e
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 Jan 27, 2024
7a14502
alphabetical lists
Gboster-0 Jan 27, 2024
1d51951
moar variables for controlling ability requirements
Gboster-0 Jan 28, 2024
c1e21d1
removes the debug borer (it isnt helpfull for debugging, may return l…
Gboster-0 Jan 28, 2024
a5842f1
midround borers maybe?
Gboster-0 Jan 28, 2024
9be0621
le midround changes
Gboster-0 Jan 28, 2024
6c4a2d0
adds some spaces, fixes a minor edge-case bug
Gboster-0 Jan 29, 2024
cb775ce
borer objectives
Gboster-0 Jan 30, 2024
96c42a5
borer hiding ability cleanup
Gboster-0 Jan 30, 2024
3a70774
some cleanup
Gboster-0 Jan 30, 2024
ad84bdc
small objective text change
Gboster-0 Jan 30, 2024
186411f
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 Jan 31, 2024
b271c26
requested changes
Gboster-0 Jan 31, 2024
5372573
some misc things
Gboster-0 Jan 31, 2024
dae9201
boop
Gboster-0 Jan 31, 2024
a5babda
whoops, forgot dat
Gboster-0 Jan 31, 2024
f7608bd
lil bit of improvements
Gboster-0 Jan 31, 2024
d85d680
better objectives
Gboster-0 Feb 1, 2024
70b4f8e
whoops
Gboster-0 Feb 1, 2024
b0ba2d0
bap
Gboster-0 Feb 1, 2024
f8a5824
taking away the neutered borers balls that i already took
Gboster-0 Feb 2, 2024
a09e004
simplifies the cage
Gboster-0 Feb 2, 2024
986a30b
sets it on a major track, didnt know how to do dat before
Gboster-0 Feb 3, 2024
c194920
TGUI with help, and borer egg fixes
Gboster-0 Feb 4, 2024
d2f4ae5
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 Feb 4, 2024
63c136c
adds borers to the antag token thingy
Gboster-0 Feb 4, 2024
a13c8e7
some re-naming, neutered round-end section, eyecandy for the borer cage
Gboster-0 Feb 5, 2024
b62016e
"i'll just quickly add in one line of logging" i said, "it surelly wo…
Gboster-0 Feb 5, 2024
7aa24a7
that isnt a proper comment
Gboster-0 Feb 6, 2024
953130b
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 Feb 8, 2024
f9817d9
Update readme.md
Gboster-0 Feb 11, 2024
a1e15c6
fixes the borer cage's animation
Gboster-0 Feb 11, 2024
f0b6ea7
bit more TGUI work
Gboster-0 Feb 11, 2024
2cb2f07
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 Feb 11, 2024
45410be
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 Feb 11, 2024
903c9ba
misc fixes
Gboster-0 Feb 11, 2024
5f76b91
the grand borer warfare DLC
Gboster-0 Feb 12, 2024
9e4a44d
switch around the chemicals we know about
Gboster-0 Feb 12, 2024
c125284
quite a few fixes
Gboster-0 Feb 12, 2024
af242e4
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 Feb 13, 2024
b05f1ac
cortical names, mainly for admin reports
Gboster-0 Feb 13, 2024
487c186
name fixes
Gboster-0 Feb 14, 2024
fc4ab8e
adds the OH_GOD_WE_FUCKED_UP() proc
Gboster-0 Feb 21, 2024
93fb284
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 Feb 21, 2024
2606b23
fixes
Gboster-0 Feb 21, 2024
ef6cd15
initial suggested changes
Gboster-0 Feb 22, 2024
32c49b3
misc fixes, an evolution var for added actions
Gboster-0 Feb 22, 2024
305291a
no more infinitelly trapped borers in dead people
Gboster-0 Feb 22, 2024
0a3f2c1
Create screenshot_antag_icons_borer.png
Gboster-0 Feb 26, 2024
07d2d72
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 Feb 27, 2024
2e14171
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 Mar 19, 2024
70cfafd
le updates to polling
Gboster-0 Mar 19, 2024
590c1ea
opendream lints got mad
Gboster-0 Mar 19, 2024
702463d
screenshot tests
Gboster-0 Mar 19, 2024
b6889d4
in this part, absolucy fixes everything by changing 1 line of code
Gboster-0 Mar 20, 2024
673b570
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 Mar 27, 2024
d84ac69
some minor stuff
Gboster-0 Mar 29, 2024
4f61d38
yoinks https://github.com/Skyrat-SS13/Skyrat-tg/pull/26693
Gboster-0 Mar 29, 2024
a62890d
fixes
Gboster-0 Mar 29, 2024
752d46b
long
Gboster-0 Mar 30, 2024
49a96df
co-existance
Gboster-0 Mar 31, 2024
359bd7d
god i hate AI's breaking everything
Gboster-0 Apr 2, 2024
060fa6f
doubles point gain
Gboster-0 Apr 5, 2024
84c628c
Merge branch 'master' into is-that-a-borer-in-your-pocket-or-are-you-…
dwasint Apr 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,11 @@
///Whether or not the squashing requires the squashed mob to be lying down
#define SQUASHED_SHOULD_BE_DOWN (1<<0)
///Whether or not to gib when the squashed mob is moved over
#define SQUASHED_SHOULD_BE_GIBBED (1<<0)
#define SQUASHED_SHOULD_BE_GIBBED (1<<1)


/// Don't squash our mob if its not located in a turf
#define SQUASHED_DONT_SQUASH_IN_CONTENTS (1<<3)
/*
* Defines for "AI emotions", allowing the AI to expression emotions
* with status displays via emotes.
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/research/anomalies.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ GLOBAL_LIST_INIT(bioscrambler_organs_blacklist, typecacheof(list (
/obj/item/organ/internal/monster_core,
/obj/item/organ/internal/vocal_cords/colossus,
/obj/item/organ/internal/zombie_infection,
/obj/item/organ/internal/empowered_borer_egg, // MONKESTATION ADDITION -- CORTICAL_BORERS
)))

/// List of body parts we can apply to people
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/role_preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_DRIFTING_CONTRACTOR = 0,
ROLE_VAMPIRICACCIDENT = 0,
ROLE_MONSTERHUNTER = 0,
ROLE_BORER = 0, // Module ID: CORTICAL_BORERS
//monkestation edit end

// Latejoin
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/span.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#define span_greenteamradio(str) ("<span class='greenteamradio'>" + str + "</span>")
#define span_greentext(str) ("<span class='greentext'>" + str + "</span>")
#define span_grey(str) ("<span class='grey'>" + str + "</span>")
#define span_header(str) ("<span class='header'>" + str + "</span>")
#define span_hear(str) ("<span class='hear'>" + str + "</span>")
#define span_hidden(str) ("<span class='hidden'>" + str + "</span>")
#define span_hierophant(str) ("<span class='hierophant'>" + str + "</span>")
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/~monkestation/actionspeed_modification.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define ACTIONSPEED_ID_BORER "borer"
25 changes: 25 additions & 0 deletions code/__DEFINES/~monkestation/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,28 @@
#define iscogscarab(checked) (istype(checked, /mob/living/basic/drone/cogscarab))
/// is something an eminence
#define iseminence(checked) (istype(checked, /mob/living/eminence))

/// is something a worm
#define iscorticalborer(A) (istype(A, /mob/living/basic/cortical_borer))

// Borer evolution defines
// The three primary paths that eventually diverge
#define BORER_EVOLUTION_SYMBIOTE "Symbiote"
#define BORER_EVOLUTION_HIVELORD "Hivelord"
#define BORER_EVOLUTION_DIVEWORM "Diveworm"
// Just general upgrades that don't take you in a specific direction
#define BORER_EVOLUTION_GENERAL "General"
#define BORER_EVOLUTION_START "Start"

// Borer effect flags

/// If the borer is in stealth mode, giving less feedback to hosts at the cost of no health/resource/point gain
#define BORER_STEALTH_MODE (1<<0)
/// If the borer is sugar-immune, taking no ill effects from sugar
#define BORER_SUGAR_IMMUNE (1<<1)
/// If the borer is able to enter hosts in half the time, if not hiding
#define BORER_FAST_BORING (1<<2)
/// If the borer is currently hiding under tables/couches/stairs or appearing on top of them
#define BORER_HIDING (1<<3)
/// If the borer can produce eggs without a host
#define BORER_ALONE_PRODUCTION (1<<4)
1 change: 1 addition & 0 deletions code/__DEFINES/~monkestation/role_preferences.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define ROLE_BORER "Borer"
2 changes: 2 additions & 0 deletions code/_globalvars/lists/poll_ignore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define POLL_IGNORE_CARGORILLA "cargorilla"
#define POLL_IGNORE_CONTRACTOR_SUPPORT "contractor_support"
#define POLL_IGNORE_CONSTRUCT "construct"
#define POLL_IGNORE_CORTICAL_BORER "cortical_borer" // MONKESTATION ADDITION -- CORTICAL_BORERS
#define POLL_IGNORE_DRONE "drone"
#define POLL_IGNORE_FIRE_SHARK "fire_shark"
#define POLL_IGNORE_FUGITIVE "fugitive"
Expand Down Expand Up @@ -47,6 +48,7 @@ GLOBAL_LIST_INIT(poll_ignore_desc, list(
POLL_IGNORE_CARGORILLA = "Cargorilla",
POLL_IGNORE_CONTRACTOR_SUPPORT = "Contractor Support Unit",
POLL_IGNORE_CONSTRUCT = "Construct",
POLL_IGNORE_CORTICAL_BORER = "Cortical Borer", // MONKESTATION ADDITION -- CORTICAL_BORERS
POLL_IGNORE_DRONE = "Drone shells",
POLL_IGNORE_FIRE_SHARK = "Fire Shark",
POLL_IGNORE_FUGITIVE = "Fugitive Hunter",
Expand Down
2 changes: 2 additions & 0 deletions code/datums/components/squashable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
return

var/mob/living/parent_as_living = parent
if((squash_flags & SQUASHED_DONT_SQUASH_IN_CONTENTS) && !isturf(parent_as_living.loc))
return

if(squash_flags & SQUASHED_SHOULD_BE_DOWN && parent_as_living.body_position != LYING_DOWN)
return
Expand Down
5 changes: 5 additions & 0 deletions code/datums/mutations/_mutations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@
/datum/mutation/human/proc/on_acquiring(mob/living/carbon/human/acquirer)
if(!acquirer || !istype(acquirer) || acquirer.stat == DEAD || (src in acquirer.dna.mutations))
return TRUE
// MONKESTATION ADDITION START -- CORTICAL_BORERS
if(acquirer.has_borer())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a change request, just curious as to why this is a thing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

partially because H.A.R.S.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be better to just have this check on the specific troublesome mutations, then?

to_chat(acquirer, span_warning("Something inside holds dearly to your humanity!"))
return TRUE
// MONKESTATION ADDITION END
if(species_allowed && !species_allowed.Find(acquirer.dna.species.id))
return TRUE
if(health_req && acquirer.health < health_req)
Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/sql_ban_system.dm
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@
ROLE_BROTHER,
ROLE_BLOODSUCKER,
ROLE_BLOODSUCKERBREAKOUT,
ROLE_BORER, // MONKESTATION ADDITION -- CORTICAL_BORERS
ROLE_CHANGELING,
ROLE_CLOCK_CULTIST,
ROLE_CULTIST,
Expand Down
6 changes: 6 additions & 0 deletions code/modules/antagonists/changeling/powers/panacea.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
user.get_organ_by_type(/obj/item/organ/internal/body_egg),
user.get_organ_by_type(/obj/item/organ/internal/legion_tumour),
user.get_organ_by_type(/obj/item/organ/internal/zombie_infection),
user.get_organ_by_type(/obj/item/organ/internal/empowered_borer_egg), // MONKESTATION ADDITION -- CORTICAL_BORERS
)

for(var/o in bad_organs)
Expand All @@ -28,6 +29,11 @@
C.vomit(0)
O.forceMove(get_turf(user))

// MONKESTATION ADDITION START -- CORTICAL_BORERS
var/mob/living/basic/cortical_borer/brain_pest = user.has_borer()
if(brain_pest)
brain_pest.leave_host()
// MONKESTATION ADDITION END
user.reagents.add_reagent(/datum/reagent/medicine/mutadone, 10)
user.reagents.add_reagent(/datum/reagent/medicine/pen_acid, 20)
user.reagents.add_reagent(/datum/reagent/medicine/antihol, 10)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// Parent of all borer actions
/datum/action/cooldown/borer
button_icon = 'monkestation/code/modules/antagonists/borers/icons/actions.dmi'
cooldown_time = 0

/// How many chemicals this costs
var/chemical_cost = 0
/// How many chem evo points are needed to use this ability
var/chemical_evo_points = 0
/// How many stat evo points are needed to use this ability
var/stat_evo_points = 0

/// Does this ability need a human host to be triggered?
var/requires_host = FALSE
/// Can this ability function within a living host?
var/needs_living_host = FALSE
/// Can this ability function within a dead host?
var/needs_dead_host = FALSE
/// Does this ability stop working when the host has sugar?
var/sugar_restricted = FALSE

/datum/action/cooldown/borer/New(Target, original)
. = ..()
var/compiled_string = ""
if(chemical_cost)
compiled_string += "([chemical_cost] chemical[chemical_cost == 1 ? "" : "s"])"
if(chemical_evo_points)
compiled_string += " ([chemical_evo_points] chemical point[chemical_evo_points == 1 ? "" : "s"])"
if(stat_evo_points)
compiled_string += " ([stat_evo_points] stat point[stat_evo_points == 1 ? "" : "s"])"
name = "[initial(name)][compiled_string]"

/datum/action/cooldown/borer/Trigger(trigger_flags, atom/target)
. = ..()

// Safety checks
if(!iscorticalborer(owner))
to_chat(owner, span_warning("You must be a cortical borer to use this action!"))
return FALSE
var/mob/living/basic/cortical_borer/cortical_owner = owner

// Status Requirements
if(requires_host == TRUE && !cortical_owner.inside_human())
owner.balloon_alert(owner, "host required")
return FALSE
if(needs_living_host == TRUE && owner.stat == DEAD)
owner.balloon_alert(owner, "Alive host required")
return FALSE
if(needs_dead_host == TRUE && !owner.stat == DEAD)
owner.balloon_alert(owner, "Dead host required")
return FALSE
if(sugar_restricted == TRUE && cortical_owner.host_sugar())
owner.balloon_alert(owner, "cannot function with sugar in host")
return FALSE

// Resource costs
if(cortical_owner.chemical_storage < chemical_cost)
cortical_owner.balloon_alert(cortical_owner, "need [chemical_cost] chemicals")
return FALSE
if(cortical_owner.chemical_evolution < chemical_evo_points)
cortical_owner.balloon_alert(cortical_owner, "need [chemical_evo_points] chemical points")
return FALSE
if(cortical_owner.stat_evolution < stat_evo_points)
cortical_owner.balloon_alert(cortical_owner, "need [stat_evo_points] stat points")
return FALSE

return . == FALSE ? FALSE : TRUE //. can be null, true, or false. There's a difference between null and false here
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
/// How many of OUR chemicals do we need to spend to inject 1 unit worth of chemicals being injected
#define CHEMICALS_PER_UNIT 2
/// How long will the cooldown on injection be, per chemical injected? example: 10 chemicals injected, 5 second divisor = 2 seconds
#define CHEMICAL_SECOND_DIVISOR (5 SECONDS)

/**
* Lets the borer inject chemicals from the "known_chemicals" list into the host
*/
/datum/action/cooldown/borer/inject_chemical
name = "Open Chemical Injector"
button_icon_state = "chemical"
requires_host = TRUE
sugar_restricted = TRUE

/datum/action/cooldown/borer/inject_chemical/Trigger(trigger_flags, atom/target)
. = ..()
if(!.)
return FALSE
ui_interact(owner)

/datum/action/cooldown/borer/inject_chemical/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "BorerChem", name)
ui.open()

/datum/action/cooldown/borer/inject_chemical/ui_data(mob/user)
var/list/data = list()
var/mob/living/basic/cortical_borer/cortical_owner = owner
data["amount"] = cortical_owner.injection_rate_current
data["energy"] = cortical_owner.chemical_storage / CHEMICALS_PER_UNIT
data["maxEnergy"] = cortical_owner.max_chemical_storage / CHEMICALS_PER_UNIT
data["borerTransferAmounts"] = cortical_owner.injection_rates_unlocked
data["onCooldown"] = !COOLDOWN_FINISHED(cortical_owner, injection_cooldown)
data["notEnoughChemicals"] = ((cortical_owner.injection_rate_current * CHEMICALS_PER_UNIT) > cortical_owner.chemical_storage) ? TRUE : FALSE

var/chemicals[0]
for(var/reagent in cortical_owner.known_chemicals)
var/datum/reagent/temp = GLOB.chemical_reagents_list[reagent]
if(temp)
var/chemname = temp.name
chemicals.Add(list(list("title" = chemname, "id" = ckey(temp.name))))
data["chemicals"] = chemicals

return data

/datum/action/cooldown/borer/inject_chemical/ui_act(action, params)
. = ..()
if(.)
return
var/mob/living/basic/cortical_borer/cortical_owner = owner
switch(action)
if("amount")
var/target = text2num(params["target"])
if(target in cortical_owner.injection_rates)
cortical_owner.injection_rate_current = target
. = TRUE
if("inject")
if(!iscorticalborer(usr) || !COOLDOWN_FINISHED(cortical_owner, injection_cooldown))
return
if(cortical_owner.host_sugar())
owner.balloon_alert(owner, "cannot function with sugar in host")
return
var/reagent_name = params["reagent"]
var/reagent = GLOB.name2reagent[reagent_name]
if(!(reagent in cortical_owner.known_chemicals))
return

cortical_owner.reagent_holder.reagents.add_reagent(reagent, cortical_owner.injection_rate_current, added_purity = 1)
cortical_owner.reagent_holder.reagents.trans_to(cortical_owner.human_host, cortical_owner.injection_rate_current, methods = INGEST)

to_chat(cortical_owner.human_host, span_warning("You feel something cool inside of you and a dull ache in your head!"))
cortical_owner.chemical_storage -= cortical_owner.injection_rate_current * CHEMICALS_PER_UNIT
COOLDOWN_START(cortical_owner, injection_cooldown, (cortical_owner.injection_rate_current / CHEMICAL_SECOND_DIVISOR))

var/turf/human_turf = get_turf(cortical_owner.human_host)
var/logging_text = "[key_name(cortical_owner)] injected [key_name(cortical_owner.human_host)] with [reagent_name] at [loc_name(human_turf)]"
cortical_owner.log_message(logging_text, LOG_GAME)
cortical_owner.human_host.log_message(logging_text, LOG_GAME)
. = TRUE

/datum/action/cooldown/borer/inject_chemical/ui_state(mob/user)
return GLOB.always_state

/datum/action/cooldown/borer/inject_chemical/ui_status(mob/user, datum/ui_state/state)
if(!iscorticalborer(user))
return UI_CLOSE

var/mob/living/basic/cortical_borer/borer = user

if(!borer.human_host)
return UI_CLOSE
return ..()

#undef CHEMICALS_PER_UNIT
#undef CHEMICAL_SECOND_DIVISOR
Loading
Loading