Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
27f5fc5
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Oct 6, 2020
dd26ed1
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Oct 9, 2020
edc0df1
Merge branch 'yogstation13:master' into master
Mqiib Jan 29, 2022
7a20bc0
Merge branch 'yogstation13:master' into master
Mqiib Feb 7, 2022
88b109e
Merge branch 'yogstation13:master' into master
Mqiib Feb 24, 2022
6dd33d0
Merge branch 'yogstation13:master' into master
Mqiib Jul 29, 2022
5c2e288
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Aug 2, 2022
b9aadc8
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Aug 15, 2022
7761c93
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Aug 15, 2022
4ddc713
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Aug 16, 2022
eea26c8
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Aug 26, 2022
a73cf7a
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Aug 29, 2022
5e0ab40
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Aug 30, 2022
4aba646
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Sep 1, 2022
2774a47
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Sep 9, 2022
bcdda9c
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Sep 11, 2022
44c69a8
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Sep 18, 2022
5db52e9
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Sep 23, 2022
780b76b
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Oct 1, 2022
d172895
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Oct 11, 2022
aaa54ac
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Oct 18, 2022
eafea34
Merge remote-tracking branch 'MqiibUpstream/master'
Mqiib Oct 23, 2022
1be6e5c
mostly just on select and unselect stuff
Mqiib Oct 23, 2022
f18e236
Progress
Mqiib Oct 30, 2022
99daa66
rename
Mqiib Oct 30, 2022
f9d54a7
IT ALMOST COMPILES
Mqiib Oct 30, 2022
4058267
cleanup
Mqiib Oct 30, 2022
5f2178b
use the name
Mqiib Oct 30, 2022
abae592
Now with slashing sprite!
Mqiib Oct 31, 2022
936b6ad
fix
Mqiib Oct 31, 2022
5322d3b
Merge remote-tracking branch 'MqiibUpstream/master' into MECHSWORDS
Mqiib Oct 31, 2022
3477ac2
pretty much done
Mqiib Oct 31, 2022
b96ca11
missing override
Mqiib Oct 31, 2022
1ef9366
plus axe and ifst
Mqiib Oct 31, 2022
609a02c
dont doublekill people
Mqiib Oct 31, 2022
ab3c073
an
Mqiib Oct 31, 2022
22bdf01
reduce combat mech damage
Mqiib Oct 31, 2022
919f61c
SOUND
Mqiib Oct 31, 2022
8c0021b
comment credit or whatever
Mqiib Oct 31, 2022
8bbeb9e
axe buff
Mqiib Oct 31, 2022
e95baab
tehc web
Mqiib Oct 31, 2022
ff25d1a
Merge branch 'master' into MECHSWORDS
Mqiib Nov 1, 2022
9ae3e60
parentheses
Mqiib Nov 1, 2022
0976c60
im going insane
Mqiib Nov 1, 2022
2754c02
the pain never ends
Mqiib Nov 1, 2022
b8ade7b
sprite n sound fix
Mqiib Nov 1, 2022
f6bed5d
oh my god its done probably
Mqiib Nov 1, 2022
a4e10ee
MARAUDER AND SMALL FIXES
Mqiib Nov 1, 2022
716fee3
moar better sprites
Mqiib Nov 1, 2022
221efc8
Merge remote-tracking branch 'MqiibUpstream/master' into MECHSWORDS
Mqiib Nov 8, 2022
3bc9440
Merge branch 'master' into MECHSWORDS
Mqiib Nov 13, 2022
c906341
small fixes + mech suit change
Mqiib Nov 14, 2022
0d0ef95
Various bugfixes and tweaks
Mqiib Nov 14, 2022
3c7cefc
More feedback + wall break fix
Mqiib Nov 14, 2022
74267a2
bump fix for centcomm
Mqiib Nov 15, 2022
adea6a4
play sound oops
Mqiib Nov 15, 2022
edce7c4
Sound amp + axe buff + wording
Mqiib Nov 15, 2022
bd1607f
more damage
Mqiib Nov 15, 2022
171d49c
Pacifism fix + comments
Mqiib Nov 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/game/mecha/combat/combat.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/mecha/combat
force = 30
force = 25
internals_req_access = list(ACCESS_MECH_SCIENCE, ACCESS_MECH_SECURITY)
internal_damage_threshold = 50
armor = list(MELEE = 30, BULLET = 30, LASER = 15, ENERGY = 20, BOMB = 20, BIO = 0, RAD = 0, FIRE = 100, ACID = 100)
Expand Down
2 changes: 1 addition & 1 deletion code/game/mecha/combat/durand.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
armor = list(MELEE = 40, BULLET = 35, LASER = 15, ENERGY = 10, BOMB = 20, BIO = 100, RAD = 50, FIRE = 100, ACID = 100)
max_temperature = 30000
infra_luminosity = 8
force = 40
force = 35
wreckage = /obj/structure/mecha_wreckage/durand

