Skip to content

Commit

Permalink
Fix: refactor mercenary mech parts (#619)
Browse files Browse the repository at this point in the history
P.s. Юджин сделал костылём, я бы честно говоря не трогал combat chasis
вообще, наследование у премейдов грешно.
Данный ПР даёт меху батарею на 3000, осветительные приборы, а так же
отрывает от combat меха, от греха подальше.
(прописывается отдельный premade)
Вот предложка:

https://discord.com/channels/617003227182792704/618952559607939072/1153984824260952076
  • Loading branch information
AmShegars authored Oct 3, 2023
1 parent 3d4fdc8 commit 44cf568
Showing 1 changed file with 76 additions and 16 deletions.
92 changes: 76 additions & 16 deletions infinity/code/modules/mechs/premade/combat.dm
Original file line number Diff line number Diff line change
@@ -1,23 +1,83 @@
/mob/living/exosuit/premade/combat/merc/Initialize()
if (!body)
body = new /obj/item/mech_component/chassis/combat/merc(src)
body.color = COLOR_WALL_GUNMETAL
/mob/living/exosuit/premade/merc
name = "combat exosuit"
desc = "A sleek, modern combat exosuit."

/mob/living/exosuit/premade/merc/Initialize()
if(!arms)
arms = new /obj/item/mech_component/manipulators/merc(src)
arms.color = COLOR_GUNMETAL
if(!legs)
legs = new /obj/item/mech_component/propulsion/merc(src)
legs.color = COLOR_GUNMETAL
if(!head)
head = new /obj/item/mech_component/sensors/merc(src)
head.color = COLOR_GUNMETAL
if(!body)
body = new /obj/item/mech_component/chassis/merc(src)
body.color = COLOR_GUNMETAL

. = ..()
if(arms)
arms.color = COLOR_WALL_GUNMETAL
if(legs)
legs.color = COLOR_WALL_GUNMETAL
if(head)
head.color = COLOR_WALL_GUNMETAL

/mob/living/exosuit/premade/combat/merc/spawn_mech_equipment()

/mob/living/exosuit/premade/merc/spawn_mech_equipment()
..()
install_system(new /obj/item/mech_equipment/mounted_system/taser/plasma_rifle(src), HARDPOINT_LEFT_HAND)
install_system(new /obj/item/mech_equipment/mounted_system/taser/machinegun(src), HARDPOINT_RIGHT_HAND)
install_system(new /obj/item/mech_equipment/shields(src), HARDPOINT_BACK)
install_system(new /obj/item/mech_equipment/mounted_system/taser/plasma(src), HARDPOINT_LEFT_SHOULDER)
install_system(new /obj/item/mech_equipment/mounted_system/taser/plasma(src), HARDPOINT_RIGHT_SHOULDER)
install_system(new /obj/item/mech_equipment/light(src), HARDPOINT_HEAD)

/obj/item/mech_component/manipulators/merc
name = "combat arms"
exosuit_desc_string = "flexible, advanced manipulators"
icon_state = "combat_arms"
melee_damage = 5
action_delay = 10
power_use = 50

/obj/item/mech_component/propulsion/merc
name = "combat legs"
exosuit_desc_string = "sleek hydraulic legs"
icon_state = "combat_legs"
move_delay = 3
turn_delay = 3
power_use = 20

/obj/item/mech_component/sensors/merc
name = "combat sensors"
gender = PLURAL
exosuit_desc_string = "high-resolution thermal sensors"
icon_state = "combat_head"
vision_flags = SEE_MOBS
see_invisible = SEE_INVISIBLE_NOLIGHTING
power_use = 200

/obj/item/mech_component/chassis/combat/merc/prebuild()
/obj/item/mech_component/sensors/merc/prebuild()
..()
software = new(src)
software.installed_software = list(MECH_SOFTWARE_WEAPONS)

/obj/item/mech_component/chassis/merc
name = "sealed exosuit chassis"
hatch_descriptor = "canopy"
pilot_coverage = 100
exosuit_desc_string = "an armoured chassis"
icon_state = "combat_body"
power_use = 40

/obj/item/mech_component/chassis/merc/prebuild()
. = ..()
QDEL_NULL(m_armour)
QDEL_NULL(cell)
cell = new /obj/item/cell/hyper(src)
m_armour = new /obj/item/robot_parts/robot_component/armour/exosuit/combat/syndie(src)


/obj/item/mech_component/chassis/merc/Initialize()
pilot_positions = list(
list(
"[NORTH]" = list("x" = 8, "y" = 8),
"[SOUTH]" = list("x" = 8, "y" = 8),
"[EAST]" = list("x" = 4, "y" = 8),
"[WEST]" = list("x" = 12, "y" = 8)
)
)

. = ..()

0 comments on commit 44cf568

Please sign in to comment.