[M] [M.attacktext] [src]!"), 1)
+ visible_message("\red [M] [M.attacktext] [src]!")
M.attack_log += text("\[[time_stamp()]\] attacked [src.name]")
//src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])")
src.health -= M.melee_damage_upper
@@ -419,9 +417,7 @@
/obj/machinery/turret/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if(!(stat & BROKEN))
playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O.show_message(text("\red [] has slashed at []!", M, src), 1)
+ visible_message("\red [] has slashed at []!", M, src)
src.health -= 15
if (src.health <= 0)
src.die()
diff --git a/code/game/master_controller.dm b/code/game/master_controller.dm
deleted file mode 100644
index 3048e0fe9b3..00000000000
--- a/code/game/master_controller.dm
+++ /dev/null
@@ -1,240 +0,0 @@
-var/global/datum/controller/game_controller/master_controller //Set in world.New()
-var/global/datum/failsafe/Failsafe
-var/global/controllernum = "no"
-var/global/controller_iteration = 0
-
-
-var/global/last_tick_timeofday = world.timeofday
-var/global/last_tick_duration = 0
-
-datum/controller/game_controller
- var/processing = 1
-
- var/global/air_master_ready = 0
- var/global/sun_ready = 0
- var/global/mobs_ready = 0
- var/global/diseases_ready = 0
- var/global/machines_ready = 0
- var/global/objects_ready = 0
- var/global/networks_ready = 0
- var/global/powernets_ready = 0
- var/global/ticker_ready = 0
- var/global/next_crew_shuttle_vote = 2 // the next automatic vote to call the crew shuttle
-
- //Used for MC 'proc break' debugging
- var/global/obj/last_obj_processed
- var/global/datum/disease/last_disease_processed
- var/global/obj/machinery/last_machine_processed
- var/global/mob/last_mob_processed
-
-
- proc/setup()
- if(master_controller && (master_controller != src))
- del(src)
- return
- //There can be only one master.
-
- if(!air_master)
- air_master = new /datum/controller/air_system()
- air_master.setup()
-
- if(!job_master)
- job_master = new /datum/controller/occupations()
- if(job_master.SetupOccupations())
- world << "\red \b Job setup complete"
- job_master.LoadJobs("config/jobs.txt")
-
- world.tick_lag = config.Ticklag
-
- createRandomZlevel()
-
- setup_objects()
-
- setupgenetics()
-
-
- /*for(var/i = 0, i < max_secret_rooms, i++)
- make_mining_asteroid_secret()*/
-
- syndicate_code_phrase = generate_code_phrase()//Sets up code phrase for traitors, for the round.
- syndicate_code_response = generate_code_phrase()
-
- emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle()
-
- if(!ticker)
- ticker = new /datum/controller/gameticker()
-
- setupfactions()
-
- spawn
- ticker.pregame()
-
- proc/setup_objects()
- world << "\red \b Initializing objects"
- sleep(-1)
-
- for(var/obj/object in world)
- object.initialize()
-
- world << "\red \b Initializing pipe networks"
- sleep(-1)
-
- for(var/obj/machinery/atmospherics/machine in world)
- machine.build_network()
-
- world << "\red \b Initializing atmos machinery."
- sleep(-1)
- for(var/obj/machinery/atmospherics/unary/vent_pump/T in world)
- T.broadcast_status()
- for(var/obj/machinery/atmospherics/unary/vent_scrubber/T in world)
- T.broadcast_status()
-
- world << "\red \b Initializations complete."
-
- proc/set_debug_state(txt)
- // This should describe what is currently being done by the master controller
- // Useful for crashlogs and similar, because that way it's easy to tell what
- // was going on when the server crashed.
- socket_talk.send_raw("type=ticker_state&message=[txt]")
- return
-
-
- proc/process()
-
- var/currenttime = world.timeofday
- var/diff = (currenttime - last_tick_timeofday) / 10
- last_tick_timeofday = currenttime
- last_tick_duration = diff
-
- if(!processing)
- return 0
- controllernum = "yes"
- spawn (100)
- controllernum = "no"
-
- controller_iteration++
-
- var/start_time = world.timeofday
-
- // Start an automatic crew shuttle vote every hour starting with the second hour
- if(world.time > 10 * 60 * 60 * next_crew_shuttle_vote)
- next_crew_shuttle_vote++
- automatic_crew_shuttle_vote()
-
- air_master_ready = 0
- sun_ready = 0
- mobs_ready = 0
- diseases_ready = 0
- machines_ready = 0
- objects_ready = 0
- networks_ready = 0
- powernets_ready = 0
- ticker_ready = 0
-
- spawn(0)
- src.set_debug_state("Air Master")
- air_master.tick()
- air_master_ready = 1
-
- sleep(1)
-
- spawn(0)
- src.set_debug_state("Sun Position Calculations")
- sun.calc_position()
- sun_ready = 1
-
- sleep(-1)
-
- spawn(0)
- src.set_debug_state("Mob Processing")
- for(var/mob/M in world)
- last_mob_processed = M
- M.Life()
- mobs_ready = 1
-
-
-
- sleep(-1)
-
-
- spawn(0)
- src.set_debug_state("Disease Processing")
- for(var/datum/disease/D in active_diseases)
- last_disease_processed = D
- D.process()
- diseases_ready = 1
-
- spawn(0)
- src.set_debug_state("Machinery Processing")
- for(var/obj/machinery/machine in machines)
- if(machine)
- last_machine_processed = machine
- machine.process()
- if(machine && machine.use_power)
- machine.auto_use_power()
-
- machines_ready = 1
-
- sleep(-1)
- sleep(1)
-
- spawn(0)
- src.set_debug_state("Object Processing")
- for(var/obj/object in processing_objects)
- last_obj_processed = object
- object.process()
- objects_ready = 1
-
- spawn(0)
- src.set_debug_state("Pipe Network Processing")
- for(var/datum/pipe_network/network in pipe_networks)
- network.process()
- networks_ready = 1
-
- spawn(0)
- src.set_debug_state("Powernet Processing")
- for(var/datum/powernet/P in powernets)
- P.reset()
- powernets_ready = 1
-
- sleep(-1)
-
- spawn(0)
- ticker.process()
- ticker_ready = 1
-
- sleep(world.timeofday+12-start_time)
-
- var/IL_check = 0 //Infinite loop check (To report when the master controller breaks.)
- while(!air_master_ready || !sun_ready || !mobs_ready || !diseases_ready || !machines_ready || !objects_ready || !networks_ready || !powernets_ready || !ticker_ready)
- IL_check++
- if(IL_check > 600)
- var/MC_report = "air_master_ready = [air_master_ready]; sun_ready = [sun_ready]; mobs_ready = [mobs_ready]; diseases_ready = [diseases_ready]; machines_ready = [machines_ready]; objects_ready = [objects_ready]; networks_ready = [networks_ready]; powernets_ready = [powernets_ready]; ticker_ready = [ticker_ready];"
- message_admins("PROC BREAKAGE WARNING: The game's master contorller appears to be stuck in one of it's cycles. It has looped through it's delaying loop [IL_check] times.")
- message_admins("The master controller reports: [MC_report]")
- if(!diseases_ready)
- if(last_disease_processed)
- message_admins("DISEASE PROCESSING stuck on [last_disease_processed]", 0, 1)
- else
- message_admins("DISEASE PROCESSING stuck on unknown")
- if(!machines_ready)
- if(last_machine_processed)
- message_admins("MACHINE PROCESSING stuck on [last_machine_processed]", 0, 1)
- else
- message_admins("MACHINE PROCESSING stuck on unknown")
- if(!objects_ready)
- if(last_obj_processed)
- message_admins("OBJ PROCESSING stuck on [last_obj_processed]", 0, 1)
- else
- message_admins("OBJ PROCESSING stuck on unknown")
- log_admin("PROC BREAKAGE WARNING: infinite_loop_check = [IL_check]; [MC_report];")
- message_admins("Master controller breaking out of delaying loop. Restarting the round is advised if problem persists. DO NOT manually restart the master controller.")
- break;
- sleep(1)
-
-
- spawn
- process()
-
-
- return 1
\ No newline at end of file
diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm
index 140e5314eb3..a1af754229a 100644
--- a/code/game/objects/effects/overlays.dm
+++ b/code/game/objects/effects/overlays.dm
@@ -17,12 +17,16 @@
icon = 'icons/misc/beach2.dmi'
icon_state = "palm1"
density = 1
+ layer = 5
+ anchored = 1
/obj/effect/overlay/palmtree_l
name = "Palm tree"
icon = 'icons/misc/beach2.dmi'
icon_state = "palm2"
density = 1
+ layer = 5
+ anchored = 1
/obj/effect/overlay/coconut
name = "Coconuts"
diff --git a/code/game/objects/explosion_recursive.dm b/code/game/objects/explosion_recursive.dm
index d5aea573bc4..80b52811800 100644
--- a/code/game/objects/explosion_recursive.dm
+++ b/code/game/objects/explosion_recursive.dm
@@ -105,9 +105,6 @@ proc/explosion_rec(turf/epicenter, power)
/turf/simulated/wall
explosion_resistance = 5
-/turf/simulated/r_wall
- explosion_resistance = 25
-
/turf/simulated/wall/r_wall
explosion_resistance = 25
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index 7fd1fad2209..40c8fcdc89f 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -1,9 +1,10 @@
/obj/item/device/flashlight
name = "flashlight"
desc = "A hand-held emergency light."
- icon_state = "flight0"
+ icon = 'icons/obj/lighting.dmi'
+ icon_state = "flashlight"
+ item_state = "flashlight"
w_class = 2
- item_state = "flight"
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
m_amt = 50
@@ -11,35 +12,33 @@
icon_action_button = "action_flashlight"
var/on = 0
var/brightness_on = 4 //luminosity when on
- var/icon_on = "flight1"
- var/icon_off = "flight0"
/obj/item/device/flashlight/initialize()
..()
- if (on)
- icon_state = icon_on
- src.SetLuminosity(brightness_on)
+ if(on)
+ icon_state = "[initial(icon_state)]-on"
+ SetLuminosity(brightness_on)
else
- icon_state = icon_off
- src.SetLuminosity(0)
+ icon_state = initial(icon_state)
+ SetLuminosity(0)
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
if(on)
- icon_state = icon_on
- if(src.loc == user)
+ icon_state = "[initial(icon_state)]-on"
+ if(loc == user)
user.SetLuminosity(user.luminosity + brightness_on)
else if(isturf(loc))
SetLuminosity(brightness_on)
else
- icon_state = icon_off
- if(src.loc == user)
+ icon_state = initial(icon_state)
+ if(loc == user)
user.SetLuminosity(user.luminosity - brightness_on)
else if(isturf(loc))
SetLuminosity(0)
/obj/item/device/flashlight/attack_self(mob/user)
if(!isturf(user.loc))
- user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
+ user << "You cannot turn the light on while in this [user.loc]." //To prevent some lighting anomalities.
return
on = !on
update_brightness(user)
@@ -47,37 +46,43 @@
/obj/item/device/flashlight/attack(mob/living/M as mob, mob/living/user as mob)
- src.add_fingerprint(user)
- if(src.on && user.zone_sel.selecting == "eyes")
+ add_fingerprint(user)
+ if(on && user.zone_sel.selecting == "eyes")
- if (((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))//too dumb to use flashlight properly
- return ..()//just hit them in the head
+ if(((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly
+ return ..() //just hit them in the head
- if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")//don't have dexterity
- usr.show_message("\red You don't have the dexterity to do this!",1)
+ if(!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") //don't have dexterity
+ user << "You don't have the dexterity to do this!"
return
- var/mob/living/carbon/human/H = M//mob has protective eyewear
+ var/mob/living/carbon/human/H = M //mob has protective eyewear
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
- user << text("\blue You're going to need to remove that [] first.", ((H.head && H.head.flags & HEADCOVERSEYES) ? "helmet" : ((H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) ? "mask": "glasses")))
+ user << "You're going to need to remove that [(H.head && H.head.flags & HEADCOVERSEYES) ? "helmet" : (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) ? "mask": "glasses"] first."
return
- for(var/mob/O in viewers(M, null))//echo message
- if ((O.client && !(O.blinded )))
- O.show_message("\blue [(O==user?"You direct":"[user] directs")] [src] to [(M==user? "your":"[M]")] eyes", 1)
+ if(M == user) //they're using it on themselves
+ if(!M.blinded)
+ flick("flash", M.flash)
+ M.visible_message("[M] directs [src] to \his eyes.", \
+ "You wave the light in front of your eyes! Trippy!")
+ else
+ M.visible_message("[M] directs [src] to \his eyes.", \
+ "You wave the light in front of your eyes.")
+ return
- if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey))//robots and aliens are unaffected
- if(M.stat == DEAD || M.sdisabilities & BLIND)//mob is dead or fully blind
- if(M!=user)
- user.show_message("\red [M] pupils does not react to the light!",1)
- else if(XRAY in M.mutations)//mob has X-RAY vision
- if(M!=user)
- user.show_message("\red [M] pupils give an eerie glow!",1)
- else //nothing wrong
+ user.visible_message("[user] directs [src] to [M]'s eyes.", \
+ "You direct [src] to [M]'s eyes.")
+
+ if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)) //robots and aliens are unaffected
+ if(M.stat == DEAD || M.sdisabilities & BLIND) //mob is dead or fully blind
+ user << "[M] pupils does not react to the light!"
+ else if(XRAY in M.mutations) //mob has X-RAY vision
+ user << "[M] pupils give an eerie glow!"
+ else //they're okay!
if(!M.blinded)
- flick("flash", M.flash)//flash the affected mob
- if(M!=user)
- user.show_message("\blue [M] pupils narrow",1)
+ flick("flash", M.flash) //flash the affected mob
+ user << "[M]'s pupils narrow."
else
return ..()
@@ -96,69 +101,34 @@
/obj/item/device/flashlight/pen
name = "penlight"
- desc = "A pen-sized light. It shines as well as a flashlight."
- icon_state = "plight0"
- flags = FPRINT | TABLEPASS | CONDUCT
+ desc = "A pen-sized light, used by medical staff."
+ icon_state = "penlight"
item_state = ""
- icon_on = "plight1"
- icon_off = "plight0"
- brightness_on = 3
+ flags = FPRINT | TABLEPASS | CONDUCT
+ brightness_on = 2
-
-/obj/item/device/flashlight/pen/paralysis/attack(mob/M as mob, mob/user as mob)
- if(!ismob(M))
- return
- user << "\red You stab [M] with the pen."
- M << "\red You feel a tiny prick!"
- M.attack_log += text("\[[time_stamp()]\] Has been stabbed with [src.name] by [user.name] ([user.ckey])")
- user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to stab [M.name] ([M.ckey])")
-
- log_attack("[user.name] ([user.ckey]) Used the [src.name] to stab [M.name] ([M.ckey])")
-
- log_admin("ATTACK: [user.name] ([user.ckey]) Used the [src.name] to stab [M.name] ([M.ckey])")
- msg_admin_attack("ATTACK: [user.name] ([user.ckey]) Used the [src.name] to stab [M.name] ([M.ckey])") //BS12 EDIT ALG
-
- ..()
- return
-
-/obj/item/device/flashlight/pen/paralysis/New()
- var/datum/reagents/R = new/datum/reagents(15)
- reagents = R
- R.my_atom = src
- R.add_reagent("zombiepowder", 15)
- ..()
- return
-
-/obj/item/device/flashlight/pen/paralysis/attack(mob/M as mob, mob/user as mob)
- if (!( istype(M, /mob) ))
- return
- ..()
- if (reagents.total_volume)
- if(M.reagents) reagents.trans_to(M, 15)
- return
-
// the desk lamps are a bit special
/obj/item/device/flashlight/lamp
name = "desk lamp"
- desc = "A desk lamp"
- icon = 'icons/obj/lighting.dmi'
- icon_state = "lamp0"
+ desc = "A desk lamp with an adjustable mount."
+ icon_state = "lamp"
+ item_state = "lamp"
brightness_on = 5
- icon_on = "lamp1"
- icon_off = "lamp0"
w_class = 4
flags = FPRINT | TABLEPASS | CONDUCT
m_amt = 0
g_amt = 0
on = 1
+
// green-shaded desk lamp
/obj/item/device/flashlight/lamp/green
- icon_state = "green0"
- icon_on = "green1"
- icon_off = "green0"
- desc = "A green-shaded desk lamp"
+ desc = "A classic green-shaded desk lamp."
+ icon_state = "lampgreen"
+ item_state = "lampgreen"
+ brightness_on = 5
+
/obj/item/device/flashlight/lamp/verb/toggle_light()
set name = "Toggle light"
@@ -166,4 +136,59 @@
set src in oview(1)
if(!usr.stat)
- attack_self(usr)
\ No newline at end of file
+ attack_self(usr)
+
+// FLARES
+
+/obj/item/device/flashlight/flare
+ name = "flare"
+ desc = "A red Nanotrasen issued flare. There are instructions on the side, it reads 'pull cord, make light'."
+ w_class = 2.0
+ brightness_on = 7 // Pretty bright.
+ icon_state = "flare"
+ item_state = "flare"
+ var/fuel = 0
+ var/on_damage = 7
+ var/produce_heat = 1500
+
+/obj/item/device/flashlight/flare/New()
+ fuel = rand(3000, 4500) // Last 10 to 15 minutes.
+ ..()
+
+/obj/item/device/flashlight/flare/process()
+ var/turf/pos = get_turf(src)
+ pos.hotspot_expose(produce_heat, 5)
+ fuel = max(fuel - 1, 0)
+ if(!fuel || !on)
+ turn_off()
+ if(!fuel)
+ src.icon_state = "[initial(icon_state)]-empty"
+ processing_objects -= src
+
+/obj/item/device/flashlight/flare/proc/turn_off()
+ on = 0
+ src.force = initial(src.force)
+ src.damtype = initial(src.damtype)
+ if(ismob(loc))
+ var/mob/U = loc
+ update_brightness(U)
+ else
+ update_brightness(null)
+
+/obj/item/device/flashlight/flare/attack_self(mob/user)
+ // Usual checks
+ if(loc != usr)
+ return
+ if(!fuel)
+ user << "It's out of fuel."
+ return
+ if(!on)
+ user.visible_message("[user] activates the flare.", "You pull the cord on the flare, activating it!")
+ else
+ return
+ // All good, turn it on.
+ on = 1
+ update_brightness(user)
+ src.force = on_damage
+ src.damtype = "fire"
+ processing_objects += src
\ No newline at end of file
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index c3144088e9f..eb5c3b2582c 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -216,8 +216,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
4, 0, 1)
return
-/obj/item/device/radio/talk_into(mob/M as mob, message, channel)
-
+/obj/item/device/radio/talk_into(mob/living/M as mob, message, channel)
if(!on) return // the device has to be on
// Fix for permacell radios, but kinda eh about actually fixing them.
if(!M || !message) return
@@ -299,10 +298,9 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
// --- Modifications to the mob's identity ---
// The mob is disguising their identity:
- if (istype(M.wear_mask, /obj/item/clothing/mask/gas/voice))
- if(M.wear_mask:vchange)
- displayname = M.wear_mask:voice
- jobname = "Unknown"
+ if (ishuman(M) && M.GetVoice() != real_name)
+ displayname = M.GetVoice()
+ jobname = "Unknown"
voicemask = 1
@@ -472,7 +470,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
if (R.client && R.client.STFU_radio) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
continue
if (R.say_understands(M))
- if (!ishuman(M) || istype(M.wear_mask, /obj/item/clothing/mask/gas/voice))
+ if (ishuman(M) && M.GetVoice() != M.real_name)
heard_masked += R
else
heard_normal += R
@@ -556,10 +554,8 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
if (length(heard_masked))
var/N = M.name
var/J = eqjobname
- if (istype(M.wear_mask, /obj/item/clothing/mask/gas/voice)&&M.wear_mask:vchange)
- //To properly have the ninja show up on radio. Could also be useful for similar items.
- //Would not be necessary but the mob could be wearing a mask that is not a voice changer.
- N = M.wear_mask:voice
+ if(ishuman(M) && M.GetVoice() != M.real_name)
+ N = M.GetVoice()
J = "Unknown"
var/rendered = "[part_a][N][part_b][quotedmsg][part_c]"
for (var/mob/R in heard_masked)
diff --git a/code/game/objects/items/devices/violin.dm b/code/game/objects/items/devices/violin.dm
index 2a9487e5b7f..770cac6cc34 100644
--- a/code/game/objects/items/devices/violin.dm
+++ b/code/game/objects/items/devices/violin.dm
@@ -19,175 +19,175 @@
/*BYOND loads resource files at compile time if they are ''. This means you can't really manipulate them dynamically.
Tried doing it dynamically at first but its more trouble than its worth. Would have saved many lines tho.*/
switch(note)
- if("Cn1") soundfile = 'sound/violin/Cn1.ogg'
- if("C#1") soundfile = 'sound/violin/C#1.ogg'
- if("Db1") soundfile = 'sound/violin/Db1.ogg'
- if("Dn1") soundfile = 'sound/violin/Dn1.ogg'
- if("D#1") soundfile = 'sound/violin/D#1.ogg'
- if("Eb1") soundfile = 'sound/violin/Eb1.ogg'
- if("En1") soundfile = 'sound/violin/En1.ogg'
- if("E#1") soundfile = 'sound/violin/E#1.ogg'
- if("Fb1") soundfile = 'sound/violin/Fb1.ogg'
- if("Fn1") soundfile = 'sound/violin/Fn1.ogg'
- if("F#1") soundfile = 'sound/violin/F#1.ogg'
- if("Gb1") soundfile = 'sound/violin/Gb1.ogg'
- if("Gn1") soundfile = 'sound/violin/Gn1.ogg'
- if("G#1") soundfile = 'sound/violin/G#1.ogg'
- if("Ab1") soundfile = 'sound/violin/Ab1.ogg'
- if("An1") soundfile = 'sound/violin/An1.ogg'
- if("A#1") soundfile = 'sound/violin/A#1.ogg'
- if("Bb1") soundfile = 'sound/violin/Bb1.ogg'
- if("Bn1") soundfile = 'sound/violin/Bn1.ogg'
- if("B#1") soundfile = 'sound/violin/B#1.ogg'
- if("Cb2") soundfile = 'sound/violin/Cb2.ogg'
- if("Cn2") soundfile = 'sound/violin/Cn2.ogg'
- if("C#2") soundfile = 'sound/violin/C#2.ogg'
- if("Db2") soundfile = 'sound/violin/Db2.ogg'
- if("Dn2") soundfile = 'sound/violin/Dn2.ogg'
- if("D#2") soundfile = 'sound/violin/D#2.ogg'
- if("Eb2") soundfile = 'sound/violin/Eb2.ogg'
- if("En2") soundfile = 'sound/violin/En2.ogg'
- if("E#2") soundfile = 'sound/violin/E#2.ogg'
- if("Fb2") soundfile = 'sound/violin/Fb2.ogg'
- if("Fn2") soundfile = 'sound/violin/Fn2.ogg'
- if("F#2") soundfile = 'sound/violin/F#2.ogg'
- if("Gb2") soundfile = 'sound/violin/Gb2.ogg'
- if("Gn2") soundfile = 'sound/violin/Gn2.ogg'
- if("G#2") soundfile = 'sound/violin/G#2.ogg'
- if("Ab2") soundfile = 'sound/violin/Ab2.ogg'
- if("An2") soundfile = 'sound/violin/An2.ogg'
- if("A#2") soundfile = 'sound/violin/A#2.ogg'
- if("Bb2") soundfile = 'sound/violin/Bb2.ogg'
- if("Bn2") soundfile = 'sound/violin/Bn2.ogg'
- if("B#2") soundfile = 'sound/violin/B#2.ogg'
- if("Cb3") soundfile = 'sound/violin/Cb3.ogg'
- if("Cn3") soundfile = 'sound/violin/Cn3.ogg'
- if("C#3") soundfile = 'sound/violin/C#3.ogg'
- if("Db3") soundfile = 'sound/violin/Db3.ogg'
- if("Dn3") soundfile = 'sound/violin/Dn3.ogg'
- if("D#3") soundfile = 'sound/violin/D#3.ogg'
- if("Eb3") soundfile = 'sound/violin/Eb3.ogg'
- if("En3") soundfile = 'sound/violin/En3.ogg'
- if("E#3") soundfile = 'sound/violin/E#3.ogg'
- if("Fb3") soundfile = 'sound/violin/Fb3.ogg'
- if("Fn3") soundfile = 'sound/violin/Fn3.ogg'
- if("F#3") soundfile = 'sound/violin/F#3.ogg'
- if("Gb3") soundfile = 'sound/violin/Gb3.ogg'
- if("Gn3") soundfile = 'sound/violin/Gn3.ogg'
- if("G#3") soundfile = 'sound/violin/G#3.ogg'
- if("Ab3") soundfile = 'sound/violin/Ab3.ogg'
- if("An3") soundfile = 'sound/violin/An3.ogg'
- if("A#3") soundfile = 'sound/violin/A#3.ogg'
- if("Bb3") soundfile = 'sound/violin/Bb3.ogg'
- if("Bn3") soundfile = 'sound/violin/Bn3.ogg'
- if("B#3") soundfile = 'sound/violin/B#3.ogg'
- if("Cb4") soundfile = 'sound/violin/Cb4.ogg'
- if("Cn4") soundfile = 'sound/violin/Cn4.ogg'
- if("C#4") soundfile = 'sound/violin/C#4.ogg'
- if("Db4") soundfile = 'sound/violin/Db4.ogg'
- if("Dn4") soundfile = 'sound/violin/Dn4.ogg'
- if("D#4") soundfile = 'sound/violin/D#4.ogg'
- if("Eb4") soundfile = 'sound/violin/Eb4.ogg'
- if("En4") soundfile = 'sound/violin/En4.ogg'
- if("E#4") soundfile = 'sound/violin/E#4.ogg'
- if("Fb4") soundfile = 'sound/violin/Fb4.ogg'
- if("Fn4") soundfile = 'sound/violin/Fn4.ogg'
- if("F#4") soundfile = 'sound/violin/F#4.ogg'
- if("Gb4") soundfile = 'sound/violin/Gb4.ogg'
- if("Gn4") soundfile = 'sound/violin/Gn4.ogg'
- if("G#4") soundfile = 'sound/violin/G#4.ogg'
- if("Ab4") soundfile = 'sound/violin/Ab4.ogg'
- if("An4") soundfile = 'sound/violin/An4.ogg'
- if("A#4") soundfile = 'sound/violin/A#4.ogg'
- if("Bb4") soundfile = 'sound/violin/Bb4.ogg'
- if("Bn4") soundfile = 'sound/violin/Bn4.ogg'
- if("B#4") soundfile = 'sound/violin/B#4.ogg'
- if("Cb5") soundfile = 'sound/violin/Cb5.ogg'
- if("Cn5") soundfile = 'sound/violin/Cn5.ogg'
- if("C#5") soundfile = 'sound/violin/C#5.ogg'
- if("Db5") soundfile = 'sound/violin/Db5.ogg'
- if("Dn5") soundfile = 'sound/violin/Dn5.ogg'
- if("D#5") soundfile = 'sound/violin/D#5.ogg'
- if("Eb5") soundfile = 'sound/violin/Eb5.ogg'
- if("En5") soundfile = 'sound/violin/En5.ogg'
- if("E#5") soundfile = 'sound/violin/E#5.ogg'
- if("Fb5") soundfile = 'sound/violin/Fb5.ogg'
- if("Fn5") soundfile = 'sound/violin/Fn5.ogg'
- if("F#5") soundfile = 'sound/violin/F#5.ogg'
- if("Gb5") soundfile = 'sound/violin/Gb5.ogg'
- if("Gn5") soundfile = 'sound/violin/Gn5.ogg'
- if("G#5") soundfile = 'sound/violin/G#5.ogg'
- if("Ab5") soundfile = 'sound/violin/Ab5.ogg'
- if("An5") soundfile = 'sound/violin/An5.ogg'
- if("A#5") soundfile = 'sound/violin/A#5.ogg'
- if("Bb5") soundfile = 'sound/violin/Bb5.ogg'
- if("Bn5") soundfile = 'sound/violin/Bn5.ogg'
- if("B#5") soundfile = 'sound/violin/B#5.ogg'
- if("Cb6") soundfile = 'sound/violin/Cb6.ogg'
- if("Cn6") soundfile = 'sound/violin/Cn6.ogg'
- if("C#6") soundfile = 'sound/violin/C#6.ogg'
- if("Db6") soundfile = 'sound/violin/Db6.ogg'
- if("Dn6") soundfile = 'sound/violin/Dn6.ogg'
- if("D#6") soundfile = 'sound/violin/D#6.ogg'
- if("Eb6") soundfile = 'sound/violin/Eb6.ogg'
- if("En6") soundfile = 'sound/violin/En6.ogg'
- if("E#6") soundfile = 'sound/violin/E#6.ogg'
- if("Fb6") soundfile = 'sound/violin/Fb6.ogg'
- if("Fn6") soundfile = 'sound/violin/Fn6.ogg'
- if("F#6") soundfile = 'sound/violin/F#6.ogg'
- if("Gb6") soundfile = 'sound/violin/Gb6.ogg'
- if("Gn6") soundfile = 'sound/violin/Gn6.ogg'
- if("G#6") soundfile = 'sound/violin/G#6.ogg'
- if("Ab6") soundfile = 'sound/violin/Ab6.ogg'
- if("An6") soundfile = 'sound/violin/An6.ogg'
- if("A#6") soundfile = 'sound/violin/A#6.ogg'
- if("Bb6") soundfile = 'sound/violin/Bb6.ogg'
- if("Bn6") soundfile = 'sound/violin/Bn6.ogg'
- if("B#6") soundfile = 'sound/violin/B#6.ogg'
- if("Cb7") soundfile = 'sound/violin/Cb7.ogg'
- if("Cn7") soundfile = 'sound/violin/Cn7.ogg'
- if("C#7") soundfile = 'sound/violin/C#7.ogg'
- if("Db7") soundfile = 'sound/violin/Db7.ogg'
- if("Dn7") soundfile = 'sound/violin/Dn7.ogg'
- if("D#7") soundfile = 'sound/violin/D#7.ogg'
- if("Eb7") soundfile = 'sound/violin/Eb7.ogg'
- if("En7") soundfile = 'sound/violin/En7.ogg'
- if("E#7") soundfile = 'sound/violin/E#7.ogg'
- if("Fb7") soundfile = 'sound/violin/Fb7.ogg'
- if("Fn7") soundfile = 'sound/violin/Fn7.ogg'
- if("F#7") soundfile = 'sound/violin/F#7.ogg'
- if("Gb7") soundfile = 'sound/violin/Gb7.ogg'
- if("Gn7") soundfile = 'sound/violin/Gn7.ogg'
- if("G#7") soundfile = 'sound/violin/G#7.ogg'
- if("Ab7") soundfile = 'sound/violin/Ab7.ogg'
- if("An7") soundfile = 'sound/violin/An7.ogg'
- if("A#7") soundfile = 'sound/violin/A#7.ogg'
- if("Bb7") soundfile = 'sound/violin/Bb7.ogg'
- if("Bn7") soundfile = 'sound/violin/Bn7.ogg'
- if("B#7") soundfile = 'sound/violin/B#7.ogg'
- if("Cb8") soundfile = 'sound/violin/Cb8.ogg'
- if("Cn8") soundfile = 'sound/violin/Cn8.ogg'
- if("C#8") soundfile = 'sound/violin/C#8.ogg'
- if("Db8") soundfile = 'sound/violin/Db8.ogg'
- if("Dn8") soundfile = 'sound/violin/Dn8.ogg'
- if("D#8") soundfile = 'sound/violin/D#8.ogg'
- if("Eb8") soundfile = 'sound/violin/Eb8.ogg'
- if("En8") soundfile = 'sound/violin/En8.ogg'
- if("E#8") soundfile = 'sound/violin/E#8.ogg'
- if("Fb8") soundfile = 'sound/violin/Fb8.ogg'
- if("Fn8") soundfile = 'sound/violin/Fn8.ogg'
- if("F#8") soundfile = 'sound/violin/F#8.ogg'
- if("Gb8") soundfile = 'sound/violin/Gb8.ogg'
- if("Gn8") soundfile = 'sound/violin/Gn8.ogg'
- if("G#8") soundfile = 'sound/violin/G#8.ogg'
- if("Ab8") soundfile = 'sound/violin/Ab8.ogg'
- if("An8") soundfile = 'sound/violin/An8.ogg'
- if("A#8") soundfile = 'sound/violin/A#8.ogg'
- if("Bb8") soundfile = 'sound/violin/Bb8.ogg'
- if("Bn8") soundfile = 'sound/violin/Bn8.ogg'
- if("B#8") soundfile = 'sound/violin/B#8.ogg'
- if("Cb9") soundfile = 'sound/violin/Cb9.ogg'
- if("Cn9") soundfile = 'sound/violin/Cn9.ogg'
+ if("Cn1") soundfile = 'sound/violin/Cn1.mid'
+ if("C#1") soundfile = 'sound/violin/C#1.mid'
+ if("Db1") soundfile = 'sound/violin/Db1.mid'
+ if("Dn1") soundfile = 'sound/violin/Dn1.mid'
+ if("D#1") soundfile = 'sound/violin/D#1.mid'
+ if("Eb1") soundfile = 'sound/violin/Eb1.mid'
+ if("En1") soundfile = 'sound/violin/En1.mid'
+ if("E#1") soundfile = 'sound/violin/E#1.mid'
+ if("Fb1") soundfile = 'sound/violin/Fb1.mid'
+ if("Fn1") soundfile = 'sound/violin/Fn1.mid'
+ if("F#1") soundfile = 'sound/violin/F#1.mid'
+ if("Gb1") soundfile = 'sound/violin/Gb1.mid'
+ if("Gn1") soundfile = 'sound/violin/Gn1.mid'
+ if("G#1") soundfile = 'sound/violin/G#1.mid'
+ if("Ab1") soundfile = 'sound/violin/Ab1.mid'
+ if("An1") soundfile = 'sound/violin/An1.mid'
+ if("A#1") soundfile = 'sound/violin/A#1.mid'
+ if("Bb1") soundfile = 'sound/violin/Bb1.mid'
+ if("Bn1") soundfile = 'sound/violin/Bn1.mid'
+ if("B#1") soundfile = 'sound/violin/B#1.mid'
+ if("Cb2") soundfile = 'sound/violin/Cb2.mid'
+ if("Cn2") soundfile = 'sound/violin/Cn2.mid'
+ if("C#2") soundfile = 'sound/violin/C#2.mid'
+ if("Db2") soundfile = 'sound/violin/Db2.mid'
+ if("Dn2") soundfile = 'sound/violin/Dn2.mid'
+ if("D#2") soundfile = 'sound/violin/D#2.mid'
+ if("Eb2") soundfile = 'sound/violin/Eb2.mid'
+ if("En2") soundfile = 'sound/violin/En2.mid'
+ if("E#2") soundfile = 'sound/violin/E#2.mid'
+ if("Fb2") soundfile = 'sound/violin/Fb2.mid'
+ if("Fn2") soundfile = 'sound/violin/Fn2.mid'
+ if("F#2") soundfile = 'sound/violin/F#2.mid'
+ if("Gb2") soundfile = 'sound/violin/Gb2.mid'
+ if("Gn2") soundfile = 'sound/violin/Gn2.mid'
+ if("G#2") soundfile = 'sound/violin/G#2.mid'
+ if("Ab2") soundfile = 'sound/violin/Ab2.mid'
+ if("An2") soundfile = 'sound/violin/An2.mid'
+ if("A#2") soundfile = 'sound/violin/A#2.mid'
+ if("Bb2") soundfile = 'sound/violin/Bb2.mid'
+ if("Bn2") soundfile = 'sound/violin/Bn2.mid'
+ if("B#2") soundfile = 'sound/violin/B#2.mid'
+ if("Cb3") soundfile = 'sound/violin/Cb3.mid'
+ if("Cn3") soundfile = 'sound/violin/Cn3.mid'
+ if("C#3") soundfile = 'sound/violin/C#3.mid'
+ if("Db3") soundfile = 'sound/violin/Db3.mid'
+ if("Dn3") soundfile = 'sound/violin/Dn3.mid'
+ if("D#3") soundfile = 'sound/violin/D#3.mid'
+ if("Eb3") soundfile = 'sound/violin/Eb3.mid'
+ if("En3") soundfile = 'sound/violin/En3.mid'
+ if("E#3") soundfile = 'sound/violin/E#3.mid'
+ if("Fb3") soundfile = 'sound/violin/Fb3.mid'
+ if("Fn3") soundfile = 'sound/violin/Fn3.mid'
+ if("F#3") soundfile = 'sound/violin/F#3.mid'
+ if("Gb3") soundfile = 'sound/violin/Gb3.mid'
+ if("Gn3") soundfile = 'sound/violin/Gn3.mid'
+ if("G#3") soundfile = 'sound/violin/G#3.mid'
+ if("Ab3") soundfile = 'sound/violin/Ab3.mid'
+ if("An3") soundfile = 'sound/violin/An3.mid'
+ if("A#3") soundfile = 'sound/violin/A#3.mid'
+ if("Bb3") soundfile = 'sound/violin/Bb3.mid'
+ if("Bn3") soundfile = 'sound/violin/Bn3.mid'
+ if("B#3") soundfile = 'sound/violin/B#3.mid'
+ if("Cb4") soundfile = 'sound/violin/Cb4.mid'
+ if("Cn4") soundfile = 'sound/violin/Cn4.mid'
+ if("C#4") soundfile = 'sound/violin/C#4.mid'
+ if("Db4") soundfile = 'sound/violin/Db4.mid'
+ if("Dn4") soundfile = 'sound/violin/Dn4.mid'
+ if("D#4") soundfile = 'sound/violin/D#4.mid'
+ if("Eb4") soundfile = 'sound/violin/Eb4.mid'
+ if("En4") soundfile = 'sound/violin/En4.mid'
+ if("E#4") soundfile = 'sound/violin/E#4.mid'
+ if("Fb4") soundfile = 'sound/violin/Fb4.mid'
+ if("Fn4") soundfile = 'sound/violin/Fn4.mid'
+ if("F#4") soundfile = 'sound/violin/F#4.mid'
+ if("Gb4") soundfile = 'sound/violin/Gb4.mid'
+ if("Gn4") soundfile = 'sound/violin/Gn4.mid'
+ if("G#4") soundfile = 'sound/violin/G#4.mid'
+ if("Ab4") soundfile = 'sound/violin/Ab4.mid'
+ if("An4") soundfile = 'sound/violin/An4.mid'
+ if("A#4") soundfile = 'sound/violin/A#4.mid'
+ if("Bb4") soundfile = 'sound/violin/Bb4.mid'
+ if("Bn4") soundfile = 'sound/violin/Bn4.mid'
+ if("B#4") soundfile = 'sound/violin/B#4.mid'
+ if("Cb5") soundfile = 'sound/violin/Cb5.mid'
+ if("Cn5") soundfile = 'sound/violin/Cn5.mid'
+ if("C#5") soundfile = 'sound/violin/C#5.mid'
+ if("Db5") soundfile = 'sound/violin/Db5.mid'
+ if("Dn5") soundfile = 'sound/violin/Dn5.mid'
+ if("D#5") soundfile = 'sound/violin/D#5.mid'
+ if("Eb5") soundfile = 'sound/violin/Eb5.mid'
+ if("En5") soundfile = 'sound/violin/En5.mid'
+ if("E#5") soundfile = 'sound/violin/E#5.mid'
+ if("Fb5") soundfile = 'sound/violin/Fb5.mid'
+ if("Fn5") soundfile = 'sound/violin/Fn5.mid'
+ if("F#5") soundfile = 'sound/violin/F#5.mid'
+ if("Gb5") soundfile = 'sound/violin/Gb5.mid'
+ if("Gn5") soundfile = 'sound/violin/Gn5.mid'
+ if("G#5") soundfile = 'sound/violin/G#5.mid'
+ if("Ab5") soundfile = 'sound/violin/Ab5.mid'
+ if("An5") soundfile = 'sound/violin/An5.mid'
+ if("A#5") soundfile = 'sound/violin/A#5.mid'
+ if("Bb5") soundfile = 'sound/violin/Bb5.mid'
+ if("Bn5") soundfile = 'sound/violin/Bn5.mid'
+ if("B#5") soundfile = 'sound/violin/B#5.mid'
+ if("Cb6") soundfile = 'sound/violin/Cb6.mid'
+ if("Cn6") soundfile = 'sound/violin/Cn6.mid'
+ if("C#6") soundfile = 'sound/violin/C#6.mid'
+ if("Db6") soundfile = 'sound/violin/Db6.mid'
+ if("Dn6") soundfile = 'sound/violin/Dn6.mid'
+ if("D#6") soundfile = 'sound/violin/D#6.mid'
+ if("Eb6") soundfile = 'sound/violin/Eb6.mid'
+ if("En6") soundfile = 'sound/violin/En6.mid'
+ if("E#6") soundfile = 'sound/violin/E#6.mid'
+ if("Fb6") soundfile = 'sound/violin/Fb6.mid'
+ if("Fn6") soundfile = 'sound/violin/Fn6.mid'
+ if("F#6") soundfile = 'sound/violin/F#6.mid'
+ if("Gb6") soundfile = 'sound/violin/Gb6.mid'
+ if("Gn6") soundfile = 'sound/violin/Gn6.mid'
+ if("G#6") soundfile = 'sound/violin/G#6.mid'
+ if("Ab6") soundfile = 'sound/violin/Ab6.mid'
+ if("An6") soundfile = 'sound/violin/An6.mid'
+ if("A#6") soundfile = 'sound/violin/A#6.mid'
+ if("Bb6") soundfile = 'sound/violin/Bb6.mid'
+ if("Bn6") soundfile = 'sound/violin/Bn6.mid'
+ if("B#6") soundfile = 'sound/violin/B#6.mid'
+ if("Cb7") soundfile = 'sound/violin/Cb7.mid'
+ if("Cn7") soundfile = 'sound/violin/Cn7.mid'
+ if("C#7") soundfile = 'sound/violin/C#7.mid'
+ if("Db7") soundfile = 'sound/violin/Db7.mid'
+ if("Dn7") soundfile = 'sound/violin/Dn7.mid'
+ if("D#7") soundfile = 'sound/violin/D#7.mid'
+ if("Eb7") soundfile = 'sound/violin/Eb7.mid'
+ if("En7") soundfile = 'sound/violin/En7.mid'
+ if("E#7") soundfile = 'sound/violin/E#7.mid'
+ if("Fb7") soundfile = 'sound/violin/Fb7.mid'
+ if("Fn7") soundfile = 'sound/violin/Fn7.mid'
+ if("F#7") soundfile = 'sound/violin/F#7.mid'
+ if("Gb7") soundfile = 'sound/violin/Gb7.mid'
+ if("Gn7") soundfile = 'sound/violin/Gn7.mid'
+ if("G#7") soundfile = 'sound/violin/G#7.mid'
+ if("Ab7") soundfile = 'sound/violin/Ab7.mid'
+ if("An7") soundfile = 'sound/violin/An7.mid'
+ if("A#7") soundfile = 'sound/violin/A#7.mid'
+ if("Bb7") soundfile = 'sound/violin/Bb7.mid'
+ if("Bn7") soundfile = 'sound/violin/Bn7.mid'
+ if("B#7") soundfile = 'sound/violin/B#7.mid'
+ if("Cb8") soundfile = 'sound/violin/Cb8.mid'
+ if("Cn8") soundfile = 'sound/violin/Cn8.mid'
+ if("C#8") soundfile = 'sound/violin/C#8.mid'
+ if("Db8") soundfile = 'sound/violin/Db8.mid'
+ if("Dn8") soundfile = 'sound/violin/Dn8.mid'
+ if("D#8") soundfile = 'sound/violin/D#8.mid'
+ if("Eb8") soundfile = 'sound/violin/Eb8.mid'
+ if("En8") soundfile = 'sound/violin/En8.mid'
+ if("E#8") soundfile = 'sound/violin/E#8.mid'
+ if("Fb8") soundfile = 'sound/violin/Fb8.mid'
+ if("Fn8") soundfile = 'sound/violin/Fn8.mid'
+ if("F#8") soundfile = 'sound/violin/F#8.mid'
+ if("Gb8") soundfile = 'sound/violin/Gb8.mid'
+ if("Gn8") soundfile = 'sound/violin/Gn8.mid'
+ if("G#8") soundfile = 'sound/violin/G#8.mid'
+ if("Ab8") soundfile = 'sound/violin/Ab8.mid'
+ if("An8") soundfile = 'sound/violin/An8.mid'
+ if("A#8") soundfile = 'sound/violin/A#8.mid'
+ if("Bb8") soundfile = 'sound/violin/Bb8.mid'
+ if("Bn8") soundfile = 'sound/violin/Bn8.mid'
+ if("B#8") soundfile = 'sound/violin/B#8.mid'
+ if("Cb9") soundfile = 'sound/violin/Cb9.mid'
+ if("Cn9") soundfile = 'sound/violin/Cn9.mid'
else return
hearers(15, get_turf(src)) << sound(soundfile)
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index 65fee3b6dc1..b653c397939 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -1,142 +1,143 @@
-/* Diffrent misc types of sheets
- * Contains:
- * Metal
- * Plasteel
- * Wood
- * Cloth
- * Cardboard
- */
-
-/*
- * 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("table parts", /obj/item/weapon/table_parts, 2), \
- new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \
- new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \
- null, \
- new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \
- null, \
- new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20), \
- new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \
- null, \
- new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \
- null, \
- new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2), \
- new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
- new/datum/stack_recipe("light fixture frame", /obj/item/light_fixture_frame, 2), \
- new/datum/stack_recipe("small light fixture frame", /obj/item/light_fixture_frame/small, 1), \
- null, \
- new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \
-)
-
-/obj/item/stack/sheet/metal
- name = "metal"
- desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
- singular_name = "metal sheet"
- icon_state = "sheet-metal"
- m_amt = 3750
- throwforce = 14.0
- flags = FPRINT | TABLEPASS | CONDUCT
- origin_tech = "materials=1"
-
-/obj/item/stack/sheet/metal/cyborg
- name = "metal"
- desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
- singular_name = "metal sheet"
- icon_state = "sheet-metal"
- m_amt = 0
- throwforce = 14.0
- flags = FPRINT | TABLEPASS | CONDUCT
-
-/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
- recipes = metal_recipes
- return ..()
-
-
-/*
- * Plasteel
- */
-var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
- new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \
- )
-
-/obj/item/stack/sheet/plasteel
- name = "plasteel"
- singular_name = "plasteel sheet"
- desc = "This sheet is an alloy of iron and plasma."
- icon_state = "sheet-plasteel"
- item_state = "sheet-metal"
- m_amt = 7500
- throwforce = 15.0
- flags = FPRINT | TABLEPASS | CONDUCT
- origin_tech = "materials=2"
-
-/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
- recipes = plasteel_recipes
- return ..()
-
-/*
- * Wood
- */
-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("table parts", /obj/item/weapon/table_parts/wood, 2), \
- new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
- new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
- )
-
-/obj/item/stack/sheet/wood
- name = "wooden planks"
- desc = "One can only guess that this is a bunch of wood."
- singular_name = "wood plank"
- icon_state = "sheet-wood"
- origin_tech = "materials=1;biotech=1"
-
-/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
- recipes = wood_recipes
- return ..()
-
-/*
- * Cloth
- */
-/obj/item/stack/sheet/cloth
- name = "cloth"
- desc = "This roll of cloth is made from only the finest chemicals and bunny rabbits."
- singular_name = "cloth roll"
- icon_state = "sheet-cloth"
- origin_tech = "materials=2"
-
-/*
- * Cardboard
- */
-var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
- new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \
- new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/lightbox/tubes), \
- new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/lightbox/bulbs), \
- new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/mousetraps), \
- new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \
- new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \
- new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
-)
-
-/obj/item/stack/sheet/cardboard //BubbleWrap
- name = "cardboard"
- desc = "Large sheets of card, like boxes folded flat."
- singular_name = "cardboard sheet"
- icon_state = "sheet-card"
- flags = FPRINT | TABLEPASS
- origin_tech = "materials=1"
-
-/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null)
- recipes = cardboard_recipes
+/* Diffrent misc types of sheets
+ * Contains:
+ * Metal
+ * Plasteel
+ * Wood
+ * Cloth
+ * Cardboard
+ */
+
+/*
+ * 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("table parts", /obj/item/weapon/table_parts, 2), \
+ new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \
+ new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \
+ null, \
+ new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \
+ null, \
+ new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20), \
+ new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \
+ null, \
+ new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1), \
+ new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \
+ new/datum/stack_recipe("airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
+ new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \
+ new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \
+ null, \
+ new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2), \
+ new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
+ new/datum/stack_recipe("light fixture frame", /obj/item/light_fixture_frame, 2), \
+ new/datum/stack_recipe("small light fixture frame", /obj/item/light_fixture_frame/small, 1), \
+ null, \
+ new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \
+)
+
+/obj/item/stack/sheet/metal
+ name = "metal"
+ desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
+ singular_name = "metal sheet"
+ icon_state = "sheet-metal"
+ m_amt = 3750
+ throwforce = 14.0
+ flags = FPRINT | TABLEPASS | CONDUCT
+ origin_tech = "materials=1"
+
+/obj/item/stack/sheet/metal/cyborg
+ name = "metal"
+ desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
+ singular_name = "metal sheet"
+ icon_state = "sheet-metal"
+ m_amt = 0
+ throwforce = 14.0
+ flags = FPRINT | TABLEPASS | CONDUCT
+
+/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
+ recipes = metal_recipes
+ return ..()
+
+
+/*
+ * Plasteel
+ */
+var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
+ new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \
+ )
+
+/obj/item/stack/sheet/plasteel
+ name = "plasteel"
+ singular_name = "plasteel sheet"
+ desc = "This sheet is an alloy of iron and plasma."
+ icon_state = "sheet-plasteel"
+ item_state = "sheet-metal"
+ m_amt = 7500
+ throwforce = 15.0
+ flags = FPRINT | TABLEPASS | CONDUCT
+ origin_tech = "materials=2"
+
+/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
+ recipes = plasteel_recipes
+ return ..()
+
+/*
+ * Wood
+ */
+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 barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
+ new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
+ new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
+ )
+
+/obj/item/stack/sheet/wood
+ name = "wooden planks"
+ desc = "One can only guess that this is a bunch of wood."
+ singular_name = "wood plank"
+ icon_state = "sheet-wood"
+ origin_tech = "materials=1;biotech=1"
+
+/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
+ recipes = wood_recipes
+ return ..()
+
+/*
+ * Cloth
+ */
+/obj/item/stack/sheet/cloth
+ name = "cloth"
+ desc = "This roll of cloth is made from only the finest chemicals and bunny rabbits."
+ singular_name = "cloth roll"
+ icon_state = "sheet-cloth"
+ origin_tech = "materials=2"
+
+/*
+ * Cardboard
+ */
+var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
+ new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \
+ new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/lightbox/tubes), \
+ new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/lightbox/bulbs), \
+ new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/mousetraps), \
+ new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \
+ new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \
+ new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
+)
+
+/obj/item/stack/sheet/cardboard //BubbleWrap
+ name = "cardboard"
+ desc = "Large sheets of card, like boxes folded flat."
+ singular_name = "cardboard sheet"
+ icon_state = "sheet-card"
+ flags = FPRINT | TABLEPASS
+ origin_tech = "materials=1"
+
+/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null)
+ recipes = cardboard_recipes
return ..()
\ No newline at end of file
diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm
index 68330ee797f..15530ff720f 100644
--- a/code/game/objects/items/trash.dm
+++ b/code/game/objects/items/trash.dm
@@ -22,7 +22,7 @@
name = "Popcorn"
icon_state = "popcorn"
sosjerky
- name = "Sosjerky"
+ name = "Scaredy's Private Reserve Beef Jerky"
icon_state = "sosjerky"
syndi_cakes
name = "Syndi cakes"
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/items/weapons/grenades/spawnergrenade.dm b/code/game/objects/items/weapons/grenades/spawnergrenade.dm
index fe15703fa2a..9f911085228 100644
--- a/code/game/objects/items/weapons/grenades/spawnergrenade.dm
+++ b/code/game/objects/items/weapons/grenades/spawnergrenade.dm
@@ -47,6 +47,6 @@
/obj/item/weapon/grenade/spawnergrenade/spesscarp
name = "carp delivery grenade"
- spawner_type = /mob/living/simple_animal/carp
+ spawner_type = /mob/living/simple_animal/hostile/carp
deliveryamt = 5
origin_tech = "materials=3;magnets=4;syndicate=4"
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm
index 512d8ef88de..b0743f0a698 100644
--- a/code/game/objects/items/weapons/storage/toolbox.dm
+++ b/code/game/objects/items/weapons/storage/toolbox.dm
@@ -4,6 +4,8 @@
new /obj/item/weapon/extinguisher/mini(src)
if(prob(50))
new /obj/item/device/flashlight(src)
+ else
+ new /obj/item/device/flashlight/flare(src)
new /obj/item/device/radio(src)
/obj/item/weapon/storage/toolbox/mechanical/New()
diff --git a/code/game/objects/items/weapons/trashbag.dm b/code/game/objects/items/weapons/trashbag.dm
index e9471f60f17..21c76f0cbdb 100644
--- a/code/game/objects/items/weapons/trashbag.dm
+++ b/code/game/objects/items/weapons/trashbag.dm
@@ -1,14 +1,14 @@
/obj/item/weapon/trashbag
+ name = "trash bag"
+ desc = "A heavy-duty, no fun allowed trash bag."
icon = 'icons/obj/trash.dmi'
icon_state = "trashbag0"
item_state = "trashbag"
- name = "Trash bag"
- desc = "A heavy-duty, no fun allowed trash bag."
- var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
- var/capacity = 25; //the number of trash it can carry.
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 2.0
+ var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
+ var/capacity = 25; //the number of trash it can carry.
/obj/item/weapon/trashbag/update_icon()
if(contents.len == 0)
@@ -21,21 +21,20 @@
/obj/item/weapon/trashbag/attackby(obj/item/W as obj, mob/living/user as mob)
..()
- if (contents.len < capacity)
- if (istype(W, /obj/item))
- if (W.w_class <= 2)
+ if(contents.len < capacity)
+ if(istype(W, /obj/item))
+ if(W.w_class <= 2)
var/obj/item/O = W
- src.contents += O
+ contents += O
else
- user << "\blue The bag is full!"
+ user << "[src] is full!"
/obj/item/weapon/trashbag/attack_self(mob/living/user as mob)
-
if(contents.len > 0)
- for(var/obj/item/I in src.contents)
+ for(var/obj/item/I in contents)
I.loc = user.loc
update_icon()
- user << "\blue You drop all the trash onto the floor."
+ user << "You empty [src] onto [user.loc]."
/obj/item/weapon/trashbag/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
if(istype(target, /obj/item))
@@ -43,23 +42,23 @@
if(W.w_class <= 2)
if(mode == 1)
if(contents.len < capacity) //slightly redundant, but it makes it prettier in the chatbox. -Pete
- user << "\blue You pick up all the trash."
+ user << "You pick up all the trash."
for(var/obj/item/O in get_turf(W))
if(istype(O, /obj/item/weapon/disk/nuclear)) continue //No nuke disks - Nodrak
if(contents.len < capacity)
if(O.w_class <= 2)
contents += O;
else
- user << "\blue The bag is full!"
+ user << "[src] is full!"
break
else
- user << "\blue The bag is full!"
+ user << "[src] is full!"
else
if(istype(W, /obj/item/weapon/disk/nuclear)) return //No nuke disks - Nodrak
if(contents.len < capacity)
contents += W;
else
- user << "\blue The bag is full!"
+ user << "[src] is full!"
update_icon()
return
@@ -68,8 +67,7 @@
set category = "Object"
mode = !mode
- switch (mode)
- if(1)
- usr << "The bag now picks up all trash in a tile at once."
- else
- usr << "The bag now picks up one piece of trash at a time."
\ No newline at end of file
+ if(mode == 1)
+ usr << "[src] now picks up all trash in a tile at once."
+ else
+ usr << "[src] now picks up one piece of trash at a time."
\ 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..a14d078878e 100644
--- a/code/game/objects/structures/bedsheet_bin.dm
+++ b/code/game/objects/structures/bedsheet_bin.dm
@@ -1,38 +1,168 @@
-// 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."
+ 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
- usr << text("There are [] bed sheets in the bin.", src.amount)
- return
\ No newline at end of file
+ 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/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 96fd8c8a518..f360d942fd4 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -15,6 +15,14 @@
var/storage_capacity = 20 //This is so that someone can't pack hundreds of items in a locker/crate
//then open it in a populated area to crash clients.
+/obj/structure/closet/New()
+ ..()
+ spawn(1)
+ if(!opened) // if closed, any item at the crate's loc is put in the contents
+ for(var/obj/item/I in src.loc)
+ if(I.density || I.anchored || I == src) continue
+ I.loc = src
+
/obj/structure/closet/alter_health()
return get_turf(src)
@@ -147,6 +155,13 @@
return
+/obj/structure/closet/attack_animal(mob/living/simple_animal/user as mob)
+ if(user.wall_smash)
+ visible_message("\red [user] destroys the [src]. ")
+ for(var/atom/movable/A as mob|obj in src)
+ A.loc = src.loc
+ del(src)
+
// this should probably use dump_contents()
/obj/structure/closet/blob_act()
if(prob(75))
diff --git a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm
index 1706e5acc67..adac90b75bf 100644
--- a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm
@@ -141,7 +141,6 @@
/*
* Radiation Closet
*/
-
/obj/structure/closet/radiation
name = "radiation suit closet"
desc = "It's a storage unit for rad-protective suits."
@@ -157,7 +156,7 @@
/*
* Bombsuit closet
*/
- /obj/structure/closet/bombcloset
+/obj/structure/closet/bombcloset
name = "\improper EOD closet"
desc = "It's a storage unit for explosion-protective suits."
icon_state = "bombsuit"
diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm
index c09bae884c0..bd337661b2d 100644
--- a/code/game/objects/structures/crates_lockers/crates.dm
+++ b/code/game/objects/structures/crates_lockers/crates.dm
@@ -197,13 +197,6 @@
// new /obj/item/weapon/pestspray(src)
// new /obj/item/weapon/pestspray(src)
-/obj/structure/closet/crate/New()
- ..()
- spawn(1)
- if(!opened) // if closed, any item at the crate's loc is put in the contents
- for(var/obj/item/I in src.loc)
- if(I.density || I.anchored || I == src) continue
- I.loc = src
/obj/structure/closet/crate/secure/New()
..()
diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm
index 7c0fe9edba7..b3e8f852125 100644
--- a/code/game/objects/structures/false_walls.dm
+++ b/code/game/objects/structures/false_walls.dm
@@ -143,7 +143,7 @@
if(istype(W, /obj/item/weapon/screwdriver))
var/turf/T = get_turf(src)
user.visible_message("[user] tightens some bolts on the wall.", "You tighten the bolts on the wall.")
- if(!mineral)
+ if(!mineral || mineral == "metal")
T.ReplaceWithWall()
else
T.ReplaceWithMineralWall(mineral)
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 32f1bf697d6..425fd06558f 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -14,212 +14,208 @@
var/destroyed = 0
explosion_resistance = 5
- ex_act(severity)
- switch(severity)
- if(1.0)
+/obj/structure/grille/ex_act(severity)
+ switch(severity)
+ if(1.0)
+ del(src)
+ return
+ if(2.0)
+ if(prob(50))
del(src)
return
- if(2.0)
- if(prob(50))
- del(src)
- return
- if(3.0)
- if(prob(25))
- src.health -= 11
- healthcheck()
- return
+ if(3.0)
+ if(prob(25))
+ src.health -= 11
+ healthcheck()
+ return
+
+/obj/structure/grille/blob_act()
+ del(src)
+ return
+
+/obj/structure/grille/Bumped(atom/user)
+ if(ismob(user)) shock(user, 70)
- blob_act()
- del(src)
- return
-
- Bumped(atom/user)
- if(ismob(user)) shock(user, 70)
+/obj/structure/grille/meteorhit(var/obj/M)
+ if (M.icon_state == "flaming")
+ src.health -= 2
+ healthcheck()
+ return
- meteorhit(var/obj/M)
- if (M.icon_state == "flaming")
- src.health -= 2
- healthcheck()
- return
+/obj/structure/grille/attack_hand(var/mob/user)
+ playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
+ user.visible_message("[user.name] kicks the [src.name].", \
+ "You kick the [src.name].", \
+ "You hear a noise")
+ if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
+ src.health -= 5
+ else if(!shock(user, 70))
+ src.health -= 3
+ healthcheck()
+ return
- attack_hand(var/mob/user)
- playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
- user.visible_message("[user.name] kicks the [src.name].", \
- "You kick the [src.name].", \
- "You hear a noise")
- if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
- src.health -= 5
- else if(!shock(user, 70))
- src.health -= 3
+/obj/structure/grille/attack_paw(var/mob/user)
+ attack_hand(user)
+
+
+/obj/structure/grille/attack_alien(var/mob/user)
+ if (istype(usr, /mob/living/carbon/alien/larva)) return
+ playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
+ user.visible_message("[user.name] mangles the [src.name].", \
+ "You mangle the [src.name].", \
+ "You hear a noise")
+ if(!shock(usr, 70))
+ src.health -= 5
healthcheck()
return
+/obj/structure/grille/attack_metroid(var/mob/user)
+ if(!istype(usr, /mob/living/carbon/metroid/adult)) return
+ playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
+ user.visible_message("[user.name] smashes against the [src.name].", \
+ "You smash against the [src.name].", \
+ "You hear a noise")
+ src.health -= rand(2,3)
+ healthcheck()
+ return
- attack_paw(var/mob/user)
- attack_hand(user)
+/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob)
+ if(M.melee_damage_upper == 0) return
+ playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
+ M.visible_message("[M.name] smashes against the [src.name].", \
+ "You smash against the [src.name].", \
+ "You hear a noise")
+ src.health -= M.melee_damage_upper
+ healthcheck()
+ return
-
- attack_alien(var/mob/user)
- if (istype(usr, /mob/living/carbon/alien/larva)) return
- playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
- user.visible_message("[user.name] mangles the [src.name].", \
- "You mangle the [src.name].", \
- "You hear a noise")
- if(!shock(usr, 70))
- src.health -= 5
- healthcheck()
- return
-
- attack_metroid(var/mob/user)
- if(!istype(usr, /mob/living/carbon/metroid/adult)) return
- playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
- user.visible_message("[user.name] smashes against the [src.name].", \
- "You smash against the [src.name].", \
- "You hear a noise")
- src.health -= rand(2,3)
- healthcheck()
- return
-
- attack_animal(var/mob/living/simple_animal/M as mob)
- if(M.melee_damage_upper == 0) return
- playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
- M.visible_message("[M.name] smashes against the [src.name].", \
- "You smash against the [src.name].", \
- "You hear a noise")
- src.health -= M.melee_damage_upper
- healthcheck()
- return
-
- CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
- if(air_group || (height==0)) return 1
- if(istype(mover) && mover.checkpass(PASSGRILLE))
- return 1
+/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
+ if(air_group || (height==0)) return 1
+ if(istype(mover) && mover.checkpass(PASSGRILLE))
+ return 1
+ else
+ if (istype(mover, /obj/item/projectile))
+ return prob(30)
else
- if (istype(mover, /obj/item/projectile))
- return prob(30)
+ return !src.density
+
+
+/obj/structure/grille/attackby(obj/item/weapon/W, mob/user)
+ if(iswirecutter(W))
+ if(!shock(user, 100))
+ playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
+ src.health = 0
+ if(!destroyed)
+ src.health = -100
+ else if ((isscrewdriver(W)) && (istype(src.loc, /turf/simulated) || src.anchored))
+ if(!shock(user, 90))
+ playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
+ src.anchored = !( src.anchored )
+ user << (src.anchored ? "You have fastened the grille to the floor." : "You have unfastened the grill.")
+ for(var/mob/O in oviewers())
+ O << text("\red [user] [src.anchored ? "fastens" : "unfastens"] the grille.")
+ return
+ else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) )
+ var/dir_to_set = 1
+ if(src.loc == usr.loc)
+ dir_to_set = usr.dir
+ else
+ if( ( src.x == usr.x ) || (src.y == usr.y) ) //Only supposed to work for cardinal directions.
+ if( src.x == usr.x )
+ if( src.y > usr.y )
+ dir_to_set = 2
+ else
+ dir_to_set = 1
+ else if( src.y == usr.y )
+ if( src.x > usr.x )
+ dir_to_set = 8
+ else
+ dir_to_set = 4
else
- var/turf/T = get_turf(src)
- var/obj/structure/cable/C = T.get_cable_node()
- if(C)
- if (C.powernet.avail)
- if (istype(mover, /obj/item))
- var/obj/item/i = mover
- if (i.m_amt)
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(5, 1, src)
- s.start()
- return !src.density
-
-
- attackby(obj/item/weapon/W, mob/user)
- if(iswirecutter(W))
- if(!shock(user, 100))
- playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
- src.health = 0
- if(!destroyed)
- src.health = -100
- else if ((isscrewdriver(W)) && (istype(src.loc, /turf/simulated) || src.anchored))
- if(!shock(user, 90))
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
- src.anchored = !( src.anchored )
- user << (src.anchored ? "You have fastened the grille to the floor." : "You have unfastened the grill.")
- for(var/mob/O in oviewers())
- O << text("\red [user] [src.anchored ? "fastens" : "unfastens"] the grille.")
+ usr << "\red You can't reach there.."
+ return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
+ for(var/obj/structure/window/WINDOW in src.loc)
+ if(WINDOW.dir == dir_to_set)
+ usr << "\red There is already a window facing this way there."
return
- else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) )
- var/dir_to_set = 1
- if(src.loc == usr.loc)
- dir_to_set = usr.dir
- else
- if( ( src.x == usr.x ) || (src.y == usr.y) ) //Only supposed to work for cardinal directions.
- if( src.x == usr.x )
- if( src.y > usr.y )
- dir_to_set = 2
- else
- dir_to_set = 1
- else if( src.y == usr.y )
- if( src.x > usr.x )
- dir_to_set = 8
- else
- dir_to_set = 4
- else
- usr << "\red You can't reach there.."
- return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
+ usr << "\blue You start placing the window"
+ if(do_after(user,20))
+ if(!src) return //Grille destroyed while waiting
for(var/obj/structure/window/WINDOW in src.loc)
- if(WINDOW.dir == dir_to_set)
+ if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
usr << "\red There is already a window facing this way there."
return
- usr << "\blue You start placing the window"
- if(do_after(user,20))
- if(!src) return //Grille destroyed while waiting
- for(var/obj/structure/window/WINDOW in src.loc)
- if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
- usr << "\red There is already a window facing this way there."
- return
- var/obj/structure/window/WD
- if(istype(W,/obj/item/stack/sheet/rglass))
- WD = new/obj/structure/window(src.loc,1) //reinforced window
- else
- WD = new/obj/structure/window(src.loc,0) //normal window
- WD.dir = dir_to_set
- WD.ini_dir = dir_to_set
- WD.anchored = 0
- WD.state = 0
- var/obj/item/stack/ST = W
- ST.use(1)
- usr << "\blue You place the [WD] on the [src]"
- return
- else if(istype(W, /obj/item/weapon/shard))
- src.health -= W.force * 0.1
- else if(!shock(user, 70))
- playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
- switch(W.damtype)
- if("fire")
- src.health -= W.force
- if("brute")
- src.health -= W.force * 0.1
- src.healthcheck()
- ..()
- return
-
-
- proc/healthcheck()
- if (src.health <= 0)
- if (!( src.destroyed ))
- src.icon_state = "brokengrille"
- src.density = 0
- src.destroyed = 1
- new /obj/item/stack/rods( src.loc )
-
+ var/obj/structure/window/WD
+ if(istype(W,/obj/item/stack/sheet/rglass))
+ WD = new/obj/structure/window(src.loc,1) //reinforced window
else
- if (src.health <= -10.0)
- new /obj/item/stack/rods( src.loc )
- //SN src = null
- del(src)
- return
+ WD = new/obj/structure/window(src.loc,0) //normal window
+ WD.dir = dir_to_set
+ WD.ini_dir = dir_to_set
+ WD.anchored = 0
+ WD.state = 0
+ var/obj/item/stack/ST = W
+ ST.use(1)
+ usr << "\blue You place the [WD] on the [src]"
return
+ else if(istype(W, /obj/item/weapon/shard))
+ src.health -= W.force * 0.1
+ else if(!shock(user, 70))
+ playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
+ switch(W.damtype)
+ if("fire")
+ src.health -= W.force
+ if("brute")
+ src.health -= W.force * 0.1
+ src.healthcheck()
+ ..()
+ return
+
+
+/obj/structure/grille/proc/healthcheck()
+ if (src.health <= 0)
+ if (!( src.destroyed ))
+ src.icon_state = "brokengrille"
+ src.density = 0
+ src.destroyed = 1
+ new /obj/item/stack/rods( src.loc )
+
+ else
+ if (src.health <= -10.0)
+ new /obj/item/stack/rods( src.loc )
+ //SN src = null
+ del(src)
+ return
+ return
// shock user with probability prb (if all connections & power are working)
// returns 1 if shocked, 0 otherwise
- proc/shock(mob/user, prb)
- if(!anchored || destroyed) // anchored/destroyed grilles are never connected
- return 0
- if(!prob(prb))
- return 0
- if(!in_range(src, usr))//To prevent TK and mech users from getting shocked
- return 0
- var/turf/T = get_turf(src)
- var/obj/structure/cable/C = T.get_cable_node()
- if(C)
- if (electrocute_mob(user, C, src))
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(5, 1, src)
- s.start()
- return 1
- else
- return 0
+/obj/structure/grille/proc/shock(mob/user, prb)
+ if(!anchored || destroyed) // anchored/destroyed grilles are never connected
return 0
+ if(!prob(prb))
+ return 0
+ if(!in_range(src, usr))//To prevent TK and mech users from getting shocked
+ return 0
+ var/turf/T = get_turf(src)
+ var/obj/structure/cable/C = T.get_cable_node()
+ if(C)
+ if (electrocute_mob(user, C, src))
+ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ s.set_up(5, 1, src)
+ s.start()
+ return 1
+ else
+ return 0
+ return 0
+
+/obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
+ if(!destroyed)
+ if(exposed_temperature > T0C + 1500)
+ src.health -= 1
+ healthcheck()
+ ..()
\ No newline at end of file
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
new file mode 100644
index 00000000000..a79eddfdf7d
--- /dev/null
+++ b/code/game/objects/structures/safe.dm
@@ -0,0 +1,190 @@
+/*
+CONTAINS:
+SAFES
+FLOOR SAFES
+*/
+
+//SAFES
+/obj/structure/safe
+ name = "safe"
+ desc = "A huge chunk of metal with a dial embedded in it. Fine print on the dial reads \"Scarborough Arms - 2 tumbler safe, guaranteed thermite resistant, explosion resistant, and assistant resistant.\""
+ icon = 'icons/obj/structures.dmi'
+ icon_state = "safe"
+ anchored = 1
+ density = 1
+ var/open = 0 //is the safe open?
+ var/tumbler_1_pos //the tumbler position- from 0 to 72
+ var/tumbler_1_open //the tumbler position to open at- 0 to 72
+ var/tumbler_2_pos
+ var/tumbler_2_open
+ var/dial = 0 //where is the dial pointing?
+ var/space = 0 //the combined w_class of everything in the safe
+ var/maxspace = 24 //the maximum combined w_class of stuff in the safe
+
+
+/obj/structure/safe/New()
+ tumbler_1_pos = rand(0, 72)
+ tumbler_1_open = rand(0, 72)
+
+ tumbler_2_pos = rand(0, 72)
+ tumbler_2_open = rand(0, 72)
+
+
+/obj/structure/safe/initialize()
+ for(var/obj/item/I in loc)
+ if(space >= maxspace)
+ return
+ if(I.w_class + space <= maxspace)
+ space += I.w_class
+ I.loc = src
+
+
+/obj/structure/safe/proc/check_unlocked(mob/user as mob, canhear)
+ if(user && canhear)
+ if(tumbler_1_pos == tumbler_1_open)
+ user << "You hear a [pick("tonk", "krunk", "plunk")] from [src]."
+ if(tumbler_2_pos == tumbler_2_open)
+ user << "You hear a [pick("tink", "krink", "plink")] from [src]."
+ if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open)
+ if(user) visible_message("[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!")
+ return 1
+ return 0
+
+
+/obj/structure/safe/proc/decrement(num)
+ num -= 1
+ if(num < 0)
+ num = 71
+ return num
+
+
+/obj/structure/safe/proc/increment(num)
+ num += 1
+ if(num > 71)
+ num = 0
+ return num
+
+
+/obj/structure/safe/update_icon()
+ if(open)
+ icon_state = "[initial(icon_state)]-open"
+ else
+ icon_state = initial(icon_state)
+
+
+/obj/structure/safe/attack_hand(mob/user as mob)
+ user.machine = src
+ var/dat = ""
+ dat += "[open ? "Close" : "Open"] [src] | - [dial * 5] +"
+ if(open)
+ dat += ""
+ for(var/i = contents.len, i>=1, i--)
+ var/obj/item/P = contents[i]
+ dat += "| [P.name] |
"
+ dat += "
"
+ user << browse("[name][dat]", "window=safe;size=350x300")
+
+
+/obj/structure/safe/Topic(href, href_list)
+ if(!ishuman(usr)) return
+ var/mob/living/carbon/human/user = usr
+
+ var/canhear = 0
+ if(istype(user.l_hand, /obj/item/clothing/tie/stethoscope) || istype(user.r_hand, /obj/item/clothing/tie/stethoscope))
+ canhear = 1
+
+ if(href_list["open"])
+ if(check_unlocked())
+ user << "You [open ? "close" : "open"] [src]."
+ open = !open
+ update_icon()
+ updateUsrDialog()
+ return
+ else
+ user << "You can't [open ? "close" : "open"] [src], the lock is engaged!"
+ return
+
+ if(href_list["decrement"])
+ dial = decrement(dial)
+ if(dial == tumbler_1_pos + 1 || dial == tumbler_1_pos - 71)
+ tumbler_1_pos = decrement(tumbler_1_pos)
+ if(canhear)
+ user << "You hear a [pick("clack", "scrape", "clank")] from [src]."
+ if(tumbler_1_pos == tumbler_2_pos + 37 || tumbler_1_pos == tumbler_2_pos - 35)
+ tumbler_2_pos = decrement(tumbler_2_pos)
+ if(canhear)
+ user << "You hear a [pick("click", "chink", "clink")] from [src]."
+ check_unlocked(user, canhear)
+ updateUsrDialog()
+ return
+
+ if(href_list["increment"])
+ dial = increment(dial)
+ if(dial == tumbler_1_pos - 1 || dial == tumbler_1_pos + 71)
+ tumbler_1_pos = increment(tumbler_1_pos)
+ if(canhear)
+ user << "You hear a [pick("clack", "scrape", "clank")] from [src]."
+ if(tumbler_1_pos == tumbler_2_pos - 37 || tumbler_1_pos == tumbler_2_pos + 35)
+ tumbler_2_pos = increment(tumbler_2_pos)
+ if(canhear)
+ user << "You hear a [pick("click", "chink", "clink")] from [src]."
+ check_unlocked(user, canhear)
+ updateUsrDialog()
+ return
+
+ if(href_list["retrieve"])
+ user << browse("", "window=safe") // Close the menu
+
+ var/obj/item/P = locate(href_list["retrieve"])
+ if(P && in_range(src, user))
+ user.put_in_hands(P)
+ updateUsrDialog()
+
+
+/obj/structure/safe/attackby(obj/item/I as obj, mob/user as mob)
+ if(open)
+ if(I.w_class + space <= maxspace)
+ space += I.w_class
+ user.drop_item()
+ I.loc = src
+ user << "You put [I] in [src]."
+ updateUsrDialog()
+ return
+ else
+ user << "[I] won't fit in [src]."
+ return
+ else
+ if(istype(I, /obj/item/clothing/tie/stethoscope))
+ user << "Hold [I] in one of your hands while you manipulate the dial."
+ return
+
+
+obj/structure/safe/blob_act()
+ return
+
+
+obj/structure/safe/ex_act(severity)
+ return
+
+
+obj/structure/safe/meteorhit(obj/O as obj)
+ return
+
+
+//FLOOR SAFES
+/obj/structure/safe/floor
+ name = "floor safe"
+ icon_state = "floorsafe"
+ density = 0
+ level = 1 //underfloor
+ layer = 2.5
+
+
+/obj/structure/safe/floor/initialize()
+ ..()
+ var/turf/T = loc
+ hide(T.intact)
+
+
+/obj/structure/safe/floor/hide(var/intact)
+ invisibility = intact ? 101 : 0
\ No newline at end of file
diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
index 972bb244221..447913d225b 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
@@ -49,6 +49,11 @@
set category = "Object"
set src in oview(1)
+ if(!usr || !isturf(usr.loc))
+ return
+ if(usr.stat || usr.restrained())
+ return
+
src.dir = turn(src.dir, 90)
handle_rotation()
return
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 48fc036f0d5..97b708a458d 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -243,9 +243,7 @@
/obj/structure/table/attack_paw(mob/user as mob)
if ((HULK in usr.mutations))
usr << "\blue You destroy the table."
- for(var/mob/O in oviewers())
- if ((O.client && !( O.blinded )))
- O << "\red [user] smashes the table apart!"
+ visible_message("\red [user] smashes the table apart!")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced( src.loc )
else if(istype(src, /obj/structure/table/woodentable))
@@ -258,18 +256,14 @@
step(user, get_dir(user, src))
if (user.loc == src.loc)
user.layer = TURF_LAYER
- for(var/mob/O in oviewers())
- if ((O.client && !( O.blinded )))
- O << "[user] hides under the table!"
+ visible_message("[user] hides under the table!")
//Foreach goto(69)
return
/obj/structure/table/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
usr << "\green You destroy the table."
- for(var/mob/O in oviewers())
- if ((O.client && !( O.blinded )))
- O << "\red [user] slices the table apart!"
+ visible_message("\red [user] slices the table apart!")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced( src.loc )
else if(istype(src, /obj/structure/table/woodentable))
@@ -281,12 +275,10 @@
return
-/obj/structure/table/attack_animal(mob/living/simple_animal/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
+/obj/structure/table/attack_animal(mob/living/simple_animal/user as mob)
if(user.wall_smash)
usr << "\red You destroy the table."
- for(var/mob/O in oviewers())
- if ((O.client && !( O.blinded )))
- O << "\red [user] smashes the table apart!"
+ visible_message("\red [user] smahes the table apart!")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced( src.loc )
else if(istype(src, /obj/structure/table/woodentable))
@@ -303,9 +295,7 @@
/obj/structure/table/attack_hand(mob/user as mob)
if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
usr << "\blue You destroy the table."
- for(var/mob/O in oviewers())
- if ((O.client && !( O.blinded )))
- O << "\red [user] smashes the table apart!"
+ visible_message("\red [user] smahes the table apart!")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced( src.loc )
else if(istype(src, /obj/structure/table/woodentable))
@@ -346,9 +336,7 @@
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
- for(var/mob/O in viewers(world.view, src))
- if (O.client)
- O << "\red [G.assailant] puts [G.affecting] on the table."
+ visible_message("\red [G.assailant] puts [G.affecting] on the table.")
del(W)
return
@@ -400,9 +388,7 @@
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
- for(var/mob/O in viewers(world.view, src))
- if (O.client)
- O << "\red [G.assailant] puts [G.affecting] on the wooden table."
+ visible_message("\red [G.assailant] puts [G.affecting] on the table.")
del(W)
return
if (istype(W, /obj/item/weapon/wrench))
@@ -451,9 +437,7 @@
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
- for(var/mob/O in viewers(world.view, src))
- if (O.client)
- O << "\red [G.assailant] puts [G.affecting] on the reinforced table."
+ visible_message("\red [G.assailant] puts [G.affecting] on the table.")
del(W)
return
diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm
new file mode 100644
index 00000000000..af584e2ac74
--- /dev/null
+++ b/code/game/objects/structures/tank_dispenser.dm
@@ -0,0 +1,101 @@
+/obj/structure/dispenser
+ name = "tank storage unit"
+ desc = "A simple yet bulky storage device for gas tanks. Has room for up to ten oxygen tanks, and ten plasma tanks."
+ icon = 'icons/obj/objects.dmi'
+ icon_state = "dispenser"
+ density = 1
+ anchored = 1.0
+ var/oxygentanks = 10
+ var/plasmatanks = 10
+ var/list/oxytanks = list() //sorry for the similar var names
+ var/list/platanks = list()
+
+
+/obj/structure/dispenser/oxygen
+ plasmatanks = 0
+
+/obj/structure/dispenser/plasma
+ oxygentanks = 0
+
+
+/obj/structure/dispenser/New()
+ update_icon()
+
+
+/obj/structure/dispenser/update_icon()
+ overlays = null
+ switch(oxygentanks)
+ if(1 to 3) overlays += "oxygen-[oxygentanks]"
+ if(4 to INFINITY) overlays += "oxygen-4"
+ switch(plasmatanks)
+ if(1 to 4) overlays += "plasma-[plasmatanks]"
+ if(5 to INFINITY) overlays += "plasma-5"
+
+
+/obj/structure/dispenser/attack_hand(mob/user as mob)
+ user.machine = src
+ var/dat = "[src]
"
+ dat += "Oxygen tanks: [oxygentanks] - [oxygentanks ? "Dispense" : "empty"]
"
+ dat += "Plasma tanks: [plasmatanks] - [plasmatanks ? "Dispense" : "empty"]"
+ user << browse(dat, "window=dispenser")
+ onclose(user, "dispenser")
+ return
+
+
+/obj/structure/dispenser/attackby(obj/item/I as obj, mob/user as mob)
+ if(istype(I, /obj/item/weapon/tank/oxygen) || istype(I, /obj/item/weapon/tank/air) || istype(I, /obj/item/weapon/tank/anesthetic))
+ if(oxygentanks < 10)
+ user.drop_item()
+ I.loc = src
+ oxytanks.Add(I)
+ oxygentanks++
+ user << "You put [I] in [src]."
+ else
+ user << "[src] is full."
+ if(istype(I, /obj/item/weapon/tank/plasma))
+ if(plasmatanks < 10)
+ user.drop_item()
+ I.loc = src
+ platanks.Add(I)
+ plasmatanks++
+ user << "You put [I] in [src]."
+ else
+ user << "[src] is full."
+ updateUsrDialog()
+
+
+/obj/structure/dispenser/Topic(href, href_list)
+ if(usr.stat || usr.restrained())
+ return
+ if(get_dist(src, usr) <= 1)
+ usr.machine = src
+ if(href_list["oxygen"])
+ if(oxygentanks > 0)
+ var/obj/item/weapon/tank/oxygen/O
+ if(oxytanks.len == oxygentanks)
+ O = oxytanks[1]
+ oxytanks.Remove(O)
+ else
+ O = new /obj/item/weapon/tank/oxygen(loc)
+ O.loc = loc
+ usr << "You take [O] out of [src]."
+ oxygentanks--
+ update_icon()
+ if(href_list["plasma"])
+ if(plasmatanks > 0)
+ var/obj/item/weapon/tank/plasma/P
+ if(platanks.len == plasmatanks)
+ P = platanks[1]
+ platanks.Remove(P)
+ else
+ P = new /obj/item/weapon/tank/plasma(loc)
+ P.loc = loc
+ usr << "You take [P] out of [src]."
+ plasmatanks--
+ update_icon()
+ add_fingerprint(usr)
+ updateUsrDialog()
+ else
+ usr << browse(null, "window=dispenser")
+ return
+ return
\ No newline at end of file
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index f31d7addfc9..ce11f1969d6 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -227,33 +227,38 @@
playsound(src.loc, 'sound/items/Crowbar.ogg', 75, 1)
user << (state ? "You have pried the window into the frame." : "You have pried the window out of the frame.")
else
-
- var/aforce = W.force
- if(reinf) aforce /= 2.0
if(W.damtype == BRUTE || W.damtype == BURN)
- src.health = max(0, src.health - aforce)
- playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
- if (src.health <= 7)
- src.anchored = 0
- update_nearby_icons()
- step(src, get_dir(user, src))
- if (src.health <= 0)
- if (src.dir == SOUTHWEST)
- var/index = null
- index = 0
- while(index < 2)
- new /obj/item/weapon/shard( src.loc )
- if(reinf) new /obj/item/stack/rods( src.loc)
- index++
- else
- new /obj/item/weapon/shard( src.loc )
- if(reinf) new /obj/item/stack/rods( src.loc)
- src.density = 0
- del(src)
- return
+ hit(W.force)
+ if (src.health <= 7)
+ src.anchored = 0
+ update_nearby_icons()
+ step(src, get_dir(user, src))
+ else
+ playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
..()
return
+/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)
+
+ if(reinf) damage /= 2.0
+ src.health = max(0, src.health - damage)
+ if(sound_effect)
+ playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
+ if (src.health <= 0)
+ if (src.dir == SOUTHWEST)
+ var/index = null
+ index = 0
+ while(index < 2)
+ new /obj/item/weapon/shard( src.loc )
+ if(reinf) new /obj/item/stack/rods( src.loc)
+ index++
+ else
+ new /obj/item/weapon/shard( src.loc )
+ if(reinf) new /obj/item/stack/rods( src.loc)
+ src.density = 0
+ del(src)
+ return
+
/obj/structure/window/verb/rotate()
set name = "Rotate Window Counter-Clockwise"
@@ -409,6 +414,11 @@
return
+/obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
+ if(exposed_temperature > T0C + 800)
+ hit(round(exposed_volume / 100), 0)
+ ..()
+
/obj/structure/window/basic
diff --git a/code/game/sound.dm b/code/game/sound.dm
index 76221779c0b..35d80594ac8 100644
--- a/code/game/sound.dm
+++ b/code/game/sound.dm
@@ -78,12 +78,14 @@
client/verb/Toggle_Soundscape() //All new ambience should be added here so it works with this verb until someone better at things comes up with a fix that isn't awful
set category = "Special Verbs"
set name = "Toggle Ambience"
+
usr:client:no_ambi = !usr:client:no_ambi
+
if(usr:client:no_ambi)
- usr << sound(pick('sound/ambience/shipambience.ogg','sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg','sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg','sound/ambience/ambimalf.ogg','sound/ambience/ambispace.ogg','sound/ambience/ambimine.ogg','sound/music/title2.ogg'), repeat = 0, wait = 0, volume = 0, channel = 2)
- else
- usr << sound(pick('sound/ambience/shipambience.ogg','sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg','sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg','sound/ambience/ambimalf.ogg','sound/ambience/ambispace.ogg','sound/ambience/ambimine.ogg','sound/music/title2.ogg'), repeat = 1, wait = 0, volume = 35, channel = 2)
- usr << "Toggled ambience sound."
+ usr << sound(null, repeat = 0, wait = 0, volume = 0, channel = 1)
+ usr << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2)
+
+ usr << "Toggled ambient sound [usr:client:no_ambi?"off":"on"]."
return
diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm
index c3b9e40c66d..fb5fa7fac0b 100644
--- a/code/game/verbs/who.dm
+++ b/code/game/verbs/who.dm
@@ -27,7 +27,7 @@ proc/get_all_admin_clients()
for (var/client/C in client_list)
var/entry = "\t"
- if(usr.client.holder)
+ if(usr.client.holder && usr.client.holder.level >= 0) //Everything above admin-observers get this.
entry += "[C.key]"
if(C.holder && C.holder.fakekey)
entry += " (as [C.holder.fakekey])"
diff --git a/code/game/vote.dm b/code/game/vote.dm
deleted file mode 100644
index f0e80082448..00000000000
--- a/code/game/vote.dm
+++ /dev/null
@@ -1,436 +0,0 @@
-/datum/vote/New()
-
- nextvotetime = world.timeofday // + 10*config.vote_delay
-
-
-/datum/vote/proc/canvote()//marker1
- var/excess = world.timeofday - vote.nextvotetime
-
- if(excess < -10000) // handle clock-wrapping problems - very long delay (>20 hrs) if wrapped
- vote.nextvotetime = world.timeofday
- return 1
- return (excess >= 0)
-
-/datum/vote/proc/nextwait()
- return timetext( round( (nextvotetime - world.timeofday)/10) )
-
-/datum/vote/proc/endwait()
- return timetext( round( (votetime - world.timeofday)/10) )
-
-/datum/vote/proc/timetext(var/interval)
- var/minutes = round(interval / 60)
- var/seconds = round(interval % 60)
-
- var/tmin = "[minutes>0?num2text(minutes)+"min":null]"
- var/tsec = "[seconds>0?num2text(seconds)+"sec":null]"
-
- if(tmin && tsec) // hack to skip inter-space if either field is blank
- return "[tmin] [tsec]"
- else
- if(!tmin && !tsec) // return '0sec' if 0 time left
- return "0sec"
- return "[tmin][tsec]"
-
-/datum/vote/proc/getvotes()
- var/list/L = list()
- for(var/mob/M in player_list)
- if(M.client && M.client.inactivity < 1200) // clients inactive for 2 minutes don't count
- L[M.client.vote] += 1
-
- return L
-
-
-/datum/vote/proc/endvote()
-
- if(!voting) // means that voting was aborted by an admin
- return
-
- world << "\red ***Voting has closed."
-
- log_vote("Voting closed, result was [winner]")
- voting = 0
- nextvotetime = world.timeofday + 10*config.vote_delay
-
- for(var/mob/M in player_list) // clear vote window from all clients
- if(M.client)
- M << browse(null, "window=vote")
- M.client.showvote = 0
-
- calcwin()
-
- if(mode)
- if(!ticker)
- if(!going)
- world << "The game will start soon."
- going = 1
- var/wintext = capitalize(winner)
- if(winner=="default")
- world << "Result is \red No change."
- return
-
- // otherwise change mode
-
-
- world << "Result is change to \red [wintext]"
- world.save_mode(winner)
-
- if(ticker && ticker.mode)
- world <<"\red World will reboot in 10 seconds"
-
- feedback_set_details("end_error","mode vote - [winner]")
-
- if(blackbox)
- blackbox.save_all_data_to_sql()
-
- sleep(100)
- log_game("Rebooting due to mode vote")
- world.Reboot()
- else
- master_mode = winner
-
- else
-
- if(winner=="default")
- world << "Result is \red No restart."
- return
-
- world << "Result is \red Restart round."
-
- world <<"\red World will reboot in 5 seconds"
-
- feedback_set_details("end_error","restart vote")
-
- if(blackbox)
- blackbox.save_all_data_to_sql()
-
- sleep(50)
- log_game("Rebooting due to restart vote")
- world.Reboot()
- return
-
-
-/datum/vote/proc/calcwin()
-
- var/list/votes = getvotes()
-
- if(vote.mode)
- var/best = -1
-
- for(var/v in votes)
- if(v=="none")
- continue
- if(best < votes[v])
- best = votes[v]
-
-
- var/list/winners = list()
-
- for(var/v in votes)
- if(votes[v] == best)
- winners += v
-
- var/ret = ""
-
-
- for(var/w in winners)
- if(lentext(ret) > 0)
- ret += "/"
- if(w=="default")
- winners = list("default")
- ret = "No change"
- break
- else
- ret += capitalize(w)
-
-
-
- if(winners.len != 1)
- ret = "Tie: " + ret
-
-
- if(winners.len == 0)
- vote.winner = "default"
- ret = "No change"
- else
- vote.winner = pick(winners)
-
- return ret
- else
-
- if(votes["default"] < votes["restart"])
-
- vote.winner = "restart"
- return "Restart"
- else
- vote.winner = "default"
- return "No restart"
-
-
-/mob/verb/vote()
- set category = "OOC"
- set name = "Vote"
- usr.client.showvote = 1
-
-
- var/text = "Voting"
-
- var/footer = "
Close"
-
-
- if(config.vote_no_dead && usr.stat == 2)
- text += "Voting while dead has been disallowed."
- text += footer
- usr << browse(text, "window=vote")
- usr.client.showvote = 0
- usr.client.vote = "none"
- return
-
- if(vote.voting)
- // vote in progress, do the current
-
- text += "Vote to [vote.mode?"change mode":"restart round"] in progress.
"
- text += "[vote.endwait()] until voting is closed.
"
-
- var/list/votes = vote.getvotes()
-
- if(vote.mode) // true if changing mode
-
- text += "Current game mode is: [master_mode].
Select the mode to change to:"
-
- for(var/md in config.votable_modes)
- var/disp = capitalize(md)
- if(md=="default")
- disp = "No change"
-
- //world << "[md]|[disp]|[src.client.vote]|[votes[md]]"
-
- if(src.client.vote == md)
- text += "- [disp]"
- else
- text += "
- [disp]"
-
- text += "[votes[md]>0?" - [votes[md]] vote\s":null]
"
-
- text += "
"
-
- text +="Current winner: [vote.calcwin()]
"
-
- text += footer
-
- usr << browse(text, "window=vote")
-
- else // voting to restart
- text += "Vote to call crew transfer shuttle round in progress.
"
- text += "[vote.endwait()] until voting is closed.
"
-
- if(vote.instant_restart)
- text += "Restart the world? ONLY PRESS THIS IF THERE'S A ROUND-BREAKING GLITCH.
"
- else
- text += "Call the Crew Transfer Shuttle?
"
-
- text += "*** Please make sure to only vote 'no' if you yourself are currently enjoying the round. If you find the round to have gone stale, you should always vote 'yes', regardless of how others are feeling about the round.
"
-
- var/list/VL = list("default","restart")
-
- for(var/md in VL)
- var/disp = (md=="default"? "No":"Yes")
-
- if(src.client.vote == md)
- text += "- [disp]"
- else
- text += "
- [disp]"
-
- text += "[votes[md]>0?" - [votes[md]] vote\s":null]
"
-
- text += "
"
-
- text +="Current winner: [vote.calcwin()]
"
-
- text += footer
-
- usr << browse(text, "window=vote")
-
-
- else //no vote in progress
-
- if(shuttlecoming == 1)
- usr << "\blue Cannot start Vote - Shuttle has been called."
- return
-
- if(!config.allow_vote_restart && !config.allow_vote_mode)
- text += "
Player voting is disabled.