/obj/mecha/combat/durand/GrantActions(mob/living/user, human_occupant = 0)
Expand Down
8 changes: 5 additions & 3 deletions code/game/mecha/combat/marauder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
wreckage = /obj/structure/mecha_wreckage/marauder
add_req_access = 0
internal_damage_threshold = 25
force = 45
force = 40
max_equip = 4
bumpsmash = 1

Expand Down Expand Up @@ -52,7 +52,7 @@
max_integrity = 550
wreckage = /obj/structure/mecha_wreckage/seraph
internal_damage_threshold = 20
force = 55
force = 50
max_equip = 5

/obj/mecha/combat/marauder/seraph/Initialize()
Expand All @@ -76,7 +76,7 @@
operation_req_access = list(ACCESS_SYNDICATE)
internals_req_access = list(ACCESS_SYNDICATE)
wreckage = /obj/structure/mecha_wreckage/mauler
max_equip = 5
max_equip = 6
destruction_sleep_duration = 20

/obj/mecha/combat/marauder/mauler/loaded/Initialize()
Expand All @@ -91,6 +91,8 @@
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/melee_weapon/sword/energy_axe(src) //NOT BECAUSE IT'S USEFUL, BUT BECAUSE IT'S AWESOME
ME.attach(src)
max_ammo()


17 changes: 15 additions & 2 deletions code/game/mecha/equipment/mecha_equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
var/destroy_sound = 'sound/mecha/critdestr.ogg'
/// Bitflag. Used by exosuit fabricator to assign sub-categories based on which exosuits can equip this.
var/mech_flags = NONE

//Special melee override for melee weapons
var/melee_override = FALSE
/obj/item/mecha_parts/mecha_equipment/proc/update_chassis_page()
if(chassis)
send_byjax(chassis.occupant,"exosuit.browser","eq_list",chassis.get_equipment_list())
Expand All @@ -43,6 +44,8 @@

/obj/item/mecha_parts/mecha_equipment/Destroy()
if(chassis)
if(chassis.selected == src) //If it's the active equipment, we lose any passive effects
on_deselect()
chassis.equipment -= src
if(chassis.selected == src)
chassis.selected = null
Expand Down Expand Up @@ -140,6 +143,8 @@
return

/obj/item/mecha_parts/mecha_equipment/proc/detach(atom/moveto=null)
if(chassis.selected == src)
src.on_deselect()
moveto = moveto || get_turf(chassis)
if(src.Move(moveto))
chassis.equipment -= src
Expand Down Expand Up @@ -178,10 +183,18 @@
/obj/item/mecha_parts/mecha_equipment/proc/rearm()
return 0


/obj/item/mecha_parts/mecha_equipment/proc/needs_rearm()
return 0


//used for equipment, such as melee weapons, that have passive effects
/obj/item/mecha_parts/mecha_equipment/proc/on_select()
return 0

/obj/item/mecha_parts/mecha_equipment/proc/on_deselect()
return 0

