diff --git a/code/ATMOSPHERICS/components/portables_connector.dm b/code/ATMOSPHERICS/components/portables_connector.dm
index 09fe000ec25..45428f121f0 100644
--- a/code/ATMOSPHERICS/components/portables_connector.dm
+++ b/code/ATMOSPHERICS/components/portables_connector.dm
@@ -137,7 +137,7 @@
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (connected_device)
- user << "\red You cannot unwrench this [src], dettach [connected_device] first."
+ user << "\red You cannot unwrench this [src], detach [connected_device] first."
return 1
if (locate(/obj/machinery/portable_atmospherics, src.loc))
return 1
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index ab9c788c079..431abf25980 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -4,15 +4,17 @@
return
// No comment
-/atom/proc/attackby(obj/item/W, mob/user)
+/atom/proc/attackby(obj/item/W, mob/living/user)
return
-/atom/movable/attackby(obj/item/W, mob/user)
+/atom/movable/attackby(obj/item/W, mob/living/user)
+ user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
if(!(W.flags&NOBLUDGEON))
visible_message("[src] has been hit by [user] with [W].")
/mob/living/attackby(obj/item/I, mob/user)
+ user.changeNext_move(CLICK_CD_MELEE)
if(istype(I) && ismob(user))
- user.changeNext_move(CLICK_CD_MELEE)
I.attack(src, user)
@@ -129,6 +131,7 @@
var/showname = "."
if(user)
showname = " by [user]."
+ user.do_attack_animation(src)
if(!(user in viewers(M, null)))
showname = "."
diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm
index 353d39347b3..1dd064219a5 100644
--- a/code/_onclick/other_mobs.dm
+++ b/code/_onclick/other_mobs.dm
@@ -69,7 +69,7 @@
if(..())
return
if(a_intent != "harm" || !ismob(A)) return
- if(istype(wear_mask, /obj/item/clothing/mask/muzzle))
+ if(is_muzzled())
return
var/mob/living/carbon/ML = A
var/dam_zone = ran_zone(pick("chest", "l_hand", "r_hand", "l_leg", "r_leg"))
diff --git a/code/datums/spell.dm b/code/datums/spell.dm
index d131db35dda..e03f172f2a2 100644
--- a/code/datums/spell.dm
+++ b/code/datums/spell.dm
@@ -48,7 +48,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
var/icon_power_button
var/power_button_name
-/obj/effect/proc_holder/spell/wizard/proc/cast_check(skipcharge = 0, mob/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell
+/obj/effect/proc_holder/spell/wizard/proc/cast_check(skipcharge = 0, mob/living/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell
if(!(src in user.spell_list))
user << "You shouldn't have this spell! Something's wrong."
@@ -75,27 +75,27 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
return 0
if(!ghost)
- if(usr.stat && !stat_allowed)
- usr << "Not when you're incapacitated."
+ if(user.stat && !stat_allowed)
+ user << "Not when you're incapacitated."
return 0
- if(ishuman(usr) || ismonkey(usr))
- if(istype(usr.wear_mask, /obj/item/clothing/mask/muzzle))
- usr << "Mmmf mrrfff!"
+ if(ishuman(user) || ismonkey(user))
+ if(user.is_muzzled())
+ user << "Mmmf mrrfff!"
return 0
var/obj/effect/proc_holder/spell/wizard/noclothes/spell = locate() in user.spell_list
if(clothes_req && !(spell && istype(spell)))//clothes check
- if(!istype(usr, /mob/living/carbon/human))
- usr << "You aren't a human, Why are you trying to cast a human spell, silly non-human? Casting human spells is for humans."
+ if(!istype(user, /mob/living/carbon/human))
+ user << "You aren't a human, Why are you trying to cast a human spell, silly non-human? Casting human spells is for humans."
return 0
- if(!istype(usr:wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(user:wear_suit, /obj/item/clothing/suit/space/rig/wizard))
- usr << "I don't feel strong enough without my robe."
+ if(!istype(user:wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(user:wear_suit, /obj/item/clothing/suit/space/rig/wizard))
+ user << "I don't feel strong enough without my robe."
return 0
- if(!istype(usr:shoes, /obj/item/clothing/shoes/sandal))
- usr << "I don't feel strong enough without my sandals."
+ if(!istype(user:shoes, /obj/item/clothing/shoes/sandal))
+ user << "I don't feel strong enough without my sandals."
return 0
- if(!istype(usr:head, /obj/item/clothing/head/wizard) && !istype(usr:head, /obj/item/clothing/head/helmet/space/rig/wizard))
- usr << "I don't feel strong enough without my hat."
+ if(!istype(user:head, /obj/item/clothing/head/wizard) && !istype(user:head, /obj/item/clothing/head/helmet/space/rig/wizard))
+ user << "I don't feel strong enough without my hat."
return 0
if(!skipcharge)
diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm
index 9bcdefdd0b8..c2e0deb52c0 100644
--- a/code/game/gamemodes/blob/theblob.dm
+++ b/code/game/gamemodes/blob/theblob.dm
@@ -129,8 +129,9 @@
return 0
- attackby(var/obj/item/weapon/W, var/mob/user)
+ attackby(var/obj/item/weapon/W, var/mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
playsound(get_turf(src), 'sound/effects/attackblob.ogg', 50, 1)
src.visible_message("\red The [src.name] has been attacked with \the [W][(user ? " by [user]." : ".")]")
var/damage = 0
@@ -145,6 +146,19 @@
health -= damage
update_icon()
return
+
+ attack_animal(mob/living/simple_animal/M as mob)
+ M.changeNext_move(CLICK_CD_MELEE)
+ M.do_attack_animation(src)
+ playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
+ src.visible_message("The [src.name] has been attacked by \the [M]!")
+ var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
+ if(!damage) // Avoid divide by zero errors
+ return
+ damage /= max(src.brute_resist, 1)
+ health -= damage
+ update_icon()
+ return
proc/change_to(var/type)
if(!ispath(type))
diff --git a/code/game/gamemodes/events/ninja_equipment.dm b/code/game/gamemodes/events/ninja_equipment.dm
index 8ea5ab28f8c..41a9408c6d2 100644
--- a/code/game/gamemodes/events/ninja_equipment.dm
+++ b/code/game/gamemodes/events/ninja_equipment.dm
@@ -1554,30 +1554,31 @@ It is possible to destroy the net by the occupant or someone else.
..()
return
- attack_hand()
- if (HULK in usr.mutations)
- usr << text("\blue You easily destroy the energy net.")
+ attack_hand(mob/living/user)
+ if (HULK in user.mutations)
+ user << text("\blue You easily destroy the energy net.")
for(var/mob/O in oviewers(src))
- O.show_message(text("\red [] rips the energy net apart!", usr), 1)
+ O.show_message(text("\red [] rips the energy net apart!", user), 1)
health-=50
healthcheck()
return
- attack_paw()
- return attack_hand()
+ attack_paw(mob/living/user)
+ return attack_hand(user)
- attack_alien()
- if (islarva(usr))
+ attack_alien(mob/living/user)
+ if (islarva(user))
return
- usr << text("\green You claw at the net.")
+ user.do_attack_animation(src)
+ user << text("\green You claw at the net.")
for(var/mob/O in oviewers(src))
- O.show_message(text("\red [] claws at the energy net!", usr), 1)
+ O.show_message(text("\red [] claws at the energy net!", user), 1)
playsound(get_turf(src), 'sound/weapons/slash.ogg', 80, 1)
health -= rand(10, 20)
if(health <= 0)
- usr << text("\green You slice the energy net to pieces.")
+ user << text("\green You slice the energy net to pieces.")
for(var/mob/O in oviewers(src))
- O.show_message(text("\red [] slices the energy net apart!", usr), 1)
+ O.show_message(text("\red [] slices the energy net apart!", user), 1)
healthcheck()
return
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index 52476c7ce02..5a657637d1e 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -68,6 +68,13 @@
src.connected = sleepernew
return
return
+
+/obj/machinery/sleeper/attack_animal(var/mob/living/simple_animal/M)//Stop putting hostile mobs in things guise
+ if(M.environment_smash)
+ M.do_attack_animation(src)
+ visible_message("[M.name] smashes [src] apart!")
+ qdel(src)
+ return
/obj/machinery/sleep_console/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
if (istype(G, /obj/item/weapon/screwdriver))
diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm
index e676f69c130..f58e11bcd50 100644
--- a/code/game/machinery/bots/bots.dm
+++ b/code/game/machinery/bots/bots.dm
@@ -145,6 +145,8 @@
user << "[src] is in pristine condition."
/obj/machinery/bot/attack_alien(var/mob/living/carbon/alien/user as mob)
+ user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
health -= rand(15,30)*brute_dam_coeff
visible_message("[user] has slashed [src]!")
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
@@ -154,6 +156,7 @@
/obj/machinery/bot/attack_animal(var/mob/living/simple_animal/M as mob)
+ M.do_attack_animation(src)
if(M.melee_damage_upper == 0)
return
health -= M.melee_damage_upper
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 865bf2f3cb8..eaf2648ee2b 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -103,6 +103,7 @@
return
if(indestructible)
return
+ user.do_attack_animation(src)
status = 0
visible_message("\The [user] slashes at [src]!")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm
index 9dab90e6ed3..b76726d4b55 100644
--- a/code/game/machinery/computer/computer.dm
+++ b/code/game/machinery/computer/computer.dm
@@ -127,8 +127,28 @@
src.attack_hand(user)
return
+/obj/machinery/computer/attack_paw(mob/living/user)
+ user.do_attack_animation(src)
+ if(circuit)
+ if(prob(10))
+ user.visible_message("[user.name] smashes the [src.name] with its paws.",\
+ "You smash the [src.name] with your paws.",\
+ "You hear a smashing sound.")
+ set_broken()
+ return
+ user.visible_message("[user.name] smashes against the [src.name] with its paws.",\
+ "You smash against the [src.name] with your paws.",\
+ "You hear a clicking sound.")
-
-
-
-
+/obj/machinery/computer/attack_alien(mob/living/user)
+ user.do_attack_animation(src)
+ if(circuit)
+ if(prob(80))
+ user.visible_message("[user.name] smashes the [src.name] with its claws.",\
+ "You smash the [src.name] with your claws.",\
+ "You hear a smashing sound.")
+ set_broken()
+ return
+ user.visible_message("[user.name] smashes against the [src.name] with its claws.",\
+ "You smash against the [src.name] with your claws.",\
+ "You hear a clicking sound.")
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 2dafc4b32cd..29c52c3f133 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -196,12 +196,14 @@
if(src.operating)
return
user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
user.visible_message("[user] smashes against the [src.name].", \
"[user] smashes against the [src.name].")
take_damage(damage)
/obj/machinery/door/window/attack_alien(mob/living/user as mob)
+
if(islarva(user))
return
attack_generic(user, 25)
@@ -332,6 +334,7 @@
//If it's a weapon, smash windoor. Unless it's an id card, agent card, ect.. then ignore it (Cards really shouldnt damage a door anyway)
if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card) )
user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
if( (I.flags&NOBLUDGEON) || !I.force )
return
var/aforce = I.force
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 85b4e35f7af..3ed4e23bedc 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -736,7 +736,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
src.updateUsrDialog()
-/obj/machinery/newscaster/attackby(obj/item/I as obj, mob/user as mob)
+/obj/machinery/newscaster/attackby(obj/item/I as obj, mob/living/user as mob)
if(istype(I, /obj/item/weapon/wrench))
user << "Now [anchored ? "un" : ""]securing [name]"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm
index 39e9e903c1a..0137af2133a 100644
--- a/code/game/machinery/shieldgen.dm
+++ b/code/game/machinery/shieldgen.dm
@@ -38,7 +38,7 @@
if (src.health <= 0)
- visible_message("\blue The [src] dissapates")
+ visible_message("\blue The [src] dissipates")
del(src)
return
@@ -51,7 +51,7 @@
src.health -= max_health*0.75 //3/4 health as damage
if(src.health <= 0)
- visible_message("\blue The [src] dissapates")
+ visible_message("\blue The [src] dissipates")
del(src)
return
@@ -63,7 +63,7 @@
health -= Proj.damage
..()
if(health <=0)
- visible_message("\blue The [src] dissapates")
+ visible_message("\blue The [src] dissipates")
del(src)
return
opacity = 1
@@ -112,7 +112,7 @@
//Handle the destruction of the shield
if (src.health <= 0)
- visible_message("\blue The [src] dissapates")
+ visible_message("\blue The [src] dissipates")
del(src)
return
@@ -489,8 +489,8 @@
user << "\red Access denied."
else
- src.add_fingerprint(user)
- visible_message("\red The [src.name] has been hit with the [W.name] by [user.name]!")
+ add_fingerprint(user)
+ ..()
/obj/machinery/shieldwallgen/proc/cleanup(var/NSEW)
var/obj/machinery/shieldwall/F
diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm
index 90dd7f27d71..37248dd64bf 100644
--- a/code/game/machinery/turrets.dm
+++ b/code/game/machinery/turrets.dm
@@ -299,7 +299,8 @@
/obj/machinery/turret/attackby(obj/item/weapon/W, mob/user)//I can't believe no one added this before/N
..()
- playsound(get_turf(src), 'sound/weapons/smash.ogg', 60, 1)
+ user.changeNext_move(CLICK_CD_MELEE)
+ playsound(src.loc, 'sound/weapons/smash.ogg', 60, 1)
src.spark_system.start()
src.health -= W.force * 0.5
if (src.health <= 0)
@@ -433,26 +434,31 @@
popup.open()
+
/obj/machinery/turret/attack_animal(mob/living/simple_animal/M as mob)
+ M.changeNext_move(CLICK_CD_MELEE)
+ M.do_attack_animation(src)
if(M.melee_damage_upper == 0) return
if(!(stat & BROKEN))
- visible_message("\red [M] [M.attacktext] [src]!")
- M.attack_log += text("\[[time_stamp()]\] attacked [src.name]")
+ visible_message("[M] [M.attacktext] [src]!")
+ add_logs(M, src, "attacked", admin=0)
//src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])")
src.health -= M.melee_damage_upper
if (src.health <= 0)
src.die()
else
- M << "\red That object is useless to you."
+ M << "That object is useless to you."
return
/obj/machinery/turret/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
+ M.changeNext_move(CLICK_CD_MELEE)
+ M.do_attack_animation(src)
if(!(stat & BROKEN))
- playsound(get_turf(src), 'sound/weapons/slash.ogg', 25, 1, -1)
- visible_message("\red [] has slashed at []!", M, src)
+ playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
+ visible_message("[M] has slashed at [src]!")
src.health -= 15
if (src.health <= 0)
src.die()
@@ -574,7 +580,10 @@
return attack_hand(user)
-/obj/machinery/gun_turret/attack_alien(mob/user as mob)
+/obj/machinery/gun_turret/attack_alien(mob/living/user as mob)
+ user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
+ playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
user.visible_message("[user] slashes at [src]", "You slash at [src]")
take_damage(15)
return
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 5c9616e0e61..ae5bbba8c11 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -453,7 +453,9 @@
src.destroy()
return
-/obj/mecha/attack_hand(mob/user as mob)
+/obj/mecha/attack_hand(mob/living/user as mob)
+ user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
src.log_message("Attack by hand/paw. Attacker - [user].",1)
if(ishuman(user))
@@ -470,12 +472,14 @@
src.log_append_to_last("Armor saved.")
return
-/obj/mecha/attack_paw(mob/user as mob)
+/obj/mecha/attack_paw(mob/living/user as mob)
return src.attack_hand(user)
-/obj/mecha/attack_alien(mob/user as mob)
+/obj/mecha/attack_alien(mob/living/user as mob)
src.log_message("Attack by alien. Attacker - [user].",1)
+ user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
if(!prob(src.deflect_chance))
src.take_damage(15)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
@@ -496,6 +500,7 @@
if(user.melee_damage_upper == 0)
user.emote("[user.friendly] [src]")
else
+ user.do_attack_animation(src)
if(!prob(src.deflect_chance))
var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
src.take_damage(damage)
@@ -674,8 +679,10 @@
src.check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL))
return
-/obj/mecha/proc/dynattackby(obj/item/weapon/W as obj, mob/user as mob)
+/obj/mecha/proc/dynattackby(obj/item/weapon/W as obj, mob/living/user as mob)
src.log_message("Attacked by [W]. Attacker - [user]")
+ user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
if(prob(src.deflect_chance))
user << "\red The [W] bounces off [src.name] armor."
src.log_append_to_last("Armor saved.")
diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm
index 34f0ca4a1ff..9c79e121a3f 100644
--- a/code/game/objects/effects/aliens.dm
+++ b/code/game/objects/effects/aliens.dm
@@ -102,6 +102,7 @@
/obj/structure/alien/resin/attack_hand(mob/living/user)
if(HULK in user.mutations)
+ user.do_attack_animation(src)
user.visible_message("[user] destroys [src]!")
health = 0
healthcheck()
@@ -112,6 +113,8 @@
/obj/structure/alien/resin/attack_alien(mob/living/user)
+ user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
if(islarva(user))
return
user.visible_message("[user] claws at the resin!")
@@ -123,6 +126,7 @@
/obj/structure/alien/resin/attackby(obj/item/I, mob/living/user)
+ user.changeNext_move(CLICK_CD_MELEE)
health -= I.force
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
healthcheck()
diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm
index 99cd5b3e97b..361abb07c12 100644
--- a/code/game/objects/items/weapons/stunbaton.dm
+++ b/code/game/objects/items/weapons/stunbaton.dm
@@ -118,6 +118,7 @@
if(user.a_intent != "harm")
if(status)
+ user.do_attack_animation(L)
baton_stun(L, user)
else
L.visible_message("[L] has been prodded with [src] by [user]. Luckily it was off.", \
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 1054dbfcb1e..f36664ad57c 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -162,6 +162,7 @@
/obj/structure/closet/attack_animal(mob/living/simple_animal/user as mob)
if(user.environment_smash)
+ user.do_attack_animation(src)
visible_message("\red [user] destroys the [src]. ")
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
diff --git a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm
index 87eb2cb8114..14807277647 100644
--- a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm
+++ b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm
@@ -14,14 +14,14 @@
var/locked = 1
var/smashed = 0
- attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
+ attackby(var/obj/item/O as obj, var/mob/living/user as mob) //Marker -Agouri
//..() //That's very useful, Erro
var/hasaxe = 0 //gonna come in handy later~
if(fireaxe)
hasaxe = 1
- if (isrobot(usr) || src.locked)
+ if (isrobot(user) || src.locked)
if(istype(O, /obj/item/device/multitool))
user << "\red Resetting circuitry..."
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
@@ -31,6 +31,7 @@
update_icon()
return
else if(istype(O, /obj/item/weapon))
+ user.changeNext_move(CLICK_CD_MELEE)
var/obj/item/weapon/W = O
if(src.smashed || src.localopened)
if(localopened)
@@ -39,6 +40,7 @@
spawn(10) update_icon()
return
else
+ user.do_attack_animation(src)
playsound(user, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
if(W.force < 15)
user << "\blue The cabinet's protective glass glances off the hit."
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index ea8665e5a9a..85c5e281bac 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -55,11 +55,12 @@
if(ismob(user)) shock(user, 70)
-/obj/structure/grille/attack_paw(mob/user as mob)
+/obj/structure/grille/attack_paw(mob/living/user as mob)
attack_hand(user)
-/obj/structure/grille/attack_hand(mob/user as mob)
+/obj/structure/grille/attack_hand(mob/living/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("[user] kicks [src].", \
"You kick [src].", \
@@ -73,9 +74,10 @@
health -= 1
healthcheck()
-/obj/structure/grille/attack_alien(mob/user as mob)
+/obj/structure/grille/attack_alien(mob/living/user as mob)
if(istype(user, /mob/living/carbon/alien/larva)) return
user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("[user] mangles [src].", \
"You mangle [src].", \
@@ -86,8 +88,9 @@
healthcheck()
return
-/obj/structure/grille/attack_slime(mob/user as mob)
+/obj/structure/grille/attack_slime(mob/living/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
var/mob/living/carbon/slime/S = user
if (!S.is_adult)
return
@@ -104,7 +107,7 @@
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0) return
M.changeNext_move(CLICK_CD_MELEE)
-
+ M.do_attack_animation(src)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
M.visible_message("[M] smashes against [src].", \
"You smash against [src].", \
diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm
index 59771219737..4a3f908b192 100644
--- a/code/game/objects/structures/mirror.dm
+++ b/code/game/objects/structures/mirror.dm
@@ -71,7 +71,8 @@
..()
-/obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob)
+/obj/structure/mirror/attackby(obj/item/I as obj, mob/living/user as mob)
+ user.do_attack_animation(src)
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
@@ -84,8 +85,9 @@
playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1)
-/obj/structure/mirror/attack_alien(mob/user as mob)
+/obj/structure/mirror/attack_alien(mob/living/user as mob)
if(islarva(user)) return
+ user.do_attack_animation(src)
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
@@ -93,10 +95,11 @@
shatter()
-/obj/structure/mirror/attack_animal(mob/user as mob)
+/obj/structure/mirror/attack_animal(mob/living/user as mob)
if(!isanimal(user)) return
var/mob/living/simple_animal/M = user
if(M.melee_damage_upper <= 0) return
+ M.do_attack_animation(src)
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
@@ -104,10 +107,11 @@
shatter()
-/obj/structure/mirror/attack_slime(mob/user as mob)
+/obj/structure/mirror/attack_slime(mob/living/user as mob)
var/mob/living/carbon/slime/S = user
if (!S.is_adult)
return
+ user.do_attack_animation(src)
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index ab4f0bea78b..324c7d736d4 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -278,26 +278,30 @@
if(prob(75))
destroy()
-/obj/structure/table/attack_paw(mob/user)
+/obj/structure/table/attack_paw(mob/living/user)
if(HULK in user.mutations)
+ user.do_attack_animation(src)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
visible_message("[user] smashes the [src] apart!")
destroy()
-/obj/structure/table/attack_alien(mob/user)
+/obj/structure/table/attack_alien(mob/living/user)
+ user.do_attack_animation(src)
visible_message("[user] slices [src] apart!")
destroy()
/obj/structure/table/attack_animal(mob/living/simple_animal/user)
if(user.environment_smash)
+ user.do_attack_animation(src)
visible_message("[user] smashes [src] apart!")
destroy()
-/obj/structure/table/attack_hand(mob/user)
+/obj/structure/table/attack_hand(mob/living/user)
if(HULK in user.mutations)
+ user.do_attack_animation(src)
visible_message("[user] smashes [src] apart!")
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
destroy()
@@ -766,20 +770,23 @@
destroy()
-/obj/structure/rack/attack_paw(mob/user)
+/obj/structure/rack/attack_paw(mob/living/user)
if(HULK in user.mutations)
+ user.do_attack_animation(src)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
visible_message("[user] smashes [src] apart!")
destroy()
-/obj/structure/rack/attack_alien(mob/user)
+/obj/structure/rack/attack_alien(mob/living/user)
+ user.do_attack_animation(src)
visible_message("[user] slices [src] apart!")
destroy()
/obj/structure/rack/attack_animal(mob/living/simple_animal/user)
if(user.environment_smash)
+ user.do_attack_animation(src)
visible_message("[user] smashes [src] apart!")
destroy()
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 829908025b4..cf880025688 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -179,8 +179,9 @@ var/global/wcColored
/obj/structure/window/attack_paw(mob/user as mob)
return attack_hand(user)
-/obj/structure/window/proc/attack_generic(mob/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
+/obj/structure/window/proc/attack_generic(mob/living/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
health -= damage
if(health <= 0)
user.visible_message("[user] smashes through [src]!")
@@ -193,25 +194,25 @@ var/global/wcColored
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
-/obj/structure/window/attack_alien(mob/user as mob)
+/obj/structure/window/attack_alien(mob/living/user as mob)
if(islarva(user)) return
attack_generic(user, 15)
-/obj/structure/window/attack_animal(mob/user as mob)
+/obj/structure/window/attack_animal(mob/living/user as mob)
if(!isanimal(user)) return
var/mob/living/simple_animal/M = user
if(M.melee_damage_upper <= 0) return
attack_generic(M, M.melee_damage_upper)
-/obj/structure/window/attack_slime(mob/user as mob)
+/obj/structure/window/attack_slime(mob/living/user as mob)
var/mob/living/carbon/slime/S = user
if (!S.is_adult)
return
attack_generic(user, rand(10, 15))
-/obj/structure/window/attackby(obj/item/weapon/W as obj, mob/user as mob)
+/obj/structure/window/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
if(!istype(W)) return//I really wish I did not need this
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index 8025554f667..ab044524ac0 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -240,9 +240,10 @@
//Interactions
-/turf/simulated/wall/attack_paw(mob/user as mob)
+/turf/simulated/wall/attack_paw(mob/living/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
if ((HULK in user.mutations))
+ user.do_attack_animation(src)
if (prob(40))
usr << text("\blue You smash through the wall.")
usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
@@ -257,6 +258,7 @@
/turf/simulated/wall/attack_animal(var/mob/living/simple_animal/M)
M.changeNext_move(CLICK_CD_MELEE)
+ M.do_attack_animation(src)
if(M.environment_smash >= 2)
if(istype(src, /turf/simulated/wall/r_wall))
if(M.environment_smash == 3)
diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm
index bc39a2cbf00..bc65a28cf5a 100644
--- a/code/modules/flufftext/Hallucination.dm
+++ b/code/modules/flufftext/Hallucination.dm
@@ -11,18 +11,19 @@ Gunshots/explosions/opening doors/less rare audio (done)
*/
-mob/living/carbon/var
- image/halimage
- image/halbody
- obj/halitem
- hal_screwyhud = 0 //1 - critical, 2 - dead, 3 - oxygen indicator, 4 - toxin indicator
- handling_hal = 0
- hal_crit = 0
+mob/living/carbon/
+ var/image/halimage
+ var/image/halbody
+ var/obj/halitem
+ var/hal_screwyhud = 0 //1 - critical, 2 - dead, 3 - oxygen indicator, 4 - toxin indicator
+ var/handling_hal = 0
+ var/hal_crit = 0
mob/living/carbon/proc/handle_hallucinations()
- if(handling_hal) return
+ if(handling_hal)
+ return
handling_hal = 1
- while(client && hallucination > 20)
+ while(hallucination > 20)
sleep(rand(200,500)/(hallucination/25))
var/halpick = rand(1,100)
switch(halpick)
@@ -77,9 +78,7 @@ mob/living/carbon/proc/handle_hallucinations()
halitem.name = "Flashbang"
if(client) client.screen += halitem
spawn(rand(100,250))
- if(client)
- client.screen -= halitem
- halitem = null
+ qdel(halitem)
if(26 to 40)
//Flashes of danger
//src << "Danger Flash"
@@ -111,7 +110,7 @@ mob/living/carbon/proc/handle_hallucinations()
if(41 to 65)
//Strange audio
//src << "Strange Audio"
- switch(rand(1,12))
+ switch(rand(1,14))
if(1) src << 'sound/machines/airlock.ogg'
if(2)
if(prob(50))src << 'sound/effects/Explosion1.ogg'
@@ -142,9 +141,14 @@ mob/living/carbon/proc/handle_hallucinations()
'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg',\
'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/turn_around2.ogg', 'sound/hallucinations/veryfar_noise.ogg', 'sound/hallucinations/wail.ogg')
src << pick(creepyasssounds)
+ if(13)
+ src << "You feel a tiny prick!"
+ if(14)
+ src << "Priority Announcement
"
+ src << "
The Emergency Shuttle has docked with the station. You have 3 minutes to board the Emergency Shuttle.
"
+ src << sound('sound/AI/shuttledock.ogg')
if(66 to 70)
//Flashes of danger
- //src << "Danger Flash"
if(!halbody)
var/list/possible_points = list()
for(var/turf/simulated/floor/F in view(src,world.view))
@@ -158,8 +162,6 @@ mob/living/carbon/proc/handle_hallucinations()
halbody = image('icons/mob/human.dmi',target,"husk_s",TURF_LAYER)
if(4)
halbody = image('icons/mob/alien.dmi',target,"alienother",TURF_LAYER)
- // if(5)
- // halbody = image('xcomalien.dmi',target,"chryssalid",TURF_LAYER)
if(client) client.images += halbody
spawn(rand(50,80)) //Only seen for a brief moment.
@@ -167,55 +169,58 @@ mob/living/carbon/proc/handle_hallucinations()
halbody = null
if(71 to 72)
//Fake death
-// src.sleeping_willingly = 1
src.sleeping = 20
hal_crit = 1
hal_screwyhud = 1
spawn(rand(50,100))
-// src.sleeping_willingly = 0
src.sleeping = 0
hal_crit = 0
hal_screwyhud = 0
+ if(73 to 75)
+ fake_attack()
handling_hal = 0
+/mob/living/carbon/proc/fake_attack()
+// var/list/possible_clones = new/list()
+ var/mob/living/carbon/human/clone = null
+ var/clone_weapon = null
+ for(var/mob/living/carbon/human/H in living_mob_list)
+ if(H.stat || H.lying)
+ continue
+// possible_clones += H
+ clone = H
+ break //changed the code a bit. Less randomised, but less work to do. Should be ok, world.contents aren't stored in any particular order.
-/*obj/machinery/proc/mockpanel(list/buttons,start_txt,end_txt,list/mid_txts)
+// if(!possible_clones.len) return
+// clone = pick(possible_clones)
+ if(!clone)
+ return
- if(!mocktxt)
+ //var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(outside_range(target))
+ var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(src.loc)
+ if(clone.l_hand)
+ if(!(locate(clone.l_hand) in non_fakeattack_weapons))
+ clone_weapon = clone.l_hand.name
+ F.weap = clone.l_hand
+ else if (clone.r_hand)
+ if(!(locate(clone.r_hand) in non_fakeattack_weapons))
+ clone_weapon = clone.r_hand.name
+ F.weap = clone.r_hand
- mocktxt = ""
+ F.name = clone.name
+ F.my_target = src
+ F.weapon_name = clone_weapon
+ src.hallucinations += F
- var/possible_txt = list("Launch Escape Pods","Self-Destruct Sequence","\[Swipe ID\]","De-Monkify",\
- "Reticulate Splines","Plasma","Open Valve","Lockdown","Nerf Airflow","Kill Traitor","Nihilism",\
- "OBJECTION!","Arrest Stephen Bowman","Engage Anti-Trenna Defenses","Increase Captain IQ","Retrieve Arms",\
- "Play Charades","Oxygen","Inject BeAcOs","Ninja Lizards","Limit Break","Build Sentry")
+ F.left = image(clone,dir = WEST)
+ F.right = image(clone,dir = EAST)
+ F.up = image(clone,dir = NORTH)
+ F.down = image(clone,dir = SOUTH)
- if(mid_txts)
- while(mid_txts.len)
- var/mid_txt = pick(mid_txts)
- mocktxt += mid_txt
- mid_txts -= mid_txt
+ F.updateimage()
- while(buttons.len)
-
- var/button = pick(buttons)
-
- var/button_txt = pick(possible_txt)
-
- mocktxt += "[button_txt]
"
-
- buttons -= button
- possible_txt -= button_txt
-
- return start_txt + mocktxt + end_txt + "