Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into clickcooldown

Conflicts:
	code/_onclick/click.dm
	code/_onclick/telekinesis.dm
	code/game/objects/items.dm
	code/game/objects/structures/grille.dm
	code/game/turfs/simulated/walls.dm
	code/modules/mob/living/carbon/resist.dm
	code/modules/mob/living/simple_animal/simple_animal.dm
This commit is contained in:
mwerezak
2015-06-28 22:35:14 -04:00
438 changed files with 8879 additions and 7628 deletions
@@ -210,13 +210,6 @@
A.loc = src.loc
qdel(src)
/obj/structure/closet/meteorhit(obj/O as obj)
if(O.icon_state == "flaming")
for(var/mob/M in src)
M.meteorhit(O)
src.dump_contents()
qdel(src)
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/weapon/grab))
@@ -227,8 +220,11 @@
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0,user))
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
if(!WT.isOn())
return
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
new /obj/item/stack/material/steel(src.loc)
for(var/mob/M in viewers(src))
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 3, "You hear welding.", 2)
@@ -246,8 +242,11 @@
else if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0,user))
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
if(!WT.isOn())
return
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
src.welded = !src.welded
src.update_icon()
for(var/mob/M in viewers(src))
@@ -83,22 +83,26 @@
src.desc = "Owned by [I.registered_name]."
else
user << "<span class='warning'>Access Denied</span>"
else if( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
if(istype(W, /obj/item/weapon/melee/energy/blade))
else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, "The locker has been sliced open by [user] with \an [W]!", "You hear metal being sliced and sparks flying."))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 3))
O.show_message("<span class='warning'>The locker has been sliced open by [user] with an energy blade!</span>", 1, "<span class='warning'>You hear metal being sliced and sparks flying.</span>", 2)
else
user << "<span class='warning'>Access Denied</span>"
return
/obj/structure/closet/secure_closet/personal/emag_act(var/remaining_charges, var/mob/user, var/visual_feedback, var/audible_feedback)
if(!broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
if(visual_feedback)
visible_message("<span class='warning'>[visual_feedback]</span>", "<span class='warning'>[audible_feedback]</span>")
return 1
/obj/structure/closet/secure_closet/personal/verb/reset()
set src in oview(1) // One square distance
@@ -78,28 +78,31 @@
user.drop_item()
if(W)
W.loc = src.loc
else if((istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = icon_off
flick(icon_broken, src)
if(istype(W, /obj/item/weapon/melee/energy/blade))
else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 3))
O.show_message("<span class='warning'>The locker has been sliced open by [user] with an energy blade!</span>", 1, "You hear metal being sliced and sparks flying.", 2)
else
for(var/mob/O in viewers(user, 3))
O.show_message("<span class='warning'>The locker has been broken by [user] with an electromagnetic card!</span>", 1, "You hear a faint electrical spark.", 2)
else if(istype(W,/obj/item/weapon/packageWrap) || istype(W,/obj/item/weapon/weldingtool))
return ..(W,user)
else
togglelock(user)
/obj/structure/closet/secure_closet/attack_hand(var/remaining_charges, var/mob/user, var/visual_feedback, var/audible_feedback)
if(!broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = icon_off
flick(icon_broken, src)
if(visual_feedback)
visible_message(visual_feedback, audible_feedback)
else
visible_message("<span class='warning'>The locker has been broken by [user] with an electromagnetic card!</span>", "You hear a faint electrical spark.")
/obj/structure/closet/secure_closet/attack_hand(mob/user as mob)
src.add_fingerprint(user)
if(src.locked)
@@ -80,12 +80,15 @@
/obj/structure/closet/statue/toggle()
return
/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
/obj/structure/closet/statue/proc/check_health()
if(health <= 0)
for(var/mob/M in src)
shatter(M)
/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
check_health()
return
/obj/structure/closet/statue/attack_generic(var/mob/user, damage, attacktext, environment_smash)
@@ -97,19 +100,17 @@
for(var/mob/M in src)
shatter(M)
/obj/structure/closet/statue/meteorhit(obj/O as obj)
if(O.icon_state == "flaming")
for(var/mob/M in src)
M.meteorhit(O)
shatter(M)
/obj/structure/closet/statue/ex_act(severity)
for(var/mob/M in src)
M.ex_act(severity)
health -= 60 / severity
check_health()
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob)
health -= I.force
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] strikes [src] with [I].</span>")
if(health <= 0)
for(var/mob/M in src)
shatter(M)
check_health()
/obj/structure/closet/statue/MouseDrop_T()
return
@@ -187,7 +187,15 @@
/obj/structure/closet/crate/secure/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(is_type_in_list(W, list(/obj/item/weapon/packageWrap, /obj/item/stack/cable_coil, /obj/item/device/radio/electropack, /obj/item/weapon/wirecutters)))
return ..()
if(locked && (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)))
if(istype(W, /obj/item/weapon/melee/energy/blade))
emag_act(INFINITY, user)
if(!opened)
src.togglelock(user)
return
return ..()
/obj/structure/closet/crate/secure/emag_act(var/remaining_charges, var/mob/user)
if(!broken)
overlays.Cut()
overlays += emag
overlays += sparks
@@ -196,11 +204,7 @@
src.locked = 0
src.broken = 1
user << "<span class='notice'>You unlock \the [src].</span>"
return
if(!opened)
src.togglelock(user)
return
return ..()
return 1
/obj/structure/closet/crate/secure/emp_act(severity)
for(var/obj/O in src)
@@ -13,8 +13,8 @@
if(istype(W, /obj/item/weapon/crowbar))
new /obj/item/stack/material/wood(src)
var/turf/T = get_turf(src)
for(var/obj/O in contents)
O.loc = T
for(var/atom/movable/AM in contents)
if(AM.simulated) AM.loc = 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>")
@@ -73,4 +73,4 @@
/obj/structure/largecrate/animal/chick
name = "chicken crate"
held_count = 5
held_type = /mob/living/simple_animal/chick
held_type = /mob/living/simple_animal/chick
@@ -43,13 +43,6 @@
occupied = 0
qdel(src)
/obj/structure/displaycase/meteorhit(obj/O as obj)
new /obj/item/weapon/material/shard( src.loc )
new /obj/item/weapon/gun/energy/captain( src.loc )
qdel(src)
/obj/structure/displaycase/proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
+1 -1
View File
@@ -37,7 +37,7 @@
if (user.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.name], but cannot!"
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"
return
if(has_extinguisher)
user.put_in_hands(has_extinguisher)
+2 -2
View File
@@ -149,7 +149,7 @@
if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds.
user.drop_item()
P.loc = src.loc
user << "<span class='notice'>You fit the pipe into the [src]!"
user << "<span class='notice'>You fit the pipe into the [src]!</span>"
else
..()
@@ -248,7 +248,7 @@
dismantle()
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
user << "<span class='notice'>Now slicing apart the girder..."
user << "<span class='notice'>Now slicing apart the girder...</span>"
if(do_after(user,30))
user << "<span class='notice'>You slice apart the girder!</span>"
dismantle()
+9 -12
View File
@@ -19,9 +19,6 @@
/obj/structure/grille/blob_act()
qdel(src)
/obj/structure/grille/meteorhit(var/obj/M)
qdel(src)
/obj/structure/grille/update_icon()
if(destroyed)
icon_state = "[initial(icon_state)]-b"
@@ -115,9 +112,12 @@
"<span class='notice'>You have [anchored ? "fastened the grille to" : "unfastened the grill from"] the floor.</span>")
return
//window placing begin
else if(istype(W,/obj/item/stack/material/glass))
var/obj/item/stack/material/glass/ST = W
//window placing begin //TODO CONVERT PROPERLY TO MATERIAL DATUM
else if(istype(W,/obj/item/stack/material))
var/obj/item/stack/material/ST = W
if(!ST.material.created_window)
return 0
var/dir_to_set = 1
if(loc == user.loc)
dir_to_set = user.dir
@@ -147,18 +147,15 @@
user << "<span class='notice'>There is already a window facing this way there.</span>"
return
var/wtype = ST.created_window
var/wtype = ST.material.created_window
if (ST.use(1))
var/obj/structure/window/WD = new wtype(loc, dir_to_set, 1)
user << "<span class='notice'>You place the [WD] on [src].</span>"
WD.update_icon()
return
//window placing end
else if(istype(W, /obj/item/weapon/material/shard))
user.changeNextMove(8)
health -= W.force * 0.1
else if(!shock(user, 70))
else if(!(W.flags & CONDUCT) || !shock(user, 70))
user.changeNextMove(8)
user.do_attack_animation(src)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
@@ -63,9 +63,6 @@
/obj/structure/inflatable/blob_act()
deflate(1)
/obj/structure/inflatable/meteorhit()
deflate(1)
/obj/structure/inflatable/attack_hand(mob/user as mob)
add_fingerprint(user)
return
+1 -1
View File
@@ -37,7 +37,7 @@
else if(istype(I, /obj/item/weapon/mop))
if(I.reagents.total_volume < I.reagents.maximum_volume) //if it's not completely soaked we assume they want to wet it, otherwise store it
if(reagents.total_volume < 1)
user << "[src] is out of water!</span>"
user << "<span class='warning'>[src] is out of water!</span>"
else
reagents.trans_to_obj(I, 5) //
user << "<span class='notice'>You wet [I] in [src].</span>"
@@ -39,13 +39,6 @@
Break()
qdel(src)
/obj/structure/lamarr/meteorhit(obj/O as obj)
new /obj/item/weapon/material/shard( src.loc )
Break()
qdel(src)
/obj/structure/lamarr/proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
+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/plasteel))
if (istype(C, /obj/item/stack/tile/steel))
var/turf/T = get_turf(src)
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
return
+2 -2
View File
@@ -14,7 +14,7 @@
if(shattered) return
if(ishuman(user))
var/obj/nano_module/appearance_changer/AC = ui_users[user]
var/datum/nano_module/appearance_changer/AC = ui_users[user]
if(!AC)
AC = new(src, user)
AC.name = "SalonPro Nano-Mirror(TM)"
@@ -60,7 +60,7 @@
return 0
if(damage)
user.visible_message("<span class='danger'>[user] smashes [src]!")
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
shatter()
else
user.visible_message("<span class='danger'>[user] hits [src] and bounces off!</span>")
+1 -1
View File
@@ -20,7 +20,7 @@
/obj/structure/mopbucket/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/mop))
if(reagents.total_volume < 1)
user << "[src] is out of water!</span>"
user << "<span class='warning'>[src] is out of water!</span>"
else
reagents.trans_to_obj(I, 5)
user << "<span class='notice'>You wet [I] in [src].</span>"
+1 -1
View File
@@ -159,7 +159,7 @@
if (user != O)
for(var/mob/B in viewers(user, 3))
if ((B.client && !( B.blinded )))
B << "<span class='warning'>\The [user] stuffs [O] into [src]!"
B << "<span class='warning'>\The [user] stuffs [O] into [src]!</span>"
return
-5
View File
@@ -167,11 +167,6 @@ obj/structure/safe/blob_act()
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"
@@ -22,6 +22,7 @@
/obj/structure/bed/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc)
color = null
if(!new_material)
new_material = DEFAULT_WALL_MATERIAL
material = get_material_by_name(new_material)
@@ -61,6 +62,12 @@
name = "[material.display_name] [initial(name)]"
desc += " It's made of [material.use_name]."
/obj/structure/bed/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
else
return ..()
/obj/structure/bed/ex_act(severity)
switch(severity)
if(1.0)
@@ -2,6 +2,7 @@
name = "chair"
desc = "You sit in this. Either by will or force."
icon_state = "chair_preview"
color = "#666666"
base_icon = "chair"
buckle_lying = 0 //force people to sit up in chairs when buckled
var/propelled = 0 // Check for fire-extinguisher-driven chairs
+9 -3
View File
@@ -225,6 +225,12 @@
if(M.back)
if(M.back.clean_blood())
M.update_inv_back(0)
//flush away reagents on the skin
if(M.touching)
var/remove_amount = M.touching.maximum_volume * M.reagent_permeability() //take off your suit first
M.touching.remove_any(remove_amount)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/washgloves = 1
@@ -352,7 +358,7 @@
if (user.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.name], but cannot!"
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"
return
if(isrobot(user) || isAI(user))
@@ -377,12 +383,12 @@
if(ishuman(user))
user:update_inv_gloves()
for(var/mob/V in viewers(src, null))
V.show_message("<span class='notice'>[user] washes their hands using \the [src].")
V.show_message("<span class='notice'>[user] washes their hands using \the [src].</span>")
/obj/structure/sink/attackby(obj/item/O as obj, mob/user as mob)
if(busy)
user << "<span class='warning'>Someone's already washing here."
user << "<span class='warning'>Someone's already washing here.</span>"
return
var/obj/item/weapon/reagent_containers/RG = O
-4
View File
@@ -125,10 +125,6 @@
/obj/structure/window/blob_act()
shatter()
/obj/structure/window/meteorhit()
shatter()
//TODO: Make full windows a separate type of window.
//Once a full window, it will always be a full window, so there's no point
//having the same type for both.