Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple mech related fixes #8363

Merged
merged 3 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ avoid code duplication. This includes items that may sometimes act as a standard
return (modifier - swing_degradation) // We hit a static object, prevents hitting anything underneath
var/successful_hit = FALSE
for(var/obj/S in targetarea)
if (S.density && !istype(S, /obj/structure/table) && !istype(S, /obj/machinery/disposal) && !istype(S, /obj/structure/closet))
if ((S.density || istype(S, /obj/effect/plant)) && !istype(S, /obj/structure/table) && !istype(S, /obj/machinery/disposal) && !istype(S, /obj/structure/closet))
if(attack_with_multiplier(user, S, modifier))
successful_hit = TRUE // Livings or targeted mobs can still be hit
if(successful_hit)
Expand Down
14 changes: 11 additions & 3 deletions code/game/objects/items/weapons/mine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,18 @@
visible_message(SPAN_DANGER("\The [src]'s triggering mechanism is disrupted by the slope and does not go off."))
return ..()
if(isliving(AM))

if(excelsior)
for(var/datum/antagonist/A in AM.mind.antagonist)
if(A.id == ROLE_EXCELSIOR_REV)
return
if(ismech(AM))
/// if at least one of the people inside is an excel.
for(var/mob/living/carbon/human/agent in AM)
for(var/datum/antagonist/A in agent.mind.antagonist)
if(A.id == ROLE_EXCELSIOR_REV)
return
else
for(var/datum/antagonist/A in AM.mind.antagonist)
if(A.id == ROLE_EXCELSIOR_REV)
return
var/true_prob_explode = prob_explode - AM.skill_to_evade_traps()
if(prob(true_prob_explode))
explode()
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/weapons/tools/_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,8 @@
if(T && T.degradation)
failtypes["damage"] = 2.5

if(user)
// You can only fail with tools you are holding
if(user && T.loc == user)
Comment on lines +531 to +532
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And a quick fix to tool code am I right?

failtypes["slip"] = 2
failtypes["swing"] = 1
if(ishuman(user))
Expand Down
4 changes: 4 additions & 0 deletions code/modules/mechs/equipment/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
w_class = ITEM_SIZE_BULKY
worksound = WORKSOUND_HARD_SLASH
wielded = TRUE
canremove = FALSE
// Its Big
armor_divisor = ARMOR_PEN_DEEP
tool_qualities = list(QUALITY_CUTTING = 30, QUALITY_HAMMERING = 20, QUALITY_PRYING = 15)
Expand Down Expand Up @@ -198,6 +199,9 @@
// so it swings gloriously
var/obj/item/tool/sword/mech/holdin = holding
holdin.wielded = TRUE
// i want the desc from the blade itself >:(
SetName(initial(name))
desc = initial(desc)

/obj/item/mech_equipment/mounted_system/sword/Destroy()
if(ismech(loc))
Expand Down