mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-12 08:43:26 +01:00
Converts beds, chairs and stools.
This commit is contained in:
@@ -16,6 +16,24 @@
|
||||
anchored = 1
|
||||
can_buckle = 1
|
||||
buckle_lying = 1
|
||||
var/material/material
|
||||
var/apply_colour = 1
|
||||
var/apply_strings = 1
|
||||
|
||||
/obj/structure/bed/New(var/newloc, var/new_material)
|
||||
..(newloc)
|
||||
if(!new_material)
|
||||
new_material = DEFAULT_WALL_MATERIAL
|
||||
|
||||
material = get_material_by_name(new_material)
|
||||
if(!istype(material))
|
||||
qdel(src)
|
||||
return
|
||||
if(apply_colour)
|
||||
color = material.icon_colour
|
||||
if(apply_strings)
|
||||
name = "[material.display_name] [initial(name)]"
|
||||
desc = "[initial(desc)] It's made of [material.display_name]."
|
||||
|
||||
/obj/structure/bed/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -33,13 +51,13 @@
|
||||
|
||||
/obj/structure/bed/blob_act()
|
||||
if(prob(75))
|
||||
new /obj/item/stack/material/steel(src.loc)
|
||||
material.place_sheet(get_turf(src))
|
||||
qdel(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/material/steel(src.loc)
|
||||
material.place_sheet(get_turf(src))
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/weapon/grab))
|
||||
user.visible_message("<span class='notice'>[user] attempts to buckle [W:affecting] into \the [src]!</span>")
|
||||
@@ -54,14 +72,24 @@
|
||||
..()
|
||||
|
||||
/obj/structure/bed/psych
|
||||
name = "psychiatrists couch"
|
||||
name = "psychiatrist's couch"
|
||||
desc = "For prime comfort during psychiatric evaluations."
|
||||
icon_state = "psychbed"
|
||||
apply_colour = 0
|
||||
apply_strings = 0
|
||||
|
||||
/obj/structure/bed/psych/New(var/newloc)
|
||||
..(newloc,"leather")
|
||||
|
||||
/obj/structure/bed/alien
|
||||
name = "resting contraption"
|
||||
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
|
||||
icon_state = "abed"
|
||||
apply_colour = 0
|
||||
apply_strings = 0
|
||||
|
||||
/obj/structure/bed/alien/New(var/newloc)
|
||||
..(newloc,"resin")
|
||||
|
||||
/*
|
||||
* Roller beds
|
||||
@@ -71,6 +99,8 @@
|
||||
icon = 'icons/obj/rollerbed.dmi'
|
||||
icon_state = "down"
|
||||
anchored = 0
|
||||
apply_colour = 0
|
||||
apply_strings = 0
|
||||
|
||||
/obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/roller_holder))
|
||||
|
||||
@@ -3,11 +3,10 @@
|
||||
desc = "You sit in this. Either by will or force."
|
||||
icon_state = "chair"
|
||||
buckle_lying = 0 //force people to sit up in chairs when buckled
|
||||
|
||||
var/propelled = 0 // Check for fire-extinguisher-driven chairs
|
||||
|
||||
/obj/structure/bed/chair/New()
|
||||
..()
|
||||
/obj/structure/bed/chair/New(var/newloc, var/material)
|
||||
..(newloc, material) //Todo make metal/stone chairs display as thrones
|
||||
spawn(3) //sorry. i don't think there's a better way to do this.
|
||||
update_layer()
|
||||
return
|
||||
@@ -20,7 +19,7 @@
|
||||
user << "<span class='notice'>[SK] is not ready to be attached!</span>"
|
||||
return
|
||||
user.drop_item()
|
||||
var/obj/structure/bed/chair/e_chair/E = new /obj/structure/bed/chair/e_chair(src.loc)
|
||||
var/obj/structure/bed/chair/e_chair/E = new (src.loc, material.name)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
E.set_dir(dir)
|
||||
E.part = SK
|
||||
@@ -71,24 +70,23 @@
|
||||
icon_state = "wooden_chair"
|
||||
name = "wooden chair"
|
||||
desc = "Old is never too old to not be in fashion."
|
||||
apply_colour = 0
|
||||
apply_strings = 0
|
||||
|
||||
/obj/structure/bed/chair/wood/New(var/newloc)
|
||||
..(newloc, "wood")
|
||||
|
||||
/obj/structure/bed/chair/wood/wings
|
||||
icon_state = "wooden_chair_wings"
|
||||
|
||||
/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/material/wood(src.loc)
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/bed/chair/comfy
|
||||
name = "comfy chair"
|
||||
desc = "It looks comfy."
|
||||
icon_state = "comfychair"
|
||||
color = rgb(255,255,255)
|
||||
var/image/armrest = null
|
||||
apply_colour = 0
|
||||
apply_strings = 0
|
||||
|
||||
/obj/structure/bed/chair/comfy/New()
|
||||
armrest = image("icons/obj/objects.dmi", "comfychair_armrest")
|
||||
@@ -129,6 +127,8 @@
|
||||
/obj/structure/bed/chair/office
|
||||
anchored = 0
|
||||
buckle_movable = 1
|
||||
apply_colour = 0
|
||||
apply_strings = 0
|
||||
|
||||
/obj/structure/bed/chair/comfy/lime
|
||||
color = rgb(255,251,0)
|
||||
|
||||
@@ -6,13 +6,26 @@
|
||||
force = 10
|
||||
throwforce = 10
|
||||
w_class = 5
|
||||
var/material/material
|
||||
|
||||
/obj/item/weapon/stool/New(var/newloc, var/new_material)
|
||||
..(newloc)
|
||||
if(!new_material)
|
||||
new_material = DEFAULT_WALL_MATERIAL
|
||||
material = get_material_by_name(new_material)
|
||||
if(!istype(material))
|
||||
qdel(src)
|
||||
return
|
||||
force = round(material.get_blunt_damage()*0.4)
|
||||
color = material.icon_colour
|
||||
name = "[material.display_name] [initial(name)]"
|
||||
desc = "[initial(desc)] It's made of [material.display_name]."
|
||||
|
||||
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
|
||||
if (prob(5) && istype(M,/mob/living))
|
||||
user.visible_message("\red [user] breaks [src] over [M]'s back!")
|
||||
user.remove_from_mob(src)
|
||||
var/obj/item/stack/material/steel/m = new/obj/item/stack/material/steel
|
||||
m.loc = get_turf(src)
|
||||
material.place_sheet(get_turf(src))
|
||||
qdel(src)
|
||||
var/mob/living/T = M
|
||||
T.Weaken(10)
|
||||
@@ -36,12 +49,12 @@
|
||||
|
||||
/obj/item/weapon/stool/blob_act()
|
||||
if(prob(75))
|
||||
new /obj/item/stack/material/steel(src.loc)
|
||||
material.place_sheet(get_turf(src))
|
||||
qdel(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/material/steel(src.loc)
|
||||
material.place_sheet(get_turf(src))
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user