Merge pull request #2039 from SinTwo/smallfeatures

Water-Coolers, Floor Lamps, and Benches
This commit is contained in:
EmperorJon
2016-07-08 09:54:11 +01:00
committed by GitHub
18 changed files with 298 additions and 35 deletions

View File

@@ -36,6 +36,11 @@
path = /obj/item/weapon/reagent_containers/glass/bucket path = /obj/item/weapon/reagent_containers/glass/bucket
category = "General" category = "General"
/datum/autolathe/recipe/cooler_bottle
name = "water-cooler bottle"
path = /obj/item/weapon/reagent_containers/glass/cooler_bottle
category = "General"
/datum/autolathe/recipe/drinkingglass /datum/autolathe/recipe/drinkingglass
name = "drinking glass" name = "drinking glass"
path = /obj/item/weapon/reagent_containers/food/drinks/glass2/square path = /obj/item/weapon/reagent_containers/food/drinks/glass2/square

View File

@@ -42,6 +42,7 @@
new/datum/stack_recipe("green comfy chair", /obj/structure/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), \ new/datum/stack_recipe("green comfy chair", /obj/structure/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), \
)) ))
recipes += new/datum/stack_recipe("table frame", /obj/structure/table, 1, time = 10, one_per_turf = 1, on_floor = 1) recipes += new/datum/stack_recipe("table frame", /obj/structure/table, 1, time = 10, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("bench frame", /obj/structure/table/bench, 1, time = 10, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("rack", /obj/structure/table/rack, 1, time = 5, one_per_turf = 1, on_floor = 1) recipes += new/datum/stack_recipe("rack", /obj/structure/table/rack, 1, time = 5, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1) recipes += new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1) recipes += new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1)
@@ -78,6 +79,7 @@
recipes += new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade) recipes += new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade)
recipes += new/datum/stack_recipe("light fixture frame", /obj/item/frame/light, 2) recipes += new/datum/stack_recipe("light fixture frame", /obj/item/frame/light, 2)
recipes += new/datum/stack_recipe("small light fixture frame", /obj/item/frame/light/small, 1) recipes += new/datum/stack_recipe("small light fixture frame", /obj/item/frame/light/small, 1)
recipes += new/datum/stack_recipe("floor lamp fixture frame", /obj/machinery/light_construct/flamp, 2)
recipes += new/datum/stack_recipe("apc frame", /obj/item/frame/apc, 2) recipes += new/datum/stack_recipe("apc frame", /obj/item/frame/apc, 2)
recipes += new/datum/stack_recipe_list("filing cabinets", list( \ recipes += new/datum/stack_recipe_list("filing cabinets", list( \
new/datum/stack_recipe("filing cabinet", /obj/structure/filingcabinet, 4, time = 20, one_per_turf = 1, on_floor = 1), \ new/datum/stack_recipe("filing cabinet", /obj/structure/filingcabinet, 4, time = 20, one_per_turf = 1, on_floor = 1), \
@@ -110,7 +112,8 @@
recipes += new/datum/stack_recipe("shower curtain", /obj/structure/curtain, 4, time = 15, one_per_turf = 1, on_floor = 1) recipes += new/datum/stack_recipe("shower curtain", /obj/structure/curtain, 4, time = 15, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 4, time = 25, one_per_turf = 1, on_floor = 1) recipes += new/datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 4, time = 25, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("airtight plastic flaps", /obj/structure/plasticflaps/mining, 5, time = 25, one_per_turf = 1, on_floor = 1) recipes += new/datum/stack_recipe("airtight plastic flaps", /obj/structure/plasticflaps/mining, 5, time = 25, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("water-cooler", /obj/structure/reagent_dispensers/water_cooler, 4, time = 1, one_per_turf = 1, on_floor = 1) recipes += new/datum/stack_recipe("water-cooler", /obj/structure/reagent_dispensers/water_cooler, 4, time = 10, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("lampshade", /obj/item/weapon/lampshade, 1, time = 1)
/material/wood/generate_recipes() /material/wood/generate_recipes()
..() ..()

View File

@@ -26,6 +26,8 @@
..() ..()
if (fixture_type == "bulb") if (fixture_type == "bulb")
icon_state = "bulb-construct-stage1" icon_state = "bulb-construct-stage1"
if (fixture_type == "flamp")
icon_state = "flamp-construct-stage1"
/obj/machinery/light_construct/examine(mob/user) /obj/machinery/light_construct/examine(mob/user)
if(!..(user, 2)) if(!..(user, 2))
@@ -71,6 +73,8 @@
src.icon_state = "tube-construct-stage1" src.icon_state = "tube-construct-stage1"
if("bulb") if("bulb")
src.icon_state = "bulb-construct-stage1" src.icon_state = "bulb-construct-stage1"
if("flamp")
src.icon_state = "flamp-construct-stage1"
new /obj/item/stack/cable_coil(get_turf(src.loc), 1, "red") new /obj/item/stack/cable_coil(get_turf(src.loc), 1, "red")
user.visible_message("[user.name] removes the wiring from [src].", \ user.visible_message("[user.name] removes the wiring from [src].", \
"You remove the wiring from [src].", "You hear a noise.") "You remove the wiring from [src].", "You hear a noise.")
@@ -86,6 +90,8 @@
src.icon_state = "tube-construct-stage2" src.icon_state = "tube-construct-stage2"
if("bulb") if("bulb")
src.icon_state = "bulb-construct-stage2" src.icon_state = "bulb-construct-stage2"
if("flamp")
src.icon_state = "flamp-construct-stage2"
src.stage = 2 src.stage = 2
user.visible_message("[user.name] adds wires to [src].", \ user.visible_message("[user.name] adds wires to [src].", \
"You add wires to [src].") "You add wires to [src].")
@@ -98,6 +104,8 @@
src.icon_state = "tube-empty" src.icon_state = "tube-empty"
if("bulb") if("bulb")
src.icon_state = "bulb-empty" src.icon_state = "bulb-empty"
if("flamp")
src.icon_state = "flamp-empty"
src.stage = 3 src.stage = 3
user.visible_message("[user.name] closes [src]'s casing.", \ user.visible_message("[user.name] closes [src]'s casing.", \
"You close [src]'s casing.", "You hear a noise.") "You close [src]'s casing.", "You hear a noise.")
@@ -109,6 +117,8 @@
newlight = new /obj/machinery/light/built(src.loc) newlight = new /obj/machinery/light/built(src.loc)
if ("bulb") if ("bulb")
newlight = new /obj/machinery/light/small/built(src.loc) newlight = new /obj/machinery/light/small/built(src.loc)
if ("flamp")
newlight = new /obj/machinery/light/flamp/built(src.loc)
newlight.dir = src.dir newlight.dir = src.dir
src.transfer_fingerprints_to(newlight) src.transfer_fingerprints_to(newlight)
@@ -127,6 +137,17 @@
fixture_type = "bulb" fixture_type = "bulb"
sheets_refunded = 1 sheets_refunded = 1
/obj/machinery/light_construct/flamp
name = "floor light fixture frame"
desc = "A floor light fixture under construction."
icon = 'icons/obj/lighting.dmi'
icon_state = "flamp-construct-stage1"
anchored = 0
layer = OBJ_LAYER
stage = 1
fixture_type = "flamp"
sheets_refunded = 2
// the standard tube light fixture // the standard tube light fixture
/obj/machinery/light /obj/machinery/light
name = "light fixture" name = "light fixture"
@@ -141,7 +162,6 @@
active_power_usage = 20 active_power_usage = 20
power_channel = LIGHT //Lights are calc'd via area so they dont need to be in the machine list power_channel = LIGHT //Lights are calc'd via area so they dont need to be in the machine list
var/on = 0 // 1 if on, 0 if off var/on = 0 // 1 if on, 0 if off
var/on_gs = 0
var/brightness_range = 10 // luminosity when on, also used in power calculation var/brightness_range = 10 // luminosity when on, also used in power calculation
var/brightness_power = 3 var/brightness_power = 3
var/brightness_color = null var/brightness_color = null
@@ -166,6 +186,18 @@
desc = "A small lighting fixture." desc = "A small lighting fixture."
light_type = /obj/item/weapon/light/bulb light_type = /obj/item/weapon/light/bulb
/obj/machinery/light/flamp
icon_state = "flamp1"
base_state = "flamp"
fitting = "bulb"
brightness_range = 5
brightness_power = 2
layer = OBJ_LAYER
brightness_color = "#FFF4E5"
desc = "A floor lamp."
light_type = /obj/item/weapon/light/bulb
var/lamp_shade = 1
/obj/machinery/light/small/emergency /obj/machinery/light/small/emergency
brightness_range = 6 brightness_range = 6
brightness_power = 2 brightness_power = 2
@@ -188,6 +220,12 @@
update(0) update(0)
..() ..()
/obj/machinery/light/flamp/built/New()
status = LIGHT_EMPTY
lamp_shade = 0
update(0)
..()
// create a new lighting fixture // create a new lighting fixture
/obj/machinery/light/New() /obj/machinery/light/New()
..() ..()
@@ -228,9 +266,29 @@
on = 0 on = 0
return return
/obj/machinery/light/flamp/update_icon()
if(lamp_shade)
base_state = "flampshade"
switch(status) // set icon_states
if(LIGHT_OK)
icon_state = "[base_state][on]"
if(LIGHT_EMPTY)
on = 0
icon_state = "[base_state][on]"
if(LIGHT_BURNED)
on = 0
icon_state = "[base_state][on]"
if(LIGHT_BROKEN)
on = 0
icon_state = "[base_state][on]"
return
else
base_state = "flamp"
..()
// update the icon_state and luminosity of the light depending on its state // update the icon_state and luminosity of the light depending on its state
/obj/machinery/light/proc/update(var/trigger = 1) /obj/machinery/light/proc/update(var/trigger = 1)
update_icon() update_icon()
if(on) if(on)
if(light_range != brightness_range || light_power != brightness_power || light_color != brightness_color) if(light_range != brightness_range || light_power != brightness_power || light_color != brightness_color)
@@ -245,7 +303,7 @@
else if( prob( min(60, switchcount*switchcount*0.01) ) ) else if( prob( min(60, switchcount*switchcount*0.01) ) )
if(status == LIGHT_OK && trigger) if(status == LIGHT_OK && trigger)
status = LIGHT_BURNED status = LIGHT_BURNED
icon_state = "[base_state]-burned" update_icon()
on = 0 on = 0
set_light(0) set_light(0)
else else
@@ -256,8 +314,7 @@
set_light(0) set_light(0)
active_power_usage = light_range * light_power active_power_usage = light_range * light_power
if(on != on_gs)
on_gs = on
/obj/machinery/light/attack_generic(var/mob/user, var/damage) /obj/machinery/light/attack_generic(var/mob/user, var/damage)
if(!damage) if(!damage)
@@ -373,6 +430,11 @@
if("bulb") if("bulb")
newlight = new /obj/machinery/light_construct/small(src.loc) newlight = new /obj/machinery/light_construct/small(src.loc)
newlight.icon_state = "bulb-construct-stage2" newlight.icon_state = "bulb-construct-stage2"
if("flamp")
newlight = new /obj/machinery/light_construct/flamp(src.loc)
newlight.icon_state = "flamp-construct-stage2"
newlight.dir = src.dir newlight.dir = src.dir
newlight.stage = 2 newlight.stage = 2
newlight.fingerprints = src.fingerprints newlight.fingerprints = src.fingerprints
@@ -390,6 +452,30 @@
if (prob(75)) if (prob(75))
electrocute_mob(user, get_area(src), src, rand(0.7,1.0)) electrocute_mob(user, get_area(src), src, rand(0.7,1.0))
/obj/machinery/light/flamp/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/wrench))
anchored = !anchored
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
if(!lamp_shade)
if(istype(W, /obj/item/weapon/lampshade))
lamp_shade = 1
qdel(W)
update_icon()
return
else
if(istype(W, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1)
user.visible_message("[user.name] removes [src]'s lamp shade.", \
"You remove [src]'s lamp shade.", "You hear a noise.")
lamp_shade = 0
new /obj/item/weapon/lampshade(src.loc)
update_icon()
return
..()
// returns whether this light has power // returns whether this light has power
// true if area has power and lightswitch is on // true if area has power and lightswitch is on
@@ -397,6 +483,13 @@
var/area/A = get_area(src) var/area/A = get_area(src)
return A && A.lightswitch && (!A.requires_power || A.power_light) return A && A.lightswitch && (!A.requires_power || A.power_light)
/obj/machinery/light/flamp/has_power()
var/area/A = get_area(src)
if(lamp_shade)
return A && (!A.requires_power || A.power_light)
else
return A && A.lightswitch && (!A.requires_power || A.power_light)
/obj/machinery/light/proc/flicker(var/amount = rand(10, 20)) /obj/machinery/light/proc/flicker(var/amount = rand(10, 20))
if(flickering) return if(flickering) return
flickering = 1 flickering = 1
@@ -417,6 +510,10 @@
src.flicker(1) src.flicker(1)
return return
/obj/machinery/light/flamp/attack_ai(mob/user)
attack_hand()
return
// attack with hand - remove tube/bulb // attack with hand - remove tube/bulb
// if hands aren't protected and the light is on, burn the player // if hands aren't protected and the light is on, burn the player
/obj/machinery/light/attack_hand(mob/user) /obj/machinery/light/attack_hand(mob/user)
@@ -481,6 +578,21 @@
status = LIGHT_EMPTY status = LIGHT_EMPTY
update() update()
/obj/machinery/light/flamp/attack_hand(mob/user)
if(lamp_shade)
if(status == LIGHT_EMPTY)
user << "There is no [fitting] in this light."
return
if(on)
on = 0
update()
else
on = has_power()
update()
else
..()
/obj/machinery/light/attack_tk(mob/user) /obj/machinery/light/attack_tk(mob/user)
if(status == LIGHT_EMPTY) if(status == LIGHT_EMPTY)
@@ -708,3 +820,11 @@
sharp = 1 sharp = 1
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
update() update()
//Lamp Shade
/obj/item/weapon/lampshade
name = "lamp shade"
desc = "A lamp shade for a lamp."
icon = 'icons/obj/lighting.dmi'
icon_state = "lampshade"
w_class = 1

View File

@@ -204,6 +204,7 @@
possible_transfer_amounts = null possible_transfer_amounts = null
volume = 10 volume = 10
center_of_mass = list("x"=16, "y"=12) center_of_mass = list("x"=16, "y"=12)
/obj/item/weapon/reagent_containers/food/drinks/sillycup/New() /obj/item/weapon/reagent_containers/food/drinks/sillycup/New()
..() ..()
@@ -214,6 +215,17 @@
else else
icon_state = "water_cup_e" icon_state = "water_cup_e"
/obj/item/weapon/reagent_containers/food/drinks/sillycup/MouseDrop(obj/over_object as obj)
if(!reagents.total_volume && istype(over_object, /obj/structure/reagent_dispensers/water_cooler))
if(over_object.Adjacent(usr))
var/obj/structure/reagent_dispensers/water_cooler/W = over_object
if(W.cupholder && W.cups < 10)
W.cups++
usr << "<span class='notice'>You put the [src] in the cup dispenser.</span>"
qdel(src)
W.update_icon()
else
return ..()
//////////////////////////drinkingglass and shaker// //////////////////////////drinkingglass and shaker//
//Note by Darem: This code handles the mixing of drinks. New drinks go in three places: In Chemistry-Reagents.dm (for the drink //Note by Darem: This code handles the mixing of drinks. New drinks go in three places: In Chemistry-Reagents.dm (for the drink

View File

@@ -255,7 +255,7 @@
name = "water-cooler bottle" name = "water-cooler bottle"
icon = 'icons/obj/vending.dmi' icon = 'icons/obj/vending.dmi'
icon_state = "water_cooler_bottle" icon_state = "water_cooler_bottle"
matter = list(DEFAULT_WALL_MATERIAL = 200) matter = list("glass" = 2000)
w_class = 3.0 w_class = 3.0
amount_per_transfer_from_this = 20 amount_per_transfer_from_this = 20
possible_transfer_amounts = list(10,20,30,60,120) possible_transfer_amounts = list(10,20,30,60,120)

View File

@@ -26,12 +26,12 @@
examine(mob/user) examine(mob/user)
if(!..(user, 2)) if(!..(user, 2))
return return
user << "\blue It contains:" user << "<span class='notice'>It contains:</span>"
if(reagents && reagents.reagent_list.len) if(reagents && reagents.reagent_list.len)
for(var/datum/reagent/R in reagents.reagent_list) for(var/datum/reagent/R in reagents.reagent_list)
user << "\blue [R.volume] units of [R.name]" user << "<span class='notice'>[R.volume] units of [R.name]</span>"
else else
user << "\blue Nothing." user << "<span class='notice'>Nothing.</span>"
verb/set_APTFT() //set amount_per_transfer_from_this verb/set_APTFT() //set amount_per_transfer_from_this
set name = "Set transfer amount" set name = "Set transfer amount"
@@ -92,7 +92,7 @@
if(!..(user, 2)) if(!..(user, 2))
return return
if (modded) if (modded)
user << "\red Fuel faucet is wrenched open, leaking the fuel!" user << "<span class='warning'>Fuel faucet is wrenched open, leaking the fuel!</span>"
if(rig) if(rig)
user << "<span class='notice'>There is some kind of device rigged to the tank.</span>" user << "<span class='notice'>There is some kind of device rigged to the tank.</span>"
@@ -100,7 +100,7 @@
if (rig) if (rig)
usr.visible_message("[usr] begins to detach [rig] from \the [src].", "You begin to detach [rig] from \the [src]") usr.visible_message("[usr] begins to detach [rig] from \the [src].", "You begin to detach [rig] from \the [src]")
if(do_after(usr, 20)) if(do_after(usr, 20))
usr.visible_message("\blue [usr] detaches [rig] from \the [src].", "\blue You detach [rig] from \the [src]") usr.visible_message("<span class='notice'>[usr] detaches [rig] from \the [src].</span>", "<span class='notice'>You detach [rig] from \the [src]</span>")
rig.loc = get_turf(usr) rig.loc = get_turf(usr)
rig = null rig = null
overlays = new/list() overlays = new/list()
@@ -117,11 +117,11 @@
leak_fuel(amount_per_transfer_from_this) leak_fuel(amount_per_transfer_from_this)
if (istype(W,/obj/item/device/assembly_holder)) if (istype(W,/obj/item/device/assembly_holder))
if (rig) if (rig)
user << "\red There is another device in the way." user << "<span class='warning'>There is another device in the way.</span>"
return ..() return ..()
user.visible_message("[user] begins rigging [W] to \the [src].", "You begin rigging [W] to \the [src]") user.visible_message("[user] begins rigging [W] to \the [src].", "You begin rigging [W] to \the [src]")
if(do_after(user, 20)) if(do_after(user, 20))
user.visible_message("\blue [user] rigs [W] to \the [src].", "\blue You rig [W] to \the [src]") user.visible_message("<span class='notice'>[user] rigs [W] to \the [src].</span>", "<span class='notice'>You rig [W] to \the [src]</span>")
var/obj/item/device/assembly_holder/H = W var/obj/item/device/assembly_holder/H = W
if (istype(H.a_left,/obj/item/device/assembly/igniter) || istype(H.a_right,/obj/item/device/assembly/igniter)) if (istype(H.a_left,/obj/item/device/assembly/igniter) || istype(H.a_right,/obj/item/device/assembly/igniter))
@@ -203,13 +203,24 @@
possible_transfer_amounts = null possible_transfer_amounts = null
anchored = 1 anchored = 1
var/bottle = 0 var/bottle = 0
var/cups = 0
var/cupholder = 0
/obj/structure/reagent_dispensers/water_cooler/full
bottle = 1
cupholder = 1
cups = 10
/obj/structure/reagent_dispensers/water_cooler/New() /obj/structure/reagent_dispensers/water_cooler/New()
if(bottle == 1) if(bottle)
..() ..()
reagents.add_reagent("water",120) reagents.add_reagent("water",120)
else update_icon()
icon_state = "water_cooler_0"
/obj/structure/reagent_dispensers/water_cooler/examine(mob/user)
..()
if(cupholder)
user << "<span class='notice'>There are [cups] cups in the cup dispenser.</span>"
/obj/structure/reagent_dispensers/water_cooler/attackby(obj/item/I as obj, mob/user as mob) /obj/structure/reagent_dispensers/water_cooler/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/wrench)) if(istype(I, /obj/item/weapon/wrench))
@@ -224,7 +235,7 @@
G.reagents.add_reagent(R.id, total_reagent) G.reagents.add_reagent(R.id, total_reagent)
reagents.clear_reagents() reagents.clear_reagents()
bottle = 0 bottle = 0
icon_state = "water_cooler_0" update_icon()
else else
if(anchored) if(anchored)
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.") user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
@@ -237,11 +248,24 @@
return return
if(istype(I, /obj/item/weapon/screwdriver)) if(istype(I, /obj/item/weapon/screwdriver))
if(!bottle) if(cupholder)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'>You take the water-cooler apart.</span>" user << "<span class='notice'>You take the cup dispenser off.</span>"
new /obj/item/stack/material/plastic( src.loc, 4 ) new /obj/item/stack/material/plastic( src.loc )
qdel(src) if(cups)
for(var/i = 0 to cups)
new /obj/item/weapon/reagent_containers/food/drinks/sillycup(src.loc)
cups = 0
cupholder = 0
update_icon()
return
if(!bottle && !cupholder)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'>You start taking the water-cooler apart.</span>"
if(do_after(user, 20))
user << "<span class='notice'>You take the water-cooler apart.</span>"
new /obj/item/stack/material/plastic( src.loc, 4 )
qdel(src)
return return
if(istype(I, /obj/item/weapon/reagent_containers/glass/cooler_bottle)) if(istype(I, /obj/item/weapon/reagent_containers/glass/cooler_bottle))
@@ -252,8 +276,8 @@
user << "<span class='notice'>You start to screw the bottle onto the water-cooler.</span>" user << "<span class='notice'>You start to screw the bottle onto the water-cooler.</span>"
if(do_after(user, 20)) if(do_after(user, 20))
bottle = 1 bottle = 1
icon_state = "water_cooler" update_icon()
user << "<span class='notice'>You screw the bottle onto the water-cooler but accidently spill some!</span>" //you spill some because it for somereason transfers 5 units to the bottle after it gets attached but before it's deleted... user << "<span class='notice'>You screw the bottle onto the water-cooler!</span>"
for(var/datum/reagent/R in G.reagents.reagent_list) for(var/datum/reagent/R in G.reagents.reagent_list)
var/total_reagent = G.reagents.get_reagent_amount(R.id) var/total_reagent = G.reagents.get_reagent_amount(R.id)
reagents.add_reagent(R.id, total_reagent) reagents.add_reagent(R.id, total_reagent)
@@ -263,8 +287,46 @@
else else
user << "<span class='warning'>There is already a bottle there!</span>" user << "<span class='warning'>There is already a bottle there!</span>"
return return
else
return ..() if(istype(I, /obj/item/stack/material/plastic))
if(!cupholder)
if(anchored)
var/obj/item/stack/material/plastic/P = I
src.add_fingerprint(user)
user << "<span class='notice'>You start to attach a cup dispenser onto the water-cooler.</span>"
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
if (P.use(1))
user << "<span class='notice'>You attach a cup dispenser onto the water-cooler.</span>"
cupholder = 1
update_icon()
else
user << "<span class='warning'>You need to wrench down the cooler first.</span>"
else
user << "<span class='warning'>There is already a cup dispenser there!</span>"
return
/obj/structure/reagent_dispensers/water_cooler/attack_hand(mob/user)
if(cups)
new /obj/item/weapon/reagent_containers/food/drinks/sillycup(src.loc)
cups--
update_icon()
return
/obj/structure/reagent_dispensers/water_cooler/update_icon()
icon_state = "water_cooler"
overlays.Cut()
var/image/I
if(bottle)
I = image(icon, "water_cooler_bottle")
overlays += I
if(cupholder)
I = image(icon, "water_cooler_cupholder")
overlays += I
if(cups)
I = image(icon, "water_cooler_cups")
overlays += I
return
/obj/structure/reagent_dispensers/beerkeg /obj/structure/reagent_dispensers/beerkeg
name = "beer keg" name = "beer keg"

View File

@@ -0,0 +1,17 @@
/obj/structure/table/bench
name = "bench frame"
icon = 'icons/obj/bench.dmi'
icon_state = "frame"
desc = "It's a bench, for putting things on. Or standing on, if you really want to."
can_reinforce = 0
flipped = -1
density = 0
/obj/structure/table/bench/update_desc()
if(material)
name = "[material.display_name] bench"
else
name = "bench frame"
/obj/structure/table/bench/CanPass(atom/movable/mover)
return 1

View File

@@ -10,6 +10,8 @@
return 1 return 1
if(istype(mover) && mover.checkpass(PASSTABLE)) if(istype(mover) && mover.checkpass(PASSTABLE))
return 1 return 1
if(locate(/obj/structure/table/bench) in get_turf(mover))
return 0
if(locate(/obj/structure/table) in get_turf(mover)) if(locate(/obj/structure/table) in get_turf(mover))
return 1 return 1
return 0 return 0
@@ -136,7 +138,8 @@
user << "<span class='warning'>There's nothing to put \the [W] on! Try adding plating to \the [src] first.</span>" user << "<span class='warning'>There's nothing to put \the [W] on! Try adding plating to \the [src] first.</span>"
return return
user.drop_item(src.loc) if(item_place)
user.drop_item(src.loc)
return return
/obj/structure/table/attack_tk() // no telehulk sorry /obj/structure/table/attack_tk() // no telehulk sorry

View File

@@ -26,6 +26,8 @@
var/list/connections = list("nw0", "ne0", "sw0", "se0") var/list/connections = list("nw0", "ne0", "sw0", "se0")
var/item_place = 1 //allows items to be placed on the table, but not on benches.
/obj/structure/table/proc/update_material() /obj/structure/table/proc/update_material()
var/old_maxhealth = maxhealth var/old_maxhealth = maxhealth
if(!material) if(!material)
@@ -217,7 +219,7 @@
// Returns the material to set the table to. // Returns the material to set the table to.
/obj/structure/table/proc/common_material_remove(mob/user, material/M, delay, what, type_holding, sound) /obj/structure/table/proc/common_material_remove(mob/user, material/M, delay, what, type_holding, sound)
if(!M.stack_type) if(!M.stack_type)
user << "<span class='warning'>You are unable to remove the [what] from this table!</span>" user << "<span class='warning'>You are unable to remove the [what] from this [src]!</span>"
return M return M
if(manipulating) return M if(manipulating) return M

View File

@@ -0,0 +1,38 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
#################################
# Your name.
author: Sin4
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Added benches."
- rscadd: "Added floor lamps."
- rscadd: "Added water-cooler cup dispenser."

BIN
icons/obj/bench.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

@@ -1646,9 +1646,9 @@
"aFH" = (/obj/item/weapon/stool/padded,/obj/machinery/ai_status_display{pixel_y = 32},/turf/simulated/floor/tiled/freezer,/area/crew_quarters/pool) "aFH" = (/obj/item/weapon/stool/padded,/obj/machinery/ai_status_display{pixel_y = 32},/turf/simulated/floor/tiled/freezer,/area/crew_quarters/pool)
"aFI" = (/obj/structure/table/glass,/obj/item/inflatable{pixel_x = 6; pixel_y = 6},/obj/item/inflatable{pixel_x = 2; pixel_y = 2},/obj/item/inflatable{pixel_x = -2; pixel_y = -3},/turf/simulated/floor/tiled/freezer,/area/crew_quarters/pool) "aFI" = (/obj/structure/table/glass,/obj/item/inflatable{pixel_x = 6; pixel_y = 6},/obj/item/inflatable{pixel_x = 2; pixel_y = 2},/obj/item/inflatable{pixel_x = -2; pixel_y = -3},/turf/simulated/floor/tiled/freezer,/area/crew_quarters/pool)
"aFJ" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor,/area/maintenance/pool) "aFJ" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor,/area/maintenance/pool)
"aFK" = (/obj/structure/reagent_dispensers/water_cooler{bottle = 1},/turf/simulated/floor/carpet,/area/crew_quarters/recreation_area) "aFK" = (/obj/structure/reagent_dispensers/water_cooler/full,/turf/simulated/floor/carpet,/area/crew_quarters/recreation_area)
"aFL" = (/obj/structure/reagent_dispensers/water_cooler{bottle = 1},/obj/effect/floor_decal/corner/paleblue{dir = 2},/turf/simulated/floor/tiled,/area/medical/surgeryobs) "aFL" = (/obj/structure/reagent_dispensers/water_cooler/full,/obj/effect/floor_decal/corner/paleblue{dir = 2},/turf/simulated/floor/tiled,/area/medical/surgeryobs)
"aFM" = (/obj/structure/reagent_dispensers/water_cooler{bottle = 1},/obj/effect/floor_decal/corner/lime/full{dir = 1},/turf/simulated/floor/tiled/white,/area/medical/virology) "aFM" = (/obj/structure/reagent_dispensers/water_cooler/full,/obj/effect/floor_decal/corner/lime/full{dir = 1},/turf/simulated/floor/tiled/white,/area/medical/virology)
"aFN" = (/obj/effect/floor_decal/industrial/warning{dir = 9},/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/tiled,/area/security/armoury) "aFN" = (/obj/effect/floor_decal/industrial/warning{dir = 9},/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/tiled,/area/security/armoury)
"aFO" = (/obj/machinery/door/blast/regular{id = "Armoury"; name = "Emergency Access"},/turf/simulated/floor/tiled,/area/security/armoury) "aFO" = (/obj/machinery/door/blast/regular{id = "Armoury"; name = "Emergency Access"},/turf/simulated/floor/tiled,/area/security/armoury)
"aFP" = (/obj/effect/floor_decal/industrial/warning{dir = 5},/turf/simulated/floor/tiled,/area/security/brig) "aFP" = (/obj/effect/floor_decal/industrial/warning{dir = 5},/turf/simulated/floor/tiled,/area/security/brig)
@@ -1700,7 +1700,7 @@
"aGJ" = (/obj/machinery/door/firedoor/glass,/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/tiled,/area/crew_quarters/recreation_area_hallway) "aGJ" = (/obj/machinery/door/firedoor/glass,/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/tiled,/area/crew_quarters/recreation_area_hallway)
"aGK" = (/obj/machinery/door/firedoor/glass,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/tiled,/area/crew_quarters/recreation_area_hallway) "aGK" = (/obj/machinery/door/firedoor/glass,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/tiled,/area/crew_quarters/recreation_area_hallway)
"aGL" = (/obj/machinery/door/firedoor/glass,/obj/structure/disposalpipe/segment,/turf/simulated/floor/tiled,/area/crew_quarters/recreation_area_hallway) "aGL" = (/obj/machinery/door/firedoor/glass,/obj/structure/disposalpipe/segment,/turf/simulated/floor/tiled,/area/crew_quarters/recreation_area_hallway)
"aGM" = (/obj/structure/reagent_dispensers/water_cooler{bottle = 1},/obj/effect/floor_decal/corner/paleblue{dir = 10},/obj/machinery/firealarm{dir = 1; pixel_y = -24},/obj/item/device/radio/intercom{dir = 4; name = "Station Intercom (General)"; pixel_x = 21},/turf/simulated/floor/tiled/white,/area/medical/reception) "aGM" = (/obj/structure/reagent_dispensers/water_cooler/full,/obj/effect/floor_decal/corner/paleblue{dir = 10},/obj/machinery/firealarm{dir = 1; pixel_y = -24},/obj/item/device/radio/intercom{dir = 4; name = "Station Intercom (General)"; pixel_x = 21},/turf/simulated/floor/tiled/white,/area/medical/reception)
"aGN" = (/turf/simulated/floor/carpet,/area/crew_quarters/recreation_area) "aGN" = (/turf/simulated/floor/carpet,/area/crew_quarters/recreation_area)
"aGO" = (/obj/item/weapon/stool/padded,/turf/simulated/floor/carpet,/area/crew_quarters/recreation_area) "aGO" = (/obj/item/weapon/stool/padded,/turf/simulated/floor/carpet,/area/crew_quarters/recreation_area)
"aGP" = (/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/carpet,/area/crew_quarters/recreation_area) "aGP" = (/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/carpet,/area/crew_quarters/recreation_area)
@@ -1708,11 +1708,11 @@
"aGR" = (/turf/simulated/floor/tiled/freezer,/area/crew_quarters/pool) "aGR" = (/turf/simulated/floor/tiled/freezer,/area/crew_quarters/pool)
"aGS" = (/obj/machinery/atmospherics/unary/vent_pump/on,/turf/simulated/floor/tiled/freezer,/area/crew_quarters/pool) "aGS" = (/obj/machinery/atmospherics/unary/vent_pump/on,/turf/simulated/floor/tiled/freezer,/area/crew_quarters/pool)
"aGT" = (/obj/structure/extinguisher_cabinet{pixel_x = 25; pixel_y = 0},/turf/simulated/floor/tiled/freezer,/area/crew_quarters/pool) "aGT" = (/obj/structure/extinguisher_cabinet{pixel_x = 25; pixel_y = 0},/turf/simulated/floor/tiled/freezer,/area/crew_quarters/pool)
"aGU" = (/obj/effect/floor_decal/corner/blue,/obj/structure/reagent_dispensers/water_cooler{bottle = 1},/turf/simulated/floor/tiled,/area/bridge_hallway) "aGU" = (/obj/effect/floor_decal/corner/blue,/obj/structure/reagent_dispensers/water_cooler/full,/turf/simulated/floor/tiled,/area/bridge_hallway)
"aGV" = (/obj/machinery/atmospherics/unary/vent_pump/on{dir = 4},/turf/simulated/floor/tiled/dark,/area/security/armoury) "aGV" = (/obj/machinery/atmospherics/unary/vent_pump/on{dir = 4},/turf/simulated/floor/tiled/dark,/area/security/armoury)
"aGW" = (/obj/machinery/door/airlock/atmos{name = "Riot Control Maintenance"; req_access = newlist(); req_one_access = list(2,12,24)},/obj/machinery/door/firedoor/border_only,/turf/simulated/floor,/area/security/riot_control) "aGW" = (/obj/machinery/door/airlock/atmos{name = "Riot Control Maintenance"; req_access = newlist(); req_one_access = list(2,12,24)},/obj/machinery/door/firedoor/border_only,/turf/simulated/floor,/area/security/riot_control)
"aGX" = (/obj/structure/table/standard,/obj/item/weapon/clipboard,/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/item/weapon/stamp/qm,/turf/simulated/floor/tiled,/area/quartermaster/qm) "aGX" = (/obj/structure/table/standard,/obj/item/weapon/clipboard,/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/item/weapon/stamp/qm,/turf/simulated/floor/tiled,/area/quartermaster/qm)
"aGY" = (/obj/structure/reagent_dispensers/water_cooler{bottle = 1},/obj/effect/floor_decal/corner/white{dir = 4},/obj/effect/floor_decal/corner/blue{dir = 1},/turf/simulated/floor/tiled,/area/crew_quarters/visitor_dinning) "aGY" = (/obj/structure/reagent_dispensers/water_cooler/full,/obj/effect/floor_decal/corner/white{dir = 4},/obj/effect/floor_decal/corner/blue{dir = 1},/turf/simulated/floor/tiled,/area/crew_quarters/visitor_dinning)
"aGZ" = (/obj/effect/floor_decal/industrial/warning{dir = 8},/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/tiled,/area/security/armoury) "aGZ" = (/obj/effect/floor_decal/industrial/warning{dir = 8},/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/tiled,/area/security/armoury)
"aHa" = (/obj/machinery/door/blast/regular{id = "Armoury"; name = "Emergency Access"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/tiled,/area/security/armoury) "aHa" = (/obj/machinery/door/blast/regular{id = "Armoury"; name = "Emergency Access"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/tiled,/area/security/armoury)
"aHb" = (/obj/effect/floor_decal/industrial/warning{icon_state = "warning"; dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/tiled,/area/security/brig) "aHb" = (/obj/effect/floor_decal/industrial/warning{icon_state = "warning"; dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/tiled,/area/security/brig)

View File

@@ -601,7 +601,7 @@
"lD" = (/obj/structure/sign/greencross,/turf/simulated/wall/r_wall,/area/outpost/research/medical) "lD" = (/obj/structure/sign/greencross,/turf/simulated/wall/r_wall,/area/outpost/research/medical)
"lE" = (/obj/machinery/portable_atmospherics/canister/air/airlock,/obj/effect/floor_decal/corner/purple{dir = 9},/turf/simulated/floor/tiled/white,/area/outpost/research/dock) "lE" = (/obj/machinery/portable_atmospherics/canister/air/airlock,/obj/effect/floor_decal/corner/purple{dir = 9},/turf/simulated/floor/tiled/white,/area/outpost/research/dock)
"lF" = (/obj/effect/floor_decal/corner/purple,/turf/simulated/floor/tiled/white,/area/outpost/research/dock) "lF" = (/obj/effect/floor_decal/corner/purple,/turf/simulated/floor/tiled/white,/area/outpost/research/dock)
"lG" = (/obj/structure/reagent_dispensers/water_cooler{bottle = 1},/turf/simulated/floor/wood,/area/outpost/research/dorms) "lG" = (/obj/structure/reagent_dispensers/water_cooler/full,/turf/simulated/floor/wood,/area/outpost/research/dorms)
"lH" = (/obj/machinery/atmospherics/unary/vent_pump/on{dir = 1},/turf/simulated/floor/wood,/area/outpost/research/dorms) "lH" = (/obj/machinery/atmospherics/unary/vent_pump/on{dir = 1},/turf/simulated/floor/wood,/area/outpost/research/dorms)
"lI" = (/obj/structure/bed/chair{dir = 4},/turf/simulated/floor/wood,/area/outpost/research/dorms) "lI" = (/obj/structure/bed/chair{dir = 4},/turf/simulated/floor/wood,/area/outpost/research/dorms)
"lJ" = (/obj/structure/table/glass,/obj/item/weapon/tape_roll,/turf/simulated/floor/wood,/area/outpost/research/dorms) "lJ" = (/obj/structure/table/glass,/obj/item/weapon/tape_roll,/turf/simulated/floor/wood,/area/outpost/research/dorms)

View File

@@ -1929,6 +1929,7 @@
#include "code\modules\surgery\slimes.dm" #include "code\modules\surgery\slimes.dm"
#include "code\modules\surgery\surgery.dm" #include "code\modules\surgery\surgery.dm"
#include "code\modules\surgery\~defines.dm" #include "code\modules\surgery\~defines.dm"
#include "code\modules\tables\bench.dm"
#include "code\modules\tables\flipping.dm" #include "code\modules\tables\flipping.dm"
#include "code\modules\tables\interactions.dm" #include "code\modules\tables\interactions.dm"
#include "code\modules\tables\presets.dm" #include "code\modules\tables\presets.dm"