This commit is contained in:
Zuhayr
2014-12-08 05:00:54 +10:30
parent 17a8c59ff9
commit 1211360118
+8 -7
View File
@@ -169,31 +169,32 @@
/obj/structure/window/attackby(obj/item/W as obj, mob/user as mob)
if(!istype(W)) return//I really wish I did not need this
if(W.flags & NOBLUDGEON) return
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if (istype(G.affecting, /mob/living))
if(istype(G.affecting,/mob/living))
var/mob/living/M = G.affecting
var/state = G.state
del(W) //gotta delete it here because if window breaks, it won't get deleted
switch (state)
if(1)
M.visible_message("\red [user] slams [M] against \the [src]!")
M.apply_damage(7)
hit(10)
visible_message("\red [user] slams [M] against \the [src]!")
if(2)
M.visible_message("\red <b>[user] bashes [M] against \the [src]!</b>")
if (prob(50))
M.Weaken(1)
M.apply_damage(10)
hit(25)
visible_message("\red <b>[user] bashes [M] against \the [src]!</b>")
if(3)
M.visible_message("\red <big><b>[user] crushes [M] against \the [src]!</b></big>")
M.Weaken(5)
M.apply_damage(20)
hit(50)
visible_message("\red <big><b>[user] crushes [M] against \the [src]!</b></big>")
return
if(W.flags & NOBLUDGEON) return
if(istype(W, /obj/item/weapon/screwdriver))
if(reinf && state >= 1)
state = 3 - state
@@ -299,7 +300,7 @@
//player-constructed windows
if (constructed)
anchored = 0
if (start_dir)
dir = start_dir