Prosthetic and Robot limb fabrication is now separate. (#8300)

This commit is contained in:
mikomyazaki
2020-02-19 23:18:42 +01:00
committed by GitHub
parent a4d0051ad3
commit e9cd29b91b
5 changed files with 24 additions and 84 deletions
@@ -1,38 +1,43 @@
/datum/design/item/mechfab/prosthetic
category = "Prosthetic (External)"
//if the fabricator is a mech fab pass the manufacturer info over to the robot part constructor
//if the fabricator is a mech fab we need to construct the proper typepath for the manufacturer
/datum/design/item/mechfab/prosthetic/Fabricate(var/newloc, var/fabricator)
if(istype(fabricator, /obj/machinery/mecha_part_fabricator))
var/obj/machinery/mecha_part_fabricator/mechfab = fabricator
return new build_path(newloc, mechfab.manufacturer)
for(var/model_path in subtypesof(build_path))
var/obj/item/organ/external/E = new model_path
if(E.robotize_type == mechfab.manufacturer)
return E.forceMove(newloc)
else
qdel(E)
return new build_path(newloc) // We didn't find our manufacturer in the list, so return an unbranded one
return ..()
// Copied from robot.dm, but reflavoured to be more fitting to prosthetics.
/datum/design/item/mechfab/prosthetic/l_arm
name = "Prosthetic left arm"
id = "robot_l_arm"
build_path = /obj/item/robot_parts/l_arm
id = "prosthetic_l_arm"
build_path = /obj/item/organ/external/arm/industrial
time = 20
materials = list(DEFAULT_WALL_MATERIAL = 18000)
/datum/design/item/mechfab/prosthetic/r_arm
name = "Prosthetic right arm"
id = "robot_r_arm"
build_path = /obj/item/robot_parts/r_arm
id = "prosthetic_r_arm"
build_path = /obj/item/organ/external/arm/right/industrial
time = 20
materials = list(DEFAULT_WALL_MATERIAL = 18000)
/datum/design/item/mechfab/prosthetic/l_leg
name = "Prosthetic left leg"
id = "robot_l_leg"
build_path = /obj/item/robot_parts/l_leg
id = "prosthetic_l_leg"
build_path = /obj/item/organ/external/leg/industrial
time = 20
materials = list(DEFAULT_WALL_MATERIAL = 15000)
/datum/design/item/mechfab/prosthetic/r_leg
name = "Prosthetic right leg"
id = "robot_r_leg"
build_path = /obj/item/robot_parts/r_leg
id = "prosthetic_r_leg"
build_path = /obj/item/organ/external/leg/right/industrial
time = 20
materials = list(DEFAULT_WALL_MATERIAL = 15000)