diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index a1199642..bb3641de 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -52,7 +52,9 @@ /obj/item/robot_parts/robot_component/diagnosis_unit, /obj/item/robot_parts/robot_component/camera, /obj/item/robot_parts/robot_component/law_computer, - /obj/item/robot_parts/robot_component/armour + /obj/item/robot_parts/robot_component/armour, + /obj/item/robot_parts/robot_component/radiator, + /obj/item/robot_parts/robot_component/bladder ), "Ripley"=list( /obj/item/mecha_parts/chassis/ripley, @@ -127,7 +129,9 @@ /obj/item/borg/upgrade/tasercooler, /obj/item/borg/upgrade/jetpack), - "Synthetic Coverings" = list( /obj/item/weapon/synth_skin_spray, + "Synthetic Shell Components" = list( + /obj/item/organ/eyes/robot, + /obj/item/weapon/synth_skin_spray, /obj/item/weapon/synth_skin_cartridge/paint, /obj/item/weapon/synth_skin_cartridge/skin, /obj/item/weapon/synth_skin_cartridge/fur, @@ -887,4 +891,4 @@ target.apply_damage(10, HALLOSS) target.say("*scream") spawn(10) - user.visible_message("\red [user] stops the [src] and leaves [target] resting as they are.", "\red You turn the [src] off and let go of [target].") \ No newline at end of file + user.visible_message("\red [user] stops the [src] and leaves [target] resting as they are.", "\red You turn the [src] off and let go of [target].") diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index dfb14c9e..d985f847 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1366,6 +1366,7 @@ var/special_role_description = "" var/health_description = "" var/gender_description = "" + var/species_description = "" var/turf/T = get_turf(M) //Location @@ -1399,8 +1400,18 @@ if(MALE,FEMALE) gender_description = "[M.gender]" else gender_description = "[M.gender]" + //Species + if(ishuman(M)) + var/mob/living/carbon/human/K = M + if(K.species) + species_description = "[K.species.name]" + else + species_description = "Unknown" + else + species_description = "N/A" + src.owner << "Info about [M.name]: " - src.owner << "Mob type = [M.type]; Gender = [gender_description] Damage = [health_description]" + src.owner << "Mob type = [M.type]; Species = [species_description]; Gender = [gender_description]; Damage = [health_description]" src.owner << "Name = [M.name]; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = [M.key];" src.owner << "Location = [location_description];" src.owner << "[special_role_description]" diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 1a0399fa..5e14402c 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -801,7 +801,19 @@ proc/stabilize_body_temperature() if (species.flags & IS_SYNTHETIC) - bodytemperature += species.synth_temp_gain //just keep putting out heat. + var/temperatureModifier = 0 + if(species.has_organ["radiator"]) + if(internal_organs_by_name["radiator"]) + var/datum/organ/internal/Radiator = internal_organs_by_name["radiator"] + if(Radiator.is_broken()) + temperatureModifier = 25 + if(bodytemperature > 450 && prob(10)) + apply_damage(rand(1, 5), BURN) + else if(Radiator.is_bruised()) + temperatureModifier = 18 + else + temperatureModifier = 25 + bodytemperature += species.synth_temp_gain + temperatureModifier //just keep putting out heat. return var/body_temperature_difference = species.body_temperature - bodytemperature @@ -1432,15 +1444,29 @@ if(1) healths.icon_state = "health6" if(2) healths.icon_state = "health7" else - //switch(health - halloss) - switch(100 - ((species && species.flags & NO_PAIN & !IS_SYNTHETIC) ? 0 : traumatic_shock)) - if(100 to INFINITY) healths.icon_state = "health0" - if(80 to 100) healths.icon_state = "health1" - if(60 to 80) healths.icon_state = "health2" - if(40 to 60) healths.icon_state = "health3" - if(20 to 40) healths.icon_state = "health4" - if(0 to 20) healths.icon_state = "health5" - else healths.icon_state = "health6" + var/numb = 0 + if (species.has_organ["diagnosis unit"]) + if (internal_organs_by_name["diagnosis unit"]) + var/datum/organ/internal/machine/Diagnosis_unit = internal_organs_by_name["diagnosis unit"] + if (Diagnosis_unit.is_broken()) + numb = 1 + else if (Diagnosis_unit.is_bruised() && prob(35)) + numb = 1 + else + numb = 1 + + if (numb) + healths.icon_state = "health_numb" + else + //switch(health - halloss) + switch(100 - ((species && species.flags & NO_PAIN & !IS_SYNTHETIC) ? 0 : traumatic_shock)) + if(100 to INFINITY) healths.icon_state = "health0" + if(80 to 100) healths.icon_state = "health1" + if(60 to 80) healths.icon_state = "health2" + if(40 to 60) healths.icon_state = "health3" + if(20 to 40) healths.icon_state = "health4" + if(0 to 20) healths.icon_state = "health5" + else healths.icon_state = "health6" if(nutrition_icon) switch(nutrition) @@ -1483,7 +1509,20 @@ else bodytemp.icon_state = "temp-4" else var/temp_step - if (bodytemperature >= species.body_temperature) + var/numb = 0 + if (species.has_organ["diagnosis unit"]) + if(internal_organs_by_name["diagnosis unit"]) + var/datum/organ/internal/machine/Diagnosis_unit = internal_organs_by_name["diagnosis unit"] + if (Diagnosis_unit.is_broken()) + numb = 1 + else if (Diagnosis_unit.is_bruised() && prob(35)) + numb = 1 + else numb = 1 + + if (numb) + bodytemp.icon_state = "temp_numb" + + else if (bodytemperature >= species.body_temperature) temp_step = (species.heat_level_1 - species.body_temperature)/4 if (bodytemperature >= species.heat_level_1) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index ddfb8577..6fc004aa 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -201,17 +201,17 @@ // Grabs the window recieved when you click-drag someone onto you. /datum/species/proc/get_inventory_dialogue(var/mob/living/carbon/human/H) return - + //Used by xenos understanding larvae and dionaea understanding nymphs. /datum/species/proc/can_understand(var/mob/other) return - - + + /datum/species/proc/blend_preview_icon(var/icon/main_icon,var/datum/preferences/preferences,var/paint_colour) if(paint_colour) main_icon.Blend(paint_colour, ICON_ADD) - return + return if(flags & HAS_SKIN_COLOR) main_icon.Blend(rgb(preferences.r_skin, preferences.g_skin, preferences.b_skin), ICON_ADD) return @@ -220,8 +220,8 @@ main_icon.Blend(rgb(preferences.s_tone, preferences.s_tone, preferences.s_tone), ICON_ADD) else main_icon.Blend(rgb(-preferences.s_tone, -preferences.s_tone, -preferences.s_tone), ICON_SUBTRACT) - - + + /datum/species/proc/get_organ_preview_icon(var/name, var/robot, var/gendered, var/gender_string, var/datum/preferences/preferences, var/datum/synthetic_limb_cover/covering, var/paint_colour) var/icon_name = icobase if (robot) @@ -236,7 +236,7 @@ var/icon/result = new /icon(icon_name,state_name) blend_preview_icon(result,preferences,paint_colour) return result - + /datum/species/proc/get_is_preview_organ_robotic(var/name,var/datum/preferences/preferences) if (flags & IS_SYNTHETIC) @@ -245,7 +245,7 @@ var/list/organ_robotic_info=preferences.organ_data[name] if (istype(organ_robotic_info)) return TRUE - + /datum/species/proc/get_preview_organ_covering(var/name,var/datum/preferences/preferences) if (name in preferences.organ_data) var/list/organ_robotic_info=preferences.organ_data[name] @@ -254,8 +254,8 @@ if (preferences.species=="Machine") if (preferences.covering_type) return list(preferences.covering_type,rgb(preferences.r_skin,preferences.g_skin,preferences.b_skin)) - - + + /datum/species/proc/get_tail_preview_icon(var/list/preview_coverings,var/datum/preferences/preferences) var/tail_state=null if (!(isnull(preview_coverings["groin"]))) @@ -268,8 +268,8 @@ var/icon/result = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = tail_state) result.Blend(rgb(preferences.r_hair,preferences.g_hair,preferences.b_hair),ICON_ADD) return result - - + + /datum/species/proc/get_eyes_preview_icon(var/list/preview_coverings,var/datum/preferences/preferences) var/eye_state=null if (!(isnull(preview_coverings["head"]))) @@ -280,13 +280,13 @@ var/icon/result = new/icon('icons/mob/human_face.dmi',eye_state) result.Blend(rgb(preferences.r_eyes,preferences.g_eyes,preferences.b_eyes),ICON_ADD) return result - + /* This function takes a preferences object and generates a complete body and hair icon for that set of preferences. It's needlessly complicated and duplicates a lot of what's going on in update_icons. The two systems should be combined somehow, possibly by using a 'visual identity' object -that could be created from either a living human or a preferences object and then passing that to a single render function, but I'll leave that +that could be created from either a living human or a preferences object and then passing that to a single render function, but I'll leave that exercise for another day. -See code\modules\mob\new_player\preferences_setup.dm for where it's used. +See code\modules\mob\new_player\preferences_setup.dm for where it's used. - jack_fractal*/ /datum/species/proc/create_body_preview_icon(var/datum/preferences/preferences) var/gender_string = (preferences.gender==FEMALE) ? "f" : "m" @@ -578,7 +578,7 @@ See code\modules\mob\new_player\preferences_setup.dm for where it's used. rarity_value = 2 eyes = "blank_eyes" - brute_mod = 0.5 + brute_mod = 1 //Fuck yo brute mod. burn_mod = 1 warning_low_pressure = 50 @@ -602,6 +602,10 @@ See code\modules\mob\new_player\preferences_setup.dm for where it's used. has_organ = list( "heart" = /datum/organ/internal/heart, "brain" = /datum/organ/internal/brain/robot, + "eyes" = /datum/organ/internal/eyes/robot, + "radiator" = /datum/organ/internal/machine/radiator, + "chemical containment" = /datum/organ/internal/machine/bladder, + "diagnosis unit" = /datum/organ/internal/machine/diagnosis_unit, ) /datum/species/machine/create_organs(var/mob/living/carbon/human/H) ..() @@ -609,8 +613,8 @@ See code\modules\mob\new_player\preferences_setup.dm for where it's used. if (istype(brain_datum)) if (isnull(brain_datum.machine_brain_type)) brain_datum.machine_brain_type="Posibrain" - - + + /datum/species/bug name = "Vaurca" name_plural = "varucae" @@ -778,4 +782,4 @@ See code\modules\mob\new_player\preferences_setup.dm for where it's used. if(slot_back in equip_slots) equip_slots |= slot_in_backpack - equip_slots |= slot_legcuffed \ No newline at end of file + equip_slots |= slot_legcuffed diff --git a/code/modules/mob/living/carbon/species.dm b/code/modules/mob/living/carbon/species.dm deleted file mode 100644 index b5043fd2..00000000 --- a/code/modules/mob/living/carbon/species.dm +++ /dev/null @@ -1,388 +0,0 @@ -/* - Datum-based species. Should make for much cleaner and easier to maintain mutantrace code. -*/ - -/datum/species - var/name // Species name. - - var/icobase = 'icons/mob/human_races/r_human.dmi' // Normal icon set. - var/deform = 'icons/mob/human_races/r_def_human.dmi' // Mutated icon set. - var/eyes = "eyes_s" // Icon for eyes. - - var/primitive // Lesser form, if any (ie. monkey for humans) - var/tail // Name of tail image in species effects icon file. - var/language // Default racial language, if any. - var/unarmed //For empty hand harm-intent attack - var/unarmed_type = /datum/unarmed_attack - var/secondary_langs = list() // The names of secondary languages that are available to this species. - var/mutantrace // Safeguard due to old code. - - var/breath_type = "oxygen" // Non-oxygen gas breathed, if any. - var/poison_type = "phoron" // Poisonous air. - var/exhale_type = "carbon_dioxide" // Exhaled gas type. - - var/cold_level_1 = 260 // Cold damage level 1 below this point. - var/cold_level_2 = 200 // Cold damage level 2 below this point. - var/cold_level_3 = 120 // Cold damage level 3 below this point. - - var/heat_level_1 = 360 // Heat damage level 1 above this point. - var/heat_level_2 = 400 // Heat damage level 2 above this point. - var/heat_level_3 = 1000 // Heat damage level 2 above this point. - - var/body_temperature = 310.15 //non-IS_SYNTHETIC species will try to stabilize at this temperature. (also affects temperature processing) - var/synth_temp_gain = 0 //IS_SYNTHETIC species will gain this much temperature every second - var/reagent_tag //Used for metabolizing reagents. - - var/darksight = 2 - var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure. - var/warning_high_pressure = WARNING_HIGH_PRESSURE // High pressure warning. - var/warning_low_pressure = WARNING_LOW_PRESSURE // Low pressure warning. - var/hazard_low_pressure = HAZARD_LOW_PRESSURE // Dangerously low pressure. - - var/brute_mod = null // Physical damage reduction/malus. - var/burn_mod = null // Burn damage reduction/malus. - - var/flags = 0 // Various specific features. - - var/list/abilities = list() // For species-derived or admin-given powers - - var/blood_color = "#A10808" //Red. - var/flesh_color = "#FFC896" //Pink. - var/base_color //Used when setting species. - - //Used in icon caching. - var/race_key = 0 - var/icon/icon_template - -/datum/species/New() - unarmed = new unarmed_type() - -/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs. - //This is a basic humanoid limb setup. - H.organs = list() - H.organs_by_name["chest"] = new/datum/organ/external/chest() - H.organs_by_name["groin"] = new/datum/organ/external/groin(H.organs_by_name["chest"]) - H.organs_by_name["head"] = new/datum/organ/external/head(H.organs_by_name["chest"]) - H.organs_by_name["l_arm"] = new/datum/organ/external/l_arm(H.organs_by_name["chest"]) - H.organs_by_name["r_arm"] = new/datum/organ/external/r_arm(H.organs_by_name["chest"]) - H.organs_by_name["r_leg"] = new/datum/organ/external/r_leg(H.organs_by_name["groin"]) - H.organs_by_name["l_leg"] = new/datum/organ/external/l_leg(H.organs_by_name["groin"]) - H.organs_by_name["l_hand"] = new/datum/organ/external/l_hand(H.organs_by_name["l_arm"]) - H.organs_by_name["r_hand"] = new/datum/organ/external/r_hand(H.organs_by_name["r_arm"]) - H.organs_by_name["l_foot"] = new/datum/organ/external/l_foot(H.organs_by_name["l_leg"]) - H.organs_by_name["r_foot"] = new/datum/organ/external/r_foot(H.organs_by_name["r_leg"]) - - H.internal_organs = list() - H.internal_organs_by_name["heart"] = new/datum/organ/internal/heart(H) - H.internal_organs_by_name["lungs"] = new/datum/organ/internal/lungs(H) - H.internal_organs_by_name["liver"] = new/datum/organ/internal/liver(H) - H.internal_organs_by_name["kidney"] = new/datum/organ/internal/kidney(H) - H.internal_organs_by_name["brain"] = new/datum/organ/internal/brain(H) - H.internal_organs_by_name["eyes"] = new/datum/organ/internal/eyes(H) - - for(var/name in H.organs_by_name) - H.organs += H.organs_by_name[name] - - for(var/datum/organ/external/O in H.organs) - O.owner = H - - if(flags & IS_SYNTHETIC) - for(var/datum/organ/external/E in H.organs) - if(E.status & ORGAN_CUT_AWAY || E.status & ORGAN_DESTROYED) continue - E.status |= ORGAN_ROBOT - for(var/datum/organ/internal/I in H.internal_organs) - I.mechanize() - -/datum/species/proc/handle_post_spawn(var/mob/living/carbon/human/H) //Handles anything not already covered by basic species assignment. - return - -/datum/species/proc/handle_death(var/mob/living/carbon/human/H) //Handles any species-specific death events (such as dionaea nymph spawns). - if(flags & IS_SYNTHETIC) - //H.make_jittery(200) //S-s-s-s-sytem f-f-ai-i-i-i-i-lure-ure-ure-ure - H.h_style = "" - spawn(100) - //H.is_jittery = 0 - //H.jitteriness = 0 - H.update_hair() - return - - -/datum/species/proc/get_eye_icon() - return eyes - - -/datum/species/human - name = "Human" - language = "Sol Common" - primitive = /mob/living/carbon/monkey - unarmed_type = /datum/unarmed_attack/punch - - flags = HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR - - //If you wanted to add a species-level ability: - /*abilities = list(/client/proc/test_ability)*/ - -/datum/species/unathi - name = "Unathi" - icobase = 'icons/mob/human_races/r_lizard.dmi' - deform = 'icons/mob/human_races/r_def_lizard.dmi' - language = "Sinta'unathi" - tail = "sogtail" - unarmed_type = /datum/unarmed_attack/claws - primitive = /mob/living/carbon/monkey/unathi - darksight = 3 - - cold_level_1 = 280 //Default 260 - Lower is better - cold_level_2 = 220 //Default 200 - cold_level_3 = 130 //Default 120 - - heat_level_1 = 420 //Default 360 - Higher is better - heat_level_2 = 480 //Default 400 - heat_level_3 = 1100 //Default 1000 - - flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_TAIL | HAS_SKIN_COLOR - - flesh_color = "#34AF10" - - reagent_tag = IS_UNATHI - base_color = "#066000" - -/datum/species/tajaran - name = "Tajaran" - icobase = 'icons/mob/human_races/r_tajaran.dmi' - deform = 'icons/mob/human_races/r_def_tajaran.dmi' - language = "Siik'Maas" - tail = "tajtail" - unarmed_type = /datum/unarmed_attack/claws - darksight = 8 - - cold_level_1 = 200 //Default 260 - cold_level_2 = 140 //Default 200 - cold_level_3 = 80 //Default 120 - - heat_level_1 = 330 //Default 360 - heat_level_2 = 380 //Default 400 - heat_level_3 = 800 //Default 1000 - - primitive = /mob/living/carbon/monkey/tajara - - flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_TAIL | HAS_SKIN_COLOR - - flesh_color = "#AFA59E" - base_color = "#333333" - -/datum/species/skrell - name = "Skrell" - icobase = 'icons/mob/human_races/r_skrell.dmi' - deform = 'icons/mob/human_races/r_def_skrell.dmi' - language = "Skrellian" - primitive = /mob/living/carbon/monkey/skrell - unarmed_type = /datum/unarmed_attack/punch - - flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR - - flesh_color = "#8CD7A3" - - reagent_tag = IS_SKRELL - -/datum/species/vox - name = "Vox" - icobase = 'icons/mob/human_races/r_vox.dmi' - deform = 'icons/mob/human_races/r_def_vox.dmi' - language = "Vox-pidgin" - unarmed_type = /datum/unarmed_attack/claws //I dont think it will hurt to give vox claws too. - - warning_low_pressure = 50 - hazard_low_pressure = 0 - - cold_level_1 = 80 - cold_level_2 = 50 - cold_level_3 = 0 - - eyes = "vox_eyes_s" - - breath_type = "nitrogen" - poison_type = "oxygen" - - flags = NO_SCAN - - blood_color = "#2299FC" - flesh_color = "#808D11" - - reagent_tag = IS_VOX - -/datum/species/vox/handle_post_spawn(var/mob/living/carbon/human/H) - - H.verbs += /mob/living/carbon/human/proc/leap - ..() - -/datum/species/vox/armalis/handle_post_spawn(var/mob/living/carbon/human/H) - - H.verbs += /mob/living/carbon/human/proc/gut - H.verbs += /mob/living/carbon/human/proc/commune - ..() - -/datum/species/vox/armalis - name = "Vox Armalis" - icobase = 'icons/mob/human_races/r_armalis.dmi' - deform = 'icons/mob/human_races/r_armalis.dmi' - language = "Vox-pidgin" - unarmed_type = /datum/unarmed_attack/claws/armalis - - warning_low_pressure = 50 - hazard_low_pressure = 0 - - cold_level_1 = 80 - cold_level_2 = 50 - cold_level_3 = 0 - - heat_level_1 = 2000 - heat_level_2 = 3000 - heat_level_3 = 4000 - - brute_mod = 0.2 - burn_mod = 0.2 - - eyes = "blank_eyes" - breath_type = "nitrogen" - poison_type = "oxygen" - - flags = NO_SCAN | NO_BLOOD | HAS_TAIL | NO_PAIN | IS_WHITELISTED - - blood_color = "#2299FC" - flesh_color = "#808D11" - - tail = "armalis_tail" - icon_template = 'icons/mob/human_races/r_armalis.dmi' - - reagent_tag = IS_VOX - -/datum/species/diona - name = "Diona" - icobase = 'icons/mob/human_races/r_diona.dmi' - deform = 'icons/mob/human_races/r_def_plant.dmi' - language = "Rootspeak" - unarmed_type = /datum/unarmed_attack/diona - primitive = /mob/living/carbon/monkey/diona - - warning_low_pressure = 50 - hazard_low_pressure = -1 - - cold_level_1 = 50 - cold_level_2 = -1 - cold_level_3 = -1 - - heat_level_1 = 2000 - heat_level_2 = 3000 - heat_level_3 = 4000 - - body_temperature = T0C + 15 //make the plant people have a bit lower body temperature, why not - - flags = IS_WHITELISTED | NO_BREATHE | REQUIRE_LIGHT | NO_SCAN | IS_PLANT | RAD_ABSORB | NO_BLOOD | IS_SLOW | NO_PAIN - - blood_color = "#004400" - flesh_color = "#907E4A" - - reagent_tag = IS_DIONA - -/datum/species/diona/handle_post_spawn(var/mob/living/carbon/human/H) - H.gender = NEUTER - - return ..() - -/datum/species/diona/handle_death(var/mob/living/carbon/human/H) - - var/mob/living/carbon/monkey/diona/S = new(get_turf(H)) - - if(H.mind) - H.mind.transfer_to(S) - - for(var/mob/living/carbon/monkey/diona/D in H.contents) - if(D.client) - D.loc = H.loc - else - del(D) - - H.visible_message("\red[H] splits apart with a wet slithering noise!") - -/datum/species/machine - name = "Machine" - icobase = 'icons/mob/human_races/r_machine.dmi' - deform = 'icons/mob/human_races/r_machine.dmi' - language = "Tradeband" - unarmed_type = /datum/unarmed_attack/punch - - eyes = "blank_eyes" - brute_mod = 0.5 - burn_mod = 1 - - warning_low_pressure = 50 - hazard_low_pressure = 0 - - cold_level_1 = 50 - cold_level_2 = -1 - cold_level_3 = -1 - - heat_level_1 = 500 //gives them about 25 seconds in space before taking damage - heat_level_2 = 1000 - heat_level_3 = 2000 - - synth_temp_gain = 10 //this should cause IPCs to stabilize at ~80 C in a 20 C environment. - - flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | IS_SYNTHETIC | NO_POISON - - blood_color = "#1F181F" - flesh_color = "#575757" - - var/brain_type = 'posibrain' // default is robots - - -//Species unarmed attacks - -/datum/unarmed_attack - var/attack_verb = list("attack") // Empty hand hurt intent verb. - var/damage = 0 // Extra empty hand attack damage. - var/attack_sound = "punch" - var/miss_sound = 'sound/weapons/punchmiss.ogg' - var/sharp = 0 - var/edge = 0 - -/datum/unarmed_attack/punch - attack_verb = list("punch") - -/datum/unarmed_attack/diona - attack_verb = list("lash", "bludgeon") - damage = 5 - -/datum/unarmed_attack/claws - attack_verb = list("scratch", "claw") - attack_sound = 'sound/weapons/slice.ogg' - miss_sound = 'sound/weapons/slashmiss.ogg' - damage = 5 - sharp = 1 - edge = 1 - -/datum/unarmed_attack/claws/armalis - attack_verb = list("slash", "claw") - damage = 10 //they're huge! they should do a little more damage, i'd even go for 15-20 maybe... - -/datum/species/kocasslani - name = "Kocasslani" - icobase = 'icons/mob/human_races/r_kocasslani.dmi' - deform = 'icons/mob/human_races/r_def_kocasslani.dmi' - language = "Sini" - darksight = 8 - - cold_level_1 = 160 //Default 260 - cold_level_2 = 100 //Default 200 - cold_level_3 = 60 //Default 120 - - heat_level_1 = 300 //Default 360 - heat_level_2 = 360 //Default 400 - heat_level_3 = 800 //Default 1000 - - flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR - -/* blood_color = "#659CEF" - flesh_color = "#D3AA8E" -*/ \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index bb03edb4..8f836208 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -147,6 +147,14 @@ var/brute = 0 var/burn = 0 var/icon_state_broken = "broken" + var/obj/item/organ/organ_type = null // for shells. Only define if this can be placed inside an IPC during organ replacement surgery. + +// In case the robot_component has a child organ, it is updated to have the proper datums and so on. +/obj/item/robot_parts/robot_component/New() + ..() + spawn(5) + if(organ_type) + organ_type.update() // TODO: actual icons ;) /obj/item/robot_parts/robot_component/binary_communication_device @@ -168,7 +176,8 @@ name = "camera" icon_state = "camera" icon_state_broken = "camera_broken" - + organ_type = new /obj/item/organ/eyes/robot() + /obj/item/robot_parts/robot_component/law_computer name = "law computer" icon_state = "radio" @@ -178,12 +187,25 @@ name = "diagnosis unit" icon_state = "analyser" icon_state_broken = "analyser_broken" + organ_type = new /obj/item/organ/machine/diagnosis_unit() /obj/item/robot_parts/robot_component/radio name = "radio" icon_state = "radio" icon_state_broken = "radio_broken" +/obj/item/robot_parts/robot_component/radiator + name = "radiator" + icon_state = "radiator" + icon_state_broken = "radiator_broken" + organ_type = new /obj/item/organ/machine/radiator() + +/obj/item/robot_parts/robot_component/bladder + name = "chemical containment" + icon_state = "bladder" + icon_state_broken = "bladder_broken" + organ_type = new /obj/item/organ/machine/bladder() + // //Robotic Component Analyser, basically a health analyser for robots // @@ -227,7 +249,7 @@ user.show_message("\t Damage Specifics: [BU] - [BR]") if(M.tod && M.stat == DEAD) user.show_message("\blue Time of Disable: [M.tod]") - + if (istype(M, /mob/living/silicon/robot)) var/mob/living/silicon/robot/H = M var/list/damaged = H.get_damaged_components(1,1,1) @@ -245,7 +267,7 @@ user.show_message("\blue \t Components are OK.",1) if(H.emagged && prob(5)) user.show_message("\red \t ERROR: INTERNAL SYSTEMS COMPROMISED",1) - + if (ishuman(M) && (M:species.flags & IS_SYNTHETIC)) var/mob/living/carbon/human/H = M var/list/damaged = H.get_damaged_organs(1,1) @@ -258,8 +280,8 @@ (org.burn_dam > 0) ? "[org.burn_dam]" :0),1) else user.show_message("\blue \t Components are OK.",1) - + user.show_message("\blue Operating Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1) - + src.add_fingerprint(user) return diff --git a/code/modules/organs/organ_alien.dm b/code/modules/organs/organ_alien.dm index 9d4bfa0b..c473d377 100644 --- a/code/modules/organs/organ_alien.dm +++ b/code/modules/organs/organ_alien.dm @@ -224,4 +224,117 @@ robotic = 2 /obj/item/organ/stack/vox - name = "vox cortical stack" \ No newline at end of file + name = "vox cortical stack" + +//IPC/SHELL ORGANS. +//TODO: Make the robot_components required for these +//TODO: Make said components printable +//TODO: sprites +/datum/organ/internal/machine + removed_type = /obj/item/organ/machine + +/datum/organ/internal/machine/process() + return + +/datum/organ/internal/machine/radiator + name = "internal cooling unit" + parent_organ = "chest" + robotic = 2 + min_bruised_damage = 15 + min_broken_damage = 40 + removed_type = /obj/item/organ/machine/radiator + +/obj/item/organ/machine/radiator + name = "internal cooling unit" + icon_state = "radiator" + organ_tag = "radiator" + organ_type = /datum/organ/internal/machine/radiator + robotic = 2 + +/obj/item/organ/machine/radiator/exposed_to_the_world() + var/obj/item/robot_parts/robot_component/radiator/Radiator = new(src.loc) + if(organ_data.damage) + Radiator.brute = organ_data.damage + del(src) + return Radiator + +/datum/organ/internal/machine/bladder + name = "chemical containment" + parent_organ = "groin" + robotic = 2 + removed_type = /obj/item/organ/machine/bladder + +/datum/organ/internal/machine/bladder/process() + if(status & ORGAN_CUT_AWAY) + return + + if(is_bruised()) + var/leakSmall = rand(1,5) + if(owner.reagents.total_volume > 0) + owner.reagents.remove_any(leakSmall) + if(owner.reagents.maximum_volume > 500) + owner.reagents.maximum_volume -= leakSmall + + if(is_broken()) + var/leakLarge = rand(25,50) + if(owner.reagents.total_volume > 0) + owner.reagents.remove_any(leakLarge) + if(owner.reagents.maximum_volume > 0) + if(owner.reagents.maximum_volume < leakLarge) + owner.reagents.maximum_volume = 0 + else + owner.reagents.maximum_volume -= leakLarge + + if(owner.reagents.reagent_list.len) + if(owner.reagents.has_reagent("sacid") || owner.reagents.has_reagent("pacid")) + take_damage(rand(0,2.5), 1) + +/obj/item/organ/machine/bladder + name = "chemical containment" + icon_state = "bladder" + organ_tag = "chemical containment" + organ_type = /datum/organ/internal/machine/bladder + robotic = 2 + +/obj/item/organ/machine/bladder/replaced(var/mob/living/carbon/human/target) + if(istype(target) && (target.species.flags & IS_SYNTHETIC)) + if(target.reagents.maximum_volume < 1000) + target.reagents.maximum_volume = 1000 + + ..() + +/obj/item/organ/machine/bladder/removed(var/mob/living/target, var/mob/living/user) + ..() + + if(istype(target, /mob/living/carbon/human)) + var/mob/living/carbon/human/Machine = target + if(Machine.species.flags & IS_SYNTHETIC) + Machine.reagents.clear_reagents() + Machine.reagents.maximum_volume = 0 + +/obj/item/organ/machine/bladder/exposed_to_the_world() + var/obj/item/robot_parts/robot_component/bladder/Bladder = new(src.loc) + if(organ_data.damage) + Bladder.brute = organ_data.damage + del(src) + return Bladder + +/datum/organ/internal/machine/diagnosis_unit + name = "diagnosis unit" + parent_organ = "head" + robotic = 2 + removed_type = /obj/item/organ/machine/diagnosis_unit + +/obj/item/organ/machine/diagnosis_unit + name = "diagnosis unit" + icon_state = "diagnosis_unit" + organ_tag = "diagnosis unit" + organ_type = /datum/organ/internal/machine/diagnosis_unit + robotic = 2 + +/obj/item/organ/machine/diagnosis_unit/exposed_to_the_world() + var/obj/item/robot_parts/robot_component/diagnosis_unit/Diagnosis_unit = new(src.loc) + if(organ_data.damage) + Diagnosis_unit.brute = organ_data.damage + del(src) + return Diagnosis_unit diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index 3ee262b7..53f28e83 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -249,12 +249,12 @@ parent_organ = "head" removed_type = /obj/item/organ/brain vital = 1 - - + + /datum/organ/internal/brain/robot // brains for shells - var/machine_brain_type=null - - + var/machine_brain_type=null + + /datum/organ/internal/brain/robot/proc/create_robot_brain_replacement(var/target,var/new_location) var/obj/item/device/mmi/new_mmi if (machine_brain_type=="Posibrain") @@ -267,7 +267,7 @@ new_mmi.transfer_identity(target) new_mmi.loc = new_location return new_mmi - + /datum/organ/internal/brain/xeno removed_type = /obj/item/organ/brain/xeno @@ -284,6 +284,11 @@ if(is_broken()) owner.eye_blind = 20 +/datum/organ/internal/eyes/robot // eyes for shells + name = "charge-coupled device" + parent_organ = "head" + removed_type = /obj/item/organ/eyes/robot + /datum/organ/internal/appendix name = "appendix" parent_organ = "groin" @@ -306,4 +311,4 @@ removed_organ.update() organ_holder = removed_organ - return removed_organ \ No newline at end of file + return removed_organ diff --git a/code/modules/organs/organ_objects.dm b/code/modules/organs/organ_objects.dm index c375cbb4..2340a34e 100644 --- a/code/modules/organs/organ_objects.dm +++ b/code/modules/organs/organ_objects.dm @@ -150,6 +150,19 @@ /obj/item/organ/eyes/prosthetic robotic = 2 +/obj/item/organ/eyes/robot + name = "charge-coupled device" + icon_state = "" + organ_type = /datum/organ/internal/eyes/robot + robotic = 2 + + exposed_to_the_world() + var/obj/item/robot_parts/robot_component/camera/Camera = new() + if(organ_data.damage) + Camera.brute = organ_data.damage + del(src) + return Camera + /obj/item/organ/liver/prosthetic robotic = 2 @@ -180,11 +193,11 @@ msg_admin_attack("[user.name] ([user.ckey]) removed a vital organ ([src]) from [target.name] ([target.ckey]) (INTENT: [uppertext(user.a_intent)]) (JMP)") target.death() - + /obj/item/organ/proc/exposed_to_the_world() // this is only useful for organs that change when actually removed from the body - return - - + return + + /obj/item/organ/appendix/removed(var/mob/living/target,var/mob/living/user) ..() @@ -277,4 +290,4 @@ if(fingerprintslast) O.fingerprintslast = fingerprintslast user.put_in_active_hand(O) - del(src) \ No newline at end of file + del(src) diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index 0cf7dfef..b9a234aa 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -17,10 +17,11 @@ return 0 if (affected.status & ORGAN_DESTROYED) return 0 - if (target_zone == "head" && target.species && (target.species.flags & IS_SYNTHETIC)) - return 1 if (affected.status & ORGAN_ROBOT) - return 0 + if (target.species && (target.species.flags & IS_SYNTHETIC) && affected.internal_organs.len) + return 1 + else + return 0 return 1 /datum/surgery_step/generic/cut_with_laser diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 3ea958bb..71189a51 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -320,7 +320,8 @@ /datum/surgery_step/internal/replace_organ allowed_tools = list( - /obj/item/organ = 100 + /obj/item/organ = 100, + /obj/item/robot_parts/robot_component = 100 ) min_duration = 60 @@ -334,7 +335,13 @@ var/organ_compatible var/organ_missing - if(!istype(O)) + if(!istype(O) && istype(O, /obj/item/robot_parts/robot_component)) + var/obj/item/robot_parts/robot_component/A = tool + if(A.organ_type) + O = A.organ_type + else + return 0 + else return 0 if(!target.species) @@ -383,6 +390,11 @@ var/obj/item/organ/O = tool if(istype(O)) O.replaced(target,affected) + else if(istype(tool, /obj/item/robot_parts/robot_component)) + var/obj/item/robot_parts/robot_component/A = tool + if(A.organ_type) + O = A.organ_type + O.replaced(target,affected) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("\red [user]'s hand slips, damaging \the [tool]!", \ @@ -455,4 +467,4 @@ // max_duration = 40 // can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) -// return ..() && target.op_stage.ribcage == 2 \ No newline at end of file +// return ..() && target.op_stage.ribcage == 2 diff --git a/icons/obj/robot_component.dmi b/icons/obj/robot_component.dmi index 1129f25a..bb53a0ab 100644 Binary files a/icons/obj/robot_component.dmi and b/icons/obj/robot_component.dmi differ diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi index 202ec39b..694752e1 100644 Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