// Is the occupant wearing a pilot suit?
/obj/item/mecha_parts/mecha_equipment/proc/check_eva()
return chassis?.check_eva()

264 changes: 264 additions & 0 deletions code/game/mecha/equipment/weapons/melee_weapons.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
/obj/item/mecha_parts/mecha_equipment/melee_weapon
name = "mecha melee weapon"
icon_state = "mecha_generic_melee"
range = MECHA_MELEE|MECHA_RANGED //so we can do stuff at range and in melee
destroy_sound = 'sound/mecha/weapdestr.ogg'
mech_flags = EXOSUIT_MODULE_COMBAT
melee_override = TRUE
var/restricted = TRUE //for our special hugbox exofabs
//If we have a longer range weapon, such as a spear or whatever capable of hitting people further away, this is how much extra range it has
var/extended_range = 0
//Attack speed modifier for a weapon. Big weapons will have a longer delay between attacks, while smaller ones will be faster
var/attack_speed_modifier = 1
//Attack sound for the weapon
var/attack_sound = 'sound/weapons/mechasword.ogg'
//Attack types - Note that at least one of these must be true otherwise it'll only have passive effects (if any)
//By default we assume we're using a small weapon with only a special single-target attack
//If the weapon has an AOE attack
var/cleave = FALSE
//If the weapon has a single-target strike
var/precise_attacks = TRUE

//Damage type for the weapon
var/dam_type = BRUTE
//If it's sharp or not
var/attack_sharpness = SHARP_NONE
//Damage the weapon will do. Note this is ADDED to the base mecha attack damage (usually)
var/weapon_damage = 0
//If we have both cleave and precise attacks, the precise may have more damage
var/precise_weapon_damage = 0
//Bonus deflection chance for using a melee weapon capable of blocking attacks
var/deflect_bonus = 0
//Base armor piercing value of the weapon
var/base_armor_piercing = 0
//Fauna bonus damage, if any
var/fauna_damage_bonus = 0
//Structure damage multiplier, for stuff like big ol' smashy hammers. Base structure damage multiplier for mech melee attacks is 3.
var/structure_damage_mult = 3

var/cleave_effect = /obj/effect/temp_visual/dir_setting/firing_effect/mecha_swipe

/obj/item/mecha_parts/mecha_equipment/melee_weapon/can_attach(obj/mecha/M)
if(!..())
return FALSE
if(istype(M, /obj/mecha/combat))
return TRUE
if((locate(/obj/item/mecha_parts/concealed_weapon_bay) in M.contents) && !((locate(/obj/item/mecha_parts/mecha_equipment/melee_weapon) in M.equipment) || (locate(/obj/item/mecha_parts/mecha_equipment/weapon) in M.equipment) ))
return TRUE
return FALSE

/obj/item/mecha_parts/mecha_equipment/melee_weapon/start_cooldown()
set_ready_state(0)
chassis.use_power(energy_drain)
addtimer(CALLBACK(src, .proc/set_ready_state, 1), chassis.melee_cooldown * attack_speed_modifier * (check_eva() ? EVA_MODIFIER : 1)) //Guns only shoot so fast, but weapons can be used as fast as the chassis can swing it!

//Melee weapon attacks are a little different in that they'll override the standard melee attack
/obj/item/mecha_parts/mecha_equipment/melee_weapon/action(atom/target, params)
if(!action_checks(target))
return 0

var/turf/curloc = get_turf(chassis)
var/turf/targloc = get_turf(target)
if (!targloc || !istype(targloc) || !curloc)
return 0
if (targloc == curloc)
return 0


if(target == targloc && !(chassis.occupant.a_intent == INTENT_HELP) && cleave) //If we are targetting a location, not an object or mob, and we're not in a passive stance
cleave_attack()
else if(precise_attacks && (get_dist(src,target) <= (1 + extended_range))) //If we are targetting not a turf and they're within reach
precise_attack(target) //We stab it if we can
else if(cleave)
cleave_attack() //Or swing wildly
chassis.log_message("Attacked with [src.name], targeting [target].", LOG_MECHA)
return 1

