The mech crusher module (#26550)

* E

* forgor this

* forgor this thing too

* add icons

* Update work_tools.dm

Signed-off-by: MLGTASTICa <61350382+MLGTASTICa@users.noreply.github.com>

* Update code/modules/research/designs/mechfabricator_designs.dm

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: MLGTASTICa <61350382+MLGTASTICa@users.noreply.github.com>

* Update code/game/mecha/equipment/tools/work_tools.dm

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: MLGTASTICa <61350382+MLGTASTICa@users.noreply.github.com>

* my beloved , gone.

* misinput!!!

* Update code/game/mecha/equipment/tools/work_tools.dm

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Signed-off-by: MLGTASTICa <61350382+MLGTASTICa@users.noreply.github.com>

* Review compliance

---------

Signed-off-by: MLGTASTICa <61350382+MLGTASTICa@users.noreply.github.com>
Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
This commit is contained in:
MLGTASTICa
2024-09-10 02:41:51 +03:00
committed by GitHub
parent 7555aefd89
commit 20d225809b
4 changed files with 62 additions and 1 deletions
@@ -455,6 +455,54 @@
last_piece = NC
return TRUE
/obj/item/mecha_parts/mecha_equipment/mech_crusher
name = "exosuit crusher"
desc = "A mech mounted crusher. For crushing bigger things."
icon_state = "mecha_crusher"
equip_cooldown = 15
energy_drain = 3000
harmful = TRUE
range = MECHA_MELEE | MECHA_RANGED
var/obj/item/kinetic_crusher/mecha/internal_crusher
/obj/item/kinetic_crusher/mecha
force = 15
force_wielded = 30
armour_penetration_flat = 15
detonation_damage = 90
backstab_bonus = 50
/obj/item/kinetic_crusher/mecha/get_turf_for_projectile(atom/user)
if(ismecha(user.loc) && isturf(user.loc?.loc))
return user.loc.loc
return null
/obj/item/kinetic_crusher/mecha/Initialize(mapload)
. = ..()
var/datum/component/unwanted = GetComponent(/datum/component/parry)
unwanted?.RemoveComponent()
unwanted = GetComponent(/datum/component/two_handed)
unwanted?.RemoveComponent()
ADD_TRAIT(src, TRAIT_WIELDED, "mech[UID()]")
/obj/item/mecha_parts/mecha_equipment/mech_crusher/Initialize(mapload)
. = ..()
internal_crusher = new(src)
/obj/item/mecha_parts/mecha_equipment/mech_crusher/Destroy()
QDEL_NULL(internal_crusher)
. = ..()
/obj/item/mecha_parts/mecha_equipment/mech_crusher/action(atom/target)
if(!action_checks(target))
return
if(!chassis.occupant)
return
var/proximate = chassis.Adjacent(target)
if(ismob(target))
internal_crusher.attack(target, chassis.occupant)
internal_crusher.afterattack(target, chassis.occupant, proximate, null)
#undef MECH_RCD_MODE_DECONSTRUCT
#undef MECH_RCD_MODE_WALL_OR_FLOOR
#undef MECH_RCD_MODE_AIRLOCK
@@ -99,6 +99,10 @@
if(!QDELETED(C) && !QDELETED(target))
C.total_damage += target_health - target.health //we did some damage, but let's not assume how much we did
/obj/item/kinetic_crusher/proc/get_turf_for_projectile(atom/user)
if(ismob(user) && isturf(user.loc))
return user.loc
/obj/item/kinetic_crusher/afterattack(atom/target, mob/living/user, proximity_flag, clickparams)
. = ..()
if(!HAS_TRAIT(src, TRAIT_WIELDED))
@@ -112,7 +116,7 @@
user.remove_status_effect(STATUS_EFFECT_DASH)
return
if(!proximity_flag && charged)//Mark a target, or mine a tile.
var/turf/proj_turf = user.loc
var/turf/proj_turf = get_turf_for_projectile(user)
if(!isturf(proj_turf))
return
var/obj/item/projectile/destabilizer/D = new /obj/item/projectile/destabilizer(proj_turf)
@@ -615,6 +615,15 @@
construction_time = 10 SECONDS
category = list("Exosuit Equipment")
/datum/design/mech_crusher
name = "Exosuit Mining Equipment (Mounted crusher)"
id = "mech_crusher"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/mech_crusher
materials = list(MAT_METAL= 23000, MAT_TITANIUM = 8000)
construction_time = 25 SECONDS
category = list("Exosuit Equipment")
/datum/design/mech_extinguisher
name = "Exosuit Engineering Equipment (Extinguisher)"
id = "mech_extinguisher"