Resprites bedsheet bins in 3/4 perspective, adds towel bins subtype.
This commit is contained in:
@@ -288,17 +288,19 @@ LINEN BINS
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
var/amount = 10
|
||||
var/list/sheet_types = list(/obj/item/bedsheet)
|
||||
var/static/allowed_sheets = list(/obj/item/bedsheet, /obj/item/reagent_containers/rag/towel)
|
||||
var/list/sheets = list()
|
||||
var/obj/item/hidden = null
|
||||
|
||||
/obj/structure/bedsheetbin/examine(mob/user)
|
||||
..()
|
||||
if(amount < 1)
|
||||
to_chat(user, "There are no bed sheets in the bin.")
|
||||
to_chat(user, "There are no sheets in the bin.")
|
||||
else if(amount == 1)
|
||||
to_chat(user, "There is one bed sheet in the bin.")
|
||||
to_chat(user, "There is one sheet in the bin.")
|
||||
else
|
||||
to_chat(user, "There are [amount] bed sheets in the bin.")
|
||||
to_chat(user, "There are [amount] sheets in the bin.")
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/update_icon()
|
||||
@@ -317,8 +319,9 @@ LINEN BINS
|
||||
..()
|
||||
|
||||
/obj/structure/bedsheetbin/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/bedsheet))
|
||||
if(is_type_in_list(I, allowed_sheets))
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot place it into the bin!</span>")
|
||||
return
|
||||
sheets.Add(I)
|
||||
amount++
|
||||
@@ -339,18 +342,18 @@ LINEN BINS
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.lying)
|
||||
if(user.incapacitated())
|
||||
return
|
||||
if(amount >= 1)
|
||||
amount--
|
||||
|
||||
var/obj/item/bedsheet/B
|
||||
var/obj/item/B
|
||||
if(sheets.len > 0)
|
||||
B = sheets[sheets.len]
|
||||
sheets.Remove(B)
|
||||
|
||||
else
|
||||
B = new /obj/item/bedsheet(loc)
|
||||
B = new pick(sheet_types)
|
||||
|
||||
B.forceMove(drop_location())
|
||||
user.put_in_hands(B)
|
||||
@@ -362,19 +365,19 @@ LINEN BINS
|
||||
to_chat(user, "<span class='notice'>[hidden] falls out of [B]!</span>")
|
||||
hidden = null
|
||||
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/bedsheetbin/attack_tk(mob/user)
|
||||
if(amount >= 1)
|
||||
amount--
|
||||
|
||||
var/obj/item/bedsheet/B
|
||||
var/obj/item/B
|
||||
if(sheets.len > 0)
|
||||
B = sheets[sheets.len]
|
||||
sheets.Remove(B)
|
||||
|
||||
else
|
||||
B = new /obj/item/bedsheet(loc)
|
||||
B = new pick(sheet_types)
|
||||
|
||||
B.forceMove(drop_location())
|
||||
to_chat(user, "<span class='notice'>You telekinetically remove [B] from [src].</span>")
|
||||
@@ -384,5 +387,11 @@ LINEN BINS
|
||||
hidden.forceMove(drop_location())
|
||||
hidden = null
|
||||
|
||||
/obj/structure/bedsheetbin/towel
|
||||
desc = "It looks rather cosy. This one is designed to hold towels."
|
||||
sheet_types = list(/obj/item/reagent_containers/rag/towel)
|
||||
|
||||
add_fingerprint(user)
|
||||
/obj/structure/bedsheetbin/color
|
||||
sheet_types = list(/obj/item/bedsheet, /obj/item/bedsheet/blue, /obj/item/bedsheet/green, /obj/item/bedsheet/orange, \
|
||||
/obj/item/bedsheet/purple, /obj/item/bedsheet/red, /obj/item/bedsheet/yellow, /obj/item/bedsheet/brown, \
|
||||
/obj/item/bedsheet/black)
|
||||
Reference in New Issue
Block a user