|
5 | 5 | selectable = FALSE // your mech IS the weapon |
6 | 6 | var/minimum_damage = 10 |
7 | 7 | var/structure_damage_mult = 4 |
| 8 | + var/list/hit_list = list() |
8 | 9 | equip_actions = list(/datum/action/cooldown/mecha_afterburner) |
9 | 10 |
|
10 | 11 | /obj/item/mecha_parts/mecha_equipment/afterburner/can_attach(obj/mecha/new_mecha) |
11 | 12 | if(!(new_mecha.melee_allowed || istype(new_mecha, /obj/mecha/working/clarke))) // clarke because it's fucking COOL |
12 | 13 | return FALSE |
| 14 | + if(locate(type) in new_mecha.equipment) |
| 15 | + return FALSE // no stacking multiple afterburners to get around the cooldown |
13 | 16 | return ..() |
14 | 17 |
|
15 | 18 | /obj/item/mecha_parts/mecha_equipment/afterburner/attach(obj/mecha/new_mecha) |
|
52 | 55 | hit_something = TRUE |
53 | 56 | else if(isliving(hit_atom)) |
54 | 57 | var/mob/living/stomped = hit_atom |
| 58 | + if(stomped in hit_list) |
| 59 | + continue |
55 | 60 | if(!stomped.check_shields(chassis, kinetic_damage * structure_damage_mult, "[chassis]", MELEE_ATTACK, 50)) // i mean, you can TRY to block it |
56 | 61 | stomped.apply_damage(kinetic_damage * (isanimal(stomped) ? 4 : 1), BRUTE, BODY_ZONE_CHEST) // bonus damage to simple mobs |
57 | 62 | stomped.Knockdown(0.5 SECONDS) // just long enough for the mech to pass over |
| 63 | + to_chat(stomped, span_userdanger("[chassis] crashes into you at full speed!")) |
58 | 64 | if(stomped.mobility_flags & MOBILITY_STAND) // still standing? knock them back! |
59 | 65 | stomped.throw_at(get_step(stomped, get_dir(chassis, stomped)), 1, 5, chassis.occupant, TRUE) |
| 66 | + else |
| 67 | + hit_list += stomped |
60 | 68 | hit_something = TRUE |
61 | 69 |
|
62 | 70 | if(hit_something) |
|
77 | 85 | button_icon_state = "mech_afterburner" |
78 | 86 | /// The exosuit linked to this action. |
79 | 87 | var/obj/mecha/chassis |
| 88 | + var/obj/item/mecha_parts/mecha_equipment/afterburner/rocket |
80 | 89 | /// Whether the linked exosuit has received bonus armor from charging. |
81 | 90 | var/bonus_lavaland_armor = FALSE |
82 | 91 |
|
83 | | -/datum/action/cooldown/mecha_afterburner/Grant(mob/living/L, obj/mecha/M) |
84 | | - if(M) |
85 | | - chassis = M |
| 92 | +/datum/action/cooldown/mecha_afterburner/Grant(mob/living/new_owner, obj/mecha/new_mecha, obj/item/mecha_parts/mecha_equipment/new_equip) |
| 93 | + if(new_mecha) |
| 94 | + chassis = new_mecha |
| 95 | + if(new_equip) |
| 96 | + rocket = new_equip |
86 | 97 | return ..() |
87 | 98 |
|
88 | 99 | /datum/action/cooldown/mecha_afterburner/Activate() |
89 | 100 | if(chassis.completely_disabled) |
90 | 101 | return |
| 102 | + chassis.pass_flags |= PASSMOB // for not getting stopped by anything that can't be knocked down |
91 | 103 | chassis.movement_type |= FLYING // for doing sick jumps over chasms |
92 | 104 | chassis.completely_disabled = TRUE |
93 | 105 | chassis.AddComponent(/datum/component/after_image, 0.7 SECONDS, 0.5, FALSE) |
|
119 | 131 | bonus_lavaland_armor = FALSE |
120 | 132 | chassis.completely_disabled = FALSE |
121 | 133 | chassis.movement_type &= ~FLYING |
| 134 | + chassis.pass_flags &= ~PASSMOB |
| 135 | + qdel(rocket.hit_list) |
| 136 | + rocket.hit_list = list() |
0 commit comments