Skip to content
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

IPC Construction! #2519

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
27 changes: 27 additions & 0 deletions monkestation/code/game/objects/items/ipc_construction.dm
Original file line number Diff line number Diff line change
@@ -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)
17 changes: 17 additions & 0 deletions monkestation/code/modules/experisci/experiment/experiments.dm
Original file line number Diff line number Diff line change
@@ -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
40 changes: 40 additions & 0 deletions monkestation/code/modules/mob/living/brain/posibrain.dm
Original file line number Diff line number Diff line change
@@ -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 = "<span class='notice'>You carefully locate the manual activation switch and start the compact positronic brain's boot process.</span>"
success_message = "<span class='notice'>The compact positronic brain pings, and its lights start flashing. Success!</span>"
fail_message = "<span class='notice'>The compact positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?</span>"
new_mob_message = "<span class='notice'>The compact positronic brain chimes quietly.</span>"
recharge_message = "<span class='warning'>The compact positronic brain isn't ready to activate again yet! Give it some time to recharge.</span>"

/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
3 changes: 3 additions & 0 deletions monkestation/code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/mob/living/carbon/human/species/arachnid
race = /datum/species/arachnid

/mob/living/carbon/human/species/ipc
race = /datum/species/ipc
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 13 additions & 0 deletions monkestation/code/modules/research/techweb/all_nodes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
8 changes: 6 additions & 2 deletions monkestation/code/modules/smithing/ipcs/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
Loading