Cargo Mech Fix (#9864)

This commit is contained in:
Geeves
2020-09-03 00:38:12 +02:00
committed by GitHub
parent 39e92a0d96
commit 7c11ec86e5
2 changed files with 14 additions and 4 deletions
@@ -180,19 +180,23 @@
)
var/mech_colour = super_random ? FALSE : pick(use_colours)
if(!arms)
var/armstype = pick(subtypesof(/obj/item/mech_component/manipulators))
var/list/forbidden_arm_types = list(/obj/item/mech_component/manipulators/cult)
var/armstype = pick(subtypesof(/obj/item/mech_component/manipulators) - forbidden_arm_types)
arms = new armstype(src)
arms.color = mech_colour ? mech_colour : pick(use_colours)
if(!legs)
var/legstype = pick(subtypesof(/obj/item/mech_component/propulsion))
var/list/forbidden_leg_types = list(/obj/item/mech_component/propulsion/cult)
var/legstype = pick(subtypesof(/obj/item/mech_component/propulsion) - forbidden_leg_types)
legs = new legstype(src)
legs.color = mech_colour ? mech_colour : pick(use_colours)
if(!head)
var/headtype = pick(subtypesof(/obj/item/mech_component/sensors))
var/list/forbidden_head_types = list(/obj/item/mech_component/sensors/cult)
var/headtype = pick(subtypesof(/obj/item/mech_component/sensors) - forbidden_head_types)
head = new headtype(src)
head.color = mech_colour ? mech_colour : pick(use_colours)
if(!body)
var/bodytype = pick(subtypesof(/obj/item/mech_component/chassis))
var/list/forbidden_body_types = list(/obj/item/mech_component/chassis/cult)
var/bodytype = pick(subtypesof(/obj/item/mech_component/chassis) - forbidden_body_types)
body = new bodytype(src)
body.color = mech_colour ? mech_colour : pick(use_colours)
update_icon()