Merge branch 'master' of https://github.com/tgstation/-tg-station into plasmadoorfix

Conflicts:
	code/game/machinery/doors/airlock.dm
This commit is contained in:
phil235
2014-10-05 13:24:14 +02:00
416 changed files with 6999 additions and 2694 deletions
@@ -250,8 +250,8 @@
user << "<span class='notice'>It won't budge!</span>"
if(!lastbang)
lastbang = 1
for (var/mob/M in hearers(src, null))
M << text("<FONT size=[]>BANG, bang!</FONT>", max(0, 5 - get_dist(src, M)))
for (var/mob/M in get_hearers_in_view(src, null))
M.show_message("<FONT size=[max(0, 5 - get_dist(src, M))]>BANG, bang!</FONT>", 2)
spawn(30)
lastbang = 0
@@ -95,8 +95,8 @@
user << "<span class='notice'>The locker is locked!</span>"
if(world.time > lastbang+5)
lastbang = world.time
for(var/mob/M in hearers(src, null))
M << "<FONT size=[max(0, 5 - get_dist(src, M))]>BANG, bang!</FONT>"
for(var/mob/M in get_hearers_in_view(src, null))
M.show_message("<FONT size=[max(0, 5 - get_dist(src, M))]>BANG, bang!</FONT>", 2)
return
/obj/structure/closet/secure_closet/attack_hand(mob/user as mob)
@@ -17,7 +17,7 @@
new /obj/item/weapon/storage/backpack/satchel_cap(src)
new /obj/item/clothing/suit/captunic(src)
new /obj/item/clothing/under/captainformal(src)
new /obj/item/clothing/head/helmet/cap(src)
new /obj/item/clothing/head/caphat/parade(src)
new /obj/item/clothing/under/rank/captain(src)
new /obj/item/clothing/suit/armor/vest/capcarapace(src)
new /obj/item/weapon/cartridge/captain(src)
@@ -71,7 +71,7 @@
sleep(2)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/suit/armor/hos/jensen(src)
new /obj/item/clothing/head/helmet/HoS/dermal(src)
new /obj/item/clothing/head/HoS/dermal(src)
new /obj/item/weapon/cartridge/hos(src)
new /obj/item/device/radio/headset/heads/hos/alt(src)
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
@@ -103,7 +103,7 @@
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/under/rank/warden(src)
new /obj/item/clothing/suit/armor/vest/warden(src)
new /obj/item/clothing/head/helmet/warden(src)
new /obj/item/clothing/head/warden(src)
new /obj/item/weapon/clipboard(src)
new /obj/item/device/radio/headset/headset_sec/alt(src)
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
@@ -293,18 +293,3 @@
else
icon_state = icon_opened
/obj/structure/closet/secure_closet/ammunitionlocker
name = "ammunition locker"
req_access = list(access_armory)
/obj/structure/closet/secure_closet/ammunitionlocker/New()
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
@@ -7,7 +7,7 @@
/obj/structure/closet/syndicate/personal
desc = "It's a storage unit for operative gear."
desc = "It's a personal storage unit for operative gear."
/obj/structure/closet/syndicate/personal/New()
..()
@@ -24,7 +24,7 @@
/obj/structure/closet/syndicate/nuclear
desc = "It's a storage unit for nuclear-operative gear."
desc = "It's a storage unit for a Syndicate boarding party."
/obj/structure/closet/syndicate/nuclear/New()
..()
@@ -37,11 +37,11 @@
new /obj/item/weapon/storage/box/handcuffs(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/storage/box/teargas(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/gun/projectile/automatic/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/bulldog(src)
new /obj/item/weapon/pinpointer/nukeop(src)
new /obj/item/weapon/pinpointer/nukeop(src)
new /obj/item/weapon/pinpointer/nukeop(src)
@@ -121,7 +121,7 @@
/obj/item/stack/sheet/mineral/plasma,
/obj/item/stack/sheet/mineral/uranium,
/obj/item/stack/sheet/mineral/diamond,
/obj/item/stack/sheet/mineral/clown,
/obj/item/stack/sheet/mineral/bananium,
/obj/item/stack/sheet/plasteel,
/obj/item/stack/rods
)
@@ -217,4 +217,22 @@
if(!opened)
icon_state = icon_closed
else
icon_state = icon_opened
icon_state = icon_opened
/*
* Ammunition
*/
/obj/structure/closet/ammunitionlocker
name = "ammunition locker"
/obj/structure/closet/ammunitionlocker/New()
..()
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
+40 -26
View File
@@ -440,7 +440,8 @@ obj/structure/door_assembly/New()
else if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0,user))
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
user.visible_message("<span class='warning'>[user] dissassembles the airlock assembly.</span>", \
"You start to dissassemble the airlock assembly.")
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
if(do_after(user, 40))
@@ -461,7 +462,9 @@ obj/structure/door_assembly/New()
else if(istype(W, /obj/item/weapon/wrench) && !anchored )
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor.")
user.visible_message("<span class='warning'>[user] secures the airlock assembly to the floor.</span>", \
"You start to secure the airlock assembly to the floor.", \
"You hear wrenching")
if(do_after(user, 40))
if( src.anchored )
@@ -472,7 +475,9 @@ obj/structure/door_assembly/New()
else if(istype(W, /obj/item/weapon/wrench) && anchored )
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("[user] unsecures the airlock assembly from the floor.", "You start to unsecure the airlock assembly from the floor.")
user.visible_message("<span class='warning'>[user] unsecures the airlock assembly from the floor.</span>", \
"You start to unsecure the airlock assembly from the floor.", \
"You hear wrenching")
if(do_after(user, 40))
if( !src.anchored )
return
@@ -485,7 +490,8 @@ obj/structure/door_assembly/New()
if (C.get_amount() < 1)
user << "<span class='warning'>You need one length of cable to wire the airlock assembly.</span>"
return
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
user.visible_message("<span class='warning'>[user] wires the airlock assembly.</span>", \
"You start to wire the airlock assembly.")
if(do_after(user, 40))
if(C.get_amount() < 1 || state != 0) return
C.use(1)
@@ -495,7 +501,8 @@ obj/structure/door_assembly/New()
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
user.visible_message("<span class='warning'>[user] cuts the wires from the airlock assembly.</span>", \
"You start to cut the wires from the airlock assembly.")
if(do_after(user, 40))
if( src.state != 1 )
@@ -507,12 +514,14 @@ obj/structure/door_assembly/New()
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 )
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
user.visible_message("<span class='warning'>[user] installs the electronics into the airlock assembly.</span>", \
"You start to install electronics into the airlock assembly.")
user.drop_item()
W.loc = src
if(do_after(user, 40))
if( src.state != 1 )
W.loc = src.loc
return
user << "<span class='notice'> You've installed the airlock electronics.</span>"
src.state = 2
@@ -525,7 +534,8 @@ obj/structure/door_assembly/New()
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove the electronics from the airlock assembly.")
user.visible_message("<span class='warning'>[user] removes the electronics from the airlock assembly.</span>", \
"You start to remove electronics from the airlock assembly.")
if(do_after(user, 40))
if( src.state != 2 )
@@ -546,7 +556,8 @@ obj/structure/door_assembly/New()
if(G.get_amount() >= 1)
if(G.type == /obj/item/stack/sheet/rglass)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
user.visible_message("<span class='warning'>[user] adds [G.name] to the airlock assembly.</span>", \
"You start to install [G.name] into the airlock assembly.")
if(do_after(user, 40))
if(G.get_amount() < 1 || mineral) return
user << "<span class='notice'>You've installed reinforced glass windows into the airlock assembly.</span>"
@@ -569,7 +580,8 @@ obj/structure/door_assembly/New()
var/M = G.sheettype
if(G.get_amount() >= 2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
user.visible_message("<span class='warning'>[user] adds [G.name] to the airlock assembly.</span>", \
"You start to install [G.name] into the airlock assembly.")
if(do_after(user, 40))
if(G.get_amount() < 2 || mineral) return
user << "<span class='notice'>You've installed [M] plating into the airlock assembly.</span>"
@@ -583,25 +595,27 @@ obj/structure/door_assembly/New()
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] finishes the airlock.", "You start finishing the airlock.")
user.visible_message("<span class='warning'>[user] finishes the airlock.</span>", \
"You start finishing the airlock.")
if(do_after(user, 40))
user << "<span class='notice'> You've finished the airlock.</span>"
var/obj/machinery/door/airlock/door
if(mineral == "glass")
door = new src.glass_type( src.loc )
else
door = new src.airlock_type( src.loc )
//door.req_access = src.req_access
door.electronics = src.electronics
if(src.electronics.use_one_access)
door.req_one_access = src.electronics.conf_access
else
door.req_access = src.electronics.conf_access
if(created_name)
door.name = created_name
src.electronics.loc = door
qdel(src)
if(state == 2)
user << "<span class='notice'> You've finished the airlock.</span>"
var/obj/machinery/door/airlock/door
if(mineral == "glass")
door = new src.glass_type( src.loc )
else
door = new src.airlock_type( src.loc )
//door.req_access = src.req_access
door.electronics = src.electronics
if(src.electronics.use_one_access)
door.req_one_access = src.electronics.conf_access
else
door.req_access = src.electronics.conf_access
if(created_name)
door.name = created_name
src.electronics.loc = door
qdel(src)
else
..()
if(mineral == "glass")
+6 -7
View File
@@ -37,7 +37,7 @@
if(HULK in user.mutations)
health -= 5
else
health -= 3
health -= rand(1,2)
healthcheck()
/obj/structure/grille/attack_alien(mob/user as mob)
@@ -62,7 +62,7 @@
"<span class='warning'>You smash against [src].</span>", \
"You hear twisting metal.")
health -= rand(2,3)
health -= rand(1,2)
healthcheck()
return
@@ -94,8 +94,8 @@
if(!Proj)
return
..()
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
src.health -= Proj.damage*0.2
if((Proj.damage_type != STAMINA)) //Grilles can't be exhausted to death
src.health -= Proj.damage*0.3
healthcheck()
return
@@ -174,11 +174,10 @@
else if(!shock(user, 70))
switch(W.damtype)
if(BURN)
health -= W.force
playsound(loc, 'sound/items/welder.ogg', 80, 1)
if(BRUTE)
health -= W.force * 0.1
else
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
health -= W.force * 0.3
healthcheck()
..()
+1 -1
View File
@@ -57,7 +57,7 @@
return
// and play
var/turf/source = get_turf(instrumentObj)
for(var/mob/M in hearers(15, source))
for(var/mob/M in get_hearers_in_view(15, source))
M.playsound_local(source, soundfile, 100, falloff = 5)
/datum/song/proc/updateDialog(mob/user as mob)
@@ -0,0 +1,83 @@
/obj/structure/spirit_board
name = "spirit board"
desc = "A wooden board with letters etched into it, used in seances."
icon = 'icons/obj/objects.dmi'
icon_state = "spirit_board"
density = 1
anchored = 0
var/virgin = 1
var/cooldown = 0
var/planchette = "A"
var/lastuser = null
/obj/structure/spirit_board/examine()
desc = "[initial(desc)] The planchette is sitting at \"[planchette]\"."
..()
/obj/structure/spirit_board/attack_hand(mob/user as mob)
if(..())
return
spirit_board_pick_letter(user)
/obj/structure/spirit_board/attack_ghost(mob/dead/observer/user as mob)
spirit_board_pick_letter(user)
/obj/structure/spirit_board/proc/spirit_board_pick_letter(var/mob/M)
if(!spirit_board_checks(M))
return 0
if(virgin)
virgin = 0
notify_ghosts("Someone has begun playing with a [src.name] in [get_area(src)]!")
planchette = input("Choose the letter.", "Seance!") in list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
add_logs(M, src, "picked a letter on", addition="which was \"[planchette]\".")
cooldown = world.time
lastuser = M.ckey
var/turf/T = loc
sleep(rand(20,30))
if(T == loc)
visible_message("<span class='notice'>The planchette slowly moves... and stops at the letter \"[planchette]\".</span>")
/obj/structure/spirit_board/proc/spirit_board_checks(var/mob/M)
//cooldown
var/bonus = 0
if(M.ckey == lastuser)
bonus = 10 //Give some other people a chance, hog.
if(cooldown > world.time - (30 + bonus))
return 0 //No feedback here, hiding the cooldown a little makes it harder to tell who's really picking letters.
//lighting check
var/light_amount = 0
var/turf/T = get_turf(src)
var/area/A = T.loc
if(A)
if(A.lighting_use_dynamic)
light_amount = T.lighting_lumcount
else
light_amount = 10
if(light_amount > 2)
M << "<span class='warning'>It's too bright here to use [src.name]!</span>"
return 0
//mobs in range check
var/users_in_range = 0
for(var/mob/living/L in orange(1,src))
if(L.ckey && L.client)
if((world.time - L.client.inactivity) < (world.time - 300) || L.stat != CONSCIOUS || L.restrained())//no playing with braindeads or corpses or handcuffed dudes.
M << "<span class='warning'>[L] doesn't seem to be paying attention...</span>"
else
users_in_range++
if(users_in_range < 2)
M << "<span class='warning'>There aren't enough people to use the [src.name]!</span>"
return 0
return 1
@@ -698,6 +698,24 @@ Destroy type values:
return
..()
/obj/structure/table/MouseDrop_T(mob/target, mob/living/carbon/human/user)
if(istype(target) && user == target && istype(user))
if(user.canmove)
climb_table(user)
/obj/structure/table/proc/climb_table(mob/user)
src.add_fingerprint(user)
user.visible_message("<span class='warning'>[user] starts climbing onto [src].</span>", \
"<span class='notice'>[user] starts climbing onto [src].</span>")
if(do_mob(user, user, 20))
user.pass_flags += PASSTABLE
step(user,get_dir(user,src.loc))
user.pass_flags -= PASSTABLE
user.visible_message("<span class='warning'>[user] climbs onto [src].</span>", \
"<span class='notice'>[user] climbs onto [src].</span>")
add_logs(user, src, "climbed onto")
user.Stun(2)
/*
* Racks
*/
+13 -5
View File
@@ -156,7 +156,11 @@
add_fingerprint(M)
if(on)
for (var/atom/movable/G in loc)
Crossed(G)
wash(G)
else
if(istype(loc, /turf/simulated))
var/turf/simulated/tile = loc
tile.MakeSlippery()
/obj/machinery/shower/attackby(obj/item/I, mob/user)
@@ -206,9 +210,10 @@
/obj/machinery/shower/Crossed(atom/movable/O)
..()
wash(O)
if(ismob(O))
mobpresent += 1
check_heat(O)
if(iscarbon(O) && on)
var/mob/living/carbon/M=O
M.slip(4,2,null,NO_SLIP_WHEN_WALKING)
/obj/machinery/shower/Uncrossed(atom/movable/O)
@@ -220,7 +225,9 @@
//Yes, showers are super powerful as far as washing goes.
/obj/machinery/shower/proc/wash(atom/movable/O)
if(!on) return
if(ismob(O))
mobpresent += 1
check_heat(O)
if(isliving(O))
var/mob/living/L = O
L.ExtinguishMob()
@@ -306,6 +313,7 @@
check_heat(C)
/obj/machinery/shower/proc/check_heat(mob/M)
if(!on || watertemp == "normal") return
if(iscarbon(M))