mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Probably fixes afterburner doing more damage than intended (#22467)
* probably fixes it * Update other_weapons.dm
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
qdel(src)
|
||||
|
||||
/// Grants the action to the passed mob, making it the owner
|
||||
/datum/action/proc/Grant(mob/grant_to)
|
||||
/datum/action/proc/Grant(mob/grant_to, ...)
|
||||
if(isnull(grant_to))
|
||||
Remove(owner)
|
||||
return
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
// Grant any actions to the pilot
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/grant_actions(mob/pilot)
|
||||
for(var/datum/action/action as anything in equip_actions)
|
||||
action.Grant(pilot)
|
||||
action.Grant(pilot, chassis, src)
|
||||
|
||||
// Remove the actions!!!!
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/remove_actions(mob/pilot)
|
||||
|
||||
@@ -5,11 +5,14 @@
|
||||
selectable = FALSE // your mech IS the weapon
|
||||
var/minimum_damage = 10
|
||||
var/structure_damage_mult = 4
|
||||
var/list/hit_list = list()
|
||||
equip_actions = list(/datum/action/cooldown/mecha_afterburner)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/afterburner/can_attach(obj/mecha/new_mecha)
|
||||
if(!(new_mecha.melee_allowed || istype(new_mecha, /obj/mecha/working/clarke))) // clarke because it's fucking COOL
|
||||
return FALSE
|
||||
if(locate(type) in new_mecha.equipment)
|
||||
return FALSE // no stacking multiple afterburners to get around the cooldown
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/afterburner/attach(obj/mecha/new_mecha)
|
||||
@@ -52,11 +55,16 @@
|
||||
hit_something = TRUE
|
||||
else if(isliving(hit_atom))
|
||||
var/mob/living/stomped = hit_atom
|
||||
if(stomped in hit_list)
|
||||
continue
|
||||
if(!stomped.check_shields(chassis, kinetic_damage * structure_damage_mult, "[chassis]", MELEE_ATTACK, 50)) // i mean, you can TRY to block it
|
||||
stomped.apply_damage(kinetic_damage * (isanimal(stomped) ? 4 : 1), BRUTE, BODY_ZONE_CHEST) // bonus damage to simple mobs
|
||||
stomped.Knockdown(0.5 SECONDS) // just long enough for the mech to pass over
|
||||
to_chat(stomped, span_userdanger("[chassis] crashes into you at full speed!"))
|
||||
if(stomped.mobility_flags & MOBILITY_STAND) // still standing? knock them back!
|
||||
stomped.throw_at(get_step(stomped, get_dir(chassis, stomped)), 1, 5, chassis.occupant, TRUE)
|
||||
else
|
||||
hit_list += stomped
|
||||
hit_something = TRUE
|
||||
|
||||
if(hit_something)
|
||||
@@ -77,17 +85,21 @@
|
||||
button_icon_state = "mech_afterburner"
|
||||
/// The exosuit linked to this action.
|
||||
var/obj/mecha/chassis
|
||||
var/obj/item/mecha_parts/mecha_equipment/afterburner/rocket
|
||||
/// Whether the linked exosuit has received bonus armor from charging.
|
||||
var/bonus_lavaland_armor = FALSE
|
||||
|
||||
/datum/action/cooldown/mecha_afterburner/Grant(mob/living/L, obj/mecha/M)
|
||||
if(M)
|
||||
chassis = M
|
||||
/datum/action/cooldown/mecha_afterburner/Grant(mob/living/new_owner, obj/mecha/new_mecha, obj/item/mecha_parts/mecha_equipment/new_equip)
|
||||
if(new_mecha)
|
||||
chassis = new_mecha
|
||||
if(new_equip)
|
||||
rocket = new_equip
|
||||
return ..()
|
||||
|
||||
/datum/action/cooldown/mecha_afterburner/Activate()
|
||||
if(chassis.completely_disabled)
|
||||
return
|
||||
chassis.pass_flags |= PASSMOB // for not getting stopped by anything that can't be knocked down
|
||||
chassis.movement_type |= FLYING // for doing sick jumps over chasms
|
||||
chassis.completely_disabled = TRUE
|
||||
chassis.AddComponent(/datum/component/after_image, 0.7 SECONDS, 0.5, FALSE)
|
||||
@@ -119,3 +131,6 @@
|
||||
bonus_lavaland_armor = FALSE
|
||||
chassis.completely_disabled = FALSE
|
||||
chassis.movement_type &= ~FLYING
|
||||
chassis.pass_flags &= ~PASSMOB
|
||||
qdel(rocket.hit_list)
|
||||
rocket.hit_list = list()
|
||||
|
||||
Reference in New Issue
Block a user