mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fixes organ bioprinter and the organs. Now less debuggy and less buggy too.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//These machines are mostly just here for debugging/spawning. Skeletons of the feature to come.
|
||||
|
||||
/obj/machinery/bioprinter
|
||||
name = "bioprinter"
|
||||
name = "organ bioprinter"
|
||||
desc = "It's a machine that grows replacement organs."
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
|
||||
@@ -41,33 +41,45 @@
|
||||
if(prints_prosthetics)
|
||||
O.robotic = 2
|
||||
else if(loaded_dna)
|
||||
visible_message("The printer would be using the DNA sample if it was coded.")
|
||||
//TODO: Copy DNA hash or donor reference over to new organ.
|
||||
visible_message("<span class='notice'>The printer injects stored DNA in used biomass.</span>.")
|
||||
var/datum/organ/internal/I = new O.organ_type
|
||||
I.transplant_data = list()
|
||||
var/mob/living/carbon/C = loaded_dna["donor"]
|
||||
I.transplant_data["species"] = C.species.name
|
||||
I.transplant_data["blood_type"] = loaded_dna["blood_type"]
|
||||
I.transplant_data["blood_DNA"] = loaded_dna["blood_DNA"]
|
||||
O.organ_data = I
|
||||
I.organ_holder = O
|
||||
|
||||
visible_message("The bioprinter spits out a new organ.")
|
||||
|
||||
visible_message("<span class='info'>The bioprinter spits out a new organ.")
|
||||
|
||||
else
|
||||
user << "There is not enough matter in the printer."
|
||||
user << "<span class='warning'>There is not enough matter in the printer.</span>"
|
||||
|
||||
/obj/machinery/bioprinter/attackby(obj/item/weapon/W, mob/user)
|
||||
|
||||
// DNA sample from syringe.
|
||||
if(!prints_prosthetics && istype(W,/obj/item/weapon/reagent_containers/syringe))
|
||||
user << "You inject the blood sample into the bioprinter, but it isn't coded yet."
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = W
|
||||
var/datum/reagent/blood/injected = locate() in S.reagents.reagent_list //Grab some blood
|
||||
if(injected && injected.data)
|
||||
loaded_dna = injected.data
|
||||
user << "<span class='info'>You inject the blood sample into the bioprinter.</span>"
|
||||
return
|
||||
// Meat for biomass.
|
||||
else if(!prints_prosthetics && istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat))
|
||||
user << "\blue \The [src] processes \the [W]."
|
||||
stored_matter += 50
|
||||
user.drop_item()
|
||||
user << "<span class='info'>\The [src] processes \the [W]. Levels of stored biomass now: [stored_matter]</span>"
|
||||
del(W)
|
||||
return
|
||||
// Steel for matter.
|
||||
else if(prints_prosthetics && istype(W, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = W
|
||||
user << "\blue \The [src] processes \the [W]."
|
||||
stored_matter += M.amount * 10
|
||||
user.drop_item()
|
||||
user << "<span class='info'>\The [src] processes \the [W]. Levels of stored matter now: [stored_matter]</span>"
|
||||
del(W)
|
||||
return
|
||||
else
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
/obj/item/organ/proc/update()
|
||||
|
||||
if(!organ_data)
|
||||
organ_data = new /datum/organ/internal()
|
||||
organ_data = new organ_type()
|
||||
|
||||
if(robotic)
|
||||
organ_data.robotic = robotic
|
||||
@@ -93,6 +93,7 @@
|
||||
organ_tag = "heart"
|
||||
fresh = 6 // Juicy.
|
||||
dead_icon = "heart-off"
|
||||
organ_type = /datum/organ/internal/heart
|
||||
|
||||
/obj/item/organ/lungs
|
||||
name = "lungs"
|
||||
@@ -101,6 +102,7 @@
|
||||
prosthetic_name = "gas exchange system"
|
||||
prosthetic_icon = "lungs-prosthetic"
|
||||
organ_tag = "lungs"
|
||||
organ_type = /datum/organ/internal/lungs
|
||||
|
||||
/obj/item/organ/kidneys
|
||||
name = "kidneys"
|
||||
@@ -109,6 +111,7 @@
|
||||
prosthetic_name = "prosthetic kidneys"
|
||||
prosthetic_icon = "kidneys-prosthetic"
|
||||
organ_tag = "kidneys"
|
||||
organ_type = /datum/organ/internal/kidney
|
||||
|
||||
/obj/item/organ/eyes
|
||||
name = "eyeballs"
|
||||
@@ -117,7 +120,7 @@
|
||||
prosthetic_name = "visual prosthesis"
|
||||
prosthetic_icon = "eyes-prosthetic"
|
||||
organ_tag = "eyes"
|
||||
|
||||
organ_type = /datum/organ/internal/eyes
|
||||
var/eye_colour
|
||||
|
||||
/obj/item/organ/liver
|
||||
@@ -126,11 +129,13 @@
|
||||
prosthetic_name = "toxin filter"
|
||||
prosthetic_icon = "liver-prosthetic"
|
||||
organ_tag = "liver"
|
||||
organ_type = /datum/organ/internal/liver
|
||||
|
||||
/obj/item/organ/appendix
|
||||
name = "appendix"
|
||||
icon_state = "appendix"
|
||||
organ_tag = "appendix"
|
||||
organ_type = /datum/organ/internal/appendix
|
||||
|
||||
//These are here so they can be printed out via the fabricator.
|
||||
/obj/item/organ/heart/prosthetic
|
||||
|
||||
Reference in New Issue
Block a user