Merge branch 'dev' into ofClicksAndCooldowns

Conflicts:
	code/ZAS/Airflow.dm
	code/__defines/items_clothing.dm
This commit is contained in:
Kelenius
2015-08-21 16:15:07 +03:00
552 changed files with 16452 additions and 14439 deletions
+37 -18
View File
@@ -3,26 +3,45 @@
icon_state = "empty"
anchored = 1
var/cult = 0
New()
ChangeSign(pick("pinkflamingo", "magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thedamnwall", "thecavern", "cindikate", "theorchard", "thesaucyclown", "theclownshead", "whiskeyimplant", "carpecarp", "robustroadhouse", "greytide", "theredshirt","thebark","theharmbaton","theharmedbaton","thesingulo","thedrukcarp","thedrunkcarp", "scotch","officerbeersky","on"))
return
proc/ChangeSign(var/Text)
src.icon_state = "[Text]"
//on = 0
//brightness_on = 4 //uncomment these when the lighting fixes get in
return
/obj/structure/sign/double/barsign/proc/get_valid_states(initial=1)
. = icon_states(icon)
. -= "on"
. -= "narsiebistro"
. -= "empty"
if(initial)
. -= "Off"
/obj/structure/sign/double/barsign/examine(mob/user)
..()
switch(icon_state)
if("Off")
user << "It appears to be switched off."
if("narsiebistro")
user << "It shows a picture of a large black and red being. Spooky!"
if("on", "empty")
user << "The lights are on, but there's no picture."
else
user << "It says '[icon_state]'"
/obj/structure/sign/double/barsign/New()
..()
icon_state = pick(get_valid_states())
/obj/structure/sign/double/barsign/attackby(obj/item/I, mob/user)
if(cult)
return ..()
var/obj/item/weapon/card/id/card = I.GetID()
if(istype(card))
if(access_bar in card.GetAccess())
var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in get_valid_states(0)
if(!sign_type)
return
icon_state = sign_type
user << "<span class='notice'>You change the barsign.</span>"
else
user << "<span class='warning'>Access denied.</span>"
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", "Pink Flamingo", "Magma Sea", "Limbo", "Rusty Axe", "Armok Bar", "Broken Drum", "Mead Bay", "The Damn Wall", "The Cavern", "Cindi Kate", "The Orchard", "The Saucy Clown", "The Clowns Head", "Whiskey Implant", "Carpe Carp", "Robust Roadhouse", "Greytide", "The Redshirt", "The Bark", "The Harm Baton", "The Harmed Baton", "The Singulo", "The Druk Carp", "The Drunk Carp", "Scotch", "Officer Beersky", "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."
return ..()
@@ -25,6 +25,16 @@ LINEN BINS
add_fingerprint(user)
return
/obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user)
if(is_sharp(I))
user.visible_message("<span class='notice'>\The [user] begins cutting up [src] with [I].</span>", "<span class='notice'>You begin cutting up [src] with [I].</span>")
if(do_after(user, 50))
user << "<span class='notice'>You cut [src] into pieces!</span>"
for(var/i in 1 to rand(2,5))
new /obj/item/weapon/reagent_containers/glass/rag(src.loc)
qdel(src)
return
..()
/obj/item/weapon/bedsheet/blue
icon_state = "sheetblue"
@@ -53,11 +53,6 @@
else
user << "It is full."
/obj/structure/closet/alter_health()
return get_turf(src)
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0 || wall_mounted)) return 1
return (!density)
@@ -68,7 +68,7 @@
new /obj/item/weapon/cartridge/janitor(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/head/soft/purple(src)
new /obj/item/clothing/head/beret/jan(src)
new /obj/item/clothing/head/beret/purple(src)
new /obj/item/device/flashlight(src)
new /obj/item/weapon/caution(src)
new /obj/item/weapon/caution(src)
@@ -11,16 +11,16 @@
New()
..()
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
return
/obj/structure/closet/secure_closet/bar/update_icon()
@@ -122,7 +122,7 @@
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/clothing/accessory/holster/waist(src)
new /obj/item/weapon/melee/telebaton(src)
new /obj/item/clothing/head/beret/sec/hos(src)
new /obj/item/clothing/head/beret/sec/corporate/hos(src)
return
@@ -159,7 +159,7 @@
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/storage/box/holobadge(src)
new /obj/item/clothing/head/beret/sec/warden(src)
new /obj/item/clothing/head/beret/sec/corporate/warden(src)
return
@@ -42,11 +42,11 @@
/obj/structure/closet/syndicate/nuclear/New()
..()
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/weapon/storage/box/handcuffs(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/gun/energy/gun(src)
@@ -26,9 +26,9 @@
new /obj/item/clothing/head/beret/sec(src)
new /obj/item/clothing/head/beret/sec(src)
new /obj/item/clothing/head/beret/sec(src)
new /obj/item/clothing/head/beret/sec/alt(src)
new /obj/item/clothing/head/beret/sec/alt(src)
new /obj/item/clothing/head/beret/sec/alt(src)
new /obj/item/clothing/head/beret/sec/corporate/officer(src)
new /obj/item/clothing/head/beret/sec/corporate/officer(src)
new /obj/item/clothing/head/beret/sec/corporate/officer(src)
return
@@ -167,9 +167,9 @@
new /obj/item/clothing/head/hardhat/red(src)
new /obj/item/clothing/head/hardhat/red(src)
new /obj/item/clothing/head/hardhat/red(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/engineering(src)
new /obj/item/clothing/head/beret/engineering(src)
new /obj/item/clothing/head/beret/engineering(src)
return
@@ -190,9 +190,9 @@
new /obj/item/clothing/head/hardhat(src)
new /obj/item/clothing/head/hardhat(src)
new /obj/item/clothing/head/hardhat(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/engineering(src)
new /obj/item/clothing/head/beret/engineering(src)
new /obj/item/clothing/head/beret/engineering(src)
return
@@ -14,7 +14,7 @@
new /obj/item/stack/material/wood(src)
var/turf/T = get_turf(src)
for(var/atom/movable/AM in contents)
if(AM.simulated) AM.loc = T
if(AM.simulated) AM.forceMove(T)
user.visible_message("<span class='notice'>[user] pries \the [src] open.</span>", \
"<span class='notice'>You pry open \the [src].</span>", \
"<span class='notice'>You hear splitting wood.</span>")
+8
View File
@@ -44,6 +44,14 @@
color = "#B8F5E3"
alpha = 200
/obj/structure/curtain/open/bed
name = "bed curtain"
color = "#854636"
/obj/structure/curtain/open/privacy
name = "privacy curtain"
color = "#B8F5E3"
/obj/structure/curtain/open/shower
name = "shower curtain"
color = "#ACD1E9"
+1
View File
@@ -43,6 +43,7 @@
return
/obj/structure/girder/proc/reset_girder()
anchored = 1
cover = initial(cover)
health = min(health,initial(health))
state = 0
+1 -1
View File
@@ -53,7 +53,7 @@
/obj/structure/lattice/attackby(obj/item/C as obj, mob/user as mob)
if (istype(C, /obj/item/stack/tile/steel))
if (istype(C, /obj/item/stack/tile/floor))
var/turf/T = get_turf(src)
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
return
-6
View File
@@ -60,9 +60,6 @@
return
return
/obj/structure/morgue/alter_health()
return src.loc
/obj/structure/morgue/attack_hand(mob/user as mob)
if (src.connected)
for(var/atom/movable/A as mob|obj in src.connected.loc)
@@ -230,9 +227,6 @@
return
return
/obj/structure/crematorium/alter_health()
return src.loc
/obj/structure/crematorium/attack_hand(mob/user as mob)
// if (cremating) AWW MAN! THIS WOULD BE SO MUCH MORE FUN ... TO WATCH
// user.show_message("<span class='warning'>Uh-oh, that was a bad idea.</span>", 1)
+6 -3
View File
@@ -175,12 +175,15 @@ obj/structure/safe/ex_act(severity)
level = 1 //underfloor
layer = 2.5
/obj/structure/safe/floor/initialize()
..()
var/turf/T = loc
hide(T.intact)
if(istype(T) && !T.is_plating())
hide(1)
update_icon()
/obj/structure/safe/floor/hide(var/intact)
invisibility = intact ? 101 : 0
/obj/structure/safe/floor/hides_under_flooring()
return 1
@@ -8,7 +8,7 @@
/obj/structure/undies_wardrobe/attack_hand(mob/user as mob)
src.add_fingerprint(user)
var/mob/living/carbon/human/H = user
if(!ishuman(user) || (H.species && !(H.species.flags & HAS_UNDERWEAR)))
if(!ishuman(user) || (H.species && !(H.species.appearance_flags & HAS_UNDERWEAR)))
user << "<span class='warning'>Sadly there's nothing in here for you to wear.</span>"
return 0
+2 -2
View File
@@ -395,7 +395,7 @@
if (istype(RG) && RG.is_open_container())
RG.reagents.add_reagent("water", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
user.visible_message("<span class='notice'>[user] fills \the [RG] using \the [src].</span>","<span class='notice'>You fill \the [RG] using \the [src].</span>")
return
return 1
else if (istype(O, /obj/item/weapon/melee/baton))
var/obj/item/weapon/melee/baton/B = O
@@ -413,7 +413,7 @@
user.visible_message( \
"<span class='danger'>[user] was stunned by \his wet [O]!</span>", \
"<span class='userdanger'>[user] was stunned by \his wet [O]!</span>")
return
return 1
// Short of a rewrite, this is necessary to stop monkeycubes being washed.
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/monkeycube))
return
+32 -27
View File
@@ -241,6 +241,7 @@
if(istype(W, /obj/item/weapon/screwdriver))
if(reinf && state >= 1)
state = 3 - state
update_nearby_icons()
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (state == 1 ? "<span class='notice'>You have unfastened the window from the frame.</span>" : "<span class='notice'>You have fastened the window to the frame.</span>")
else if(reinf && state == 0)
@@ -293,6 +294,9 @@
set category = "Object"
set src in oview(1)
if(usr.incapacitated())
return 0
if(anchored)
usr << "It is fastened to the floor therefore you can't rotate it!"
return 0
@@ -309,6 +313,9 @@
set category = "Object"
set src in oview(1)
if(usr.incapacitated())
return 0
if(anchored)
usr << "It is fastened to the floor therefore you can't rotate it!"
return 0
@@ -340,7 +347,11 @@
/obj/structure/window/Destroy()
density = 0
update_nearby_tiles()
update_nearby_icons()
var/turf/location = loc
loc = null
for(var/obj/structure/window/W in orange(location, 1))
W.update_icon()
loc = location
..()
@@ -360,35 +371,31 @@
//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
/obj/structure/window/proc/update_nearby_icons()
update_icon()
for(var/direction in cardinal)
for(var/obj/structure/window/W in get_step(src,direction) )
W.update_icon()
for(var/obj/structure/window/W in orange(src, 1))
W.update_icon()
//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm)
/obj/structure/window/update_icon()
//A little cludge here, since I don't know how it will work with slim windows. Most likely VERY wrong.
//this way it will only update full-tile ones
//This spawn is here so windows get properly updated when one gets deleted.
spawn(2)
if(!src) return
if(!is_fulltile())
icon_state = "[basestate]"
return
var/junction = 0 //will be used to determine from which side the window is connected to other windows
if(anchored)
for(var/obj/structure/window/W in orange(src,1))
if(W.anchored && W.density && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
if(abs(x-W.x)-abs(y-W.y) ) //doesn't count windows, placed diagonally to src
junction |= get_dir(src,W)
if(opacity)
icon_state = "[basestate][junction]"
else
if(reinf)
icon_state = "[basestate][junction]"
else
icon_state = "[basestate][junction]"
overlays.Cut()
if(!is_fulltile())
icon_state = "[basestate]"
return
var/list/dirs = list()
if(anchored)
for(var/obj/structure/window/W in orange(src,1))
if(W.anchored && W.density && W.type == src.type && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
dirs += get_dir(src, W)
var/list/connections = dirs_to_corner_states(dirs)
icon_state = ""
for(var/i = 1 to 4)
var/image/I = image(icon, "[basestate][connections[i]]", dir = 1<<(i-1))
overlays += I
return
/obj/structure/window/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > T0C + 800)
@@ -469,11 +476,9 @@
basestate = "window"
maxhealth = 40
reinf = 1
basestate = "w"
dir = 5
update_icon() //icon_state has to be set manually
return
/obj/structure/window/reinforced/polarized
name = "electrochromic window"
desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
@@ -68,6 +68,15 @@
icon_state = "r-wingrille"
win_path = /obj/structure/window/reinforced
/obj/effect/wingrille_spawn/reinforced/crescent
name = "Crescent window grille spawner"
icon_state = "r-wingrille"
win_path = /obj/structure/window/reinforced
/obj/effect/wingrille_spawn/reinforced/crescent/handle_window_spawn(var/obj/structure/window/W)
W.maxhealth = 1000000
W.health = 1000000
/obj/effect/wingrille_spawn/phoron
name = "phoron window grille spawner"
icon_state = "p-wingrille"