Skip to content

Commit

Permalink
Makes Androids more robotic. (#1587)
Browse files Browse the repository at this point in the history
* Adds cybernetic brain and updates android

* Update brain_item.dm

I hope this works.

* Update tgstation.dme

* Update organs.dmi

Adds brain-c icon

* Fixes errors and makes android more robotic.

* Update android.dm

Makes androids virus immune.

* Removes duplicate

Why were there two?

* Removes android appendix

* Update brain_item.dm

* Update brain_item.dm

* Revert "Update brain_item.dm"

This reverts commit 3e083f7.

* More robotic

* Documentation from TGstation.

For if we ever have androids as a roundstart race. (Maybe for Halloween.)

* Credit
  • Loading branch information
Uristthedorf authored Jun 21, 2024
1 parent b5d4b74 commit c53fb86
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 13 deletions.
59 changes: 59 additions & 0 deletions code/modules/mob/living/brain/brain_cybernetic.dm
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/examine(mob/user)
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)
25 changes: 13 additions & 12 deletions code/modules/mob/living/brain/brain_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,17 @@
L.mind.transfer_to(brainmob)
to_chat(brainmob, span_notice("You feel slightly disoriented. That's normal when you're just a brain."))

/obj/item/organ/internal/brain/attackby(obj/item/O, mob/user, params)
/obj/item/organ/internal/brain/attackby(obj/item/item, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)

if(istype(O, /obj/item/borg/apparatus/organ_storage))
if(istype(item, /obj/item/borg/apparatus/organ_storage))
return //Borg organ bags shouldn't be killing brains

if (check_for_repair(O, user))
if (check_for_repair(item, user))
return TRUE

// Cutting out skill chips.
if(length(skillchips) && O.get_sharpness() == SHARP_EDGED)
if(length(skillchips) && item.get_sharpness() == SHARP_EDGED)
to_chat(user,span_notice("You begin to excise skillchips from [src]."))
if(do_after(user, 15 SECONDS, target = src))
for(var/chip in skillchips)
Expand All @@ -183,14 +183,15 @@
return

if(brainmob) //if we aren't trying to heal the brain, pass the attack onto the brainmob.
O.attack(brainmob, user) //Oh noooeeeee
item.attack(brainmob, user) //Oh noooeeeee

if(O.force != 0 && !(O.item_flags & NOBLUDGEON))
if(item.force != 0 && !(item.item_flags & NOBLUDGEON))
user.do_attack_animation(src)
playsound(loc, 'sound/effects/meatslap.ogg', 50)
set_organ_damage(maxHealth) //fails the brain as the brain was attacked, they're pretty fragile.
visible_message(span_danger("[user] hits [src] with [O]!"))
to_chat(user, span_danger("You hit [src] with [O]!"))

visible_message(span_danger("[user] hits [src] with [item]!"))
to_chat(user, span_danger("You hit [src] with [item]!"))

/obj/item/organ/internal/brain/proc/check_for_repair(obj/item/item, mob/user)
if(damage && item.is_drainable() && item.reagents.has_reagent(/datum/reagent/medicine/mannitol) && (status == ORGAN_ORGANIC)) //attempt to heal the brain
Expand Down Expand Up @@ -219,13 +220,13 @@
return
if((brainmob && (brainmob.client || brainmob.get_ghost())) || decoy_override)
if(organ_flags & ORGAN_FAILING)
. += span_info("It seems to still have a bit of energy within it, but it's rather damaged... You may be able to restore it with some <b>mannitol</b>.")
return span_info("It seems to still have a bit of energy within it, but it's rather damaged... You may be able to restore it with some <b>mannitol</b>.")
else if(damage >= BRAIN_DAMAGE_DEATH*0.5)
. += span_info("You can feel the small spark of life still left in this one, but it's got some bruises. You may be able to restore it with some <b>mannitol</b>.")
return span_info("You can feel the small spark of life still left in this one, but it's got some bruises. You may be able to restore it with some <b>mannitol</b>.")
else
. += span_info("You can feel the small spark of life still left in this one.")
return span_info("You can feel the small spark of life still left in this one.")
else
. += span_info("This one is completely devoid of life.")
return span_info("This one is completely devoid of life.")

/obj/item/organ/internal/brain/attack(mob/living/carbon/C, mob/user)
if(!istype(C))
Expand Down
63 changes: 62 additions & 1 deletion code/modules/mob/living/carbon/human/species_types/android.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
NO_DNA_COPY,
NOTRANSSTING,
NO_UNDERWEAR,
NOHUSK
)
inherent_traits = list(
TRAIT_CAN_USE_FLIGHT_POTION,
Expand All @@ -23,18 +24,31 @@
TRAIT_RESISTHIGHPRESSURE,
TRAIT_TOXIMMUNE,
TRAIT_NOBLOOD,
TRAIT_VIRUSIMMUNE,
)

