diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index 858b824ffbe..99bf63bd187 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -359,83 +359,6 @@
desc = "An untrustworthy bar of soap. Smells of fear."
icon_state = "soapsyndie"
-/obj/item/weapon/bedsheet
- name = "bedsheet"
- desc = "Nice, linen, bedsheet. Perfect to put on."
- icon = 'icons/obj/items.dmi'
- icon_state = "sheet"
- layer = 4.0
- item_state = "bedsheet"
- throwforce = 1
- w_class = 1.0
- throw_speed = 2
- throw_range = 10
- color = "white"
-
-/obj/item/weapon/bedsheet/blue
- icon_state = "sheetblue"
- color = "blue"
-
-/obj/item/weapon/bedsheet/green
- icon_state = "sheetgreen"
- color = "green"
-
-/obj/item/weapon/bedsheet/orange
- icon_state = "sheetorange"
- color = "orange"
-
-/obj/item/weapon/bedsheet/purple
- icon_state = "sheetpurple"
- color = "purple"
-
-/obj/item/weapon/bedsheet/rainbow
- icon_state = "sheetrainbow"
- color = "rainbow"
-
-/obj/item/weapon/bedsheet/red
- icon_state = "sheetred"
- color = "red"
-
-/obj/item/weapon/bedsheet/yellow
- icon_state = "sheetyellow"
- color = "yellow"
-
-/obj/item/weapon/bedsheet/mime
- icon_state = "sheetmime"
- color = "mime"
-
-/obj/item/weapon/bedsheet/clown
- icon_state = "sheetclown"
- color = "clown"
-
-/obj/item/weapon/bedsheet/captain
- icon_state = "sheetcaptain"
- color = "captain"
-
-/obj/item/weapon/bedsheet/rd
- icon_state = "sheetrd"
- color = "director"
-
-/obj/item/weapon/bedsheet/medical
- icon_state = "sheetmedical"
- color = "medical"
-
-/obj/item/weapon/bedsheet/hos
- icon_state = "sheethos"
- color = "hosred"
-
-/obj/item/weapon/bedsheet/hop
- icon_state = "sheethop"
- color = "hop"
-
-/obj/item/weapon/bedsheet/ce
- icon_state = "sheetce"
- color = "chief"
-
-/obj/item/weapon/bedsheet/brown
- icon_state = "sheetbrown"
- color = "brown"
-
/obj/item/weapon/bikehorn
name = "bike horn"
desc = "A horn off of a bicycle."
diff --git a/code/game/machinery/airlock_control.dm b/code/game/machinery/airlock_control.dm
index e9af711662f..ec1667ad0c3 100644
--- a/code/game/machinery/airlock_control.dm
+++ b/code/game/machinery/airlock_control.dm
@@ -8,90 +8,98 @@ obj/machinery/door/airlock
var/datum/radio_frequency/radio_connection
explosion_resistance = 15
- receive_signal(datum/signal/signal)
- if(!signal || signal.encryption) return
- if(id_tag != signal.data["tag"] || !signal.data["command"]) return
+obj/machinery/door/airlock/receive_signal(datum/signal/signal)
+ if(!signal || signal.encryption) return
- switch(signal.data["command"])
- if("open")
- spawn open(1)
+ if(id_tag != signal.data["tag"] || !signal.data["command"]) return
- if("close")
- spawn close(1)
+ switch(signal.data["command"])
+ if("open")
+ open(1)
- if("unlock")
- locked = 0
- update_icon()
+ if("close")
+ close(1)
- if("lock")
- locked = 1
- update_icon()
+ if("unlock")
+ locked = 0
+ update_icon()
- if("secure_open")
- spawn
- locked = 0
- update_icon()
+ if("lock")
+ locked = 1
+ update_icon()
- sleep(2)
- open(1)
+ if("secure_open")
+ locked = 0
+ update_icon()
- locked = 1
- update_icon()
+ sleep(2)
+ open(1)
- if("secure_close")
- spawn
- locked = 0
- close(1)
+ locked = 1
+ update_icon()
- locked = 1
- sleep(2)
- update_icon()
+ if("secure_close")
+ locked = 0
+ close(1)
- send_status()
+ locked = 1
+ sleep(2)
+ update_icon()
- proc/send_status()
- if(radio_connection)
- var/datum/signal/signal = new
- signal.transmission_method = 1 //radio signal
- signal.data["tag"] = id_tag
- signal.data["timestamp"] = world.time
+ send_status()
- signal.data["door_status"] = density?("closed"):("open")
- signal.data["lock_status"] = locked?("locked"):("unlocked")
- radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
+obj/machinery/door/airlock/proc/send_status()
+ if(radio_connection)
+ var/datum/signal/signal = new
+ signal.transmission_method = 1 //radio signal
+ signal.data["tag"] = id_tag
+ signal.data["timestamp"] = world.time
- open(surpress_send)
- . = ..()
- if(!surpress_send) send_status()
+ signal.data["door_status"] = density?("closed"):("open")
+ signal.data["lock_status"] = locked?("locked"):("unlocked")
- close(surpress_send)
- . = ..()
- if(!surpress_send) send_status()
+ radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
- proc/set_frequency(new_frequency)
- radio_controller.remove_object(src, frequency)
- if(new_frequency)
- frequency = new_frequency
- radio_connection = radio_controller.add_object(src, frequency, RADIO_AIRLOCK)
- initialize()
- if(frequency)
- set_frequency(frequency)
+obj/machinery/door/airlock/open(surpress_send)
+ . = ..()
+ if(!surpress_send) send_status()
+
+
+obj/machinery/door/airlock/close(surpress_send)
+ . = ..()
+ if(!surpress_send) send_status()
+
+
+obj/machinery/door/airlock/proc/set_frequency(new_frequency)
+ radio_controller.remove_object(src, frequency)
+ if(new_frequency)
+ frequency = new_frequency
+ radio_connection = radio_controller.add_object(src, frequency, RADIO_AIRLOCK)
+
+
+obj/machinery/door/airlock/initialize()
+ if(frequency)
+ set_frequency(frequency)
+
+ update_icon()
+
+
+obj/machinery/door/airlock/New()
+ ..()
+
+ if(radio_controller)
+ set_frequency(frequency)
- update_icon()
- New()
- ..()
- if(radio_controller)
- set_frequency(frequency)
obj/machinery/airlock_sensor
icon = 'icons/obj/airlock_machines.dmi'
icon_state = "airlock_sensor_off"
- name = "Airlock Sensor"
+ name = "airlock sensor"
anchored = 1
power_channel = ENVIRON
@@ -105,60 +113,64 @@ obj/machinery/airlock_sensor
var/on = 1
var/alert = 0
- update_icon()
- if(on)
- if(alert)
- icon_state = "airlock_sensor_alert"
- else
- icon_state = "airlock_sensor_standby"
- else
- icon_state = "airlock_sensor_off"
- attack_hand(mob/user)
+obj/machinery/airlock_sensor/update_icon()
+ if(on)
+ if(alert)
+ icon_state = "airlock_sensor_alert"
+ else
+ icon_state = "airlock_sensor_standby"
+ else
+ icon_state = "airlock_sensor_off"
+
+obj/machinery/airlock_sensor/attack_hand(mob/user)
+ var/datum/signal/signal = new
+ signal.transmission_method = 1 //radio signal
+ signal.data["tag"] = master_tag
+ signal.data["command"] = "cycle"
+
+ radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
+ flick("airlock_sensor_cycle", src)
+
+obj/machinery/airlock_sensor/process()
+ if(on)
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
- signal.data["tag"] = master_tag
- signal.data["command"] = "cycle"
+ signal.data["tag"] = id_tag
+ signal.data["timestamp"] = world.time
+
+ var/datum/gas_mixture/air_sample = return_air()
+
+ var/pressure = round(air_sample.return_pressure(),0.1)
+ alert = (pressure < ONE_ATMOSPHERE*0.8)
+
+ signal.data["pressure"] = num2text(pressure)
radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
- flick("airlock_sensor_cycle", src)
- process()
- if(on)
- var/datum/signal/signal = new
- signal.transmission_method = 1 //radio signal
- signal.data["tag"] = id_tag
- signal.data["timestamp"] = world.time
+ update_icon()
- var/datum/gas_mixture/air_sample = return_air()
+obj/machinery/airlock_sensor/proc/set_frequency(new_frequency)
+ radio_controller.remove_object(src, frequency)
+ frequency = new_frequency
+ radio_connection = radio_controller.add_object(src, frequency, RADIO_AIRLOCK)
- var/pressure = round(air_sample.return_pressure(),0.1)
- alert = (pressure < ONE_ATMOSPHERE*0.8)
+obj/machinery/airlock_sensor/initialize()
+ set_frequency(frequency)
- signal.data["pressure"] = num2text(pressure)
+obj/machinery/airlock_sensor/New()
+ ..()
- radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
-
- update_icon()
-
- proc/set_frequency(new_frequency)
- radio_controller.remove_object(src, frequency)
- frequency = new_frequency
- radio_connection = radio_controller.add_object(src, frequency, RADIO_AIRLOCK)
-
- initialize()
+ if(radio_controller)
set_frequency(frequency)
- New()
- ..()
- if(radio_controller)
- set_frequency(frequency)
+
obj/machinery/access_button
icon = 'icons/obj/airlock_machines.dmi'
icon_state = "access_button_standby"
- name = "Access Button"
+ name = "access button"
anchored = 1
power_channel = ENVIRON
@@ -171,37 +183,41 @@ obj/machinery/access_button
var/on = 1
- update_icon()
- if(on)
- icon_state = "access_button_standby"
- else
- icon_state = "access_button_off"
- attack_hand(mob/user)
- src.add_fingerprint(usr)
- if(!allowed(user))
- user << "\red Access Denied"
+obj/machinery/access_button/update_icon()
+ if(on)
+ icon_state = "access_button_standby"
+ else
+ icon_state = "access_button_off"
- else if(radio_connection)
- var/datum/signal/signal = new
- signal.transmission_method = 1 //radio signal
- signal.data["tag"] = master_tag
- signal.data["command"] = command
- radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
- flick("access_button_cycle", src)
+obj/machinery/access_button/attack_hand(mob/user)
+ add_fingerprint(usr)
+ if(!allowed(user))
+ user << "\red Access Denied"
- proc
- set_frequency(new_frequency)
- radio_controller.remove_object(src, frequency)
- frequency = new_frequency
- radio_connection = radio_controller.add_object(src, frequency, RADIO_AIRLOCK)
+ else if(radio_connection)
+ var/datum/signal/signal = new
+ signal.transmission_method = 1 //radio signal
+ signal.data["tag"] = master_tag
+ signal.data["command"] = command
- initialize()
- set_frequency(frequency)
+ radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
+ flick("access_button_cycle", src)
- New()
- ..()
- if(radio_controller)
- set_frequency(frequency)
+obj/machinery/access_button/proc/set_frequency(new_frequency)
+ radio_controller.remove_object(src, frequency)
+ frequency = new_frequency
+ radio_connection = radio_controller.add_object(src, frequency, RADIO_AIRLOCK)
+
+
+obj/machinery/access_button/initialize()
+ set_frequency(frequency)
+
+
+obj/machinery/access_button/New()
+ ..()
+
+ if(radio_controller)
+ set_frequency(frequency)
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/Bedsheets.dm b/code/game/objects/items/weapons/Bedsheets.dm
deleted file mode 100644
index 440a6c08f58..00000000000
--- a/code/game/objects/items/weapons/Bedsheets.dm
+++ /dev/null
@@ -1,14 +0,0 @@
-/obj/item/weapon/bedsheet/ex_act(severity)
- if (severity <= 2)
- del(src)
- return
- return
-
-/obj/item/weapon/bedsheet/attack_self(mob/user as mob)
- user.drop_item()
- if(layer == initial(layer))
- layer = 5
- else
- layer = initial(layer)
- add_fingerprint(user)
- return
\ No newline at end of file
diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm
index d286eba22da..3fdda184c48 100644
--- a/code/game/objects/structures/bedsheet_bin.dm
+++ b/code/game/objects/structures/bedsheet_bin.dm
@@ -1,38 +1,169 @@
-// BEDSHEET BIN
+/*
+CONTAINS:
+BEDSHEETS
+LINEN BINS
+*/
+
+/obj/item/weapon/bedsheet
+ name = "bedsheet"
+ desc = "A surprisingly soft linen bedsheet."
+ icon = 'icons/obj/items.dmi'
+ icon_state = "sheet"
+ item_state = "bedsheet"
+ layer = 4.0
+ throwforce = 1
+ throw_speed = 1
+ throw_range = 2
+ w_class = 1.0
+ color = "white"
+
+
+/obj/item/weapon/bedsheet/attack_self(mob/user as mob)
+ user.drop_item()
+ if(layer == initial(layer))
+ layer = 5
+ else
+ layer = initial(layer)
+ add_fingerprint(user)
+ return
+
+
+/obj/item/weapon/bedsheet/blue
+ icon_state = "sheetblue"
+ color = "blue"
+
+/obj/item/weapon/bedsheet/green
+ icon_state = "sheetgreen"
+ color = "green"
+
+/obj/item/weapon/bedsheet/orange
+ icon_state = "sheetorange"
+ color = "orange"
+
+/obj/item/weapon/bedsheet/purple
+ icon_state = "sheetpurple"
+ color = "purple"
+
+/obj/item/weapon/bedsheet/rainbow
+ icon_state = "sheetrainbow"
+ color = "rainbow"
+
+/obj/item/weapon/bedsheet/red
+ icon_state = "sheetred"
+ color = "red"
+
+/obj/item/weapon/bedsheet/yellow
+ icon_state = "sheetyellow"
+ color = "yellow"
+
+/obj/item/weapon/bedsheet/mime
+ icon_state = "sheetmime"
+ color = "mime"
+
+/obj/item/weapon/bedsheet/clown
+ icon_state = "sheetclown"
+ color = "clown"
+
+/obj/item/weapon/bedsheet/captain
+ icon_state = "sheetcaptain"
+ color = "captain"
+
+/obj/item/weapon/bedsheet/rd
+ icon_state = "sheetrd"
+ color = "director"
+
+/obj/item/weapon/bedsheet/medical
+ icon_state = "sheetmedical"
+ color = "medical"
+
+/obj/item/weapon/bedsheet/hos
+ icon_state = "sheethos"
+ color = "hosred"
+
+/obj/item/weapon/bedsheet/hop
+ icon_state = "sheethop"
+ color = "hop"
+
+/obj/item/weapon/bedsheet/ce
+ icon_state = "sheetce"
+ color = "chief"
+
+/obj/item/weapon/bedsheet/brown
+ icon_state = "sheetbrown"
+ color = "brown"
+
+
+
/obj/structure/bedsheetbin
name = "linen bin"
- desc = "A bin for containing bedsheets. It looks rather cosy."
- icon = 'icons/obj/items.dmi'
- icon_state = "bedbin"
- var/amount = 23.0
- anchored = 1.0
+ desc = "A linen bin. It looks rather cosy."
+ icon = 'icons/obj/structures.dmi'
+ icon_state = "linenbin-full"
+ anchored = 1
+ var/amount = 20
+ var/list/sheets = list()
+ var/obj/item/hidden = null
-/obj/structure/bedsheetbin/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (istype(W, /obj/item/weapon/bedsheet))
- del(W)
- src.amount++
- return
-
-/obj/structure/bedsheetbin/attack_paw(mob/user as mob)
- return src.attack_hand(user)
-
-/obj/structure/bedsheetbin/attack_hand(mob/user as mob)
- if (src.amount >= 1)
- src.amount--
- new /obj/item/weapon/bedsheet( src.loc )
- add_fingerprint(user)
/obj/structure/bedsheetbin/examine()
- set src in oview(1)
-
- src.amount = round(src.amount)
- if (src.amount <= 0)
- src.amount = 0
+ usr << desc
+ if(amount < 1)
usr << "There are no bed sheets in the bin."
- else
- if (src.amount == 1)
- usr << "There is one bed sheet in the bin."
- else
- usr << text("There are [] bed sheets in the bin.", src.amount)
- return
\ No newline at end of file
+ return
+ if(amount == 1)
+ usr << "There is one bed sheet in the bin."
+ return
+ usr << "There are [amount] bed sheets in the bin."
+
+
+/obj/structure/bedsheetbin/update_icon()
+ switch(amount)
+ if(0) icon_state = "linenbin-empty"
+ if(1 to amount / 2) icon_state = "linenbin-half"
+ else icon_state = "linenbin-full"
+
+
+/obj/structure/bedsheetbin/attackby(obj/item/I as obj, mob/user as mob)
+ if(istype(I, /obj/item/weapon/bedsheet))
+ user.drop_item()
+ I.loc = src
+ sheets.Add(I)
+ amount++
+ user << "You put [I] in [src]."
+ else if(amount && !hidden && I.w_class < 4) //make sure there's sheets to hide it among, make sure nothing else is hidden in there.
+ user.drop_item()
+ I.loc = src
+ hidden = I
+ user << "You hide [I] among the sheets."
+
+
+
+/obj/structure/bedsheetbin/attack_paw(mob/user as mob)
+ return attack_hand(user)
+
+
+/obj/structure/bedsheetbin/attack_hand(mob/user as mob)
+ if(amount >= 1)
+ amount--
+
+ var/obj/item/weapon/bedsheet/B
+ if(sheets.len > 0)
+ B = sheets[sheets.len]
+ sheets.Remove(B)
+
+ else if(amount >= 1)
+ amount--
+ B = new /obj/item/weapon/bedsheet(loc)
+
+ B.loc = user.loc
+ user.put_in_hands(B)
+ user << "You take [B] out of [src]."
+
+ if(hidden)
+ hidden.loc = user.loc
+ user << "[hidden] falls out of [B]!"
+ hidden = null
+
+
+ add_fingerprint(user)
\ No newline at end of file
diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm
index 921a3851b4b..aa7349a6b34 100644
--- a/code/modules/paperwork/paperbin.dm
+++ b/code/modules/paperwork/paperbin.dm
@@ -44,14 +44,10 @@
P.updateinfolinks()
P.loc = user.loc
- if(ishuman(user))
- user.put_in_hands(P)
- user << "You take a paper out of the bin."
- else
- P.loc = get_turf_loc(src)
- user << "You take a paper out of the bin."
+ user.put_in_hands(P)
+ user << "You take [P] out of the [src]."
else
- user << "The paper bin is empty!"
+ user << "[src] is empty!"
add_fingerprint(user)
return
@@ -63,7 +59,7 @@
user.drop_item()
i.loc = src
- usr << "You put the paper on the top of the paper bin."
+ user << "You put [i] in [src]."
papers.Add(i)
amount++
diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi
index 20d88d6ac5c..5d9084df592 100644
Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ
diff --git a/icons/obj/structures.dmi b/icons/obj/structures.dmi
index fe440f3de32..9662ab7119e 100644
Binary files a/icons/obj/structures.dmi and b/icons/obj/structures.dmi differ
diff --git a/tgstation.dme b/tgstation.dme
index 4331567a17c..4d000613514 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -663,7 +663,6 @@
#include "code\game\objects\items\stacks\tiles\plasteel.dm"
#include "code\game\objects\items\stacks\tiles\tile_types.dm"
#include "code\game\objects\items\weapons\AI_modules.dm"
-#include "code\game\objects\items\weapons\Bedsheets.dm"
#include "code\game\objects\items\weapons\cards_ids.dm"
#include "code\game\objects\items\weapons\cigs_lighters.dm"
#include "code\game\objects\items\weapons\clown_items.dm"