/obj/item/mecha_parts/mecha_equipment/melee_weapon/proc/precise_attack(atom/target) //No special attack by default. These will be set in the weapons themselves
return 0

/obj/item/mecha_parts/mecha_equipment/melee_weapon/proc/cleave_attack()
return 0

/obj/item/mecha_parts/mecha_equipment/melee_weapon/on_select()
if(deflect_bonus)
chassis.deflect_chance += deflect_bonus

/obj/item/mecha_parts/mecha_equipment/melee_weapon/on_deselect()
if(deflect_bonus)
chassis.deflect_chance -= deflect_bonus

/obj/item/mecha_parts/mecha_equipment/melee_weapon/sword
name = "generic mech sword"
desc = "Generic mech sword! It's a bit too big to use yourself."
cleave = TRUE
precise_attacks = TRUE
attack_sharpness = SHARP_EDGED
attack_sound = 'sound/weapons/mechasword.ogg' //Recorded from Respawn/EA's Titanfall 2 (Ronin broadsword swing). Apparently they don't care so we're probably good
harmful = TRUE //DO NOT give to children. Or do, I'm not the police.
var/minimum_damage = 0 //Baby mechs with a secret combat module get a little boost

/obj/item/mecha_parts/mecha_equipment/melee_weapon/sword/shortsword //Our bread-and-butter mech shortsword for both slicing and stabbing baddies
name = "\improper GD6 \"Jaeger\" shortsword"
desc = "An extendable arm-mounted blade with a nasty edge. It is small and fast enough to deflect some incoming attacks."
energy_drain = 20
weapon_damage = 15
precise_weapon_damage = 20
fauna_damage_bonus = 30 //because why not
deflect_bonus = 15
base_armor_piercing = 15
structure_damage_mult = 2.5 //Sword is not as smashy
minimum_damage = 25

/obj/item/mecha_parts/mecha_equipment/melee_weapon/sword/cleave_attack() //use this for basic cleaving attacks, tweak as needed
playsound(chassis, attack_sound, 50, 1)
var/turf/M = get_turf(chassis)
for(var/i = 0 to 2)
var/it_turn = 45*(1-i)
var/turf/T = get_step(M,turn(chassis.dir, it_turn)) //+45, +0, and -45 will get the three front tiles
for(var/atom/A in T.contents)
if(isliving(A))
var/mob/living/L = A

if(iscarbon(L)) //If we're a carbon we can get armor and jazz
var/mob/living/carbon/C = L
var/obj/item/bodypart/body_part = pick(C.bodyparts) //Cleave attack isn't very precise
var/armor_block = C.run_armor_check(body_part, MELEE, armour_penetration = base_armor_piercing)
C.apply_damage(max(chassis.force + weapon_damage, minimum_damage), dam_type, body_part, armor_block, sharpness = attack_sharpness)
else //Regular mobs just take damage
L.apply_damage(max(chassis.force + weapon_damage, minimum_damage), dam_type)
if(ismegafauna(L) || istype(L, /mob/living/simple_animal/hostile/asteroid)) //If we're hitting fauna, because heck those guys
L.apply_damage(fauna_damage_bonus, dam_type)

L.visible_message(span_danger("[chassis.name] strikes [L] with a wide swing of [src]!"), \
span_userdanger("[chassis.name] strikes you with [src]!"))
chassis.log_message("Hit [L] with [src.name] (cleave attack).", LOG_MECHA)
playsound(L, 'sound/weapons/bladeslice.ogg', 50)

else if(isstructure(A) || ismachinery(A) || istype(A, /obj/mecha)) //if it's something we can otherwise still hit
var/obj/O = A
if(!O.density) //Make sure it's not an open door or something
continue
var/object_damage = max(chassis.force + weapon_damage, minimum_damage) * structure_damage_mult
O.take_damage(object_damage, dam_type, "melee", 0)
if(istype(O, /obj/structure/window))
playsound(O,'sound/effects/Glasshit.ogg', 50) //glass bonk noise
else
if(istype(A, /obj/mecha))
O.visible_message(span_danger("[chassis.name] strikes [O] with a wide swing of [src]!")) //Don't really need to make a message for EVERY object, just important ones
playsound(O,'sound/weapons/smash.ogg', 50) //metallic bonk noise

