Files
Paradise/code/game/objects/stool.dm
baloh.matevz 49f3db9954 - F12 now properly hides the action buttons
- Changed the 'black overlay' you get when paralyzed, blind or in critical condition to include a small circle around you. It still 'blinks' once every 25 seconds or so.
- Added a flag BLOCK_GAS_SMOKE_EFFECT, which can be applied to masks, glasses and hats, which prevent gas smoke, which contains reagents, from having an effect on you. Currently only present for gas masks.
- Dramatically lowered the amount of damage you get per breath while in critical condition. Critical condition now lasts for about 5 minutes if nothing is causing you any additional harm. This in combination with the new black image overlay is an attempt at making doctors more willing to help. For one thing they'll have more time to get to you, for another you will get to see if they murder you before sending you to genetics.
- Added Cheridan's wooden chairs to code
- Added a action_button_name to all items, which defaults to null and contains the text which appears on the action button. If an action button exists, but this variable is not set, the text will default to 'Use [name]', name being the name of the item tied to the button.
- Fixed the problem which resulted in certain glasses types making you keep night vision abilities even after you took them off. 

(Screenshot of black overlay: http://www.kamletos.si/blackimage4.png)

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4280 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-02 08:25:34 +00:00

184 lines
4.7 KiB
Plaintext

/obj/structure/stool/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(50))
del(src)
return
if(3.0)
if (prob(5))
del(src)
return
return
/obj/structure/stool/blob_act()
if(prob(75))
new /obj/item/stack/sheet/metal(src.loc)
del(src)
/obj/structure/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/metal(src.loc)
del(src)
return
/obj/structure/stool/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/assembly/shock_kit))
var/obj/structure/stool/bed/chair/e_chair/E = new /obj/structure/stool/bed/chair/e_chair(src.loc)
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
E.dir = src.dir
E.part = W
W.loc = E
W.master = E
user.u_equip(W)
W.layer = initial(W.layer)
del(src)
return
return
/obj/structure/stool/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/wood(src.loc)
del(src)
else
..()
/obj/structure/stool/bed/Del()
unbuckle()
..()
return
/obj/structure/stool/bed/proc/unbuckle()
if(buckled_mob)
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.update_canmove()
buckled_mob = null
return
/obj/structure/stool/bed/proc/manual_unbuckle(mob/user as mob)
if(buckled_mob)
if(buckled_mob.buckled == src)
if(buckled_mob != user)
buckled_mob.visible_message(\
"\blue [buckled_mob.name] was unbuckled by [user.name]!",\
"You unbuckled from [src] by [user.name].",\
"You hear metal clanking")
else
buckled_mob.visible_message(\
"\blue [buckled_mob.name] unbuckled himself!",\
"You unbuckle yourself from [src].",\
"You hear metal clanking")
unbuckle()
src.add_fingerprint(user)
return
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
if (!ticker)
user << "You can't buckle anyone in before the game starts."
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
return
unbuckle()
if (M == usr)
M.visible_message(\
"\blue [M.name] buckles in!",\
"You buckle yourself to [src].",\
"You hear metal clanking")
else
M.visible_message(\
"\blue [M.name] is buckled in to [src] by [user.name]!",\
"You are buckled in to [src] by [user.name].",\
"You hear metal clanking")
M.buckled = src
M.loc = src.loc
M.dir = src.dir
M.update_canmove()
src.buckled_mob = M
src.add_fingerprint(user)
return
/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob)
if(!istype(M)) return
buckle_mob(M, user)
return
/obj/structure/stool/bed/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/structure/stool/bed/attack_hand(mob/user as mob)
manual_unbuckle(user)
return
/obj/structure/stool/bed/chair/New()
if(anchored)
src.verbs -= /atom/movable/verb/pull
if(src.dir == NORTH)
src.layer = FLY_LAYER
..()
return
/obj/structure/stool/bed/chair/verb/rotate()
set name = "Rotate Chair"
set category = "Object"
set src in oview(1)
src.dir = turn(src.dir, 90)
if(src.dir == NORTH)
src.layer = FLY_LAYER
else
src.layer = OBJ_LAYER
if(buckled_mob)
buckled_mob.dir = dir
return
/obj/structure/stool/bed/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
if(!istype(M)) return
buckle_mob(M, user)
return
//roller bed
/obj/structure/stool/bed/roller
name = "roller bed"
icon = 'icons/obj/rollerbed.dmi'
icon_state = "down"
anchored = 0
/obj/structure/stool/bed/roller/Move()
..()
if(buckled_mob)
if(buckled_mob.buckled == src)
buckled_mob.loc = src.loc
/obj/structure/stool/bed/roller/buckle_mob(mob/M as mob, mob/user as mob)
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(usr, /mob/living/silicon/pai) )
return
M.pixel_y = 6
density = 1
icon_state = "up"
..()
return
/obj/structure/stool/bed/roller/manual_unbuckle(mob/user as mob)
if(buckled_mob)
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
buckled_mob.pixel_y = 0
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.buckled = null
buckled_mob.update_canmove()
buckled_mob = null
density = 0
icon_state = "down"
..()
return