Merge pull request #878 from tigercat2000/Curtains

4 Baystation12 PR's
This commit is contained in:
ZomgPonies
2015-04-26 10:08:06 -04:00
8 changed files with 123 additions and 15 deletions
+42 -1
View File
@@ -9,6 +9,9 @@
var/tape_type = /obj/item/tape
var/icon_base
var/list/image/hazard_overlays
var/list/tape_roll_applications = list()
/obj/item/tape
name = "tape"
icon = 'icons/policetape.dmi'
@@ -16,6 +19,24 @@
density = 1
var/icon_base
/obj/item/tape/New()
..()
if(!hazard_overlays)
hazard_overlays = list()
hazard_overlays["[NORTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "N")
hazard_overlays["[EAST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "E")
hazard_overlays["[SOUTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "S")
hazard_overlays["[WEST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "W")
/obj/item/taperoll/New() //just using tape is not enough to guarantee the overlays are genned
..()
if(!hazard_overlays)
hazard_overlays = list()
hazard_overlays["[NORTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "N")
hazard_overlays["[EAST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "E")
hazard_overlays["[SOUTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "S")
hazard_overlays["[WEST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "W")
/obj/item/taperoll/police
name = "police tape"
desc = "A roll of police tape used to block off crime scenes from the public."
@@ -97,7 +118,10 @@
usr << "\blue You finish placing the [src]." //Git Test
/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob, proximity)
if (proximity && istype(A, /obj/machinery/door/airlock))
if (!proximity)
return
if(istype(A, /obj/machinery/door/airlock))
var/turf/T = get_turf(A)
var/obj/item/tape/P = new tape_type(T.x,T.y,T.z)
P.loc = locate(T.x,T.y,T.z)
@@ -105,6 +129,23 @@
P.layer = 3.2
user << "\blue You finish placing the [src]."
if (istype(A, /turf/simulated/floor) ||istype(A, /turf/unsimulated/floor))
var/turf/F = A
var/direction = user.loc == F ? user.dir : turn(user.dir, 180)
var/icon/hazard_overlay = hazard_overlays["[direction]"]
if(tape_roll_applications[F] == null)
tape_roll_applications[F] = 0
if(tape_roll_applications[F] & direction) // hazard_overlay in F.overlays wouldn't work.
user.visible_message("[user] uses the adhesive of \the [src] to remove area markings from \the [F].", "You use the adhesive of \the [src] to remove area markings from \the [F].")
F.overlays -= hazard_overlay
tape_roll_applications[F] &= ~direction
else
user.visible_message("[user] applied \the [src] on \the [F] to create area markings.", "You apply \the [src] on \the [F] to create area markings.")
F.overlays |= hazard_overlay
tape_roll_applications[F] |= direction
return
/obj/item/tape/Bumped(M as mob)
if(src.allowed(M))
var/turf/T = get_turf(src)
@@ -25,6 +25,10 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("brown comfy chair", /obj/structure/stool/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("lime comfy chair", /obj/structure/stool/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("teal comfy chair", /obj/structure/stool/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("red comfy chair", /obj/structure/stool/bed/chair/comfy/red, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("blue comfy chair", /obj/structure/stool/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("purple comfy chair", /obj/structure/stool/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("green comfy chair", /obj/structure/stool/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), \
), 2), \
null, \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
+16
View File
@@ -2,6 +2,7 @@
icon = 'icons/obj/barsigns.dmi'
icon_state = "empty"
anchored = 1
var/nopick = 0
New()
ChangeSign(pick("magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thecavern", "cindikate", "theorchard", "lv426", "zocalo", "4theemprah", "ishimura", "tardis", "quarks", "tenforward", "thepranicngpony", "vault13", "solaris", "thehive", "cantina", "theouterspess", "milliways42", "thetimeofeve", "spaceasshole", "dwarffortress", "thebark", "thedrunkcarp", "theharmbaton", "thenest", "officerbeersky", "thesingulo"))
return
@@ -10,3 +11,18 @@
//on = 0
//brightness_on = 4 //uncomment these when the lighting fixes get in
return
/obj/structure/sign/double/barsign/attackby(obj/item/I, mob/user)
if(nopick)
return
if(istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/card = I
if(access_bar in card.GetAccess())
var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in list("Off", "Magma Sea", "Limbo", "Rusty Axe", "Armok Bar", "Broken Drum", "Mead bay", "The Cavern", "Cindi Kate", "The Orchard", "LV 426", "Zocalo", "4 The Emprah", "Ishimura", "Tardis", "Quarks", "Ten Forward", "The Pranicng Pony", "Vault 13", "Solaris", "The Hive", "Cantina", "The Outer Spess", "Milliways 42", "The Time Of Eve", "Space Asshole", "Dwarf Fortress", "The Bark", "The Drunk Carp", "The Harm Baton", "The Nest", "Officer Beersky", "The Singulo", "On")
if(sign_type == null)
return
else
sign_type = replacetext(lowertext(sign_type), " ", "") // lowercase, strip spaces - along with choices for user options, avoids huge if-else-else
src.ChangeSign(sign_type)
user << "You change the barsign."
+16 -4
View File
@@ -1,14 +1,17 @@
#define SHOWER_OPEN_LAYER OBJ_LAYER + 0.4
#define SHOWER_CLOSED_LAYER MOB_LAYER + 0.1
/obj/structure/curtain
icon = 'icons/obj/curtain.dmi'
name = "curtain"
icon_state = "closed"
layer = MOB_LAYER + 0.1
layer = SHOWER_CLOSED_LAYER
opacity = 1
density = 0
/obj/structure/curtain/open
icon_state = "open"
layer = OBJ_LAYER
layer = SHOWER_OPEN_LAYER
opacity = 0
/obj/structure/curtain/bullet_act(obj/item/projectile/P, def_zone)
@@ -27,10 +30,10 @@
opacity = !opacity
if(opacity)
icon_state = "closed"
layer = MOB_LAYER + 0.1
layer = SHOWER_CLOSED_LAYER
else
icon_state = "open"
layer = OBJ_LAYER
layer = SHOWER_OPEN_LAYER
/obj/structure/curtain/black
name = "black curtain"
@@ -45,3 +48,12 @@
name = "shower curtain"
color = "#ACD1E9"
alpha = 200
/obj/structure/curtain/open/shower/engineering
color = "#FFA500"
/obj/structure/curtain/open/shower/security
color = "#AA0000"
#undef SHOWER_OPEN_LAYER
#undef SHOWER_CLOSED_LAYER
@@ -54,13 +54,20 @@
buckle_mob(M, user)
return
/obj/structure/stool/bed/proc/afterbuckle(mob/M as mob) //Called after somebody buckled / unbuckled
return
/obj/structure/stool/bed/proc/unbuckle()
if(buckled_mob)
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.update_canmove()
var/M = buckled_mob
buckled_mob = null
afterbuckle(M)
return
/obj/structure/stool/bed/proc/manual_unbuckle(mob/user as mob)
@@ -110,6 +117,7 @@
M.update_canmove()
src.buckled_mob = M
src.add_fingerprint(user)
afterbuckle(M)
return
/*
@@ -97,26 +97,53 @@
/obj/structure/stool/bed/chair/comfy
name = "comfy chair"
desc = "It looks comfy."
icon_state = "comfychair"
color = rgb(255,255,255)
var/image/armrest = null
/obj/structure/stool/bed/chair/comfy/New()
armrest = image("icons/obj/objects.dmi", "comfychair_armrest")
armrest.layer = MOB_LAYER + 0.1
return ..()
/obj/structure/stool/bed/chair/comfy/afterbuckle()
if(buckled_mob)
overlays += armrest
else
overlays -= armrest
/obj/structure/stool/bed/chair/comfy/brown
icon_state = "comfychair_brown"
color = rgb(141,70,0)
/obj/structure/stool/bed/chair/comfy/beige
icon_state = "comfychair_beige"
/obj/structure/stool/bed/chair/comfy/red
color = rgb(218,2,10)
/obj/structure/stool/bed/chair/comfy/teal
icon_state = "comfychair_teal"
color = rgb(0,234,250)
/obj/structure/stool/bed/chair/comfy/black
color = rgb(60,60,60)
/obj/structure/stool/bed/chair/comfy/green
color = rgb(1,196,8)
/obj/structure/stool/bed/chair/comfy/purp
color = rgb(112,2,176)
/obj/structure/stool/bed/chair/comfy/blue
color = rgb(2,9,210)
/obj/structure/stool/bed/chair/comfy/beige
color = rgb(255,253,195)
/obj/structure/stool/bed/chair/comfy/lime
color = rgb(255,251,0)
/obj/structure/stool/bed/chair/office
anchored = 0
movable = 1
/obj/structure/stool/bed/chair/comfy/black
icon_state = "comfychair_black"
/obj/structure/stool/bed/chair/comfy/lime
icon_state = "comfychair_lime"
/obj/structure/stool/bed/chair/office/Move()
..()
if(buckled_mob)