Merge pull request #8160 from mwerezak/stools

Replaces stool structures with stool items
This commit is contained in:
PsiOmegaDelta
2015-02-18 07:35:54 +01:00
36 changed files with 668 additions and 765 deletions
+1 -1
View File
@@ -1305,7 +1305,7 @@ proc/is_hot(obj/item/W as obj)
/proc/can_operate(mob/living/carbon/M)
return (M.lying && \
locate(/obj/machinery/optable, M.loc) || \
(locate(/obj/structure/stool/bed/roller, M.loc) && prob(75)) || \
(locate(/obj/structure/bed/roller, M.loc) && prob(75)) || \
(locate(/obj/structure/table/, M.loc) && prob(66)))
/proc/reverse_direction(var/dir)
+1 -1
View File
@@ -108,7 +108,7 @@
playSpecials(curturf,effectin,soundin)
var/obj/structure/stool/bed/chair/C = null
var/obj/structure/bed/chair/C = null
if(isliving(teleatom))
var/mob/living/L = teleatom
if(L.buckled)
+1 -1
View File
@@ -19,7 +19,7 @@
spawn(0)
if(target.buckled)
var/obj/structure/stool/bed/buckled_to = target.buckled.
var/obj/structure/bed/buckled_to = target.buckled.
buckled_to.unbuckle_mob()
var/mobloc = get_turf(target.loc)
+1 -1
View File
@@ -185,7 +185,7 @@ var/global/datum/controller/gameticker/ticker
cinematic.mouse_opacity = 0
cinematic.screen_loc = "1,0"
var/obj/structure/stool/bed/temp_buckle = new(src)
var/obj/structure/bed/temp_buckle = new(src)
//Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around
if(station_missed)
for(var/mob/living/M in living_mob_list)
+2 -2
View File
@@ -421,7 +421,7 @@ var/global/datum/controller/occupations/job_master
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
H.loc = S.loc
// Moving wheelchair if they have one
if(H.buckled && istype(H.buckled, /obj/structure/stool/bed/chair/wheelchair))
if(H.buckled && istype(H.buckled, /obj/structure/bed/chair/wheelchair))
H.buckled.loc = H.loc
H.buckled.set_dir(H.dir)
@@ -516,7 +516,7 @@ var/global/datum/controller/occupations/job_master
var/datum/organ/external/l_foot = H.get_organ("l_foot")
var/datum/organ/external/r_foot = H.get_organ("r_foot")
if((!l_foot || l_foot.status & ORGAN_DESTROYED) && (!r_foot || r_foot.status & ORGAN_DESTROYED))
var/obj/structure/stool/bed/chair/wheelchair/W = new /obj/structure/stool/bed/chair/wheelchair(H.loc)
var/obj/structure/bed/chair/wheelchair/W = new /obj/structure/bed/chair/wheelchair(H.loc)
H.buckled = W
H.update_canmove()
W.set_dir(H.dir)
+2 -2
View File
@@ -102,8 +102,8 @@
else
flick("door_deny", src)
return
if(istype(AM, /obj/structure/stool/bed/chair/wheelchair))
var/obj/structure/stool/bed/chair/wheelchair/wheel = AM
if(istype(AM, /obj/structure/bed/chair/wheelchair))
var/obj/structure/bed/chair/wheelchair/wheel = AM
if(density)
if(wheel.pulling && (src.allowed(wheel.pulling)))
open()
+29 -26
View File
@@ -15,36 +15,39 @@
action(atom/target)
if(!action_checks(target)) return
if(!cargo_holder) return
if(istype(target, /obj/structure/stool)) return
for(var/M in target.contents)
if(istype(M, /mob/living))
return
//loading
if(istype(target,/obj))
var/obj/O = target
if(!O.anchored)
if(cargo_holder.cargo.len < cargo_holder.cargo_capacity)
occupant_message("You lift [target] and start to load it into cargo compartment.")
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
set_ready_state(0)
chassis.use_power(energy_drain)
O.anchored = 1
var/T = chassis.loc
if(do_after_cooldown(target))
if(T == chassis.loc && src == chassis.selected)
cargo_holder.cargo += O
O.loc = chassis
O.anchored = 0
occupant_message("<font color='blue'>[target] succesfully loaded.</font>")
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
else
occupant_message("<font color='red'>You must hold still while handling objects.</font>")
O.anchored = initial(O.anchored)
else
occupant_message("<font color='red'>Not enough room in cargo compartment.</font>")
else
if(O.buckled_mob)
return
if(locate(/mob/living) in O)
return
if(O.anchored)
occupant_message("<font color='red'>[target] is firmly secured.</font>")
return
if(cargo_holder.cargo.len >= cargo_holder.cargo_capacity)
occupant_message("<font color='red'>Not enough room in cargo compartment.</font>")
return
occupant_message("You lift [target] and start to load it into cargo compartment.")
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
set_ready_state(0)
chassis.use_power(energy_drain)
O.anchored = 1
var/T = chassis.loc
if(do_after_cooldown(target))
if(T == chassis.loc && src == chassis.selected)
cargo_holder.cargo += O
O.loc = chassis
O.anchored = 0
occupant_message("<font color='blue'>[target] succesfully loaded.</font>")
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
else
occupant_message("<font color='red'>You must hold still while handling objects.</font>")
O.anchored = initial(O.anchored)
//attacking
else if(istype(target,/mob/living))
var/mob/living/M = target
if(M.stat>1) return
@@ -79,8 +79,8 @@ var/global/list/image/splatter_cache=list()
if(!perp.feet_blood_DNA)
perp.feet_blood_DNA = list()
perp.feet_blood_DNA |= blood_DNA.Copy()
else if (perp.buckled && istype(perp.buckled, /obj/structure/stool/bed/chair/wheelchair))
var/obj/structure/stool/bed/chair/wheelchair/W = perp.buckled
else if (perp.buckled && istype(perp.buckled, /obj/structure/bed/chair/wheelchair))
var/obj/structure/bed/chair/wheelchair/W = perp.buckled
W.bloodiness = 4
perp.update_inv_shoes(1)
@@ -11,20 +11,20 @@
* Metal
*/
var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("stool", /obj/item/weapon/stool, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("chair", /obj/structure/bed/chair, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe_list("office chairs",list( \
new/datum/stack_recipe("dark office chair", /obj/structure/stool/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("light office chair", /obj/structure/stool/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("dark office chair", /obj/structure/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("light office chair", /obj/structure/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1), \
), 5), \
new/datum/stack_recipe_list("comfy chairs", list( \
new/datum/stack_recipe("beige comfy chair", /obj/structure/stool/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("black comfy chair", /obj/structure/stool/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("brown comfy chair", /obj/structure/stool/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("lime comfy chair", /obj/structure/stool/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("teal comfy chair", /obj/structure/stool/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("beige comfy chair", /obj/structure/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("black comfy chair", /obj/structure/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("brown comfy chair", /obj/structure/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("lime comfy chair", /obj/structure/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("teal comfy chair", /obj/structure/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
), 2), \
null, \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
@@ -132,7 +132,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \
new/datum/stack_recipe("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden chair", /obj/structure/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0), \
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
@@ -79,8 +79,8 @@
if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored )
spawn(0)
var/obj/structure/stool/bed/chair/C = null
if(istype(usr.buckled, /obj/structure/stool/bed/chair))
var/obj/structure/bed/chair/C = null
if(istype(usr.buckled, /obj/structure/bed/chair))
C = usr.buckled
var/obj/B = usr.buckled
var/movementdirection = turn(direction,180)
@@ -4,7 +4,7 @@
if(!istype(M))
return ..()
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/stool/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))))
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))))
return ..()
if(!istype(M, /mob/living/carbon/human))
@@ -55,8 +55,8 @@
break
if(O.density || O.anchored || istype(O,/obj/structure/closet))
continue
if(istype(O, /obj/structure/stool/bed)) //This is only necessary because of rollerbeds and swivel chairs.
var/obj/structure/stool/bed/B = O
if(istype(O, /obj/structure/bed)) //This is only necessary because of rollerbeds and swivel chairs.
var/obj/structure/bed/B = O
if(B.buckled_mob)
continue
O.loc = src
@@ -1,4 +1,4 @@
/obj/structure/stool/bed/chair/e_chair
/obj/structure/bed/chair/e_chair
name = "electric chair"
desc = "Looks absolutely SHOCKING!"
icon_state = "echair0"
@@ -6,14 +6,14 @@
var/obj/item/assembly/shock_kit/part = null
var/last_time = 1.0
/obj/structure/stool/bed/chair/e_chair/New()
/obj/structure/bed/chair/e_chair/New()
..()
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir)
return
/obj/structure/stool/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
var/obj/structure/stool/bed/chair/C = new /obj/structure/stool/bed/chair(loc)
var/obj/structure/bed/chair/C = new /obj/structure/bed/chair(loc)
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
C.set_dir(dir)
part.loc = loc
@@ -23,7 +23,7 @@
return
return
/obj/structure/stool/bed/chair/e_chair/verb/toggle()
/obj/structure/bed/chair/e_chair/verb/toggle()
set name = "Toggle Electric Chair"
set category = "Object"
set src in oview(1)
@@ -37,13 +37,13 @@
usr << "<span class='notice'>You switch [on ? "on" : "off"] [src].</span>"
return
/obj/structure/stool/bed/chair/e_chair/rotate()
/obj/structure/bed/chair/e_chair/rotate()
..()
overlays.Cut()
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir) //there's probably a better way of handling this, but eh. -Pete
return
/obj/structure/stool/bed/chair/e_chair/proc/shock()
/obj/structure/bed/chair/e_chair/proc/shock()
if(!on)
return
if(last_time + 50 > world.time)
+13 -13
View File
@@ -156,7 +156,7 @@
//old style retardo-cart
/obj/structure/stool/bed/chair/janicart
/obj/structure/bed/chair/janicart
name = "janicart"
icon = 'icons/obj/vehicles.dmi'
icon_state = "pussywagon"
@@ -169,12 +169,12 @@
var/callme = "pimpin' ride" //how do people refer to it?
/obj/structure/stool/bed/chair/janicart/New()
/obj/structure/bed/chair/janicart/New()
create_reagents(100)
update_layer()
/obj/structure/stool/bed/chair/janicart/examine(mob/user)
/obj/structure/bed/chair/janicart/examine(mob/user)
if(!..(user, 1))
return
@@ -183,7 +183,7 @@
user << "\A [mybag] is hanging on the [callme]."
/obj/structure/stool/bed/chair/janicart/attackby(obj/item/I, mob/user)
/obj/structure/bed/chair/janicart/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/mop))
if(reagents.total_volume > 1)
reagents.trans_to(I, 2)
@@ -200,7 +200,7 @@
mybag = I
/obj/structure/stool/bed/chair/janicart/attack_hand(mob/user)
/obj/structure/bed/chair/janicart/attack_hand(mob/user)
if(mybag)
mybag.loc = get_turf(user)
user.put_in_hands(mybag)
@@ -209,7 +209,7 @@
..()
/obj/structure/stool/bed/chair/janicart/relaymove(mob/user, direction)
/obj/structure/bed/chair/janicart/relaymove(mob/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis)
unbuckle_mob()
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
@@ -219,26 +219,26 @@
user << "<span class='notice'>You'll need the keys in one of your hands to drive this [callme].</span>"
/obj/structure/stool/bed/chair/janicart/Move()
/obj/structure/bed/chair/janicart/Move()
..()
if(buckled_mob)
if(buckled_mob.buckled == src)
buckled_mob.loc = loc
/obj/structure/stool/bed/chair/janicart/post_buckle_mob(mob/living/M)
/obj/structure/bed/chair/janicart/post_buckle_mob(mob/living/M)
update_mob()
return ..()
/obj/structure/stool/bed/chair/janicart/update_layer()
/obj/structure/bed/chair/janicart/update_layer()
if(dir == SOUTH)
layer = FLY_LAYER
else
layer = OBJ_LAYER
/obj/structure/stool/bed/chair/janicart/unbuckle_mob()
/obj/structure/bed/chair/janicart/unbuckle_mob()
var/mob/living/M = ..()
if(M)
M.pixel_x = 0
@@ -246,7 +246,7 @@
return M
/obj/structure/stool/bed/chair/janicart/set_dir()
/obj/structure/bed/chair/janicart/set_dir()
..()
update_layer()
if(buckled_mob)
@@ -257,7 +257,7 @@
update_mob()
/obj/structure/stool/bed/chair/janicart/proc/update_mob()
/obj/structure/bed/chair/janicart/proc/update_mob()
if(buckled_mob)
buckled_mob.set_dir(dir)
switch(dir)
@@ -275,7 +275,7 @@
buckled_mob.pixel_y = 7
/obj/structure/stool/bed/chair/janicart/bullet_act(var/obj/item/projectile/Proj)
/obj/structure/bed/chair/janicart/bullet_act(var/obj/item/projectile/Proj)
if(buckled_mob)
if(prob(85))
return buckled_mob.bullet_act(Proj)
@@ -1,14 +1,14 @@
//Alium nests. Essentially beds with an unbuckle delay that only aliums can buckle mobs to.
#define NEST_RESIST_TIME 1200
/obj/structure/stool/bed/nest
/obj/structure/bed/nest
name = "alien nest"
desc = "It's a gruesome pile of thick, sticky resin shaped like a nest."
icon = 'icons/mob/alien.dmi'
icon_state = "nest"
var/health = 100
/obj/structure/stool/bed/nest/user_unbuckle_mob(mob/user as mob)
/obj/structure/bed/nest/user_unbuckle_mob(mob/user as mob)
if(buckled_mob)
if(buckled_mob.buckled == src)
if(buckled_mob != user)
@@ -36,7 +36,7 @@
src.add_fingerprint(user)
return
/obj/structure/stool/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob)
/obj/structure/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob)
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
return
@@ -68,7 +68,7 @@
src.add_fingerprint(user)
return
/obj/structure/stool/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob)
var/aforce = W.force
health = max(0, health - aforce)
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
@@ -76,7 +76,7 @@
M.show_message("<span class='warning'>[user] hits [src] with [W]!</span>", 1)
healthcheck()
/obj/structure/stool/bed/nest/proc/healthcheck()
/obj/structure/bed/nest/proc/healthcheck()
if(health <=0)
density = 0
del(src)
@@ -7,119 +7,63 @@
/*
* Beds
*/
/obj/structure/stool/bed
/obj/structure/bed
name = "bed"
desc = "This is used to lie in, sleep in or strap on."
icon = 'icons/obj/objects.dmi'
icon_state = "bed"
pressure_resistance = 15
anchored = 1
can_buckle = 1
buckle_lying = 1
//var/mob/living/buckled_mob
//var/movable = 0 // For mobility checks
/obj/structure/stool/bed/psych
/obj/structure/bed/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
/obj/structure/bed/blob_act()
if(prob(75))
new /obj/item/stack/sheet/metal(src.loc)
del(src)
/obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/metal(src.loc)
del(src)
else
..()
/obj/structure/bed/psych
name = "psychiatrists couch"
desc = "For prime comfort during psychiatric evaluations."
icon_state = "psychbed"
/obj/structure/stool/bed/alien
/obj/structure/bed/alien
name = "resting contraption"
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
icon_state = "abed"
/*/obj/structure/stool/bed/Del()
unbuckle()
..()
return
/obj/structure/stool/bed/attack_hand(mob/user as mob)
manual_unbuckle(user)
return
/obj/structure/stool/bed/MouseDrop(atom/over_object)
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/proc/afterbuckle(mob/M as mob) // Called after somebody buckled / unbuckled
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()
var/M = buckled_mob
buckled_mob = null
afterbuckle(M)
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 were 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 1
return 0
/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 || M.pinned.len || istype(user, /mob/living/silicon/pai) )
return
if (istype(M, /mob/living/carbon/slime))
user << "The [M] is too squishy to buckle in."
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.set_dir(src.dir)
M.update_canmove()
src.buckled_mob = M
src.add_fingerprint(user)
afterbuckle(M)
return*/
/*
* Roller beds
*/
/obj/structure/stool/bed/roller
/obj/structure/bed/roller
name = "roller bed"
icon = 'icons/obj/rollerbed.dmi'
icon_state = "down"
anchored = 0
/obj/structure/stool/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/roller_holder))
if(buckled_mob)
user_unbuckle_mob(user)
@@ -139,7 +83,7 @@
w_class = 4.0 // Can't be put in backpacks. Oh well.
/obj/item/roller/attack_self(mob/user)
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
R.add_fingerprint(user)
del(src)
@@ -173,13 +117,13 @@
return
user << "\blue You deploy the roller bed."
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
R.add_fingerprint(user)
del(held)
held = null
/obj/structure/stool/bed/roller/Move()
/obj/structure/bed/roller/Move()
..()
if(buckled_mob)
if(buckled_mob.buckled == src)
@@ -187,7 +131,7 @@
else
buckled_mob = null
/obj/structure/stool/bed/roller/post_buckle_mob(mob/living/M as mob)
/obj/structure/bed/roller/post_buckle_mob(mob/living/M as mob)
if(M == buckled_mob)
M.pixel_y = 6
M.old_y = 6
@@ -201,7 +145,7 @@
return ..()
/obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location)
/obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location)
..()
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if(!ishuman(usr)) return
@@ -1,4 +1,4 @@
/obj/structure/stool/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete
/obj/structure/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete
name = "chair"
desc = "You sit in this. Either by will or force."
icon_state = "chair"
@@ -6,13 +6,13 @@
var/propelled = 0 // Check for fire-extinguisher-driven chairs
/obj/structure/stool/bed/chair/New()
/obj/structure/bed/chair/New()
..()
spawn(3) //sorry. i don't think there's a better way to do this.
update_layer()
return
/obj/structure/stool/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/assembly/shock_kit))
var/obj/item/assembly/shock_kit/SK = W
@@ -20,7 +20,7 @@
user << "<span class='notice'>[SK] is not ready to be attached!</span>"
return
user.drop_item()
var/obj/structure/stool/bed/chair/e_chair/E = new /obj/structure/stool/bed/chair/e_chair(src.loc)
var/obj/structure/bed/chair/e_chair/E = new /obj/structure/bed/chair/e_chair(src.loc)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
E.set_dir(dir)
E.part = SK
@@ -28,26 +28,26 @@
SK.master = E
del(src)
/obj/structure/stool/bed/chair/attack_tk(mob/user as mob)
/obj/structure/bed/chair/attack_tk(mob/user as mob)
if(buckled_mob)
..()
else
rotate()
return
/obj/structure/stool/bed/chair/proc/update_layer()
/obj/structure/bed/chair/proc/update_layer()
if(src.dir == NORTH)
src.layer = FLY_LAYER
else
src.layer = OBJ_LAYER
/obj/structure/stool/bed/chair/set_dir()
/obj/structure/bed/chair/set_dir()
..()
update_layer()
if(buckled_mob)
buckled_mob.set_dir(dir)
/obj/structure/stool/bed/chair/verb/rotate()
/obj/structure/bed/chair/verb/rotate()
set name = "Rotate Chair"
set category = "Object"
set src in oview(1)
@@ -67,17 +67,17 @@
return
// Chair types
/obj/structure/stool/bed/chair/wood/normal
/obj/structure/bed/chair/wood/normal
icon_state = "wooden_chair"
name = "wooden chair"
desc = "Old is never too old to not be in fashion."
/obj/structure/stool/bed/chair/wood/wings
/obj/structure/bed/chair/wood/wings
icon_state = "wooden_chair_wings"
name = "wooden chair"
desc = "Old is never too old to not be in fashion."
/obj/structure/stool/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/wood(src.loc)
@@ -85,45 +85,45 @@
else
..()
/obj/structure/stool/bed/chair/comfy
/obj/structure/bed/chair/comfy
name = "comfy chair"
desc = "It looks comfy."
icon_state = "comfychair"
color = rgb(255,255,255)
var/image/armrest = null
/obj/structure/stool/bed/chair/comfy/New()
/obj/structure/bed/chair/comfy/New()
armrest = image("icons/obj/objects.dmi", "comfychair_armrest")
armrest.layer = MOB_LAYER + 0.1
return ..()
/obj/structure/stool/bed/chair/comfy/post_buckle_mob()
/obj/structure/bed/chair/comfy/post_buckle_mob()
if(buckled_mob)
overlays += armrest
else
overlays -= armrest
/obj/structure/stool/bed/chair/comfy/brown
/obj/structure/bed/chair/comfy/brown
color = rgb(255,113,0)
/obj/structure/stool/bed/chair/comfy/beige
/obj/structure/bed/chair/comfy/beige
color = rgb(255,253,195)
/obj/structure/stool/bed/chair/comfy/teal
/obj/structure/bed/chair/comfy/teal
color = rgb(0,255,255)
/obj/structure/stool/bed/chair/office
/obj/structure/bed/chair/office
anchored = 0
buckle_movable = 1
/obj/structure/stool/bed/chair/comfy/black
/obj/structure/bed/chair/comfy/black
color = rgb(167,164,153)
/obj/structure/stool/bed/chair/comfy/lime
/obj/structure/bed/chair/comfy/lime
color = rgb(255,251,0)
/obj/structure/stool/bed/chair/office/Move()
/obj/structure/bed/chair/office/Move()
..()
if(buckled_mob)
var/mob/living/occupant = buckled_mob
@@ -138,7 +138,7 @@
else
unbuckle_mob()
/obj/structure/stool/bed/chair/office/Bump(atom/A)
/obj/structure/bed/chair/office/Bump(atom/A)
..()
if(!buckled_mob) return
@@ -163,8 +163,8 @@
victim.apply_damage(10, BRUTE, def_zone, blocked)
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
/obj/structure/stool/bed/chair/office/light
/obj/structure/bed/chair/office/light
icon_state = "officechair_white"
/obj/structure/stool/bed/chair/office/dark
/obj/structure/bed/chair/office/dark
icon_state = "officechair_dark"
@@ -1,81 +1,11 @@
/obj/structure/stool
/obj/item/weapon/stool
name = "stool"
desc = "Apply butt."
icon = 'icons/obj/objects.dmi'
icon_state = "stool"
anchored = 1.0
pressure_resistance = 15
/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, 'sound/items/Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/metal(src.loc)
del(src)
return
/obj/structure/stool/MouseDrop(atom/over_object)
if(istype(over_object, /mob/living/carbon/human) && type == /obj/structure/stool) //i am sorry for this, but the inheritance mess requires it
var/mob/living/carbon/human/H = over_object
if (H==usr && !H.restrained() && !H.stat && in_range(src, 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!")
return
return ..()
/obj/item/weapon/stool
name = "stool"
desc = "Uh-hoh, bar is heating up."
icon = 'icons/obj/objects.dmi'
icon_state = "stool"
force = 10
throwforce = 10
w_class = 5.0
var/obj/structure/stool/origin = null
/obj/item/weapon/stool/proc/deploy(var/mob/user)
if(!origin)
del src
origin.loc = get_turf(src)
if(user)
user.u_equip(src)
user.visible_message("\blue [user] puts [src] down.", "\blue You put [src] down.")
del src
/obj/item/weapon/stool/dropped(mob/user as mob)
..()
if(istype(loc,/turf/))
deploy(user)
/obj/item/weapon/stool/attack_self(mob/user as mob)
..()
deploy(user)
w_class = 5
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
if (prob(5) && istype(M,/mob/living))
@@ -89,3 +19,29 @@
T.apply_damage(20)
return
..()
/obj/item/weapon/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
/obj/item/weapon/stool/blob_act()
if(prob(75))
new /obj/item/stack/sheet/metal(src.loc)
del(src)
/obj/item/weapon/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/metal(src.loc)
del(src)
..()
@@ -1,4 +1,4 @@
/obj/structure/stool/bed/chair/wheelchair
/obj/structure/bed/chair/wheelchair
name = "wheelchair"
desc = "You sit in this. Either by will or force."
icon_state = "wheelchair"
@@ -10,7 +10,7 @@
var/bloodiness
/obj/structure/stool/bed/chair/wheelchair/set_dir()
/obj/structure/bed/chair/wheelchair/set_dir()
..()
overlays = null
var/image/O = image(icon = 'icons/obj/objects.dmi', icon_state = "w_overlay", layer = FLY_LAYER, dir = src.dir)
@@ -18,7 +18,7 @@
if(buckled_mob)
buckled_mob.set_dir(dir)
/obj/structure/stool/bed/chair/wheelchair/relaymove(mob/user, direction)
/obj/structure/bed/chair/wheelchair/relaymove(mob/user, direction)
// Redundant check?
if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained())
if(user==pulling)
@@ -79,7 +79,7 @@
create_track()
driving = 0
/obj/structure/stool/bed/chair/wheelchair/Move()
/obj/structure/bed/chair/wheelchair/Move()
..()
if(buckled_mob)
var/mob/living/occupant = buckled_mob
@@ -102,14 +102,14 @@
if (occupant && (src.loc != occupant.loc))
src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving
/obj/structure/stool/bed/chair/wheelchair/attack_hand(mob/living/user as mob)
/obj/structure/bed/chair/wheelchair/attack_hand(mob/living/user as mob)
if (pulling)
MouseDrop(usr)
else
user_unbuckle_mob(user)
return
/obj/structure/stool/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
/obj/structure/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
..()
if(over_object == usr && in_range(src, usr))
if(!ishuman(usr)) return
@@ -133,7 +133,7 @@
pulling = null
return
/obj/structure/stool/bed/chair/wheelchair/Bump(atom/A)
/obj/structure/bed/chair/wheelchair/Bump(atom/A)
..()
if(!buckled_mob) return
@@ -170,7 +170,7 @@
else
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
/obj/structure/stool/bed/chair/wheelchair/proc/create_track()
/obj/structure/bed/chair/wheelchair/proc/create_track()
var/obj/effect/decal/cleanable/blood/tracks/B = new(loc)
var/newdir = get_dir(get_step(loc, dir), loc)
if(newdir == dir)
@@ -184,7 +184,7 @@
B.set_dir(newdir)
bloodiness--
/obj/structure/stool/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob)
/obj/structure/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob)
if(M == pulling)
pulling = null
usr.pulledby = null
+2 -2
View File
@@ -54,8 +54,8 @@ var/list/mechtoys = list(
if(istype(A) && A.checkpass(PASSGLASS))
return prob(60)
var/obj/structure/stool/bed/B = A
if (istype(A, /obj/structure/stool/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
var/obj/structure/bed/B = A
if (istype(A, /obj/structure/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
return 0
if(istype(A, /obj/vehicle)) //no vehicles
+1 -1
View File
@@ -76,7 +76,7 @@
bloodDNA = null
var/noslip = 0
for (var/obj/structure/stool/bed/chair/C in loc)
for (var/obj/structure/bed/chair/C in loc)
if (C.buckled_mob == M)
noslip = 1
if((wet == 1 && M.m_intent == "walk") || noslip)
+2 -2
View File
@@ -40,7 +40,7 @@
return
/obj/item/assembly/shock_kit/receive_signal()
if(istype(loc, /obj/structure/stool/bed/chair/e_chair))
var/obj/structure/stool/bed/chair/e_chair/C = loc
if(istype(loc, /obj/structure/bed/chair/e_chair))
var/obj/structure/bed/chair/e_chair/C = loc
C.shock()
return
+2 -2
View File
@@ -182,10 +182,10 @@
visible_message("[src] fades away as it shatters!")
del(src)
/obj/structure/stool/bed/chair/holochair/Del()
/obj/structure/bed/chair/holochair/Del()
..()
/obj/structure/stool/bed/chair/holochair/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/bed/chair/holochair/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
user << ("<span class='notice'>It's a holochair, you can't dismantle it!</span>")
return
+1 -1
View File
@@ -341,7 +341,7 @@
/mob/living/carbon/can_use_hands()
if(handcuffed)
return 0
if(buckled && ! istype(buckled, /obj/structure/stool/bed/chair)) // buckling does not restrict hands
if(buckled && ! istype(buckled, /obj/structure/bed/chair)) // buckling does not restrict hands
return 0
return 1
@@ -26,7 +26,7 @@
if(wear_suit)
tally += wear_suit.slowdown
if(istype(buckled, /obj/structure/stool/bed/chair/wheelchair))
if(istype(buckled, /obj/structure/bed/chair/wheelchair))
for(var/organ_name in list("l_hand","r_hand","l_arm","r_arm"))
var/datum/organ/external/E = get_organ(organ_name)
if(!E || (E.status & ORGAN_DESTROYED))
@@ -209,5 +209,5 @@
if("resin membrane")
new /obj/effect/alien/resin/membrane(loc)
if("resin nest")
new /obj/structure/stool/bed/nest(loc)
new /obj/structure/bed/nest(loc)
return
+1 -1
View File
@@ -121,7 +121,7 @@
var/m_int = null//Living
var/m_intent = "run"//Living
var/lastKnownIP = null
var/obj/structure/stool/bed/buckled = null//Living
var/obj/structure/bed/buckled = null//Living
var/obj/item/l_hand = null//Living
var/obj/item/r_hand = null//Living
var/obj/item/weapon/back = null//Human/Monkey
+2 -2
View File
@@ -284,9 +284,9 @@
if(mob.pulledby || mob.buckled) // Wheelchair driving!
if(istype(mob.loc, /turf/space))
return // No wheelchair driving in space
if(istype(mob.pulledby, /obj/structure/stool/bed/chair/wheelchair))
if(istype(mob.pulledby, /obj/structure/bed/chair/wheelchair))
return mob.pulledby.relaymove(mob, direct)
else if(istype(mob.buckled, /obj/structure/stool/bed/chair/wheelchair))
else if(istype(mob.buckled, /obj/structure/bed/chair/wheelchair))
if(ishuman(mob.buckled))
var/mob/living/carbon/human/driver = mob.buckled
var/datum/organ/external/l_hand = driver.get_organ("l_hand")
+1 -1
View File
@@ -352,7 +352,7 @@
character.lastarea = get_area(loc)
// Moving wheelchair if they have one
if(character.buckled && istype(character.buckled, /obj/structure/stool/bed/chair/wheelchair))
if(character.buckled && istype(character.buckled, /obj/structure/bed/chair/wheelchair))
character.buckled.loc = character.loc
character.buckled.set_dir(character.dir)
+1 -1
View File
@@ -112,7 +112,7 @@
stance_damage = 0
// Buckled to a bed/chair. Stance damage is forced to 0 since they're sitting on something solid
if (istype(buckled, /obj/structure/stool/bed))
if (istype(buckled, /obj/structure/bed))
return
for (var/organ in list("l_leg","l_foot","r_leg","r_foot"))
+1 -1
View File
@@ -483,7 +483,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
attack_verb = list("whipped", "lashed", "disciplined", "flogged")
/obj/item/stack/cable_coil/suicide_act(mob/user)
if(locate(/obj/structure/stool) in user.loc)
if(locate(/obj/item/weapon/stool) in user.loc)
user.visible_message("<span class='suicide'>[user] is making a noose with the [src.name]! It looks like \he's trying to commit suicide.</span>")
else
user.visible_message("<span class='suicide'>[user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide.</span>")