Merge pull request #6584 from phil235/HoloSwordFix

Fixes being able to smash grille/newscaster/mirror/lights with holo esword
This commit is contained in:
tkdrg
2015-01-01 16:39:16 -03:00
4 changed files with 13 additions and 21 deletions

View File

@@ -786,18 +786,6 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
/obj/machinery/newscaster/attackby(obj/item/I as obj, mob/living/user as mob)
/* if (istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda) ) //Name verification for channels or messages
if(src.screen == 4 || src.screen == 5)
if( istype(I, /obj/item/device/pda) )
var/obj/item/device/pda/P = I
if(P.id)
src.scanned_user = "[P.id.registered_name] ([P.id.assignment])"
src.screen=2
else
var/obj/item/weapon/card/id/T = I
src.scanned_user = text("[T.registered_name] ([T.assignment])")
src.screen=2*/ //Obsolete after autorecognition
if(istype(I, /obj/item/weapon/wrench))
user << "<span class='notice'>Now [anchored ? "un" : ""]securing [name]</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
@@ -809,26 +797,24 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if (src.isbroken)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1)
for (var/mob/O in hearers(5, src.loc))
O.show_message("<span class='danger'>[user.name] further abuses the shattered [src.name].</span>")
src.loc.audible_message("<span class='danger'>[user.name] further abuses the shattered [src.name].</span>", null, 5 )
else
if(istype(I, /obj/item/weapon) )
user.do_attack_animation(src)
var/obj/item/weapon/W = I
if(W.damtype == STAMINA)
return
if(W.force <15)
for (var/mob/O in hearers(5, src.loc))
O.show_message("<span class='danger'>[user.name] hits the [src.name] with the [W.name] with no visible effect.</span>" )
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
src.loc.audible_message("<span class='danger'>[user.name] hits the [src.name] with the [W.name] with no visible effect.</span>", null , 5 )
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
else
src.hitstaken++
if(src.hitstaken==3)
for (var/mob/O in hearers(5, src.loc))
O.show_message("<span class='danger'>[user.name] smashes the [src.name]!</span>" )
src.loc.audible_message("<span class='danger'>[user.name] smashes the [src.name]!</span>", null, 5 )
src.isbroken=1
playsound(src.loc, 'sound/effects/Glassbr3.ogg', 100, 1)
else
for (var/mob/O in hearers(5, src.loc))
O.show_message("<span class='danger'>[user.name] forcefully slams the [src.name] with the [I.name]!</span>" )
src.loc.audible_message("<span class='danger'>[user.name] forcefully slams the [src.name] with the [I.name]!</span>", null, 5 )
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
else
user << "<FONT COLOR='blue'>This does nothing.</FONT>"

View File

@@ -196,6 +196,8 @@
health -= W.force * 0.1
else if(!shock(user, 70))
switch(W.damtype)
if(STAMINA)
return
if(BURN)
playsound(loc, 'sound/items/welder.ogg', 80, 1)
else

View File

@@ -58,6 +58,8 @@
/obj/structure/mirror/attackby(obj/item/I as obj, mob/living/user as mob)
user.do_attack_animation(src)
if(I.damtype == STAMINA)
return
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return

View File

@@ -370,6 +370,8 @@
else if(status != LIGHT_BROKEN && status != LIGHT_EMPTY)
user.do_attack_animation(src)
if(W.damtype == STAMINA)
return
if(prob(1+W.force * 5))
user.visible_message("<span class='danger'>[user.name] smashed the light!</span>", \