Merge pull request #2146 from comma/master

Violence and carnage
This commit is contained in:
Hawk-v3
2013-01-05 15:58:45 -08:00
7 changed files with 104 additions and 10 deletions

View File

@@ -3,6 +3,9 @@
desc = "You sit in this. Either by will or force."
icon_state = "chair"
/obj/structure/stool/MouseDrop(atom/over_object)
return
/obj/structure/stool/bed/chair/New()
if(anchored)
src.verbs -= /atom/movable/verb/pull

View File

@@ -32,4 +32,43 @@
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/metal(src.loc)
del(src)
return
return
/obj/structure/stool/MouseDrop(atom/over_object)
if (istype(over_object, /mob/living/carbon/human))
var/mob/living/carbon/human/H = over_object
var/obj/item/weapon/stool/S = new/obj/item/weapon/stool()
S.origin = src
src.loc = S
H.put_in_hands(S)
H.visible_message("\red [H] grabs [src] from the floor!", "\red You grab [src] from the floor!")
/obj/item/weapon/stool
name = "stool"
desc = "Uh-hoh, bar is heating up."
icon = 'icons/obj/objects.dmi'
icon_state = "stool"
force = 10
throwforce = 20
w_class = 5.0
var/obj/structure/stool/origin = null
/obj/item/weapon/stool/attack_self(mob/user as mob)
..()
origin.loc = get_turf(src)
user.u_equip(src)
user.visible_message("\blue [user] puts [src] down.", "\blue You put [src] down.")
del src
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
if (prob(5) && istype(M,/mob/living))
user.visible_message("\red [user] breaks [src] over [M]'s back!.")
user.u_equip(src)
var/obj/item/stack/sheet/metal/m = new/obj/item/stack/sheet/metal
m.loc = get_turf(src)
del src
var/mob/living/T = M
T.Weaken(10)
T.apply_damage(20)
return
..()

View File

@@ -333,14 +333,23 @@
/obj/structure/table/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(G.state<2)
user << "\red You need a better grip to do that!"
if (istype(G.affecting, /mob/living))
var/mob/living/M = G.affecting
if (G.state < 2)
if(user.a_intent == "hurt")
if (prob(5)) M.Weaken(3)
M.apply_damage(10)
visible_message("\red [G.assailant] slams [G.affecting] against \the [src]!")
playsound(src.loc, 'sound/weapons/tablehit1.ogg', 50, 1)
else
user << "\red You need a better grip to do that!"
return
else
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("\red [G.assailant] puts [G.affecting] on \the [src].")
del(W)
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
del(W)
return
if (istype(W, /obj/item/weapon/wrench))
user << "\blue Now disassembling table"

View File

@@ -209,6 +209,30 @@
/obj/structure/window/attackby(obj/item/weapon/W as obj, mob/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
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.apply_damage(10)
hit(10)
visible_message("\red [user] slams [M] against \the [src]!")
if(2)
M.Weaken(2)
M.apply_damage(15)
hit(25)
visible_message("\red <b>[user] bashes [M] against \the [src]!</b>")
if(3)
M.Weaken(10)
M.apply_damage(25)
hit(50)
visible_message("\red <big><b>[user] crushes [M] against \the [src]!</b></big>")
return
if (istype(W, /obj/item/weapon/screwdriver))
if(reinf && state >= 1)
state = 3 - state
@@ -438,4 +462,4 @@
/obj/structure/window/reinforced/tinted/frosted
icon_state = "fwindow"
name = "frosted window"
name = "frosted window"