var/turf/cleave_effect_loc = get_step(get_turf(src), SOUTHWEST)
new cleave_effect(cleave_effect_loc, chassis.dir)

/obj/item/mecha_parts/mecha_equipment/melee_weapon/sword/precise_attack(atom/target)
if(isliving(target))
var/mob/living/L = target

if(iscarbon(L))
var/mob/living/carbon/C = L
var/obj/item/bodypart/body_part = chassis.occupant.zone_selected
var/armor_block = C.run_armor_check(body_part, MELEE, armour_penetration = base_armor_piercing * 2) //and get more AP
C.apply_damage(max(chassis.force + precise_weapon_damage, minimum_damage), dam_type, body_part, armor_block, sharpness = attack_sharpness)
else
L.apply_damage(max(chassis.force + precise_weapon_damage, minimum_damage), dam_type)
if(ismegafauna(L) || istype(L, /mob/living/simple_animal/hostile/asteroid)) //Stab them harder
L.apply_damage(fauna_damage_bonus, dam_type)

L.visible_message(span_danger("[chassis.name] strikes [L] with [src]!"), \
span_userdanger("[chassis.name] strikes you with [src]!"))
chassis.log_message("Hit [L] with [src.name] (precise attack).", LOG_MECHA)

else if(isstructure(target) || ismachinery(target) || istype(target, /obj/mecha)) //If the initial target is a big object, hit it even if it's not dense.
var/obj/O = target
var/object_damage = max(chassis.force + precise_weapon_damage, minimum_damage) * structure_damage_mult
O.take_damage(object_damage, dam_type, "melee", 0)
else
return
chassis.do_attack_animation(target, ATTACK_EFFECT_SLASH)
playsound(chassis, attack_sound, 50, 1)

/obj/item/mecha_parts/mecha_equipment/melee_weapon/sword/energy_axe
name = "\improper SH-NT \"Killerhurtz\" energy axe"
desc = "An oversized, destructive-looking axe with a powered edge. While far too big for use by an individual, an exosuit might be able to wield it."
icon_state = "mecha_energy_axe"
precise_attacks = FALSE //This is not a weapon of precision, it is a weapon of destruction
energy_drain = 40
weapon_damage = 30
fauna_damage_bonus = 30 //If you're fighting fauna with this thing, why? I mean it works, I guess.
base_armor_piercing = 40
structure_damage_mult = 4 //Think obi-wan cutting through a bulkhead with his lightsaber but he's a giant mech with a huge terrifying axe
minimum_damage = 40
attack_speed_modifier = 1.5 //Kinda chunky
light_color = LIGHT_COLOR_RED

/obj/item/mecha_parts/mecha_equipment/melee_weapon/sword/energy_axe/cleave_attack() //Mostly copy-pasted sword cleave code with minor tweaks.
playsound(chassis, attack_sound, 50, 1) //Not hard to change some of this to be based on vars if you REALLY wanted to
var/turf/M = get_turf(src)
for(var/i = 0 to 2)
var/it_turn = 45*(1-i)
var/turf/T = get_step(M,turn(chassis.dir, it_turn)) //+45, +0, and -45 will get the three front tiles
for(var/atom/A in T.contents)
if(isliving(A))
var/mob/living/L = A

if(iscarbon(L)) //If we're a carbon we can get armor and jazz
var/mob/living/carbon/C = L
var/obj/item/bodypart/body_part = pick(C.bodyparts) //Cleave attack isn't very precise
var/armor_block = C.run_armor_check(body_part, MELEE, armour_penetration = base_armor_piercing)
C.apply_damage(max(chassis.force + weapon_damage, minimum_damage), dam_type, body_part, armor_block, sharpness = attack_sharpness)
else //Regular mobs just take damage
L.apply_damage(max(chassis.force + weapon_damage, minimum_damage), dam_type)
if(ismegafauna(L) || istype(L, /mob/living/simple_animal/hostile/asteroid)) //If we're hitting fauna, because heck those guys
L.apply_damage(fauna_damage_bonus, dam_type)

