diff --git a/monkestation/code/game/objects/items/ipc_construction.dm b/monkestation/code/game/objects/items/ipc_construction.dm new file mode 100644 index 000000000000..7c9be5bb033f --- /dev/null +++ b/monkestation/code/game/objects/items/ipc_construction.dm @@ -0,0 +1,27 @@ +/// IPC Building +/obj/item/ipc_chest + name = "ipc chest (ipc assembly)" + desc = "A complex metal chest cavity with standard limb sockets and pseudomuscle anchors." + icon = 'monkestation/icons/mob/species/ipc/bodyparts.dmi' + icon_state = "synth_chest" + +/obj/item/ipc_chest/Initialize(mapload) + . = ..() + var/mob/living/carbon/human/species/ipc/ipc_body = new /mob/living/carbon/human/species/ipc(get_turf(src)) + /// Remove those bodyparts + for(var/ipc_body_parts in ipc_body.bodyparts) + var/obj/item/bodypart/bodypart = ipc_body_parts + if(bodypart.body_part != CHEST) + QDEL_NULL(bodypart) + /// Remove those organs + for (var/ipc_organ in ipc_body.organs) + qdel(ipc_organ) + + /// Update current body to be limbless + ipc_body.update_icon() + ADD_TRAIT(ipc_body, TRAIT_EMOTEMUTE, type) + ipc_body.death() + REMOVE_TRAIT(ipc_body, TRAIT_EMOTEMUTE, type) + ADD_TRAIT(ipc_body, TRAIT_PACIFISM, type) + /// Remove placeholder ipc_chest + qdel(src) diff --git a/monkestation/code/modules/experisci/experiment/experiments.dm b/monkestation/code/modules/experisci/experiment/experiments.dm new file mode 100644 index 000000000000..f0c97d59057f --- /dev/null +++ b/monkestation/code/modules/experisci/experiment/experiments.dm @@ -0,0 +1,17 @@ +/datum/experiment/scanning/cyborg_scan + name = "Positronic Brain Diagnostics" + description = "Scientists on a neighboring station have possibly found the solution for replicating advanced silicon lifeforms! They are requesting analysis of a few active cyborgs to complete their research." + scan_message = "Scan Cyborgs built with Positronic Brains." + exp_tag = "Scan" + required_atoms = list(/mob/living/silicon/robot = 4) + + //store scanned ckeys so roboticists dont disassemble and reassemble a borg over and over + var/scanned_ckeys = list() + +/datum/experiment/scanning/cyborg_scan/final_contributing_index_checks(target, typepath) + var/mob/living/silicon/robot/cyborg = target + if (cyborg.mind != null || !(cyborg.ckey in scanned_ckeys) || cyborg.mmi == /obj/item/mmi/posibrain) + scanned_ckeys += cyborg.ckey + return TRUE + else + return FALSE diff --git a/monkestation/code/modules/mob/living/brain/posibrain.dm b/monkestation/code/modules/mob/living/brain/posibrain.dm new file mode 100644 index 000000000000..8ffdb7872788 --- /dev/null +++ b/monkestation/code/modules/mob/living/brain/posibrain.dm @@ -0,0 +1,40 @@ +/obj/item/mmi/posibrain/ipc + name = "compact positronic brain" + desc = "A cube of shining metal, four inches to a side and covered in shallow grooves. It has an IPC serial number engraved on the top. It is usually slotted into the chest of synthetic crewmembers." + icon = 'icons/obj/assemblies/assemblies.dmi' + icon_state = "posibrain" + base_icon_state = "posibrain" + + begin_activation_message = "You carefully locate the manual activation switch and start the compact positronic brain's boot process." + success_message = "The compact positronic brain pings, and its lights start flashing. Success!" + fail_message = "The compact positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?" + new_mob_message = "The compact positronic brain chimes quietly." + recharge_message = "The compact positronic brain isn't ready to activate again yet! Give it some time to recharge." + +/obj/item/mmi/posibrain/ipc/transfer_personality(mob/dead/observer/candidate) + if(candidate) + var/obj/item/organ/internal/brain/synth/ipc_brain = new /obj/item/organ/internal/brain/synth(get_turf(src)) + ipc_brain.brainmob = new /mob/living/brain(ipc_brain) + if(candidate.mind) + candidate.mind.transfer_to(ipc_brain.brainmob) + else + ipc_brain.brainmob.key = candidate.key + candidate.reenter_corpse() + visible_message(success_message) + playsound(src, 'sound/machines/ping.ogg', 15, TRUE) + ipc_brain.brain_gain_trauma(/datum/brain_trauma/severe/pacifism, TRAUMA_RESILIENCE_LOBOTOMY) + qdel(src) + +/obj/item/mmi/posibrain/ipc/update_icon_state() + . = ..() + if(searching) + icon = 'icons/obj/assemblies/assemblies.dmi' + icon_state = "[base_icon_state]-searching" + return + if(brainmob?.key) + icon = 'monkestation/code/modules/smithing/icons/ipc_organ.dmi' + icon_state = "posibrain-ipc" + return + icon = 'icons/obj/assemblies/assemblies.dmi' + icon_state = "[base_icon_state]" + return diff --git a/monkestation/code/modules/mob/living/carbon/human/human.dm b/monkestation/code/modules/mob/living/carbon/human/human.dm index 531d405af991..cf07660451b1 100644 --- a/monkestation/code/modules/mob/living/carbon/human/human.dm +++ b/monkestation/code/modules/mob/living/carbon/human/human.dm @@ -1,2 +1,5 @@ /mob/living/carbon/human/species/arachnid race = /datum/species/arachnid + +/mob/living/carbon/human/species/ipc + race = /datum/species/ipc diff --git a/monkestation/code/modules/research/designs/mechfabricator_designs.dm b/monkestation/code/modules/research/designs/mechfabricator_designs.dm index 1a7903c8d595..e55d7f2f5e4e 100644 --- a/monkestation/code/modules/research/designs/mechfabricator_designs.dm +++ b/monkestation/code/modules/research/designs/mechfabricator_designs.dm @@ -82,3 +82,39 @@ RND_CATEGORY_CYBERNETICS + RND_SUBCATEGORY_CYBERNETICS_ORGANS_MISC ) departmental_flags = DEPARTMENT_BITFLAG_MEDICAL + +/datum/design/ipc_part_chest_ipc_construction + name = "IPC Chest (IPC Construction)" + id = "ipc_chest_ipc_construction" + build_type = MECHFAB + construction_time = 100 + materials = list(/datum/material/iron = 20000, /datum/material/titanium = 500) + build_path = /obj/item/ipc_chest + category = list( + RND_CATEGORY_CYBERNETICS + RND_SUBCATEGORY_CYBERNETICS_ORGANS_MISC + ) + departmental_flags = DEPARTMENT_BITFLAG_SCIENCE + +/datum/design/ipc_part_posibrain + name = "Compact Positronic Brain" + id = "ipc_posibrain" + build_type = MECHFAB + construction_time = 150 + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT*3.4, /datum/material/glass = HALF_SHEET_MATERIAL_AMOUNT*2.7, /datum/material/gold =SMALL_MATERIAL_AMOUNT*10, /datum/material/diamond =SMALL_MATERIAL_AMOUNT*10) + build_path = /obj/item/mmi/posibrain/ipc + category = list( + RND_CATEGORY_CYBERNETICS + RND_SUBCATEGORY_CYBERNETICS_ORGANS_MISC + ) + departmental_flags = DEPARTMENT_BITFLAG_SCIENCE + +/datum/design/ipc_part_charger + name = "Recharging Electronics" + id = "ipc_charger" + build_type = MECHFAB + construction_time = 100 + materials = list(/datum/material/iron = 2000, /datum/material/glass = 1000) + build_path = /obj/item/organ/internal/cyberimp/arm/item_set/power_cord + category = list( + RND_CATEGORY_CYBERNETICS + RND_SUBCATEGORY_CYBERNETICS_ORGANS_MISC + ) + departmental_flags = DEPARTMENT_BITFLAG_SCIENCE diff --git a/monkestation/code/modules/research/techweb/all_nodes.dm b/monkestation/code/modules/research/techweb/all_nodes.dm index 55ec1b4100db..29a322bb6234 100644 --- a/monkestation/code/modules/research/techweb/all_nodes.dm +++ b/monkestation/code/modules/research/techweb/all_nodes.dm @@ -223,3 +223,16 @@ "ipc_leg_right" ) research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) + +/datum/techweb_node/advanced_ipcs + id = "advanced_ipcs" + display_name = "Advanced I.P.C Research" + description = "We have the technology to synthesize him." + prereq_ids = list("ipc_parts") + design_ids = list( + "ipc_chest_ipc_construction", + "ipc_posibrain", + "ipc_charger" + ) + required_experiments = list(/datum/experiment/scanning/cyborg_scan) + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 10000) diff --git a/monkestation/code/modules/smithing/ipcs/species.dm b/monkestation/code/modules/smithing/ipcs/species.dm index 44bc9ade80be..7a2fb36e7ca4 100644 --- a/monkestation/code/modules/smithing/ipcs/species.dm +++ b/monkestation/code/modules/smithing/ipcs/species.dm @@ -155,8 +155,12 @@ */ /datum/species/ipc/proc/bsod_death(mob/living/carbon/human/transformer, screen_name = "BSOD") saved_screen = change_screen // remember the old screen in case of revival - switch_to_screen(transformer, screen_name) - addtimer(CALLBACK(src, PROC_REF(switch_to_screen), transformer, "Blank"), 5 SECONDS) + for(var/obj/item/bodypart/head/ipc_head in transformer.bodyparts) // i know this is kinda bad but i honestly have no fucking clue how to directly get the head + if (ipc_head != null) // if we dont have a head dont do this + switch_to_screen(transformer, screen_name) + addtimer(CALLBACK(src, PROC_REF(switch_to_screen), transformer, "Blank"), 5 SECONDS) + return + switch_to_screen(transformer, "Blank") /datum/species/ipc/on_species_loss(mob/living/carbon/C) diff --git a/tgstation.dme b/tgstation.dme index 5a26bb276b5f..61466c85c271 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -5814,6 +5814,7 @@ #include "monkestation\code\game\objects\items\choice_beacon.dm" #include "monkestation\code\game\objects\items\cirno_plush.dm" #include "monkestation\code\game\objects\items\gravity_gun.dm" +#include "monkestation\code\game\objects\items\ipc_construction.dm" #include "monkestation\code\game\objects\items\jukebox_beacon.dm" #include "monkestation\code\game\objects\items\miningweapons.dm" #include "monkestation\code\game\objects\items\mop.dm" @@ -6688,6 +6689,7 @@ #include "monkestation\code\modules\events\summon_wizard_event.dm" #include "monkestation\code\modules\events\ghost_role\drifting_contractor.dm" #include "monkestation\code\modules\events\wizard\summon_gifts.dm" +#include "monkestation\code\modules\experisci\experiment\experiments.dm" #include "monkestation\code\modules\flavor_text\flavor_examine.dm" #include "monkestation\code\modules\flavor_text\flavor_helpers.dm" #include "monkestation\code\modules\flavor_text\flavor_hrefs.dm" @@ -6920,6 +6922,7 @@ #include "monkestation\code\modules\mob\living\basic\pets\parrot\parrot_ai\parroting_action.dm" #include "monkestation\code\modules\mob\living\basic\space_fauna\fugu_gland.dm" #include "monkestation\code\modules\mob\living\basic\vermin\mouse.dm" +#include "monkestation\code\modules\mob\living\brain\posibrain.dm" #include "monkestation\code\modules\mob\living\carbon\carbon.dm" #include "monkestation\code\modules\mob\living\carbon\carbon_death.dm" #include "monkestation\code\modules\mob\living\carbon\carbon_defense.dm"