Fixes courtesy of BubbbleWrap

- The first makes it so floor tiles are actually used up when placed on lattice.
- The second fixes the pepperspray so it isn't blocked by cigarettes/cigars/etc...

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3022 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
trubblebass@gmail.com
2012-01-31 22:54:04 +00:00
parent 2d77383ad0
commit cb7123d122
2 changed files with 44 additions and 23 deletions

View File

@@ -176,14 +176,9 @@ obj/structure
/obj/structure/lattice/attackby(obj/item/C as obj, mob/user as mob)
if (istype(C, /obj/item/stack/tile))
C:build(get_turf(src))
C:use(1)
playsound(src.loc, 'Genhit.ogg', 50, 1)
if (C)
C.add_fingerprint(user)
del(src)
if (istype(C, /obj/item/stack/tile/plasteel))
var/turf/T = get_turf(src)
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
return
if (istype(C, /obj/item/weapon/weldingtool) && C:welding)
user << "\blue Slicing lattice joints ..."

View File

@@ -1692,24 +1692,50 @@ datum
return
if(method == TOUCH)
if(istype(M, /mob/living/carbon/human))
if(M:wear_mask)
M << "\red Your mask protects you from the pepperspray!"
var/mob/living/carbon/human/victim = M
var/mouth_covered = 0
var/eyes_covered = 0
var/obj/item/safe_thing = null
if( victim.wear_mask )
if ( victim.wear_mask.flags & MASKCOVERSEYES )
eyes_covered = 1
safe_thing = victim.wear_mask
if ( victim.wear_mask.flags & MASKCOVERSMOUTH )
mouth_covered = 1
safe_thing = victim.wear_mask
if( victim.head )
if ( victim.head.flags & MASKCOVERSEYES )
eyes_covered = 1
safe_thing = victim.head
if ( victim.head.flags & MASKCOVERSMOUTH )
mouth_covered = 1
safe_thing = victim.head
if(victim.glasses)
eyes_covered = 1
if ( !safe_thing )
safe_thing = victim.glasses
if ( eyes_covered && mouth_covered )
victim << "\red Your [safe_thing] protects you from the pepperspray!"
return
if(M:head)
M << "\red Your helmet protects you from the pepperspray!"
else if ( mouth_covered ) // Reduced effects if partially protected
victim << "\red Your [safe_thing] protect you from most of the pepperspray!"
victim.eye_blurry = max(M.eye_blurry, 3)
victim.eye_blind = max(M.eye_blind, 1)
victim.Paralyse(1)
victim.drop_item()
return
if(M:glasses)
M << "\red Your glasses protect you from most of the pepperspray!"
M:emote("scream")
M.eye_blurry = max(M.eye_blurry, 1)
else if ( eyes_covered ) // Eye cover is better than mouth cover
victim << "\red Your [safe_thing] protects your eyes from the pepperspray!"
victim.emote("scream")
victim.eye_blurry = max(M.eye_blurry, 1)
return
M:emote("scream")
M << "\red You're sprayed directly in the eyes with pepperspray!"
M.eye_blurry = max(M.eye_blurry, 5)
M.eye_blind = max(M.eye_blind, 2)
M.Paralyse(1)
M.drop_item()
else // Oh dear :D
victim.emote("scream")
victim << "\red You're sprayed directly in the eyes with pepperspray!"
victim.eye_blurry = max(M.eye_blurry, 5)
victim.eye_blind = max(M.eye_blind, 2)
victim.Paralyse(1)
victim.drop_item()
frostoil
name = "Frost Oil"