Skip to content

Commit

Permalink
bugfix: Drasks now correctly crash any non-admin types of obstacles (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ErdGinalD authored Sep 22, 2023
1 parent 736148a commit e12a1a4
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 7 deletions.
10 changes: 10 additions & 0 deletions code/game/machinery/deployable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@
else
return !density

/obj/structure/barricade/attack_hand(mob/user)
if(user.a_intent == INTENT_HARM && ishuman(user) && user.dna.species.obj_damage)
SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user)
add_fingerprint(user)
user.changeNext_move(CLICK_CD_MELEE)
attack_generic(user, user.dna.species.obj_damage)
return
else
..()



/////BARRICADE TYPES///////
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ About the new airlock wires panel:
if(user.a_intent == INTENT_HARM && ishuman(user) && user.dna.species.obj_damage)
add_fingerprint(user)
user.changeNext_move(CLICK_CD_MELEE)
attack_generic(user, user.dna.species.obj_damage, damage_flag = "melee")
attack_generic(user, user.dna.species.obj_damage)
return
if(remove_airlock_note(user, FALSE))
add_fingerprint(user)
Expand Down
10 changes: 10 additions & 0 deletions code/game/machinery/doors/airlock_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,11 @@
normal_integrity = 1000
security_level = 6

/obj/machinery/door/airlock/centcom/attack_hand(mob/user)
. = ..()
if(user.a_intent == INTENT_HARM && ishuman(user) && user.dna.species.obj_damage)
return

/obj/machinery/door/airlock/centcom/emag_act(mob/user)
to_chat(user, span_notice("The electronic systems in this door are far too advanced for your primitive hacking peripherals."))
return
Expand Down Expand Up @@ -841,6 +846,11 @@
glass = TRUE
normal_integrity = 300

/obj/machinery/door/airlock/syndicate/extmai/glass/attack_hand(mob/user)
. = ..()
if(user.a_intent == INTENT_HARM && ishuman(user) && user.dna.species.obj_damage)
return

/*
Misc Airlocks
*/
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/doors/firedoor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
if(user.a_intent == INTENT_HARM && ishuman(user) && user.dna.species.obj_damage)
add_fingerprint(user)
user.changeNext_move(CLICK_CD_MELEE)
attack_generic(user, user.dna.species.obj_damage, damage_flag = "melee")
attack_generic(user, user.dna.species.obj_damage)
return
if(operating || !density)
return
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/doors/windowdoor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
if(user.a_intent == INTENT_HARM && ishuman(user) && user.dna.species.obj_damage)
add_fingerprint(user)
user.changeNext_move(CLICK_CD_MELEE)
attack_generic(user, user.dna.species.obj_damage, damage_flag = "melee")
attack_generic(user, user.dna.species.obj_damage)
return
return try_to_activate_door(user)

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/door_assembly.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
if(user.a_intent == INTENT_HARM && ishuman(user) && user.dna.species.obj_damage)
add_fingerprint(user)
user.changeNext_move(CLICK_CD_MELEE)
attack_generic(user, user.dna.species.obj_damage, damage_flag = "melee")
attack_generic(user, user.dna.species.obj_damage)
return
. = ..()

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/grille.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
user.changeNext_move(CLICK_CD_MELEE)
if(user.a_intent == INTENT_HARM && ishuman(user) && user.dna.species.obj_damage)
user.changeNext_move(CLICK_CD_MELEE)
attack_generic(user, user.dna.species.obj_damage, damage_flag = "melee")
attack_generic(user, user.dna.species.obj_damage)
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
user.visible_message("<span class='warning'>[user] hits [src].</span>")
if(!shock(user, 70))
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/windoor_assembly.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
if(user.a_intent == INTENT_HARM && ishuman(user) && user.dna.species.obj_damage)
add_fingerprint(user)
user.changeNext_move(CLICK_CD_MELEE)
attack_generic(user, user.dna.species.obj_damage, damage_flag = "melee")
attack_generic(user, user.dna.species.obj_damage)
return
. = ..()

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/window.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
if(user.a_intent == INTENT_HARM)
user.changeNext_move(CLICK_CD_MELEE)
if(ishuman(user) && user.dna.species.obj_damage)
attack_generic(user, user.dna.species.obj_damage, damage_flag = "melee")
attack_generic(user, user.dna.species.obj_damage)
else
playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] bangs against [src]!</span>", \
Expand Down

0 comments on commit e12a1a4

Please sign in to comment.