inherent_biotypes = MOB_ROBOTIC|MOB_HUMANOID
meat = null
meat = /obj/item/stack/sheet/plasteel{amount = 5}
skinned_type = /obj/item/stack/sheet/iron{amount = 10}
species_gibs = GIB_TYPE_ROBOTIC
mutantbrain = /obj/item/organ/internal/brain/cybernetic
mutanttongue = /obj/item/organ/internal/tongue/robot
mutantstomach = null
mutantheart = null
mutantliver = null
mutantlungs = null
mutantappendix = null
mutantbladder = null
mutanteyes = /obj/item/organ/internal/eyes/robotic
mutantears = /obj/item/organ/internal/ears/cybernetic
mutantbutt = /obj/item/organ/internal/butt/cyber
species_language_holder = /datum/language_holder/synthetic
wing_types = list(/obj/item/organ/external/wings/functional/robotic)
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT
reagent_tag = PROCESS_SYNTHETIC // They don't HAVE a liver, but if they did, they'd have synthetic chem processing.
special_step_sounds = list('sound/effects/servostep.ogg')



bodypart_overrides = list(
BODY_ZONE_HEAD = /obj/item/bodypart/head/robot/android,
Expand All @@ -46,6 +60,53 @@
)
examine_limb_id = SPECIES_HUMAN


//Taken from TGstation
/datum/species/android/get_species_description()
return "Androids are an entirely synthetic species."


/// Taken from TGstation.
/datum/species/android/create_pref_traits_perks()
var/list/to_add = list()

to_add += list(
list(
SPECIES_PERK_TYPE = SPECIES_POSITIVE_PERK,
SPECIES_PERK_ICON = FA_ICON_SHIELD_ALT,
SPECIES_PERK_NAME = "Android Aptitude",
SPECIES_PERK_DESC = "As a synthetic lifeform, Androids are immune to many forms of damage humans are susceptible to. \
Fire, cold, heat, pressure, radiation, and toxins are all ineffective against them. \
They also can't overdose on drugs, don't need to breathe or eat, can't catch on fire, and are immune to being pierced.",
),
list(
SPECIES_PERK_TYPE = SPECIES_POSITIVE_PERK,
SPECIES_PERK_ICON = FA_ICON_COGS,
SPECIES_PERK_NAME = "Modular Lifeform",
SPECIES_PERK_DESC = "Android limbs are modular, allowing them to easily reattach severed bodyparts.",
),
list(
SPECIES_PERK_TYPE = SPECIES_NEGATIVE_PERK,
SPECIES_PERK_ICON = FA_ICON_DNA,
SPECIES_PERK_NAME = "Not Human After All",
SPECIES_PERK_DESC = "There is no humanity behind the eyes of the Android, and as such, they have no DNA to genetically alter.",
),
list(
SPECIES_PERK_TYPE = SPECIES_NEUTRAL_PERK,
SPECIES_PERK_ICON = FA_ICON_SHIELD_HEART,
SPECIES_PERK_NAME = "Some Components Optional",
SPECIES_PERK_DESC = "Androids have very few internal organs. While they can survive without many of them, \
they don't have any benefits from them either.",
),
list(
SPECIES_PERK_TYPE = SPECIES_NEGATIVE_PERK,
SPECIES_PERK_ICON = FA_ICON_ROBOT,
SPECIES_PERK_NAME = "Synthetic",
SPECIES_PERK_DESC = "Being synthetic, Androids are vulnernable to EMPs.",
),
)
return to_add

/datum/species/android/on_species_gain(mob/living/carbon/C)
. = ..()
// Androids don't eat, hunger or metabolise foods. Let's do some cleanup.
Expand Down
Binary file modified icons/obj/medical/organs/organs.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -4500,6 +4500,7 @@
#include "code\modules\mob\living\basic\vermin\mouse.dm"
#include "code\modules\mob\living\basic\vermin\space_bat.dm"
#include "code\modules\mob\living\brain\brain.dm"
#include "code\modules\mob\living\brain\brain_cybernetic.dm"
#include "code\modules\mob\living\brain\brain_item.dm"
#include "code\modules\mob\living\brain\brain_say.dm"
#include "code\modules\mob\living\brain\death.dm"
Expand Down

0 comments on commit c53fb86

Please sign in to comment.