-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIRROR] Cybernetic brains for androids [MDB IGNORE] (#25034)
* Cybernetic brains for androids (#79421) ## About The Pull Request A while ago, androids were changed to have robotic eyes and ears rather than organic ones, for obvious reasons. But androids still have one organic organ left; the brain. This PR adds a new cybernetic brain organ, currently only used by androids. It has most of the benefits of robotic organs, such as not rotting, but it also has the drawbacks, like being unaffected by chemicals (mannitol being the big one) and being somewhat vulnerable to EMPs. In terms of EMP vulnerability, the brains are pretty safe. They take 10 brain damage per light EMP, capped at 20 total brain damage. They take 20 damage from each heavy EMP, capped at 100 total. This should allow for EMPs to be debilitating without making them lethal when spammed. Normal brains can be repaired by pouring mannitol over them, but obviously this doesn't make sense for robotic brains. Instead, you can use a multitool to repair removed robot brains. I'm still workshopping ways to repair the brain without totally removing it. I had an idea for new cybernetic organ repair surgeries, but it would also make more sense to put all that in a separate PR. Here is a picture of the new brain, with a normal brain for comparison: ![brainpic](https://github.com/tgstation/tgstation/assets/21979502/3b32e839-8670-4e8a-9c07-fb8f062879f2) ## Why It's Good For The Game The robotic species should actually have entirely robotic parts, and other people might come up with cool uses for this that I haven't thought of. ## Changelog :cl: add: Androids now have robotic brains instead of organic brains. /:cl: * Cybernetic brains for androids --------- Co-authored-by: GPeckman <[email protected]>
- Loading branch information
1 parent
226c328
commit 1ab06cb
Showing
5 changed files
with
102 additions
and
37 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/obj/item/organ/internal/brain/cybernetic | ||
name = "cybernetic brain" | ||
desc = "A mechanical brain found inside of androids. Not to be confused with a positronic brain." | ||
icon_state = "brain-c" | ||
organ_flags = ORGAN_ROBOTIC | ORGAN_VITAL | ||
failing_desc = "seems to be broken, and will not work without repairs." | ||
|
||
/obj/item/organ/internal/brain/cybernetic/brain_damage_examine() | ||
if(suicided) | ||
return span_info("Its circuitry is smoking slightly. They must not have been able to handle the stress of it all.") | ||
if(brainmob && (decoy_override || brainmob.client || brainmob.get_ghost())) | ||
if(organ_flags & ORGAN_FAILING) | ||
return span_info("It seems to still have a bit of energy within it, but it's rather damaged... You may be able to repair it with a <b>multitool</b>.") | ||
else if(damage >= BRAIN_DAMAGE_DEATH*0.5) | ||
return span_info("You can feel the small spark of life still left in this one, but it's got some dents. You may be able to restore it with a <b>multitool</b>.") | ||
else | ||
return span_info("You can feel the small spark of life still left in this one.") | ||
else | ||
return span_info("This one is completely devoid of life.") | ||
|
||
/obj/item/organ/internal/brain/cybernetic/check_for_repair(obj/item/item, mob/user) | ||
if (item.tool_behaviour == TOOL_MULTITOOL) //attempt to repair the brain | ||
if (brainmob?.health <= HEALTH_THRESHOLD_DEAD) //if the brain is fucked anyway, do nothing | ||
to_chat(user, span_warning("[src] is far too damaged, there's nothing else we can do for it!")) | ||
return TRUE | ||
|
||
if (DOING_INTERACTION(user, src)) | ||
to_chat(user, span_warning("you're already repairing [src]!")) | ||
return TRUE | ||
|
||
user.visible_message(span_notice("[user] slowly starts to repair [src] with [item]."), span_notice("You slowly start to repair [src] with [item].")) | ||
var/did_repair = FALSE | ||
while(damage > 0) | ||
if(item.use_tool(src, user, 3 SECONDS, volume = 50)) | ||
did_repair = TRUE | ||
set_organ_damage(max(0, damage - 20)) | ||
else | ||
break | ||
|
||
if (did_repair) | ||
if (damage > 0) | ||
user.visible_message(span_notice("[user] partially repairs [src] with [item]."), span_notice("You partially repair [src] with [item].")) | ||
else | ||
user.visible_message(span_notice("[user] fully repairs [src] with [item], causing its warning light to stop flashing."), span_notice("You fully repair [src] with [item], causing its warning light to stop flashing.")) | ||
else | ||
to_chat(user, span_warning("You failed to repair [src] with [item]!")) | ||
|
||
return TRUE | ||
return FALSE | ||
|
||
/obj/item/organ/internal/brain/cybernetic/emp_act(severity) | ||
. = ..() | ||
if(. & EMP_PROTECT_SELF) | ||
return | ||
switch(severity) // Hard cap on brain damage from EMP | ||
if (EMP_HEAVY) | ||
apply_organ_damage(20, BRAIN_DAMAGE_SEVERE) | ||
if (EMP_LIGHT) | ||
apply_organ_damage(10, BRAIN_DAMAGE_MILD) |
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
Binary file not shown.
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