From a2c4c91789b19aab86f77366a5cdfcdf2691e8d8 Mon Sep 17 00:00:00 2001 From: Anewbe Date: Thu, 4 May 2017 20:50:04 -0500 Subject: [PATCH] Starts support for species robolimbs --- code/modules/organs/robolimbs.dm | 1 + code/modules/research/prosfab_designs.dm | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/code/modules/organs/robolimbs.dm b/code/modules/organs/robolimbs.dm index 69d14c1dd1..a93f37bd56 100644 --- a/code/modules/organs/robolimbs.dm +++ b/code/modules/organs/robolimbs.dm @@ -43,6 +43,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ var/list/monitor_styles //If empty, the model of limbs offers a head compatible with monitors. var/parts = BP_ALL //Defines what parts said brand can replace on a body. var/health_hud_intensity = 1 // Intensity modifier for the health GUI indicator. + var/suggested_species = "Human" //If it should make the torso a species /datum/robolimb/unbranded_monitor company = "Unbranded Monitor" diff --git a/code/modules/research/prosfab_designs.dm b/code/modules/research/prosfab_designs.dm index 02a05eb64d..1323d0a449 100644 --- a/code/modules/research/prosfab_designs.dm +++ b/code/modules/research/prosfab_designs.dm @@ -11,7 +11,11 @@ if(istype(fabricator, /obj/machinery/pros_fabricator)) var/obj/machinery/pros_fabricator/prosfab = fabricator var/obj/item/organ/O = new build_path(newloc) - O.species = all_species["Human"] + if(prosfab.manufacturer) + var/datum/robolimb/manf = all_robolimbs[prosfab.manufacturer] + O.species = all_species["[manf.suggested_species]"] + else + O.species = all_species["Human"] O.robotize(prosfab.manufacturer) O.dna = new/datum/dna() //Uuughhhh... why do I have to do this? O.dna.ResetUI() @@ -25,7 +29,11 @@ /datum/design/item/prosfab/pros/torso/Fabricate(var/newloc, var/fabricator) if(istype(fabricator, /obj/machinery/pros_fabricator)) var/obj/machinery/pros_fabricator/prosfab = fabricator - var/mob/living/carbon/human/H = new(newloc,"Human") + var/newspecies = "Human" + if(prosfab.manufacturer) + var/datum/robolimb/manf = all_robolimbs[prosfab.manufacturer] + newspecies = manf.suggested_species + var/mob/living/carbon/human/H = new(newloc,newspecies) H.stat = DEAD H.gender = gender for(var/obj/item/organ/external/EO in H.organs) @@ -35,7 +43,7 @@ EO.remove_rejuv() for(var/obj/item/organ/external/O in H.organs) - O.species = all_species["Human"] + O.species = all_species[newspecies] O.robotize(prosfab.manufacturer) O.dna = new/datum/dna() O.dna.ResetUI()