/
mecha_construction_paths.dm
821 lines (753 loc) · 27 KB
/
mecha_construction_paths.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
////////////////////////////////
///// Construction datums //////
////////////////////////////////
/datum/component/construction/mecha
var/base_icon
// Component typepaths.
// most must be defined unless
// get_steps is overriden.
// Circuit board typepaths.
// circuit_control and circuit_periph must be defined
// unless get_circuit_steps is overriden.
var/circuit_control
var/circuit_periph
var/circuit_weapon
// Armor plating typepaths. both must be defined
// unless relevant step procs are overriden. amounts
// must be defined if using /obj/item/stack/sheet types
var/obj/inner_plating
var/inner_plating_amount
var/obj/outer_plating
var/outer_plating_amount
/datum/component/construction/mecha/spawn_result()
if(!result)
return
// Remove default mech power cell, as we replace it with a new one.
var/obj/vehicle/sealed/mecha/mech = new result(drop_location(), /* built_manually = */ TRUE)
var/obj/item/mecha_parts/chassis/parent_chassis = parent
mech.CheckParts(parent_chassis.contents)
SSblackbox.record_feedback("tally", "mechas_created", 1, mech.name)
ADD_TRAIT(mech, TRAIT_MECHA_CREATED_NORMALLY, mech)
QDEL_NULL(parent)
// Default proc to generate mech steps.
// Override if the mech needs an entirely custom process (See HONK mech)
// Otherwise override specific steps as needed (Ripley, Clarke, Phazon)
/datum/component/construction/mecha/proc/get_steps()
return get_frame_steps() + get_circuit_steps() + (circuit_weapon ? get_circuit_weapon_steps() : list()) + get_stockpart_steps() + get_inner_plating_steps() + get_outer_plating_steps()
/datum/component/construction/mecha/update_parent(step_index)
steps = get_steps()
..()
// By default, each step in mech construction has a single icon_state:
// "[base_icon][index - 1]"
// For example, Ripley's step 1 icon_state is "ripley0"
var/atom/parent_atom = parent
if(!steps[index]["icon_state"] && base_icon)
parent_atom.icon_state = "[base_icon][index - 1]"
/datum/component/construction/unordered/mecha_chassis/custom_action(obj/item/I, mob/living/user, typepath)
. = user.transferItemToLoc(I, parent)
if(.)
var/atom/parent_atom = parent
user.balloon_alert_to_viewers("connected [I]")
parent_atom.add_overlay(I.icon_state+"+o")
qdel(I)
/datum/component/construction/unordered/mecha_chassis/spawn_result()
var/atom/parent_atom = parent
parent_atom.icon = 'icons/mob/mech_construction.dmi'
parent_atom.set_density(TRUE)
parent_atom.cut_overlays()
..()
// Default proc for the first steps of mech construction.
/datum/component/construction/mecha/proc/get_frame_steps()
return list(
list(
"key" = TOOL_WRENCH,
"desc" = "The hydraulic systems can be connected with a <b>wrench</b>.",
"forward_message" = "connected the hydraulic systems",
),
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_WRENCH,
"desc" = "The hydraulic systems are connected, and can be activated with a <b>screwdriver</b>.",
"forward_message" = "activated the hydraulic systems",
"backward_message" = "disconnected the hydraulic systems"
),
list(
"key" = /obj/item/stack/cable_coil,
"amount" = 5,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "The hydraulic systems are active, and the frame can be <b>wired</b>.",
"forward_message" = "added wiring",
"backward_message" = "deactivated the hydraulic systems"
),
list(
"key" = TOOL_WIRECUTTER,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "The wiring is added, and can be adjusted with <b>wirecutters</b>.",
"forward_message" = "adjusted wiring",
"backward_message" = "removed wiring"
)
)
// Default proc for the circuit board steps of a mech.
// Second set of steps by default.
/datum/component/construction/mecha/proc/get_circuit_steps()
return list(
list(
"key" = circuit_control,
"action" = ITEM_DELETE,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "The wiring is adjusted, and the <b>central control module</b> slot has opened.",
"forward_message" = "added central control module",
"backward_message" = "disconnected wiring"
),
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_CROWBAR,
"desc" = "Central control module is installed, and can be <b>screwed</b> into place.",
"forward_message" = "secured central control module",
"backward_message" = "removed central control module"
),
list(
"key" = circuit_periph,
"action" = ITEM_DELETE,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "Central control module is secured, and the <b>peripheral control module</b> slot has opened.",
"forward_message" = "added peripheral control module",
"backward_message" = "unsecured central control module"
),
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_CROWBAR,
"desc" = "Peripheral control module is installed, and can be <b>screwed</b> into place.",
"forward_message" = "secured peripheral control module",
"backward_message" = "removed peripheral control module"
)
)
// Default proc for weapon circuitboard steps
// Used by combat mechs
/datum/component/construction/mecha/proc/get_circuit_weapon_steps()
return list(
list(
"key" = circuit_weapon,
"action" = ITEM_DELETE,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "Peripherals control module is secured, and the <b>weapon control module<b> slot has opened.",
"forward_message" = "added weapon control module",
"backward_message" = "unsecured peripheral control module"
),
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_CROWBAR,
"desc" = "Weapon control module is installed, and can be <b>screwed</b> into place.",
"forward_message" = "secured weapon control module",
"backward_message" = "removed weapon control module"
)
)
// Default proc for stock part installation
// Third set of steps by default
/datum/component/construction/mecha/proc/get_stockpart_steps()
var/prevstep_text = circuit_weapon ? "Weapon control module is secured" : "Peripherals control module is secured"
prevstep_text += ", and the <b>scanning module</b> can be added."
var/backward_text = circuit_weapon ? "unsecured weapon control module" : "unsecured peripheral module"
return list(
list(
"key" = /obj/item/stock_parts/scanning_module,
"action" = ITEM_MOVE_INSIDE,
"back_key" = TOOL_SCREWDRIVER,
"desc" = prevstep_text,
"forward_message" = "added scanning module",
"backward_message" = backward_text
),
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_CROWBAR,
"desc" = "Scanning module is installed, and can be <b>screwed</b> into place.",
"forward_message" = "secured scanning module",
"backward_message" = "removed scanning module"
),
list(
"key" = /obj/item/stock_parts/capacitor,
"action" = ITEM_MOVE_INSIDE,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "Scanning module is secured, the <b>capacitor</b> can be added.",
"forward_message" = "added capacitor",
"backward_message" = "unscecured scanning module"
),
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_CROWBAR,
"desc" = "Capacitor is installed, and can be <b>screwed</b> into place.",
"forward_message" = "secured capacitor",
"backward_message" = "removed capacitor"
),
list(
"key" = /obj/item/stock_parts/servo,
"action" = ITEM_MOVE_INSIDE,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "Scanning module is secured, the <b>servo</b> can be added.",
"forward_message" = "added servo",
"backward_message" = "unsecured capacitor"
),
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_CROWBAR,
"desc" = "Servo is installed, and can be <b>screwed</b> into place.",
"forward_message" = "secured servo",
"backward_message" = "removed servo"
),
list(
"key" = /obj/item/stock_parts/cell,
"action" = ITEM_MOVE_INSIDE,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "Servo is secured, and the <b>power cell</b> can be added.",
"forward_message" = "added power cell",
"backward_message" = "unsecured servo"
),
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_CROWBAR,
"desc" = "The power cell is installed, and can be <b>screwed</b> into place.",
"forward_message" = "secured power cell",
"backward_message" = "removed power cell"
)
)
// Default proc for inner armor plating
// Fourth set of steps by default
/datum/component/construction/mecha/proc/get_inner_plating_steps()
var/list/first_step
if(ispath(inner_plating, /obj/item/stack/sheet))
first_step = list(
list(
"key" = inner_plating,
"amount" = inner_plating_amount,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "The power cell is secured, [inner_plating_amount] sheets of [initial(inner_plating.name)] can be used as inner plating.",
"forward_message" = "installed internal armor layer",
"backward_message" = "unsecured power cell"
)
)
else
first_step = list(
list(
"key" = inner_plating,
"action" = ITEM_DELETE,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "The power cell is secured, [initial(inner_plating.name)] can be used as inner plating.",
"forward_message" = "installed internal armor layer",
"backward_message" = "unsecured power cell"
)
)
return first_step + list(
list(
"key" = TOOL_WRENCH,
"back_key" = TOOL_CROWBAR,
"desc" = "Inner plating is installed, and can be <b>wrenched</b> into place.",
"forward_message" = "secured internal armor layer",
"backward_message" = "pried off internal armor layer"
),
list(
"key" = TOOL_WELDER,
"back_key" = TOOL_WRENCH,
"desc" = "Inner plating is wrenched, and can be <b>welded</b>.",
"forward_message" = "welded internal armor layer",
"backward_message" = "unfastened internal armor layer"
)
)
// Default proc for outer armor plating
// Fifth set of steps by default
/datum/component/construction/mecha/proc/get_outer_plating_steps()
var/list/first_step
if(ispath(outer_plating, /obj/item/stack/sheet))
first_step = list(
list(
"key" = outer_plating,
"amount" = outer_plating_amount,
"back_key" = TOOL_WELDER,
"desc" = "Inner plating is welded, [outer_plating_amount] sheets of [initial(outer_plating.name)] can be used as external armor.",
"forward_message" = "installed external armor layer",
"backward_message" = "cut off internal armor layer"
)
)
else
first_step = list(
list(
"key" = outer_plating,
"action" = ITEM_DELETE,
"back_key" = TOOL_WELDER,
"desc" = "Inner plating is welded, [initial(outer_plating.name)] can be used as external armor.",
"forward_message" = "installed external armor layer",
"backward_message" = "cut off internal armor layer"
)
)
return first_step + list(
list(
"key" = TOOL_WRENCH,
"back_key" = TOOL_CROWBAR,
"desc" = "External armor is installed, and can be <b>wrenched</b> into place.",
"forward_message" = "secured external armor layer",
"backward_message" = "pried off external armor layer"
),
list(
"key" = TOOL_WELDER,
"back_key" = TOOL_WRENCH,
"desc" = "External armor is wrenched, and can be <b>welded</b>.",
"forward_message" = "welded external armor layer",
"backward_message" = "unfastened external armor layer"
)
)
/// Generic mech construction messages
/datum/component/construction/mecha/custom_action(obj/item/I, mob/living/user, diff)
if(!..())
return FALSE
if(diff == FORWARD && steps[index]["forward_message"])
user.balloon_alert_to_viewers(steps[index]["forward_message"])
else if(steps[index]["backward_message"])
user.balloon_alert_to_viewers(steps[index]["backward_message"])
return TRUE
//RIPLEY
/datum/component/construction/unordered/mecha_chassis/ripley
result = /datum/component/construction/mecha/ripley
steps = list(
/obj/item/mecha_parts/part/ripley_torso,
/obj/item/mecha_parts/part/ripley_left_arm,
/obj/item/mecha_parts/part/ripley_right_arm,
/obj/item/mecha_parts/part/ripley_left_leg,
/obj/item/mecha_parts/part/ripley_right_leg
)
/datum/component/construction/mecha/ripley
result = /obj/vehicle/sealed/mecha/ripley
base_icon = "ripley"
circuit_control = /obj/item/circuitboard/mecha/ripley/main
circuit_periph = /obj/item/circuitboard/mecha/ripley/peripherals
inner_plating=/obj/item/stack/sheet/iron
inner_plating_amount = 5
outer_plating=/obj/item/stack/rods
outer_plating_amount = 10
/datum/component/construction/mecha/ripley/get_outer_plating_steps()
return list(
list(
"key" = /obj/item/stack/rods,
"amount" = 10,
"back_key" = TOOL_WELDER,
"desc" = "Outer plating is welded, and 10 <b>rods</b> can be used to install the cockpit.",
"forward_message" = "installed cockpit",
"backward_message" = "cut off outer armor layer"
),
list(
"key" = TOOL_WELDER,
"back_key" = TOOL_WIRECUTTER,
"desc" = "Cockpit wire screen is installed, and can be <b>welded</b>.",
"forward_message" = "welded cockpit",
"backward_message" = "cut off cockpit"
),
)
//GYGAX
/datum/component/construction/unordered/mecha_chassis/gygax
result = /datum/component/construction/mecha/gygax
steps = list(
/obj/item/mecha_parts/part/gygax_torso,
/obj/item/mecha_parts/part/gygax_left_arm,
/obj/item/mecha_parts/part/gygax_right_arm,
/obj/item/mecha_parts/part/gygax_left_leg,
/obj/item/mecha_parts/part/gygax_right_leg,
/obj/item/mecha_parts/part/gygax_head
)
/datum/component/construction/mecha/gygax
result = /obj/vehicle/sealed/mecha/gygax
base_icon = "gygax"
circuit_control = /obj/item/circuitboard/mecha/gygax/main
circuit_periph = /obj/item/circuitboard/mecha/gygax/peripherals
circuit_weapon = /obj/item/circuitboard/mecha/gygax/targeting
inner_plating = /obj/item/stack/sheet/iron
inner_plating_amount = 5
outer_plating=/obj/item/mecha_parts/part/gygax_armor
outer_plating_amount=1
/datum/component/construction/mecha/gygax/action(datum/source, atom/used_atom, mob/user)
ASYNC //This proc will never actually sleep, it calls do_after with a time of 0.
. = check_step(used_atom, user)
return .
//CLARKE
/datum/component/construction/unordered/mecha_chassis/clarke
result = /datum/component/construction/mecha/clarke
steps = list(
/obj/item/mecha_parts/part/clarke_torso,
/obj/item/mecha_parts/part/clarke_left_arm,
/obj/item/mecha_parts/part/clarke_right_arm,
/obj/item/mecha_parts/part/clarke_head
)
/datum/component/construction/mecha/clarke
result = /obj/vehicle/sealed/mecha/clarke
base_icon = "clarke"
circuit_control = /obj/item/circuitboard/mecha/clarke/main
circuit_periph = /obj/item/circuitboard/mecha/clarke/peripherals
inner_plating = /obj/item/stack/sheet/plasteel
inner_plating_amount = 5
outer_plating = /obj/item/stack/sheet/mineral/gold
outer_plating_amount = 5
/datum/component/construction/mecha/clarke/get_frame_steps()
return list(
list(
"key" = /obj/item/stack/conveyor,
"amount" = 4,
"desc" = "The treads can be added using 4 sheets of conveyor belts.",
"forward_message" = "added tread systems",
),
list(
"key" = TOOL_WRENCH,
"back_key" = TOOL_CROWBAR,
"desc" = "The treads are installed, and the hydraulic systems can be connected with a <b>wrench</b>.",
"forward_message" = "connected the hydraulic systems",
"backward_message" = "removed tread systems"
),
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_WRENCH,
"desc" = "The hydraulic systems are connected, and can be activated with a <b>screwdriver</b>.",
"forward_message" = "activated hydraulic systems",
"backward_message" = "disconnected hydraulic systems"
),
list(
"key" = /obj/item/stack/cable_coil,
"amount" = 5,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "The hydraulic systems are active, and the frame can be <b>wired</b>.",
"forward_message" = "added wiring",
"backward_message" = "deactivated hydraulic systems"
),
list(
"key" = TOOL_WIRECUTTER,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "The wiring is added, and can be adjusted with <b>wirecutters</b>.",
"forward_message" = "adjusted wiring",
"backward_message" = "removed wiring"
)
)
//HONKER
/datum/component/construction/unordered/mecha_chassis/honker
result = /datum/component/construction/mecha/honker
steps = list(
/obj/item/mecha_parts/part/honker_torso,
/obj/item/mecha_parts/part/honker_left_arm,
/obj/item/mecha_parts/part/honker_right_arm,
/obj/item/mecha_parts/part/honker_left_leg,
/obj/item/mecha_parts/part/honker_right_leg,
/obj/item/mecha_parts/part/honker_head
)
/datum/component/construction/mecha/honker
result = /obj/vehicle/sealed/mecha/honker
steps = list(
list(
"key" = /obj/item/bikehorn,
"desc" = "HONK!"
),
list(
"key" = /obj/item/circuitboard/mecha/honker/main,
"action" = ITEM_DELETE,
"desc" = "Fun <b>central board</b> can be added!",
"forward_message" = "added fun"
),
list(
"key" = /obj/item/bikehorn,
"desc" = "HONK!!"
),
list(
"key" = /obj/item/circuitboard/mecha/honker/peripherals,
"action" = ITEM_DELETE,
"desc" = "Joke <b>peripheral board</b> can be added!",
"forward_message" = "added joke"
),
list(
"key" = /obj/item/bikehorn,
"desc" = "HONK!!!"
),
list(
"key" = /obj/item/circuitboard/mecha/honker/targeting,
"action" = ITEM_DELETE,
"desc" = "Prank <b>targeting board</b> can be added!",
"forward_message" = "added prank"
),
list(
"key" = /obj/item/bikehorn,
"desc" = "HONK!!!!"
),
list(
"key" = /obj/item/stock_parts/scanning_module,
"action" = ITEM_MOVE_INSIDE,
"desc" = "Silly <b>scanning</b> module can be added!",
"forward_message" = "added silly"
),
list(
"key" = /obj/item/bikehorn,
"desc" = "HONK!!!!!"
),
list(
"key" = /obj/item/stock_parts/capacitor,
"action" = ITEM_MOVE_INSIDE,
"desc" = "Humor <b>capacitor</b> can be added!",
"forward_message" = "added humor"
),
list(
"key" = /obj/item/bikehorn,
"desc" = "HONK!!!!!!"
),
list(
"key" = /obj/item/stock_parts/servo,
"action" = ITEM_MOVE_INSIDE,
"desc" = "Humor <b>servo</b> can be added!",
"forward_message" = "added smile"
),
list(
"key" = /obj/item/bikehorn,
"desc" = "HONK!!!!!!"
),
list(
"key" = /obj/item/stock_parts/cell,
"action" = ITEM_MOVE_INSIDE,
"desc" = "Laughter <b>cell</b> can be added!",
"forward_message" = "added laughter"
),
list(
"key" = /obj/item/bikehorn,
"desc" = "HONK!!!!!!!"
),
list(
"key" = /obj/item/clothing/mask/gas/clown_hat,
"action" = ITEM_DELETE,
"desc" = "Clown mask can be ceremoniously added!",
"forward_message" = "added mask"
),
list(
"key" = /obj/item/bikehorn,
"desc" = "HONK!!!!!!!!"
),
list(
"key" = /obj/item/clothing/shoes/clown_shoes,
"action" = ITEM_DELETE,
"desc" = "Clown shoes can be reverently added!",
"forward_message" = "added shoes"
),
list(
"key" = /obj/item/bikehorn,
"desc" = "Honk again, if you are brave enough."
),
)
/datum/component/construction/mecha/honker/get_steps()
return steps
// HONK doesn't have any construction step icons, so we just set an icon once.
/datum/component/construction/mecha/honker/update_parent(step_index)
if(step_index == 1)
var/atom/parent_atom = parent
parent_atom.icon = 'icons/mob/mech_construct.dmi'
parent_atom.icon_state = "honker_chassis"
..()
/datum/component/construction/mecha/honker/custom_action(obj/item/I, mob/living/user, diff)
if(istype(I, /obj/item/bikehorn))
playsound(parent, 'sound/items/bikehorn.ogg', 50, TRUE)
user.balloon_alert_to_viewers("HONK!")
return TRUE
return ..()
//DURAND
/datum/component/construction/unordered/mecha_chassis/durand
result = /datum/component/construction/mecha/durand
steps = list(
/obj/item/mecha_parts/part/durand_torso,
/obj/item/mecha_parts/part/durand_left_arm,
/obj/item/mecha_parts/part/durand_right_arm,
/obj/item/mecha_parts/part/durand_left_leg,
/obj/item/mecha_parts/part/durand_right_leg,
/obj/item/mecha_parts/part/durand_head
)
/datum/component/construction/mecha/durand
result = /obj/vehicle/sealed/mecha/durand
base_icon = "durand"
circuit_control = /obj/item/circuitboard/mecha/durand/main
circuit_periph = /obj/item/circuitboard/mecha/durand/peripherals
circuit_weapon = /obj/item/circuitboard/mecha/durand/targeting
inner_plating = /obj/item/stack/sheet/iron
inner_plating_amount = 5
outer_plating = /obj/item/mecha_parts/part/durand_armor
outer_plating_amount = 1
//PHAZON
/datum/component/construction/unordered/mecha_chassis/phazon
result = /datum/component/construction/mecha/phazon
steps = list(
/obj/item/mecha_parts/part/phazon_torso,
/obj/item/mecha_parts/part/phazon_left_arm,
/obj/item/mecha_parts/part/phazon_right_arm,
/obj/item/mecha_parts/part/phazon_left_leg,
/obj/item/mecha_parts/part/phazon_right_leg,
/obj/item/mecha_parts/part/phazon_head
)
/datum/component/construction/mecha/phazon
result = /obj/vehicle/sealed/mecha/phazon
base_icon = "phazon"
circuit_control = /obj/item/circuitboard/mecha/phazon/main
circuit_periph = /obj/item/circuitboard/mecha/phazon/peripherals
circuit_weapon = /obj/item/circuitboard/mecha/phazon/targeting
inner_plating = /obj/item/stack/sheet/plasteel
inner_plating_amount = 5
outer_plating = /obj/item/mecha_parts/part/phazon_armor
outer_plating_amount = 1
/datum/component/construction/mecha/phazon/get_stockpart_steps()
return list(
list(
"key" = /obj/item/stock_parts/scanning_module,
"action" = ITEM_MOVE_INSIDE,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "Weapon control module is secured, and the <b>scanning module</b> can be added.",
"forward_message" = "added scanning module",
"backward_message" = "unsecured weapon control module"
),
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_CROWBAR,
"desc" = "Scanning module is installed, and can be <b>screwed</b> into place.",
"forward_message" = "secured scanning module",
"backward_message" = "removed scanning module"
),
list(
"key" = /obj/item/stock_parts/capacitor,
"action" = ITEM_MOVE_INSIDE,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "Scanning module is secured, and the <b>capacitor</b> can be added.",
"forward_message" = "added capacitor",
"backward_message" = "unsecured scanning module"
),
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_CROWBAR,
"desc" = "Capacitor is installed, and can be <b>screwed</b> into place.",
"forward_message" = "secured capacitor",
"backward_message" = "removed capacitor"
),
list(
"key" = /obj/item/stock_parts/servo,
"action" = ITEM_MOVE_INSIDE,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "Capacitor is secured, the <b>servo</b> can be added.",
"forward_message" = "added servo",
"backward_message" = "unsecured capacitor"
),
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_CROWBAR,
"desc" = "Servo is installed, and can be <b>screwed</b> into place.",
"forward_message" = "secured servo",
"backward_message" = "removed servo"
),
list(
"key" = /obj/item/stack/ore/bluespace_crystal,
"amount" = 1,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "Servo is secured, and the <b>bluespace crystal</b> can be added.",
"forward_message" = "added bluespace crystal",
"backward_message" = "unsecured servo"
),
list(
"key" = /obj/item/stack/cable_coil,
"amount" = 5,
"back_key" = TOOL_CROWBAR,
"desc" = "The bluespace crystal is installed, and can be <b>wired</b> to the mech systems.",
"forward_message" = "connected bluespace crystal",
"backward_message" = "removed bluespace crystal"
),
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_WIRECUTTER,
"desc" = "The bluespace crystal is connected, and the system can be engaged with a <b>screwdriver</b>.",
"forward_message" = "engaded bluespace crystal",
"backward_message" = "disconnected bluespace crystal"
),
list(
"key" = /obj/item/stock_parts/cell,
"action" = ITEM_MOVE_INSIDE,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "The bluespace crystal is engaged, and the <b>power cell</b> can be added.",
"forward_message" = "added power cell",
"backward_message" = "disengaged bluespace crystal"
),
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_CROWBAR,
"desc" = "The power cell is installed, and can be <b>screwed</b> into place.",,
"forward_message" = "secured power cell",
"backward_message" = "removed power cell",
"icon_state" = "phazon19"
// This is the point where a step icon is skipped, so "icon_state" had to be set manually starting from here.
)
)
/datum/component/construction/mecha/phazon/get_outer_plating_steps()
return list(
list(
"key" = outer_plating,
"amount" = 1,
"action" = ITEM_DELETE,
"back_key" = TOOL_WELDER,
"desc" = "Internal armor is welded, [initial(outer_plating.name)] can be used as external armor.",
"forward_message" = "added external armor layer",
"backward_message" = "cut off internal armor layer"
),
list(
"key" = TOOL_WRENCH,
"back_key" = TOOL_CROWBAR,
"desc" = "External armor is installed, and can be <b>wrenched</b> into place.",
"forward_message" = "secured external armor layer",
"backward_message" = "pried off external armor"
),
list(
"key" = TOOL_WELDER,
"back_key" = TOOL_WRENCH,
"desc" = "External armor is wrenched, and can be <b>welded</b>.",
"forward_message" = "welded external armor",
"backward_message" = "unfastened external armor layer"
),
list(
"key" = /obj/item/assembly/signaler/anomaly/bluespace,
"action" = ITEM_DELETE,
"back_key" = TOOL_WELDER,
"desc" = "The external armor is welded, and the <b>bluespace anomaly core</b> socket is open.",
"icon_state" = "phazon26",
"forward_message" = "inserted bluespace anomaly core",
"backward_message" = "cut off external armor"
)
)
//SAVANNAH-IVANOV
/datum/component/construction/unordered/mecha_chassis/savannah_ivanov
result = /datum/component/construction/mecha/savannah_ivanov
steps = list(
/obj/item/mecha_parts/part/savannah_ivanov_torso,
/obj/item/mecha_parts/part/savannah_ivanov_head,
/obj/item/mecha_parts/part/savannah_ivanov_left_arm,
/obj/item/mecha_parts/part/savannah_ivanov_right_arm,
/obj/item/mecha_parts/part/savannah_ivanov_left_leg,
/obj/item/mecha_parts/part/savannah_ivanov_right_leg
)
/datum/component/construction/mecha/savannah_ivanov
result = /obj/vehicle/sealed/mecha/savannah_ivanov
base_icon = "savannah_ivanov"
circuit_control = /obj/item/circuitboard/mecha/savannah_ivanov/main
circuit_periph = /obj/item/circuitboard/mecha/savannah_ivanov/peripherals
circuit_weapon = /obj/item/circuitboard/mecha/savannah_ivanov/targeting
inner_plating = /obj/item/stack/sheet/plasteel
inner_plating_amount = 10
outer_plating = /obj/item/mecha_parts/part/savannah_ivanov_armor
outer_plating_amount = 1
//ODYSSEUS
/datum/component/construction/unordered/mecha_chassis/odysseus
result = /datum/component/construction/mecha/odysseus
steps = list(
/obj/item/mecha_parts/part/odysseus_torso,
/obj/item/mecha_parts/part/odysseus_head,
/obj/item/mecha_parts/part/odysseus_left_arm,
/obj/item/mecha_parts/part/odysseus_right_arm,
/obj/item/mecha_parts/part/odysseus_left_leg,
/obj/item/mecha_parts/part/odysseus_right_leg
)
/datum/component/construction/mecha/odysseus
result = /obj/vehicle/sealed/mecha/odysseus
base_icon = "odysseus"
circuit_control = /obj/item/circuitboard/mecha/odysseus/main
circuit_periph = /obj/item/circuitboard/mecha/odysseus/peripherals
inner_plating = /obj/item/stack/sheet/iron
inner_plating_amount = 5
outer_plating = /obj/item/stack/sheet/plasteel
outer_plating_amount = 5