mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Colorable Chairs, Stools, and other phoney baloney (#12797)
This commit is contained in:
@@ -27,7 +27,8 @@
|
||||
|
||||
var/can_dismantle = TRUE
|
||||
gfi_layer_rotation = GFI_ROTATION_DEFDIR
|
||||
var/makes_rolling_sound = TRUE
|
||||
var/makes_rolling_sound = FALSE
|
||||
var/held_item = null
|
||||
slowdown = 5
|
||||
|
||||
/obj/structure/bed/Initialize()
|
||||
@@ -36,7 +37,12 @@
|
||||
|
||||
/obj/structure/bed/New(newloc, new_material = MATERIAL_STEEL, new_padding_material)
|
||||
..(newloc)
|
||||
color = null
|
||||
if(can_buckle)
|
||||
desc_info = "Click and drag yourself (or anyone) to this to buckle in. Click on this with an empty hand to undo the buckles.<br>\
|
||||
Anyone with restraints, such as handcuffs, will not be able to unbuckle themselves. They must use the Resist button, or verb, to break free of \
|
||||
the buckles instead. "
|
||||
if(held_item)
|
||||
desc_info += "Click and drag this onto yourself to pick it up. "
|
||||
material = SSmaterials.get_material_by_name(new_material)
|
||||
if(!istype(material))
|
||||
qdel(src)
|
||||
@@ -56,24 +62,24 @@
|
||||
icon_state = ""
|
||||
cut_overlays()
|
||||
// Base icon.
|
||||
var/list/stool_cache = SSicon_cache.stool_cache
|
||||
var/list/furniture_cache = SSicon_cache.furniture_cache
|
||||
|
||||
var/cache_key = "[base_icon]-[material.name]"
|
||||
if(!stool_cache[cache_key])
|
||||
if(!furniture_cache[cache_key])
|
||||
var/image/I = image('icons/obj/furniture.dmi', base_icon)
|
||||
if(material_alteration & MATERIAL_ALTERATION_COLOR)
|
||||
I.color = material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
add_overlay(stool_cache[cache_key])
|
||||
furniture_cache[cache_key] = I
|
||||
add_overlay(furniture_cache[cache_key])
|
||||
// Padding overlay.
|
||||
if(padding_material)
|
||||
var/padding_cache_key = "[base_icon]-[padding_material.name]-padding"
|
||||
if(!stool_cache[padding_cache_key])
|
||||
if(!furniture_cache[padding_cache_key])
|
||||
var/image/I = image(icon, "[base_icon]_padding")
|
||||
if(material_alteration & MATERIAL_ALTERATION_COLOR)
|
||||
I.color = padding_material.icon_colour
|
||||
stool_cache[padding_cache_key] = I
|
||||
add_overlay(stool_cache[padding_cache_key])
|
||||
furniture_cache[padding_cache_key] = I
|
||||
add_overlay(furniture_cache[padding_cache_key])
|
||||
|
||||
// Strings.
|
||||
if(material_alteration & MATERIAL_ALTERATION_NAME)
|
||||
@@ -222,8 +228,9 @@
|
||||
icon_state = "standard_down"
|
||||
item_state = "rollerbed"
|
||||
anchored = FALSE
|
||||
makes_rolling_sound = TRUE
|
||||
var/base_state = "standard"
|
||||
var/item_bedpath = /obj/item/roller
|
||||
held_item = /obj/item/roller
|
||||
var/obj/item/reagent_containers/beaker
|
||||
var/obj/item/vitals_monitor/vitals
|
||||
var/iv_attached = 0
|
||||
@@ -294,8 +301,8 @@
|
||||
..()
|
||||
|
||||
/obj/structure/bed/roller/proc/collapse()
|
||||
visible_message("<b>[usr]</b> collapses \the [src].")
|
||||
new item_bedpath(get_turf(src))
|
||||
usr.visible_message(SPAN_NOTICE("<b>[usr]</b> collapses \the [src]."), SPAN_NOTICE("You collapse \the [src]"))
|
||||
new held_item(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/bed/roller/process()
|
||||
@@ -328,13 +335,13 @@
|
||||
if(!beaker)
|
||||
return
|
||||
if(do_mob(user, target, 1 SECOND))
|
||||
visible_message("<b>[user]</b> attaches [target] to the IV on \the [src].")
|
||||
user.visible_message(SPAN_NOTICE("<b>[user]</b> attaches [target] to the IV on \the [src]."), SPAN_NOTICE("You attach the IV to \the [target]."))
|
||||
iv_attached = TRUE
|
||||
update_icon()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/structure/bed/roller/proc/detach_iv(mob/living/carbon/human/target, mob/user)
|
||||
visible_message("<b>[user]</b> takes [target] off the IV on \the [src].")
|
||||
user.visible_message(SPAN_NOTICE("<b>[user]</b> takes [target] off the IV on \the [src]."), SPAN_NOTICE("You take the IV off \the [target]."))
|
||||
iv_attached = FALSE
|
||||
update_icon()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
@@ -403,7 +410,7 @@
|
||||
icon_state = "hover_down"
|
||||
base_state = "hover"
|
||||
makes_rolling_sound = FALSE
|
||||
item_bedpath = /obj/item/roller/hover
|
||||
held_item = /obj/item/roller/hover
|
||||
patient_shift = 6
|
||||
bag_strap = null
|
||||
|
||||
@@ -424,14 +431,14 @@
|
||||
drop_sound = 'sound/items/drop/axe.ogg'
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
center_of_mass = list("x" = 17,"y" = 7)
|
||||
var/bedpath = /obj/structure/bed/roller
|
||||
var/origin_type = /obj/structure/bed/roller
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
/obj/item/roller/hover
|
||||
name = "medical hoverbed"
|
||||
desc = "A collapsed hoverbed that can be carried around."
|
||||
icon_state = "hover_folded"
|
||||
bedpath = /obj/structure/bed/roller/hover
|
||||
origin_type = /obj/structure/bed/roller/hover
|
||||
|
||||
/obj/item/roller/attack_self(mob/user)
|
||||
..()
|
||||
@@ -446,19 +453,17 @@
|
||||
deploy_roller(user, target)
|
||||
|
||||
/obj/item/roller/attackby(obj/item/W as obj, mob/user as mob)
|
||||
|
||||
if(istype(W,/obj/item/roller_holder))
|
||||
var/obj/item/roller_holder/RH = W
|
||||
if(!RH.held)
|
||||
to_chat(user, "<span class='notice'>You collect the roller bed.</span>")
|
||||
to_chat(user, SPAN_NOTICE("You collect the roller bed."))
|
||||
src.forceMove(RH)
|
||||
RH.held = src
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/roller/proc/deploy_roller(mob/user, atom/location)
|
||||
var/obj/structure/bed/roller/R = new bedpath(location)
|
||||
var/obj/structure/bed/roller/R = new origin_type(location)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
|
||||
@@ -474,12 +479,10 @@
|
||||
held = new /obj/item/roller(src)
|
||||
|
||||
/obj/item/roller_holder/attack_self(mob/user as mob)
|
||||
|
||||
if(!held)
|
||||
to_chat(user, "<span class='notice'>The rack is empty.</span>")
|
||||
to_chat(user, SPAN_NOTICE("The rack is empty."))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You deploy the roller bed.</span>")
|
||||
to_chat(user, SPAN_NOTICE("You deploy the roller bed."))
|
||||
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
qdel(held)
|
||||
|
||||
@@ -1,83 +1,83 @@
|
||||
/obj/structure/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete
|
||||
/obj/structure/bed/stool/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete // Not anymore. - Wezzy
|
||||
name = "chair"
|
||||
desc = "You sit in this. Either by will or force."
|
||||
icon_state = "chair_preview"
|
||||
base_icon = "chair"
|
||||
color = "#666666"
|
||||
|
||||
build_amt = 1
|
||||
|
||||
buckle_dir = 0
|
||||
buckle_lying = 0 //force people to sit up in chairs when buckled_to
|
||||
obj_flags = OBJ_FLAG_ROTATABLE_ANCHORED
|
||||
var/propelled = 0 // Check for fire-extinguisher-driven chairs
|
||||
held_item = /obj/item/material/stool/chair/
|
||||
|
||||
/obj/structure/bed/chair/do_simple_ranged_interaction(var/mob/user)
|
||||
/obj/structure/bed/stool/chair/Initialize()
|
||||
. = ..()
|
||||
LAZYADD(can_buckle, /mob/living)
|
||||
|
||||
/obj/structure/bed/stool/chair/MouseDrop(over_object, src_location, over_location)
|
||||
if(padding_material) // No picking up padded chairs. For reasons.
|
||||
return
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/structure/bed/stool/chair/do_simple_ranged_interaction(var/mob/user)
|
||||
if(!buckled && user)
|
||||
rotate(user)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/bed/chair/post_buckle()
|
||||
/obj/structure/bed/stool/chair/post_buckle()
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/chair/update_icon()
|
||||
..()
|
||||
/obj/structure/bed/stool/chair/update_icon()
|
||||
..() // This handles all chair-specific funky stuff, such as chair backrests, armrests, padding and buckles.
|
||||
|
||||
var/list/stool_cache = SSicon_cache.stool_cache
|
||||
var/list/furniture_cache = SSicon_cache.furniture_cache
|
||||
|
||||
var/cache_key = "[base_icon]-[material.name]-over"
|
||||
if(!stool_cache[cache_key])
|
||||
if(!furniture_cache[cache_key])
|
||||
var/image/I = image('icons/obj/furniture.dmi', "[base_icon]_over")
|
||||
if(material_alteration & MATERIAL_ALTERATION_COLOR)
|
||||
I.color = material.icon_colour
|
||||
I.layer = FLY_LAYER
|
||||
stool_cache[cache_key] = I
|
||||
add_overlay(stool_cache[cache_key])
|
||||
furniture_cache[cache_key] = I
|
||||
add_overlay(furniture_cache[cache_key])
|
||||
// Padding overlay.
|
||||
if(padding_material)
|
||||
var/padding_cache_key = "[base_icon]-[padding_material.name]-padding-over"
|
||||
if(!stool_cache[padding_cache_key])
|
||||
if(!furniture_cache[padding_cache_key])
|
||||
var/image/I = image(icon, "[base_icon]_padding_over")
|
||||
if(material_alteration & MATERIAL_ALTERATION_COLOR)
|
||||
I.color = padding_material.icon_colour
|
||||
I.layer = FLY_LAYER
|
||||
stool_cache[padding_cache_key] = I
|
||||
add_overlay(stool_cache[padding_cache_key])
|
||||
furniture_cache[padding_cache_key] = I
|
||||
add_overlay(furniture_cache[padding_cache_key])
|
||||
|
||||
if(buckled)
|
||||
cache_key = "[base_icon]-[material.name]-armrest"
|
||||
if(!stool_cache[cache_key])
|
||||
if(!furniture_cache[cache_key])
|
||||
var/image/I = image(icon, "[base_icon]_armrest")
|
||||
I.layer = FLY_LAYER
|
||||
if(material_alteration & MATERIAL_ALTERATION_COLOR)
|
||||
I.color = material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
add_overlay(stool_cache[cache_key])
|
||||
furniture_cache[cache_key] = I
|
||||
add_overlay(furniture_cache[cache_key])
|
||||
if(padding_material)
|
||||
cache_key = "[base_icon]-[padding_material.name]-padding-armrest"
|
||||
if(!stool_cache[cache_key])
|
||||
if(!furniture_cache[cache_key])
|
||||
var/image/I = image(icon, "[base_icon]_padding_armrest")
|
||||
I.layer = FLY_LAYER
|
||||
if(material_alteration & MATERIAL_ALTERATION_COLOR)
|
||||
I.color = padding_material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
add_overlay(stool_cache[cache_key])
|
||||
furniture_cache[cache_key] = I
|
||||
add_overlay(furniture_cache[cache_key])
|
||||
|
||||
/obj/structure/bed/chair/set_dir()
|
||||
/obj/structure/bed/stool/chair/set_dir()
|
||||
. = ..()
|
||||
if(buckled)
|
||||
buckled.set_dir(dir)
|
||||
|
||||
// Leaving this in for the sake of compilation.
|
||||
/obj/structure/bed/chair/comfy
|
||||
name = "comfy chair"
|
||||
desc = "It's a chair. It looks comfy."
|
||||
icon_state = "comfychair_preview"
|
||||
base_icon = "comfychair"
|
||||
build_amt = 2
|
||||
|
||||
/obj/structure/bed/chair/comfy/MouseDrop_T(mob/target, mob/user)
|
||||
/obj/structure/bed/stool/chair/MouseDrop_T(mob/target, mob/user)
|
||||
if(target == user && user.loc != loc && (reverse_dir[dir] & angle2dir(Get_Angle(src, user))))
|
||||
user.visible_message("<b>[user]</b> starts climbing over the back of \the [src]...", SPAN_NOTICE("You start climbing over the back of \the [src]..."))
|
||||
if(do_after(user, 2 SECONDS))
|
||||
@@ -85,105 +85,180 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/chair/comfy/CanPass(atom/movable/mover, turf/target, height, air_group)
|
||||
/obj/structure/bed/stool/chair/CanPass(atom/movable/mover, turf/target, height, air_group)
|
||||
if(mover.density && isliving(mover) && (reverse_dir[dir] & angle2dir(Get_Angle(src, mover))))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/chair/comfy/brown/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/padded/brown/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_LEATHER)
|
||||
|
||||
/obj/structure/bed/chair/comfy/red/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/padded/red/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
|
||||
|
||||
/obj/structure/bed/chair/comfy/teal/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/padded/teal/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_TEAL)
|
||||
|
||||
/obj/structure/bed/chair/comfy/black/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/padded/black/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLACK)
|
||||
|
||||
/obj/structure/bed/chair/comfy/green/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/padded/green/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_GREEN)
|
||||
|
||||
/obj/structure/bed/chair/comfy/purp/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/padded/purp/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_PURPLE)
|
||||
|
||||
/obj/structure/bed/chair/comfy/blue/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/padded/blue/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLUE)
|
||||
|
||||
/obj/structure/bed/chair/comfy/beige/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/padded/beige/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BEIGE)
|
||||
|
||||
/obj/structure/bed/chair/comfy/lime/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/padded/lime/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_LIME)
|
||||
|
||||
/obj/structure/bed/chair/comfy/sofa
|
||||
/obj/structure/bed/stool/chair/sofa
|
||||
name = "sofa"
|
||||
desc = "A sofa, how nice!"
|
||||
icon_state = "sofamiddle_preview"
|
||||
base_icon = "sofamiddle"
|
||||
|
||||
/obj/structure/bed/chair/comfy/sofa/leather/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/sofa/brown/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_LEATHER)
|
||||
|
||||
obj/structure/bed/chair/comfy/sofa/comfy/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/sofa/red/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
|
||||
|
||||
obj/structure/bed/chair/comfy/sofa/cloth/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/sofa/teal/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_TEAL)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/black/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLACK)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/green/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_GREEN)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/purp/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_PURPLE)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/blue/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLUE)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/beige/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH)
|
||||
|
||||
/obj/structure/bed/chair/comfy/sofa/left
|
||||
/obj/structure/bed/stool/chair/sofa/lime/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_LIME)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/left
|
||||
icon_state = "sofaend_left_preview"
|
||||
base_icon = "sofaend_left"
|
||||
|
||||
/obj/structure/bed/chair/comfy/sofa/left/leather/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/sofa/left/brown/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_LEATHER)
|
||||
|
||||
obj/structure/bed/chair/comfy/sofa/left/comfy/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/sofa/left/red/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
|
||||
|
||||
obj/structure/bed/chair/comfy/sofa/left/cloth/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/sofa/left/teal/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_TEAL)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/left/black/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLACK)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/left/green/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_GREEN)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/left/purp/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_PURPLE)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/left/blue/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLUE)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/left/beige/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH)
|
||||
|
||||
/obj/structure/bed/chair/comfy/sofa/right
|
||||
/obj/structure/bed/stool/chair/sofa/left/lime/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_LIME)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/right
|
||||
icon_state = "sofaend_right_preview"
|
||||
base_icon = "sofaend_right"
|
||||
|
||||
/obj/structure/bed/chair/comfy/sofa/right/leather/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/sofa/right/brown/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_LEATHER)
|
||||
|
||||
obj/structure/bed/chair/comfy/sofa/right/comfy/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/sofa/right/red/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
|
||||
|
||||
obj/structure/bed/chair/comfy/sofa/right/cloth/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/sofa/right/teal/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_TEAL)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/right/black/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLACK)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/right/green/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_GREEN)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/right/purp/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_PURPLE)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/right/blue/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLUE)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/right/beige/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH)
|
||||
|
||||
/obj/structure/bed/chair/comfy/sofa/corner
|
||||
/obj/structure/bed/stool/chair/sofa/right/lime/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_LIME)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/corner
|
||||
icon_state = "sofacorner_preview"
|
||||
base_icon = "sofacorner"
|
||||
|
||||
/obj/structure/bed/chair/comfy/sofa/corner/leather/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/sofa/corner/brown/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_LEATHER)
|
||||
|
||||
obj/structure/bed/chair/comfy/sofa/corner/comfy/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/sofa/corner/red/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
|
||||
|
||||
obj/structure/bed/chair/comfy/sofa/corner/cloth/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/sofa/corner/teal/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_TEAL)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/corner/black/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLACK)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/corner/green/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_GREEN)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/corner/purp/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_PURPLE)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/corner/blue/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLUE)
|
||||
|
||||
/obj/structure/bed/stool/chair/sofa/corner/beige/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH)
|
||||
|
||||
/obj/structure/bed/chair/office
|
||||
/obj/structure/bed/stool/chair/sofa/corner/lime/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_LIME)
|
||||
|
||||
|
||||
/obj/structure/bed/stool/chair/office
|
||||
name = "office chair"
|
||||
material_alteration = MATERIAL_ALTERATION_NAME || MATERIAL_ALTERATION_DESC
|
||||
material_alteration = MATERIAL_ALTERATION_DESC
|
||||
makes_rolling_sound = TRUE
|
||||
anchored = 0
|
||||
buckle_movable = 1
|
||||
build_amt = 5
|
||||
held_item = null
|
||||
|
||||
/obj/structure/bed/chair/office/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/structure/bed/stool/chair/office/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/stack) || W.iswirecutter())
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/bed/chair/office/Move()
|
||||
/obj/structure/bed/stool/chair/office/Move()
|
||||
. = ..()
|
||||
if(makes_rolling_sound)
|
||||
playsound(src, 'sound/effects/roll.ogg', 100, 1)
|
||||
@@ -200,7 +275,7 @@ obj/structure/bed/chair/comfy/sofa/corner/cloth/New(var/newloc)
|
||||
else
|
||||
unbuckle()
|
||||
|
||||
/obj/structure/bed/chair/office/Collide(atom/A)
|
||||
/obj/structure/bed/stool/chair/office/Collide(atom/A)
|
||||
. = ..()
|
||||
if(!buckled)
|
||||
return
|
||||
@@ -224,82 +299,87 @@ obj/structure/bed/chair/comfy/sofa/corner/cloth/New(var/newloc)
|
||||
victim.apply_damage(10, BRUTE, def_zone)
|
||||
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
|
||||
|
||||
/obj/structure/bed/chair/office/light
|
||||
/obj/structure/bed/stool/chair/office/light
|
||||
icon_state = "officechair_white_preview"
|
||||
base_icon = "officechair_white"
|
||||
|
||||
/obj/structure/bed/chair/office/dark
|
||||
/obj/structure/bed/stool/chair/office/dark
|
||||
icon_state = "officechair_dark_preview"
|
||||
base_icon = "officechair_dark"
|
||||
|
||||
/obj/structure/bed/chair/office/bridge
|
||||
/obj/structure/bed/stool/chair/office/bridge
|
||||
name = "command chair"
|
||||
desc = "It exudes authority... and looks about as comfortable as a brick."
|
||||
icon_state = "bridge_preview"
|
||||
base_icon = "bridge"
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/bed/chair/office/bridge/legion
|
||||
/obj/structure/bed/stool/chair/office/bridge/legion
|
||||
name = "legion pilot seat"
|
||||
desc = "A comfortable seat for a pilot."
|
||||
icon_state = "bridge_legion_preview"
|
||||
base_icon = "bridge_legion"
|
||||
|
||||
/obj/structure/bed/chair/office/bridge/generic
|
||||
/obj/structure/bed/stool/chair/office/bridge/generic
|
||||
icon_state = "bridge_generic_preview"
|
||||
base_icon = "bridge_generic"
|
||||
|
||||
/obj/structure/bed/chair/office/bridge/pilot
|
||||
/obj/structure/bed/stool/chair/office/bridge/pilot
|
||||
name = "pilot seat"
|
||||
desc = "A comfortable seat for a pilot."
|
||||
icon_state = "pilot_preview"
|
||||
base_icon = "pilot"
|
||||
|
||||
/obj/structure/bed/chair/office/hover
|
||||
/obj/structure/bed/stool/chair/office/hover
|
||||
name = "hoverchair"
|
||||
desc = "Adjusts itself to the sitter's weight resulting in a most comfortable sitting experience. Like floating on a cloud."
|
||||
icon_state = "hover_chair"
|
||||
icon_state = "hover_chair_preview"
|
||||
base_icon = "hover_chair"
|
||||
makes_rolling_sound = FALSE
|
||||
can_dismantle = FALSE
|
||||
held_item = null
|
||||
|
||||
/obj/structure/bed/chair/office/hover/Initialize()
|
||||
.=..()
|
||||
/obj/structure/bed/stool/chair/office/hover/New(var/newloc)
|
||||
..(newloc, MATERIAL_SHUTTLE_SKRELL)
|
||||
set_light(1,1,LIGHT_COLOR_CYAN)
|
||||
|
||||
/obj/structure/bed/chair/office/hover/command
|
||||
icon_state = "hover_command"
|
||||
/obj/structure/bed/stool/chair/office/hover/command
|
||||
icon_state = "hover_command_preview"
|
||||
base_icon = "hover_command"
|
||||
|
||||
// Chair types
|
||||
/obj/structure/bed/chair/plastic
|
||||
/obj/structure/bed/stool/chair/plastic
|
||||
|
||||
/obj/structure/bed/chair/plastic/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/plastic/New(var/newloc)
|
||||
..(newloc, MATERIAL_PLASTIC)
|
||||
|
||||
/obj/structure/bed/chair/wood
|
||||
/obj/structure/bed/stool/chair/wood
|
||||
name = "classic chair"
|
||||
desc = "Old is never too old to not be in fashion."
|
||||
icon_state = "wooden_chair_preview"
|
||||
base_icon = "wooden_chair"
|
||||
material_alteration = MATERIAL_ALTERATION_NAME || MATERIAL_ALTERATION_DESC
|
||||
build_amt = 3
|
||||
held_item = /obj/item/material/stool/chair/wood
|
||||
|
||||
/obj/structure/bed/chair/wood/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/structure/bed/stool/chair/wood/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/stack) || W.iswirecutter())
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/bed/chair/wood/New(var/newloc)
|
||||
/obj/structure/bed/stool/chair/wood/New(var/newloc)
|
||||
..(newloc, MATERIAL_WOOD)
|
||||
|
||||
/obj/structure/bed/chair/wood/wings
|
||||
/obj/structure/bed/stool/chair/wood/wings
|
||||
name = "winged chair"
|
||||
icon_state = "wooden_chair_wings_preview"
|
||||
base_icon = "wooden_chair_wings"
|
||||
held_item = /obj/item/material/stool/chair/wood/wings
|
||||
|
||||
/obj/structure/bed/chair/unmovable
|
||||
can_dismantle = 0
|
||||
/obj/structure/bed/stool/chair/unmovable
|
||||
can_dismantle = FALSE
|
||||
|
||||
/obj/structure/bed/chair/shuttle
|
||||
/obj/structure/bed/stool/chair/shuttle
|
||||
name = "shuttle chair"
|
||||
icon_state = "shuttlechair_preview"
|
||||
base_icon = "shuttlechair"
|
||||
@@ -308,14 +388,14 @@ obj/structure/bed/chair/comfy/sofa/corner/cloth/New(var/newloc)
|
||||
can_dismantle = FALSE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/bed/chair/shuttle/post_buckle()
|
||||
/obj/structure/bed/stool/chair/shuttle/post_buckle()
|
||||
if(buckled)
|
||||
base_icon = "shuttlechair-b"
|
||||
else
|
||||
base_icon = "shuttlechair"
|
||||
..()
|
||||
|
||||
/obj/structure/bed/chair/shuttle/update_icon()
|
||||
/obj/structure/bed/stool/chair/shuttle/update_icon()
|
||||
..()
|
||||
if(!buckled)
|
||||
var/image/I = image(icon, "[base_icon]_special")
|
||||
@@ -325,22 +405,65 @@ obj/structure/bed/chair/comfy/sofa/corner/cloth/New(var/newloc)
|
||||
overlays |= I
|
||||
|
||||
// pool chair, to sit with your feet in the water. only works when facing south, because water overlays weirdly otherwise
|
||||
/obj/structure/bed/chair/pool
|
||||
/obj/structure/bed/stool/chair/pool
|
||||
name = "pool chair"
|
||||
desc = "A simple plastic contraption that allows you to sit comfortably, dipping your feet into the pool."
|
||||
icon_state = "pool_chair"
|
||||
held_item = null
|
||||
|
||||
/obj/structure/bed/chair/pool/update_icon()
|
||||
/obj/structure/bed/stool/chair/pool/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/pool/buckle(mob/living/M)
|
||||
/obj/structure/bed/stool/chair/pool/buckle(mob/living/M)
|
||||
if(!iscarbon(M))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/chair/pool/post_buckle(mob/living/M)
|
||||
/obj/structure/bed/stool/chair/pool/post_buckle(mob/living/M)
|
||||
. = ..()
|
||||
if(M == buckled)
|
||||
M.pixel_y = -6
|
||||
else
|
||||
M.pixel_y = initial(M.pixel_y)
|
||||
|
||||
/obj/structure/bed/stool/chair/folding
|
||||
name = "folding chair"
|
||||
desc = "Temporary seating perfect for your next office party and/or wrestling match."
|
||||
icon_state = "folding_chair_preview"
|
||||
base_icon = "folding_chair"
|
||||
held_item = /obj/item/material/stool/chair/folding
|
||||
|
||||
/obj/item/material/stool/chair
|
||||
name = "chair"
|
||||
desc = "Bar brawl essential. Now all that's missing is a ragtime piano."
|
||||
desc_info = "Click it while in hand to right it."
|
||||
icon = 'icons/obj/furniture.dmi'
|
||||
icon_state = "chair_toppled"
|
||||
item_state = "chair"
|
||||
base_icon = "chair"
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/lefthand_chairs.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/righthand_chairs.dmi',
|
||||
)
|
||||
w_class = ITEMSIZE_HUGE
|
||||
force_divisor = 0.5
|
||||
origin_type = /obj/structure/bed/stool/chair
|
||||
|
||||
// Because wood chairs are snowflake sprites.
|
||||
/obj/item/material/stool/chair/wood
|
||||
icon_state = "wooden_chair_toppled"
|
||||
item_state = "woodenchair"
|
||||
base_icon = "wooden_chair"
|
||||
origin_type = /obj/structure/bed/stool/chair/wood
|
||||
|
||||
/obj/item/material/stool/chair/wood/wings
|
||||
icon_state = "wooden_chair_wings_toppled"
|
||||
item_state = "woodenchair"
|
||||
base_icon= "wooden_chair_wings"
|
||||
origin_type = /obj/structure/bed/stool/chair/wood/wings
|
||||
|
||||
/obj/item/material/stool/chair/folding // Todo : "borrow" CM code for stacking and general tomfoolery.
|
||||
icon_state = "folding_chair_toppled"
|
||||
item_state = "folding_chair"
|
||||
base_icon = "folding_chair"
|
||||
origin_type = /obj/structure/bed/stool/chair/folding
|
||||
|
||||
@@ -1,128 +1,193 @@
|
||||
//Todo: add leather and cloth for arbitrary coloured stools.
|
||||
|
||||
/obj/item/stool
|
||||
/obj/structure/bed/stool
|
||||
name = "stool"
|
||||
desc = "Apply butt."
|
||||
icon = 'icons/obj/furniture.dmi'
|
||||
icon_state = "stool_preview" //set for the map
|
||||
randpixel = 0
|
||||
center_of_mass = null
|
||||
force = 10
|
||||
throwforce = 10
|
||||
w_class = ITEMSIZE_HUGE
|
||||
item_state_slots = list(
|
||||
slot_l_hand_str = "stool",
|
||||
slot_r_hand_str = "stool"
|
||||
)
|
||||
var/base_icon = "stool"
|
||||
var/material/material
|
||||
var/material/padding_material
|
||||
icon_state = "stool_preview"
|
||||
base_icon = "stool"
|
||||
anchored = FALSE
|
||||
buckle_dir = 0
|
||||
buckle_lying = FALSE //force people to sit up in chairs when buckled
|
||||
build_amt = 2
|
||||
held_item = /obj/item/material/stool // if null it can't be picked up. Automatically applies materials.
|
||||
|
||||
/obj/item/stool/padded
|
||||
icon_state = "stool_padded_preview" //set for the map
|
||||
/obj/structure/bed/stool/Initialize()
|
||||
. = ..()
|
||||
can_buckle = FALSE // Some idiot decided can_buckle should be a list...
|
||||
|
||||
/obj/item/stool/New(var/newloc, var/new_material, var/new_padding_material)
|
||||
..(newloc)
|
||||
if(!new_material)
|
||||
new_material = DEFAULT_WALL_MATERIAL
|
||||
material = SSmaterials.get_material_by_name(new_material)
|
||||
if(new_padding_material)
|
||||
padding_material = SSmaterials.get_material_by_name(new_padding_material)
|
||||
if(!istype(material))
|
||||
/obj/structure/bed/stool/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!held_item || use_check_and_message(usr) || buckled || !can_dismantle)
|
||||
return
|
||||
usr.visible_message(SPAN_NOTICE("[usr] grabs \the [src.name]."), SPAN_NOTICE("You grab \the [src.name]."))
|
||||
var/obj/item/material/stool/S = new held_item(src.loc, material.name, padding_material ? padding_material.name : null) // Handles all the material code so you don't have to.
|
||||
TransferComponents(S)
|
||||
if(material_alteration & MATERIAL_ALTERATION_COLOR) // For snowflakes like wood chairs.
|
||||
S.color = material.icon_colour
|
||||
if(material_alteration & MATERIAL_ALTERATION_NAME)
|
||||
S.name = name // Get the name and desc of the stool, rather. We already went through all the trouble in New in bed.dm
|
||||
if(material_alteration & MATERIAL_ALTERATION_DESC)
|
||||
S.desc = desc
|
||||
if(blood_DNA)
|
||||
S.blood_DNA |= blood_DNA // Transfer blood, if any.
|
||||
S.add_blood()
|
||||
S.dir = dir
|
||||
S.add_fingerprint(usr)
|
||||
usr.put_in_hands(S)
|
||||
qdel(src)
|
||||
return
|
||||
force = round(material.get_blunt_damage()*0.4)
|
||||
update_icon()
|
||||
|
||||
/obj/item/stool/padded/New(var/newloc, var/new_material)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
|
||||
|
||||
/obj/item/stool/wood/New(var/newloc, var/new_material)
|
||||
/obj/structure/bed/stool/wood/New(var/newloc)
|
||||
..(newloc, MATERIAL_WOOD)
|
||||
|
||||
/obj/item/stool/bar
|
||||
name = "bar stool"
|
||||
base_icon = "bar_stool"
|
||||
icon_state = "bar_stool_preview"
|
||||
/obj/structure/bed/stool/padded
|
||||
icon_state = "stool_padded_preview" //set for the map
|
||||
|
||||
/obj/item/stool/bar/padded
|
||||
icon_state = "bar_stool_padded_preview"
|
||||
/obj/structure/bed/stool/padded/brown/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_LEATHER)
|
||||
|
||||
/obj/item/stool/bar/padded/New(var/newloc, var/new_material)
|
||||
/obj/structure/bed/stool/padded/red/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
|
||||
|
||||
/obj/item/stool/hover
|
||||
/obj/structure/bed/stool/padded/teal/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_TEAL)
|
||||
|
||||
/obj/structure/bed/stool/padded/black/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLACK)
|
||||
|
||||
/obj/structure/bed/stool/padded/green/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_GREEN)
|
||||
|
||||
/obj/structure/bed/stool/padded/purp/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_PURPLE)
|
||||
|
||||
/obj/structure/bed/stool/padded/blue/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLUE)
|
||||
|
||||
/obj/structure/bed/stool/padded/beige/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BEIGE)
|
||||
|
||||
/obj/structure/bed/stool/padded/lime/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_LIME)
|
||||
|
||||
/obj/structure/bed/stool/bar
|
||||
name = "bar stool"
|
||||
desc = "It has some unsavory stains on it..."
|
||||
icon_state = "bar_stool_preview"
|
||||
item_state = "bar_stool"
|
||||
base_icon = "bar_stool"
|
||||
held_item = /obj/item/material/stool/bar
|
||||
|
||||
/obj/structure/bed/stool/bar/wood/New(var/newloc)
|
||||
..(newloc, MATERIAL_WOOD)
|
||||
|
||||
/obj/structure/bed/stool/bar/padded
|
||||
icon_state = "bar_stool_padded_preview"
|
||||
|
||||
/obj/structure/bed/stool/bar/padded/brown/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_LEATHER)
|
||||
|
||||
/obj/structure/bed/stool/bar/padded/red/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
|
||||
|
||||
/obj/structure/bed/stool/bar/padded/red/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
|
||||
|
||||
/obj/structure/bed/stool/bar/padded/teal/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_TEAL)
|
||||
|
||||
/obj/structure/bed/stool/bar/padded/black/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLACK)
|
||||
|
||||
/obj/structure/bed/stool/bar/padded/green/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_GREEN)
|
||||
|
||||
/obj/structure/bed/stool/bar/padded/purp/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_PURPLE)
|
||||
|
||||
/obj/structure/bed/stool/bar/padded/blue/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLUE)
|
||||
|
||||
/obj/structure/bed/stool/bar/padded/beige/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BEIGE)
|
||||
|
||||
/obj/structure/bed/stool/bar/padded/lime/New(var/newloc)
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_LIME)
|
||||
|
||||
/obj/structure/bed/stool/bar/wood/New(var/newloc)
|
||||
..(newloc, MATERIAL_WOOD)
|
||||
|
||||
/obj/structure/bed/stool/hover
|
||||
name = "hoverstool"
|
||||
desc = "Apply butt. Now as comfortable as a cloud."
|
||||
desc = "As comfortable as a cloud."
|
||||
icon_state = "hover_stool"
|
||||
item_state_slots = null
|
||||
item_state = "hover_stool"
|
||||
base_icon = "hover_stool"
|
||||
can_dismantle = FALSE
|
||||
material_alteration = MATERIAL_ALTERATION_NAME || MATERIAL_ALTERATION_DESC
|
||||
held_item = /obj/item/material/stool/hover
|
||||
|
||||
/obj/item/stool/hover/New(var/newloc, var/new_material)
|
||||
/obj/structure/bed/stool/hover/New(var/newloc)
|
||||
..(newloc, MATERIAL_SHUTTLE_SKRELL)
|
||||
|
||||
/obj/item/stool/hover/Initialize()
|
||||
.=..()
|
||||
set_light(1,1,LIGHT_COLOR_CYAN)
|
||||
|
||||
/obj/item/stool/hover/update_icon()
|
||||
/obj/item/material/stool // Not intended to be spawned in. You will be sad. Thankfully will self-correct.
|
||||
icon = 'icons/obj/furniture.dmi'
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/lefthand_chairs.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/righthand_chairs.dmi',
|
||||
)
|
||||
icon_state = "stool_toppled_preview"
|
||||
item_state = "stool"
|
||||
var/base_icon = "stool"
|
||||
desc_info = "Use in-hand or alt-click to right this."
|
||||
randpixel = 0
|
||||
center_of_mass = null
|
||||
force = 10 // Doesn't really matter. Will get overriden by set_material.
|
||||
throwforce = 10
|
||||
throw_range = 5
|
||||
force_divisor = 0.4
|
||||
w_class = ITEMSIZE_HUGE
|
||||
use_material_name = FALSE
|
||||
applies_material_colour = FALSE
|
||||
var/material/padding_material
|
||||
var/obj/structure/bed/stool/origin_type = /obj/structure/bed/stool
|
||||
|
||||
/obj/item/material/stool/New(var/newloc, var/new_material, var/new_padding_material)
|
||||
..(newloc, new_material) // new_material handled in material_weapons.dm
|
||||
if(new_padding_material)
|
||||
padding_material = SSmaterials.get_material_by_name(new_padding_material)
|
||||
update_icon()
|
||||
|
||||
/obj/item/material/stool/attack_self(mob/user)
|
||||
deploy(user)
|
||||
|
||||
/obj/item/material/stool/AltClick(mob/user)
|
||||
deploy(user)
|
||||
|
||||
/obj/item/material/stool/MouseDrop(mob/user)
|
||||
if((user && (!use_check(user))) && (user.contents.Find(src)) || in_range(src, user))
|
||||
if(!istype(user, /mob/living/carbon/slime) && !istype(user, /mob/living/simple_animal))
|
||||
if( !user.get_active_hand() ) //if active hand is empty
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
|
||||
if (H.hand)
|
||||
temp = H.organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
to_chat(user, SPAN_NOTICE("You try to move your [temp.name], but cannot!"))
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You pick up \the [src]."))
|
||||
user.put_in_hands(src)
|
||||
return
|
||||
|
||||
/obj/item/stool/update_icon()
|
||||
// Prep icon.
|
||||
icon_state = ""
|
||||
cut_overlays()
|
||||
var/list/stool_cache = SSicon_cache.stool_cache
|
||||
// Base icon.
|
||||
var/cache_key = "[initial(name)]-[material.name]"
|
||||
if(!stool_cache[cache_key])
|
||||
var/image/I = image(icon, base_icon)
|
||||
I.color = material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
add_overlay(stool_cache[cache_key])
|
||||
// Padding overlay.
|
||||
if(padding_material)
|
||||
var/padding_cache_key = "[initial(name)]-padding-[padding_material.name]"
|
||||
if(!stool_cache[padding_cache_key])
|
||||
var/image/I = image(icon, "[base_icon]_padding")
|
||||
I.color = padding_material.icon_colour
|
||||
stool_cache[padding_cache_key] = I
|
||||
add_overlay(stool_cache[padding_cache_key])
|
||||
// Strings.
|
||||
if(padding_material)
|
||||
name = "[padding_material.display_name] [initial(name)]" //this is not perfect but it will do for now.
|
||||
desc = "A padded stool. Apply butt. It's made of [material.use_name] and covered with [padding_material.use_name]."
|
||||
else
|
||||
name = "[material.display_name] [initial(name)]"
|
||||
desc = "A stool. Apply butt with care. It's made of [material.use_name]."
|
||||
|
||||
/obj/item/stool/proc/add_padding(var/padding_type)
|
||||
padding_material = SSmaterials.get_material_by_name(padding_type)
|
||||
update_icon()
|
||||
|
||||
/obj/item/stool/proc/remove_padding()
|
||||
if(padding_material)
|
||||
padding_material.place_sheet(get_turf(src))
|
||||
padding_material = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/stool/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
|
||||
if (prob(5))
|
||||
user.visible_message("<span class='danger'>[user] breaks [src] over [target]'s back!</span>")
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.do_attack_animation(target)
|
||||
|
||||
user.remove_from_mob(src)
|
||||
dismantle()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/material/stool/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
|
||||
if(prob(300 / force)) // Weaker materials are more likely to shatter on people randomly.
|
||||
var/blocked = target.get_blocked_ratio(hit_zone, BRUTE)
|
||||
target.Weaken(10 * (1 - blocked))
|
||||
target.apply_damage(20, BRUTE, hit_zone, blocked, src)
|
||||
return
|
||||
target.Weaken(force * BLOCKED_MULT(blocked))
|
||||
target.apply_damage(force * 2, BRUTE, hit_zone, blocked, src)
|
||||
user.visible_message(SPAN_DANGER("[user] [material.destruction_desc] \the [src] to pieces against \the [target]'s [hit_zone]!"), SPAN_DANGER("\The [src] [material.destruction_desc] to pieces against \the [target]'s [hit_zone]!"))
|
||||
use_material_shatter = FALSE
|
||||
shatter()
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/stool/ex_act(severity)
|
||||
/obj/item/material/stool/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
@@ -136,49 +201,73 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/stool/proc/dismantle()
|
||||
if(material)
|
||||
material.place_sheet(get_turf(src))
|
||||
if(padding_material)
|
||||
padding_material.place_sheet(get_turf(src))
|
||||
/obj/item/material/stool/proc/deploy(mob/user)
|
||||
for(var/obj/A in get_turf(loc))
|
||||
if(istype(A, /obj/structure/bed))
|
||||
to_chat(user, SPAN_DANGER("There is already a [A.name] here."))
|
||||
return
|
||||
if(A.density)
|
||||
to_chat(user, SPAN_DANGER("There is already something here."))
|
||||
return
|
||||
|
||||
user.visible_message(SPAN_NOTICE("[user] rights \the [src.name]."), SPAN_NOTICE("You right \the [name]."))
|
||||
// playsound(src, deploy_sound ? deploy_sound : drop_sound, DROP_SOUND_VOLUME)
|
||||
user.drop_from_inventory(src)
|
||||
var/obj/structure/bed/stool/S = new origin_type(get_turf(loc))
|
||||
if(src.padding_material)
|
||||
S.padding_material = src.padding_material
|
||||
S.update_icon()
|
||||
TransferComponents(S)
|
||||
S.dir = user.dir // Plant it where the user's facing
|
||||
if(blood_DNA)
|
||||
S.blood_DNA |= blood_DNA // Transfer blood.
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stool/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(W.iswrench())
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
dismantle()
|
||||
qdel(src)
|
||||
else if(istype(W,/obj/item/stack))
|
||||
if(padding_material)
|
||||
to_chat(user, "\The [src] is already padded.")
|
||||
return
|
||||
var/obj/item/stack/C = W
|
||||
if(C.get_amount() < 1) // How??
|
||||
qdel(C)
|
||||
return
|
||||
var/padding_type //This is awful but it needs to be like this until tiles are given a material var.
|
||||
if(istype(W,/obj/item/stack/tile/carpet))
|
||||
padding_type = MATERIAL_CARPET
|
||||
else if(istype(W,/obj/item/stack/material))
|
||||
var/obj/item/stack/material/M = W
|
||||
if(M.material && (M.material.flags & MATERIAL_PADDING))
|
||||
padding_type = "[M.material.name]"
|
||||
if(!padding_type)
|
||||
to_chat(user, "You cannot pad \the [src] with that.")
|
||||
return
|
||||
C.use(1)
|
||||
if(!istype(src.loc, /turf))
|
||||
user.drop_from_inventory(src)
|
||||
src.forceMove(get_turf(src))
|
||||
to_chat(user, "You add padding to \the [src].")
|
||||
add_padding(padding_type)
|
||||
return
|
||||
else if (W.iswirecutter())
|
||||
if(!padding_material)
|
||||
to_chat(user, "\The [src] has no padding to remove.")
|
||||
return
|
||||
to_chat(user, "You remove the padding from \the [src].")
|
||||
playsound(src, 'sound/items/wirecutter.ogg', 100, 1)
|
||||
remove_padding()
|
||||
/obj/item/material/stool/update_icon()
|
||||
icon_state = "[base_icon]_toppled"
|
||||
cut_overlays()
|
||||
if(padding_material) // Handles padding overlay and inhand overlays.
|
||||
var/image/padding_overlay = image(icon, "[base_icon]_toppled_padding")
|
||||
padding_overlay.appearance_flags = RESET_COLOR
|
||||
build_from_parts = TRUE
|
||||
worn_overlay = "padding"
|
||||
if(padding_material.icon_colour)
|
||||
padding_overlay.color = padding_material.icon_colour
|
||||
worn_overlay_color = padding_material.icon_colour
|
||||
add_overlay(padding_overlay)
|
||||
else
|
||||
..()
|
||||
build_from_parts = FALSE
|
||||
update_held_icon()
|
||||
|
||||
/obj/item/material/stool/shatter()
|
||||
if(padding_material)
|
||||
padding_material.place_sheet(get_turf(src))
|
||||
padding_material = null
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/material/stool/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
shatter(src)
|
||||
return
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
shatter(src)
|
||||
return
|
||||
if(3.0)
|
||||
if(prob(5))
|
||||
shatter(src)
|
||||
return
|
||||
|
||||
/obj/item/material/stool/bar
|
||||
icon_state = "bar_stool_toppled_preview"
|
||||
item_state = "bar_stool"
|
||||
base_icon = "bar_stool"
|
||||
origin_type = /obj/structure/bed/stool/bar
|
||||
|
||||
/obj/item/material/stool/hover
|
||||
icon_state = "hover_stool_toppled"
|
||||
item_state = "hover_stool"
|
||||
base_icon = "hover_stool"
|
||||
origin_type = /obj/structure/bed/stool/hover
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/structure/bed/chair/wheelchair
|
||||
/obj/structure/bed/stool/chair/wheelchair
|
||||
name = "wheelchair"
|
||||
desc = "You sit in this. Either by will or force."
|
||||
icon_state = "wheelchair"
|
||||
@@ -11,21 +11,21 @@
|
||||
|
||||
slowdown = 0
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/update_icon()
|
||||
/obj/structure/bed/stool/chair/wheelchair/update_icon()
|
||||
cut_overlays()
|
||||
add_overlay(image(icon = 'icons/obj/furniture.dmi', icon_state = "w_overlay", layer = FLY_LAYER))
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/set_dir()
|
||||
/obj/structure/bed/stool/chair/wheelchair/set_dir()
|
||||
. = ..()
|
||||
if(buckled)
|
||||
buckled.set_dir(dir)
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/structure/bed/stool/chair/wheelchair/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(W.iswrench() || istype(W,/obj/item/stack) || W.iswirecutter())
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/relaymove(mob/user, direction)
|
||||
/obj/structure/bed/stool/chair/wheelchair/relaymove(mob/user, direction)
|
||||
// Redundant check?
|
||||
if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained())
|
||||
if(user==pulling)
|
||||
@@ -86,7 +86,7 @@
|
||||
create_track()
|
||||
driving = 0
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/Move()
|
||||
/obj/structure/bed/stool/chair/wheelchair/Move()
|
||||
. = ..()
|
||||
playsound(src, 'sound/effects/roll.ogg', 75, 1)
|
||||
if(buckled)
|
||||
@@ -110,14 +110,14 @@
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
src.forceMove(occupant.loc) // Failsafe to make sure the wheelchair stays beneath the occupant after driving
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/attack_hand(mob/living/user as mob)
|
||||
/obj/structure/bed/stool/chair/wheelchair/attack_hand(mob/living/user as mob)
|
||||
if (pulling)
|
||||
MouseDrop(usr)
|
||||
else
|
||||
user_unbuckle(user)
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/CtrlClick(var/mob/user)
|
||||
/obj/structure/bed/stool/chair/wheelchair/CtrlClick(var/mob/user)
|
||||
if(in_range(src, user))
|
||||
if(!ishuman(user)) return
|
||||
if(user == buckled)
|
||||
@@ -136,7 +136,7 @@
|
||||
pulling = null
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/Collide(atom/A)
|
||||
/obj/structure/bed/stool/chair/wheelchair/Collide(atom/A)
|
||||
. = ..()
|
||||
if(!buckled)
|
||||
return
|
||||
@@ -172,7 +172,7 @@
|
||||
else
|
||||
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/proc/create_track()
|
||||
/obj/structure/bed/stool/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)
|
||||
@@ -186,7 +186,7 @@
|
||||
B.set_dir(newdir)
|
||||
bloodiness--
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/buckle(mob/M as mob, mob/user as mob)
|
||||
/obj/structure/bed/stool/chair/wheelchair/buckle(mob/M as mob, mob/user as mob)
|
||||
if(M == pulling)
|
||||
pulling = null
|
||||
usr.pulledby = null
|
||||
@@ -201,14 +201,14 @@
|
||||
w_class = ITEMSIZE_HUGE // Can't be put in backpacks. Oh well.
|
||||
|
||||
/obj/item/wheelchair/attack_self(mob/user)
|
||||
var/obj/structure/bed/chair/wheelchair/R = new /obj/structure/bed/chair/wheelchair(user.loc)
|
||||
var/obj/structure/bed/stool/chair/wheelchair/R = new /obj/structure/bed/stool/chair/wheelchair(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
R.name = src.name
|
||||
R.desc = src.desc
|
||||
R.color = src.color
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
|
||||
/obj/structure/bed/stool/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
if(!ishuman(usr))
|
||||
return FALSE
|
||||
@@ -223,4 +223,3 @@
|
||||
R.color = src.color
|
||||
usr.put_in_hands(R)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/structure/bed/chair/remote
|
||||
/obj/structure/bed/stool/chair/remote
|
||||
name = "virtual reality centre"
|
||||
desc = "A comfortable chair with full audio-visual transposition centres."
|
||||
icon_state = "shuttlechair_preview"
|
||||
@@ -7,24 +7,24 @@
|
||||
can_dismantle = FALSE
|
||||
var/remote_network // Which network does this remote control belong to?
|
||||
|
||||
/obj/structure/bed/chair/remote/Initialize()
|
||||
/obj/structure/bed/stool/chair/remote/Initialize()
|
||||
. = ..()
|
||||
if(portable_type)
|
||||
name = "portable [name]"
|
||||
|
||||
/obj/structure/bed/chair/remote/Destroy()
|
||||
/obj/structure/bed/stool/chair/remote/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/chair/remote/examine(mob/user)
|
||||
/obj/structure/bed/stool/chair/remote/examine(mob/user)
|
||||
..()
|
||||
if(portable_type)
|
||||
to_chat(user, FONT_SMALL(SPAN_NOTICE("Can be packed up by using a wrench on it.")))
|
||||
|
||||
/obj/structure/bed/chair/remote/update_icon()
|
||||
/obj/structure/bed/stool/chair/remote/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/remote/attackby(obj/item/W, mob/user)
|
||||
/obj/structure/bed/stool/chair/remote/attackby(obj/item/W, mob/user)
|
||||
if(portable_type && W.iswrench())
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts dismantling \the [src]..."), SPAN_NOTICE("You start dismantling \the [src]..."))
|
||||
if(do_after(user, 20 SECONDS, TRUE, src))
|
||||
@@ -35,7 +35,7 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/bed/chair/remote/user_buckle(mob/user)
|
||||
/obj/structure/bed/stool/chair/remote/user_buckle(mob/user)
|
||||
..()
|
||||
var/area/A = get_area(src)
|
||||
if(!A.powered(EQUIP))
|
||||
@@ -50,7 +50,7 @@
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
|
||||
/obj/structure/bed/chair/remote/process()
|
||||
/obj/structure/bed/stool/chair/remote/process()
|
||||
..()
|
||||
if(buckled)
|
||||
var/area/A = get_area(src)
|
||||
@@ -58,7 +58,7 @@
|
||||
user_unbuckle(buckled)
|
||||
|
||||
// Return to our body in the unfortunate event that we get unbuckled while plugged in
|
||||
/obj/structure/bed/chair/remote/user_unbuckle(mob/user)
|
||||
/obj/structure/bed/stool/chair/remote/user_unbuckle(mob/user)
|
||||
if(buckled)
|
||||
var/mob/M = buckled
|
||||
if(istype(M) && M.vr_mob)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/obj/structure/bed/chair/remote/human
|
||||
/obj/structure/bed/stool/chair/remote/human
|
||||
name = "virtual reality centre"
|
||||
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to a virtual reality body."
|
||||
|
||||
/obj/structure/bed/chair/remote/human/user_buckle(mob/user)
|
||||
/obj/structure/bed/stool/chair/remote/human/user_buckle(mob/user)
|
||||
..()
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
/obj/structure/bed/chair/remote/mech
|
||||
/obj/structure/bed/stool/chair/remote/mech
|
||||
name = "mech control centre"
|
||||
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to exosuits attached to the remote network."
|
||||
remote_network = REMOTE_GENERIC_MECH
|
||||
|
||||
/obj/structure/bed/chair/remote/mech/user_buckle(mob/user)
|
||||
/obj/structure/bed/stool/chair/remote/mech/user_buckle(mob/user)
|
||||
..()
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
SSvirtualreality.mech_selection(H, remote_network)
|
||||
|
||||
/obj/structure/bed/chair/remote/mech/portable
|
||||
/obj/structure/bed/stool/chair/remote/mech/portable
|
||||
portable_type = /obj/item/deployable_kit/remote_mech
|
||||
|
||||
/obj/structure/bed/chair/remote/mech/prison
|
||||
/obj/structure/bed/stool/chair/remote/mech/prison
|
||||
name = "brig mech control centre"
|
||||
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to exosuits attached to the brig network."
|
||||
remote_network = REMOTE_PRISON_MECH
|
||||
|
||||
/obj/structure/bed/chair/remote/mech/prison/portable
|
||||
portable_type = /obj/item/deployable_kit/remote_mech/brig
|
||||
/obj/structure/bed/stool/chair/remote/mech/prison/portable
|
||||
portable_type = /obj/item/deployable_kit/remote_mech/brig
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
/obj/structure/bed/chair/remote/robot
|
||||
/obj/structure/bed/stool/chair/remote/robot
|
||||
name = "robot control centre"
|
||||
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to robots attached to the remote network."
|
||||
remote_network = REMOTE_GENERIC_ROBOT
|
||||
|
||||
/obj/structure/bed/chair/remote/robot/user_buckle(mob/user)
|
||||
/obj/structure/bed/stool/chair/remote/robot/user_buckle(mob/user)
|
||||
..()
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
SSvirtualreality.robot_selection(H, remote_network)
|
||||
|
||||
/obj/structure/bed/chair/remote/robot/bunker
|
||||
/obj/structure/bed/stool/chair/remote/robot/bunker
|
||||
name = "bunker robot control centre"
|
||||
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to robots attached to the bunker network."
|
||||
remote_network = REMOTE_BUNKER_ROBOT
|
||||
|
||||
/obj/structure/bed/chair/remote/robot/prison
|
||||
/obj/structure/bed/stool/chair/remote/robot/prison
|
||||
name = "penal robot control centre"
|
||||
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to robots attached to the penal network."
|
||||
remote_network = REMOTE_PRISON_ROBOT
|
||||
|
||||
/obj/structure/bed/chair/remote/robot/warden
|
||||
/obj/structure/bed/stool/chair/remote/robot/warden
|
||||
name = "warden robot control centre"
|
||||
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to robots attached to the warden's network."
|
||||
remote_network = REMOTE_WARDEN_ROBOT
|
||||
remote_network = REMOTE_WARDEN_ROBOT
|
||||
|
||||
Reference in New Issue
Block a user