Merge remote-tracking branch 'refs/remotes/tgstation/master' into Research

This commit is contained in:
LatD
2016-05-28 01:37:55 +03:00
211 changed files with 927 additions and 1328 deletions
+1 -1
View File
@@ -162,7 +162,7 @@
desc = "A thick resin surface covers the floor."
anchored = 1
density = 0
layer = TURF_LAYER + 0.09
layer = TURF_LAYER
icon_state = "weeds"
health = 15
var/obj/structure/alien/weeds/node/linked_node = null
@@ -14,7 +14,7 @@
var/image/nest_overlay
/obj/structure/bed/nest/New()
nest_overlay = image('icons/mob/alien.dmi', "nestoverlay", layer=MOB_LAYER - 0.2)
nest_overlay = image('icons/mob/alien.dmi', "nestoverlay", layer=LYING_MOB_LAYER)
return ..()
/obj/structure/bed/nest/user_unbuckle_mob(mob/living/buckled_mob, mob/living/user)
@@ -73,7 +73,7 @@
if(M in buckled_mobs)
M.pixel_y = 0
M.pixel_x = initial(M.pixel_x) + 2
M.layer = MOB_LAYER - 0.3
M.layer = BELOW_MOB_LAYER
overlays += nest_overlay
else
M.pixel_x = M.get_standard_pixel_x_offset(M.lying)
@@ -162,7 +162,7 @@
/obj/structure/chair/comfy/New()
armrest = image("icons/obj/chairs.dmi", "comfychair_armrest")
armrest.layer = MOB_LAYER + 0.1
armrest.layer = ABOVE_MOB_LAYER
return ..()
+4 -2
View File
@@ -11,7 +11,7 @@ LINEN BINS
icon_state = "sheetwhite"
item_state = "bedsheet"
slot_flags = SLOT_BACK
layer = 4
layer = MOB_LAYER
throwforce = 0
throw_speed = 1
throw_range = 2
@@ -28,9 +28,11 @@ LINEN BINS
/obj/item/weapon/bedsheet/attack_self(mob/user)
user.drop_item()
if(layer == initial(layer))
layer = 5
layer = ABOVE_MOB_LAYER
user << "<span class='notice'>You cover yourself with [src].</span>"
else
layer = initial(layer)
user << "<span class='notice'>You smooth [src] out beneath you.</span>"
add_fingerprint(user)
return
+1 -1
View File
@@ -8,7 +8,7 @@
anchored = 1
density = 1
pixel_x = -16
layer = 9
layer = FLY_LAYER
var/cut = FALSE
var/log_amount = 10
+1 -2
View File
@@ -9,7 +9,7 @@
icon_state = "girder"
anchored = 1
density = 1
layer = 2.9
layer = BELOW_OBJ_LAYER
var/state = GIRDER_NORMAL
var/girderpasschance = 20 // percentage chance that a projectile passes through the girder.
var/can_displace = TRUE //If the girder can be moved around by wrenching it
@@ -291,7 +291,6 @@
anchored = 0
state = GIRDER_DISPLACED
girderpasschance = 25
layer = 2.45
/obj/structure/girder/reinforced
name = "reinforced girder"
+1 -1
View File
@@ -7,7 +7,7 @@
anchored = 1
flags = CONDUCT
pressure_resistance = 5*ONE_ATMOSPHERE
layer = 2.9
layer = BELOW_OBJ_LAYER
var/health = 10
var/destroyed = 0
var/obj/item/stack/rods/stored
+28 -29
View File
@@ -50,38 +50,37 @@
qdel(src)
else
user << "<span class='notice'>You can't do that while something's on the spike!</span>"
else if(istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
if(istype(G.affecting, /mob/living/))
if(!buckled_mobs.len)
if(do_mob(user, src, 120))
if(buckled_mobs.len) //to prevent spam/queing up attacks
return
if(G.affecting.buckled)
return
var/mob/living/H = G.affecting
playsound(src.loc, "sound/effects/splat.ogg", 25, 1)
H.visible_message("<span class='danger'>[user] slams [G.affecting] onto the meat spike!</span>", "<span class='userdanger'>[user] slams you onto the meat spike!</span>", "<span class='italics'>You hear a squishy wet noise.</span>")
H.loc = src.loc
H.emote("scream")
if(istype(H, /mob/living/carbon/human)) //So you don't get human blood when you spike a giant spidere
var/turf/pos = get_turf(H)
pos.add_blood_floor(H)
H.adjustBruteLoss(30)
H.buckled = src
H.dir = 2
buckle_mob(H, force=1)
var/matrix/m180 = matrix(H.transform)
m180.Turn(180)
animate(H, transform = m180, time = 3)
H.pixel_y = H.get_standard_pixel_y_offset(180)
qdel(G)
return
user << "<span class='danger'>You can't use that on the spike!</span>"
else
return ..()
/obj/structure/kitchenspike/attack_hand(mob/user)
if(user.pulling && isliving(user.pulling) && user.a_intent == "grab" && !buckled_mobs.len)
var/mob/living/L = user.pulling
if(do_mob(user, src, 120))
if(buckled_mobs.len) //to prevent spam/queing up attacks
return
if(L.buckled)
return
playsound(src.loc, "sound/effects/splat.ogg", 25, 1)
L.visible_message("<span class='danger'>[user] slams [L] onto the meat spike!</span>", "<span class='userdanger'>[user] slams you onto the meat spike!</span>", "<span class='italics'>You hear a squishy wet noise.</span>")
L.loc = src.loc
L.emote("scream")
if(ishuman(L)) //So you don't get human blood when you spike a giant spider
var/turf/pos = get_turf(L)
pos.add_blood_floor(L)
L.adjustBruteLoss(30)
L.buckled = src
L.dir = 2
buckle_mob(L, force=1)
var/matrix/m180 = matrix(L.transform)
m180.Turn(180)
animate(L, transform = m180, time = 3)
L.pixel_y = L.get_standard_pixel_y_offset(180)
else
..()
/obj/structure/kitchenspike/user_buckle_mob(mob/living/M, mob/living/user) //Don't want them getting put on the rack other than by spiking
return
+1 -1
View File
@@ -5,7 +5,7 @@
icon_state = "lattice"
density = 0
anchored = 1
layer = 2.3 //under pipes
layer = LATTICE_LAYER //under pipes
var/obj/item/stack/rods/stored
canSmoothWith = list(/obj/structure/lattice,
/turf/open/floor,
+1 -1
View File
@@ -211,7 +211,7 @@ var/global/list/crematoriums = new/list()
/obj/structure/tray
icon = 'icons/obj/stationobjs.dmi'
density = 1
layer = 2.9
layer = BELOW_OBJ_LAYER
var/obj/structure/bodycontainer/connected = null
anchored = 1
pass_flags = LETPASSTHROW
+1 -1
View File
@@ -5,7 +5,7 @@
icon_state = "plasticflaps"
density = 0
anchored = 1
layer = 4
layer = ABOVE_MOB_LAYER
/obj/structure/plasticflaps/CanAStarPass(ID, to_dir, caller)
if(istype(caller, /mob/living))
+1 -1
View File
@@ -5,7 +5,7 @@
desc = "An angled mirror for reflecting lasers. This one does so at a 90 degree angle."
anchored = 0
density = 1
layer = 2.9
layer = BELOW_OBJ_LAYER
var/finished = 0
var/admin = 0 //Can't be rotated or deconstructed
var/framebuildstacktype = /obj/item/stack/sheet/metal
+1 -1
View File
@@ -177,7 +177,7 @@ obj/structure/safe/ex_act(severity, target)
icon_state = "floorsafe"
density = 0
level = 1 //underfloor
layer = 2.5
layer = LOW_OBJ_LAYER
/obj/structure/safe/floor/initialize()
+1 -1
View File
@@ -3,7 +3,7 @@
anchored = 1
opacity = 0
density = 0
layer = 3.5
layer = SIGN_LAYER
/obj/structure/sign/basic
name = "blank sign"
+1 -1
View File
@@ -16,7 +16,7 @@
icon_state = "table_frame"
density = 0
anchored = 0
layer = 2.8
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
var/framestack = /obj/item/stack/rods
var/framestackamount = 2
+34 -36
View File
@@ -19,7 +19,7 @@
icon_state = "table"
density = 1
anchored = 1
layer = 2.8
layer = TABLE_LAYER
climbable = TRUE
pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.")
var/frame = /obj/structure/table_frame
@@ -97,6 +97,19 @@
take_damage(rand(180,280), BRUTE, 0)
return 1
/obj/structure/table/attack_hand(mob/living/user)
if(user.a_intent == "grab" && user.pulling && isliving(user.pulling))
var/mob/living/pushed_mob = user.pulling
if(pushed_mob.buckled)
user << "<span class='warning'>[pushed_mob] is buckled to [pushed_mob.buckled]!</span>"
return
if(user.grab_state < GRAB_AGGRESSIVE)
user << "<span class='warning'>You need a better grip to do that!</span>"
return
tablepush(user, pushed_mob)
user.stop_pulling()
else
..()
/obj/structure/table/attack_tk() // no telehulk sorry
return
@@ -123,39 +136,15 @@
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSTABLE)
/obj/structure/table/proc/tablepush(obj/item/I, mob/user)
if(get_dist(src, user) < 2)
var/obj/item/weapon/grab/G = I
if(G.affecting.buckled)
user << "<span class='warning'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return 0
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='warning'>You need a better grip to do that!</span>"
return 0
if(!G.confirm())
return 0
G.affecting.forceMove(src.loc)
if(istype(src, /obj/structure/table/optable))
var/obj/structure/table/optable/OT = src
G.affecting.resting = 1
G.affecting.update_canmove()
visible_message("<span class='notice'>[G.assailant] has laid [G.affecting] on [src].</span>")
OT.patient = G.affecting
OT.check_patient()
qdel(I)
return 1
G.affecting.Weaken(2)
G.affecting.visible_message("<span class='danger'>[G.assailant] pushes [G.affecting] onto [src].</span>", \
"<span class='userdanger'>[G.assailant] pushes [G.affecting] onto [src].</span>")
add_logs(G.assailant, G.affecting, "pushed")
qdel(I)
return 1
qdel(I)
/obj/structure/table/proc/tablepush(mob/living/user, mob/living/pushed_mob)
pushed_mob.forceMove(src.loc)
pushed_mob.Weaken(2)
pushed_mob.visible_message("<span class='danger'>[user] pushes [pushed_mob] onto [src].</span>", \
"<span class='userdanger'>[user] pushes [pushed_mob] onto [src].</span>")
add_logs(user, pushed_mob, "pushed")
/obj/structure/table/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/grab))
tablepush(I, user)
return
if(!(flags & NODECONSTRUCT))
if(istype(I, /obj/item/weapon/screwdriver) && deconstruction_ready)
table_deconstruct(user, 1)
@@ -297,10 +286,12 @@
/obj/structure/table/glass/proc/table_shatter(mob/M)
visible_message("<span class='warning'>[src] breaks!</span>",
"<span class='danger'>You hear breaking glass.</span>")
playsound(src.loc, "shatter", 50, 1)
for(var/i in debris)
var/atom/movable/AM = i
AM.loc = get_turf(src)
var/turf/T = get_turf(src)
playsound(T, "shatter", 50, 1)
for(var/I in debris)
var/atom/movable/AM = I
AM.forceMove(T)
debris -= AM
if(istype(AM, /obj/item/weapon/shard))
AM.throw_impact(M)
M.Weaken(5)
@@ -401,6 +392,13 @@
computer.table = src
break
/obj/structure/table/optable/tablepush(mob/living/user, mob/living/pushed_mob)
pushed_mob.forceMove(src.loc)
pushed_mob.resting = 1
pushed_mob.update_canmove()
visible_message("<span class='notice'>[user] has laid [pushed_mob] on [src].</span>")
check_patient()
/obj/structure/table/optable/proc/check_patient()
var/mob/M = locate(/mob/living/carbon/human, loc)
if(M)
+1 -1
View File
@@ -27,7 +27,7 @@
pinned_target = T
T.pinnedLoc = src
T.density = 1
T.layer = OBJ_LAYER + 0.1
T.layer = OBJ_LAYER + 0.01
T.loc = loc
user << "<span class='notice'>You slide the target into the stake.</span>"
@@ -60,41 +60,44 @@
/obj/structure/transit_tube/station/attack_hand(mob/user)
if(!pod_moving)
for(var/obj/structure/transit_tube_pod/pod in loc)
if(!pod.moving && pod.dir in directions())
if(icon_state == "closed")
open_animation()
if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
if(icon_state == "open")
var/mob/living/GM = user.pulling
if(user.grab_state >= GRAB_AGGRESSIVE)
if(GM.buckled || GM.buckled_mobs.len)
user << "<span class='warning'>[GM] is attached to something!</span>"
return
for(var/obj/structure/transit_tube_pod/pod in loc)
pod.visible_message("<span class='warning'>[user] starts putting [GM] into the [pod]!</span>")
if(do_after(user, 15, target = src))
if(GM && user.grab_state >= GRAB_AGGRESSIVE && user.pulling == GM && !GM.buckled && !GM.buckled_mobs.len)
GM.Weaken(5)
src.Bumped(GM)
break
else
for(var/obj/structure/transit_tube_pod/pod in loc)
if(!pod.moving && pod.dir in directions())
if(icon_state == "closed")
open_animation()
else if(icon_state == "open")
if(pod.contents.len && user.loc != pod)
user.visible_message("[user] starts emptying [pod]'s contents onto the floor.", "<span class='notice'>You start emptying [pod]'s contents onto the floor...</span>")
if(do_after(user, 10, target = src)) //So it doesn't default to close_animation() on fail
if(pod.loc == loc)
for(var/atom/movable/AM in pod)
AM.loc = get_turf(user)
if(ismob(AM))
var/mob/M = AM
M.Weaken(5)
else if(icon_state == "open")
if(pod.contents.len && user.loc != pod)
user.visible_message("[user] starts emptying [pod]'s contents onto the floor.", "<span class='notice'>You start emptying [pod]'s contents onto the floor...</span>")
if(do_after(user, 10, target = src)) //So it doesn't default to close_animation() on fail
if(pod.loc == loc)
for(var/atom/movable/AM in pod)
AM.loc = get_turf(user)
if(ismob(AM))
var/mob/M = AM
M.Weaken(5)
else
close_animation()
break
else
close_animation()
break
/obj/structure/transit_tube/station/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/grab))
if(icon_state == "open")
var/obj/item/weapon/grab/G = W
if(ismob(G.affecting) && G.state >= GRAB_AGGRESSIVE)
var/mob/GM = G.affecting
for(var/obj/structure/transit_tube_pod/pod in loc)
pod.visible_message("<span class='warning'>[user] starts putting [GM] into the [pod]!</span>")
if(do_after(user, 15, target = src) && GM && G && G.affecting == GM)
GM.Weaken(5)
src.Bumped(GM)
qdel(G)
break
else if(istype(W, /obj/item/weapon/crowbar))
if(istype(W, /obj/item/weapon/crowbar))
for(var/obj/structure/transit_tube_pod/pod in loc)
if(pod.contents)
user << "<span class='warning'>Empty the pod first!</span>"
@@ -6,7 +6,7 @@
icon = 'icons/obj/atmospherics/pipes/transit_tube.dmi'
icon_state = "E-W"
density = 1
layer = 3.1
layer = ABOVE_OBJ_LAYER
anchored = 1
var/tube_construction = /obj/structure/c_transit_tube
var/list/tube_dirs = null
@@ -6,7 +6,7 @@
icon = 'icons/obj/atmospherics/pipes/transit_tube.dmi'
icon_state = "E-W" //icon_state decides which tube will be built
density = 0
layer = 3.1 //same as the built tube
layer = ABOVE_OBJ_LAYER //same as the built tube
anchored = 0
/obj/structure/c_transit_tube/examine(mob/user)
+45 -60
View File
@@ -22,12 +22,37 @@
playsound(src.loc, "swing_hit", 25, 1)
swirlie.visible_message("<span class='danger'>[user] slams the toilet seat onto [swirlie]'s head!</span>", "<span class='userdanger'>[user] slams the toilet seat onto your head!</span>", "<span class='italics'>You hear reverberating porcelain.</span>")
swirlie.adjustBruteLoss(5)
return
if(cistern && !open)
else if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
user.changeNext_move(CLICK_CD_MELEE)
var/mob/living/GM = user.pulling
if(user.grab_state >= GRAB_AGGRESSIVE)
if(GM.loc != get_turf(src))
user << "<span class='warning'>[GM] needs to be on [src]!</span>"
return
if(!swirlie)
if(open)
GM.visible_message("<span class='danger'>[user] starts to give [GM] a swirlie!</span>", "<span class='userdanger'>[user] starts to give you a swirlie...</span>")
swirlie = GM
if(do_after(user, 30, 0, target = src))
GM.visible_message("<span class='danger'>[user] gives [GM] a swirlie!</span>", "<span class='userdanger'>[user] gives you a swirlie!</span>", "<span class='italics'>You hear a toilet flushing.</span>")
if(iscarbon(GM))
var/mob/living/carbon/C = GM
if(!C.internal)
C.adjustOxyLoss(5)
else
GM.adjustOxyLoss(5)
swirlie = null
else
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
GM.visible_message("<span class='danger'>[user] slams [GM.name] into [src]!</span>", "<span class='userdanger'>[user] slams you into [src]!</span>")
GM.adjustBruteLoss(5)
else
user << "<span class='warning'>You need a tighter grip!</span>"
else if(cistern && !open)
if(!contents.len)
user << "<span class='notice'>The cistern is empty.</span>"
return
else
var/obj/item/I = pick(contents)
if(ishuman(user))
@@ -36,10 +61,9 @@
I.loc = get_turf(src)
user << "<span class='notice'>You find [I] in the cistern.</span>"
w_items -= I.w_class
return
open = !open
update_icon()
else
open = !open
update_icon()
/obj/structure/toilet/update_icon()
@@ -54,7 +78,6 @@
user.visible_message("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!", "<span class='notice'>You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!</span>", "<span class='italics'>You hear grinding porcelain.</span>")
cistern = !cistern
update_icon()
return
else if(cistern)
if(user.a_intent != "harm")
@@ -70,7 +93,6 @@
I.loc = src
w_items += I.w_class
user << "<span class='notice'>You carefully place [I] into the cistern.</span>"
return
else if(istype(I, /obj/item/weapon/reagent_containers))
if (!open)
@@ -78,39 +100,6 @@
var/obj/item/weapon/reagent_containers/RG = I
RG.reagents.add_reagent("water", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
user << "<span class='notice'>You fill [RG] from [src]. Gross.</span>"
return
else if(istype(I, /obj/item/weapon/grab))
user.changeNext_move(CLICK_CD_MELEE)
var/obj/item/weapon/grab/G = I
if(!G.confirm())
return
if(isliving(G.affecting))
var/mob/living/GM = G.affecting
if(G.state >= GRAB_AGGRESSIVE)
if(GM.loc != get_turf(src))
user << "<span class='warning'>[GM] needs to be on [src]!</span>"
return
if(!swirlie)
if(open)
GM.visible_message("<span class='danger'>[user] starts to give [GM] a swirlie!</span>", "<span class='userdanger'>[user] starts to give you a swirlie...</span>")
swirlie = GM
if(do_after(user, 30, 0, target = src))
GM.visible_message("<span class='danger'>[user] gives [GM] a swirlie!</span>", "<span class='userdanger'>[user] gives you a swirlie!</span>", "<span class='italics'>You hear a toilet flushing.</span>")
if(iscarbon(GM))
var/mob/living/carbon/C = GM
if(!C.internal)
C.adjustOxyLoss(5)
else
GM.adjustOxyLoss(5)
swirlie = null
else
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
GM.visible_message("<span class='danger'>[user] slams [GM.name] into [src]!</span>", "<span class='userdanger'>[user] slams you into [src]!</span>")
GM.adjustBruteLoss(5)
else
user << "<span class='warning'>You need a tighter grip!</span>"
else
return ..()
@@ -125,24 +114,20 @@
anchored = 1
/obj/structure/urinal/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
if(!G.confirm())
return
if(isliving(G.affecting))
var/mob/living/GM = G.affecting
if(G.state >= GRAB_AGGRESSIVE)
if(GM.loc != get_turf(src))
user << "<span class='notice'>[GM.name] needs to be on [src].</span>"
return
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("<span class='danger'>[user] slams [GM] into [src]!</span>", "<span class='danger'>You slam [GM] into [src]!</span>")
GM.adjustBruteLoss(8)
else
user << "<span class='warning'>You need a tighter grip!</span>"
/obj/structure/urinal/attack_hand(mob/user)
if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
var/mob/living/GM = user.pulling
if(user.grab_state >= GRAB_AGGRESSIVE)
if(GM.loc != get_turf(src))
user << "<span class='notice'>[GM.name] needs to be on [src].</span>"
return
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("<span class='danger'>[user] slams [GM] into [src]!</span>", "<span class='danger'>You slam [GM] into [src]!</span>")
GM.adjustBruteLoss(8)
else
user << "<span class='warning'>You need a tighter grip!</span>"
else
return ..()
..()
/obj/machinery/shower
name = "shower"
@@ -162,7 +147,7 @@
name = "mist"
icon = 'icons/obj/watercloset.dmi'
icon_state = "mist"
layer = MOB_LAYER + 1
layer = FLY_LAYER
anchored = 1
mouse_opacity = 0
+1 -1
View File
@@ -3,7 +3,7 @@
desc = "A window."
icon_state = "window"
density = 1
layer = 3.2//Just above doors
layer = ABOVE_OBJ_LAYER //Just above doors
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1 //initially is 0 for tile smoothing
flags = ON_BORDER