L.visible_message(span_danger("[chassis.name] strikes [L] with a wide swing of [src]!"), \
span_userdanger("[chassis.name] strikes you with [src]!"))
chassis.log_message("Hit [L] with [src.name] (cleave attack).", LOG_MECHA)
playsound(L, 'sound/weapons/blade1.ogg', 50)

else if(isstructure(A) || ismachinery(A) || istype(A, /obj/mecha)) //if it's something we can otherwise still hit
var/obj/O = A
if(!O.density) //Make sure it's not an open door or something
continue
var/object_damage = max(chassis.force + weapon_damage, minimum_damage) * structure_damage_mult
O.take_damage(object_damage, dam_type, "melee", 0)
if(istype(O, /obj/structure/window))
playsound(O,'sound/effects/Glasshit.ogg', 50) //glass bonk noise
else
if(istype(A, /obj/mecha))
O.visible_message(span_danger("[chassis.name] strikes [O] with a wide swing of [src]!"))
playsound(O,'sound/weapons/smash.ogg', 50) //metallic bonk noise

if(istype(T, /turf/closed/wall)) //IT BREAKS WALLS TOO
var/turf/closed/wall/W = T
W.dismantle_wall()

var/turf/cleave_effect_loc = get_step(get_turf(src), SOUTHWEST) //Big sprite needs to be centered properly
new cleave_effect(cleave_effect_loc, chassis.dir)

/obj/item/mecha_parts/mecha_equipment/melee_weapon/sword/energy_axe/on_select()
START_PROCESSING(SSobj, src)
set_light(5)

/obj/item/mecha_parts/mecha_equipment/melee_weapon/sword/energy_axe/on_deselect()
STOP_PROCESSING(SSobj, src)
set_light(0)

/obj/item/mecha_parts/mecha_equipment/melee_weapon/rocket_fist //Passive upgrade weapon when selected, makes your mech punch harder AND faster
name = "\improper DD-2 \"Atom Smasher\" rocket fist"
desc = "A large metal fist fitted to the arm of an exosuit, it uses repurposed maneuvering thrusters from a Raven battlecruiser to give a little more oomph to every punch. Also helps increase the speed at which the mech is able to return to a ready stance after each swing."
icon_state = "mecha_rocket_fist"
melee_override = FALSE //We'll just buff the regular punch
precise_attacks = FALSE
cleave = FALSE
range = null //This should just make the mech punch stuff, which is what we want!
weapon_damage = 20

/obj/item/mecha_parts/mecha_equipment/melee_weapon/rocket_fist/on_select()
chassis.force += weapon_damage //PUNCH HARDER
chassis.melee_cooldown *= 0.8 //PUNCH FASTER

/obj/item/mecha_parts/mecha_equipment/melee_weapon/rocket_fist/on_deselect()
chassis.force -= weapon_damage //Return to babby fist
chassis.melee_cooldown /= 0.8
2 changes: 1 addition & 1 deletion code/game/mecha/equipment/weapons/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
return FALSE
if(istype(M, /obj/mecha/combat))
return TRUE
if((locate(/obj/item/mecha_parts/concealed_weapon_bay) in M.contents) && !(locate(/obj/item/mecha_parts/mecha_equipment/weapon) in M.equipment))
if((locate(/obj/item/mecha_parts/concealed_weapon_bay) in M.contents) && !((locate(/obj/item/mecha_parts/mecha_equipment/melee_weapon) in M.equipment) || (locate(/obj/item/mecha_parts/mecha_equipment/weapon) in M.equipment) ))
return TRUE
return FALSE

Expand Down
Loading