Skip to content

Commit

Permalink
Multiple mech related fixes (#8363)
Browse files Browse the repository at this point in the history
* aaa

* Update combat.dm

* Update code/game/objects/items/weapons/mine.dm

---------

Co-authored-by: hyperioo <64754494+hyperioo@users.noreply.github.com>
  • Loading branch information
MLGTASTICa and hyperioo authored Nov 18, 2023
1 parent 50ac0f4 commit b36cf78
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
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)
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

0 comments on commit b36cf78

Please sign in to comment.