-
Notifications
You must be signed in to change notification settings - Fork 298
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
dwasint
merged 81 commits into
Monkestation:master
from
Gboster-0:is-that-a-borer-in-your-pocket-or-are-you-happy-to-see-me
Apr 30, 2024
Merged
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 c5722c9
actually working worms
Gboster-0 8723058
removes the mid-round chance
Gboster-0 50dd5ec
readme.md changes part 1
Gboster-0 3281d93
readme.md changes part 2
Gboster-0 279c9a1
mayhaps we dont support jsx files?
Gboster-0 1ac9f1c
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 c471d73
traitor borers & code improvement
Gboster-0 cfc1eb5
im sorry, but we cant have eggs running around can we?
Gboster-0 0f68e4d
lets not
Gboster-0 0887ba7
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 67f3ea3
post-upstream fixes
Gboster-0 f0693d2
entering hosts now gives a text
Gboster-0 7c0e51f
lets learn chemicals by names, and not a path
Gboster-0 2d7d5f6
fixes
Gboster-0 03f3529
requested changes
Gboster-0 228e616
better blood learning
Gboster-0 914626e
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 7a14502
alphabetical lists
Gboster-0 1d51951
moar variables for controlling ability requirements
Gboster-0 c1e21d1
removes the debug borer (it isnt helpfull for debugging, may return l…
Gboster-0 a5842f1
midround borers maybe?
Gboster-0 9be0621
le midround changes
Gboster-0 6c4a2d0
adds some spaces, fixes a minor edge-case bug
Gboster-0 cb775ce
borer objectives
Gboster-0 96c42a5
borer hiding ability cleanup
Gboster-0 3a70774
some cleanup
Gboster-0 ad84bdc
small objective text change
Gboster-0 186411f
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 b271c26
requested changes
Gboster-0 5372573
some misc things
Gboster-0 dae9201
boop
Gboster-0 a5babda
whoops, forgot dat
Gboster-0 f7608bd
lil bit of improvements
Gboster-0 d85d680
better objectives
Gboster-0 70b4f8e
whoops
Gboster-0 b0ba2d0
bap
Gboster-0 f8a5824
taking away the neutered borers balls that i already took
Gboster-0 a09e004
simplifies the cage
Gboster-0 986a30b
sets it on a major track, didnt know how to do dat before
Gboster-0 c194920
TGUI with help, and borer egg fixes
Gboster-0 d2f4ae5
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 63c136c
adds borers to the antag token thingy
Gboster-0 a13c8e7
some re-naming, neutered round-end section, eyecandy for the borer cage
Gboster-0 b62016e
"i'll just quickly add in one line of logging" i said, "it surelly wo…
Gboster-0 7aa24a7
that isnt a proper comment
Gboster-0 953130b
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 f9817d9
Update readme.md
Gboster-0 a1e15c6
fixes the borer cage's animation
Gboster-0 f0b6ea7
bit more TGUI work
Gboster-0 2cb2f07
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 45410be
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 903c9ba
misc fixes
Gboster-0 5f76b91
the grand borer warfare DLC
Gboster-0 9e4a44d
switch around the chemicals we know about
Gboster-0 c125284
quite a few fixes
Gboster-0 af242e4
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 b05f1ac
cortical names, mainly for admin reports
Gboster-0 487c186
name fixes
Gboster-0 fc4ab8e
adds the OH_GOD_WE_FUCKED_UP() proc
Gboster-0 93fb284
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 2606b23
fixes
Gboster-0 ef6cd15
initial suggested changes
Gboster-0 32c49b3
misc fixes, an evolution var for added actions
Gboster-0 305291a
no more infinitelly trapped borers in dead people
Gboster-0 0a3f2c1
Create screenshot_antag_icons_borer.png
Gboster-0 07d2d72
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 2e14171
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 70cfafd
le updates to polling
Gboster-0 590c1ea
opendream lints got mad
Gboster-0 702463d
screenshot tests
Gboster-0 b6889d4
in this part, absolucy fixes everything by changing 1 line of code
Gboster-0 673b570
Merge remote-tracking branch 'upstream/master' into is-that-a-borer-i…
Gboster-0 d84ac69
some minor stuff
Gboster-0 4f61d38
yoinks https://github.com/Skyrat-SS13/Skyrat-tg/pull/26693
Gboster-0 a62890d
fixes
Gboster-0 752d46b
long
Gboster-0 49a96df
co-existance
Gboster-0 359bd7d
god i hate AI's breaking everything
Gboster-0 060fa6f
doubles point gain
Gboster-0 84c628c
Merge branch 'master' into is-that-a-borer-in-your-pocket-or-are-you-…
dwasint File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#define ACTIONSPEED_ID_BORER "borer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#define ROLE_BORER "Borer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
monkestation/code/modules/antagonists/borers/code/abilities/_ability.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
96 changes: 96 additions & 0 deletions
96
monkestation/code/modules/antagonists/borers/code/abilities/chemical_injector.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?