Merge branch 'master' into upstream-merge-37476

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
This commit is contained in:
LetterJay
2018-05-20 23:11:16 -05:00
242 changed files with 3178 additions and 2201 deletions
+1 -2
View File
@@ -147,8 +147,7 @@
to_chat(user, "<span class='notice'>You remove the cables.</span>")
state = SCREWED_CORE
update_icon()
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc )
A.amount = 5
new /obj/item/stack/cable_coil(drop_location(), 5)
return
if(istype(P, /obj/item/stack/sheet/rglass))
+3 -3
View File
@@ -53,7 +53,7 @@
name = "resin"
desc = "Looks like some kind of thick resin."
icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi'
icon_state = "resin"
icon_state = "smooth"
density = TRUE
opacity = 1
anchored = TRUE
@@ -77,7 +77,7 @@
name = "resin wall"
desc = "Thick resin solidified into a wall."
icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi'
icon_state = "wall0" //same as resin, but consistency ho!
icon_state = "smooth" //same as resin, but consistency ho!
resintype = "wall"
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
@@ -88,7 +88,7 @@
name = "resin membrane"
desc = "Resin just thin enough to let light pass through."
icon = 'icons/obj/smooth_structures/alien/resin_membrane.dmi'
icon_state = "membrane0"
icon_state = "smooth"
opacity = 0
max_integrity = 160
resintype = "membrane"
@@ -86,31 +86,31 @@
/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
if(wall_mounted)
return 1
return TRUE
return !density
/obj/structure/closet/proc/can_open(mob/living/user)
if(welded || locked)
return 0
return FALSE
var/turf/T = get_turf(src)
for(var/mob/living/L in T)
if(L.anchored || horizontal && L.mob_size > MOB_SIZE_TINY && L.density)
if(user)
to_chat(user, "<span class='danger'>There's something large on top of [src], preventing it from opening.</span>" )
return 0
return 1
return FALSE
return TRUE
/obj/structure/closet/proc/can_close(mob/living/user)
var/turf/T = get_turf(src)
for(var/obj/structure/closet/closet in T)
if(closet != src && !closet.wall_mounted)
return 0
return FALSE
for(var/mob/living/L in T)
if(L.anchored || horizontal && L.mob_size > MOB_SIZE_TINY && L.density)
if(user)
to_chat(user, "<span class='danger'>There's something too large in [src], preventing it from closing.</span>")
return 0
return 1
return FALSE
return TRUE
/obj/structure/closet/proc/dump_contents()
var/atom/L = drop_location()
@@ -180,14 +180,14 @@
/obj/structure/closet/proc/close(mob/living/user)
if(!opened || !can_close(user))
return 0
return FALSE
take_contents()
playsound(loc, close_sound, 15, 1, -3)
climb_time = initial(climb_time)
opened = FALSE
density = TRUE
update_icon()
return 1
return TRUE
/obj/structure/closet/proc/toggle(mob/living/user)
if(opened)
@@ -388,7 +388,7 @@
/obj/structure/closet/proc/bust_open()
welded = FALSE //applies to all lockers
locked = FALSE //applies to critter crates and secure lockers only
broken = 1 //applies to secure lockers only
broken = TRUE //applies to secure lockers only
open()
/obj/structure/closet/AltClick(mob/user)
@@ -427,7 +427,7 @@
"<span class='warning'>You scramble [src]'s lock, breaking it open!</span>",
"<span class='italics'>You hear a faint electrical spark.</span>")
playsound(src, "sparks", 50, 1)
broken = 1
broken = TRUE
locked = FALSE
update_icon()
@@ -470,16 +470,17 @@
/obj/structure/closet/proc/dive_into(mob/living/user)
var/turf/T1 = get_turf(user)
var/turf/T2 = get_turf(src)
if(!open() && !opened)
togglelock(user, TRUE)
if(!open())
if(!opened)
if(locked)
togglelock(user, TRUE)
if(!open(user))
to_chat(user, "<span class='warning'>It won't budge!</span>")
return
step_towards(user, T2)
T1 = get_turf(user)
if(T1 == T2)
user.resting = TRUE //so people can jump into crates without slamming the lid on their head
if(!close())
if(!close(user))
to_chat(user, "<span class='warning'>You can't get [src] to close!</span>")
user.resting = FALSE
return
@@ -148,6 +148,8 @@
new /obj/item/storage/backpack/duffelbag/sec(src)
for(var/i in 1 to 3)
new /obj/item/clothing/under/rank/security(src)
for(var/i in 1 to 2)
new /obj/item/clothing/under/rank/security/skirt(src)
for(var/i in 1 to 3)
new /obj/item/clothing/shoes/jackboots(src)
for(var/i in 1 to 3)
@@ -17,6 +17,7 @@
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 90, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
anchored = TRUE
anchorable = FALSE
var/generated = FALSE
var/datum/supply_order/SupplyOrder
/obj/structure/closet/supplypod/bluespacepod
@@ -45,7 +46,9 @@
/obj/structure/closet/supplypod/open()
var/turf/T = get_turf(src)
opened = TRUE
SupplyOrder.generate(T)//not called during populateContents as supplyorder generation requires a turf
if(!generated)
generated = TRUE
SupplyOrder.generate(T)//not called during populateContents as supplyorder generation requires a turf
update_icon()
playsound(src, open_sound, 15, 1, -3)
if(istype(src,/obj/structure/closet/supplypod/bluespacepod))
@@ -62,6 +65,7 @@
//------------------------------------FALLING SUPPLY POD-------------------------------------//
/obj/effect/temp_visual/DPfall
icon = 'icons/obj/2x2.dmi'
icon_state = "supplypod_falling"
pixel_x = -16
pixel_y = -5
pixel_z = 200
@@ -115,4 +119,4 @@
icon = 'icons/obj/module.dmi'
icon_state = "cargodisk"
item_state = "card-id"
w_class = WEIGHT_CLASS_SMALL
w_class = WEIGHT_CLASS_SMALL
@@ -1,115 +1,115 @@
/obj/structure/closet/syndicate
name = "armory closet"
desc = "Why is this here?"
icon_state = "syndicate"
/obj/structure/closet/syndicate/personal
desc = "It's a personal storage unit for operative gear."
/obj/structure/closet/syndicate/personal/PopulateContents()
..()
new /obj/item/clothing/under/syndicate(src)
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/radio/headset/syndicate(src)
new /obj/item/ammo_box/magazine/m10mm(src)
new /obj/item/storage/belt/military(src)
new /obj/item/crowbar/red(src)
new /obj/item/clothing/glasses/night(src)
/obj/structure/closet/syndicate/nuclear
desc = "It's a storage unit for a Syndicate boarding party."
/obj/structure/closet/syndicate/nuclear/PopulateContents()
for(var/i in 1 to 5)
new /obj/item/ammo_box/magazine/m10mm(src)
new /obj/item/storage/box/flashbangs(src)
new /obj/item/storage/box/teargas(src)
new /obj/item/storage/backpack/duffelbag/syndie/med(src)
new /obj/item/pda/syndicate(src)
/obj/structure/closet/syndicate/resources
desc = "An old, dusty locker."
/obj/structure/closet/syndicate/resources/PopulateContents()
..()
var/common_min = 30 //Minimum amount of minerals in the stack for common minerals
var/common_max = 50 //Maximum amount of HONK in the stack for HONK common minerals
var/rare_min = 5 //Minimum HONK of HONK in the stack HONK HONK rare minerals
var/rare_max = 20 //Maximum HONK HONK HONK in the HONK for HONK rare HONK
var/pickednum = rand(1, 50)
//Sad trombone
if(pickednum == 1)
var/obj/item/paper/P = new /obj/item/paper(src)
P.name = "\improper IOU"
P.info = "Sorry man, we needed the money so we sold your stash. It's ok, we'll double our money for sure this time!"
//Metal (common ore)
if(pickednum >= 2)
new /obj/item/stack/sheet/metal(src, rand(common_min, common_max))
//Glass (common ore)
if(pickednum >= 5)
new /obj/item/stack/sheet/glass(src, rand(common_min, common_max))
//Plasteel (common ore) Because it has a million more uses then plasma
if(pickednum >= 10)
new /obj/item/stack/sheet/plasteel(src, rand(common_min, common_max))
//Plasma (rare ore)
if(pickednum >= 15)
new /obj/item/stack/sheet/mineral/plasma(src, rand(rare_min, rare_max))
//Silver (rare ore)
if(pickednum >= 20)
new /obj/item/stack/sheet/mineral/silver(src, rand(rare_min, rare_max))
//Gold (rare ore)
if(pickednum >= 30)
new /obj/item/stack/sheet/mineral/gold(src, rand(rare_min, rare_max))
//Uranium (rare ore)
if(pickednum >= 40)
new /obj/item/stack/sheet/mineral/uranium(src, rand(rare_min, rare_max))
//Titanium (rare ore)
if(pickednum >= 40)
new /obj/item/stack/sheet/mineral/titanium(src, rand(rare_min, rare_max))
//Plastitanium (rare ore)
if(pickednum >= 40)
new /obj/item/stack/sheet/mineral/plastitanium(src, rand(rare_min, rare_max))
//Diamond (rare HONK)
if(pickednum >= 45)
new /obj/item/stack/sheet/mineral/diamond(src, rand(rare_min, rare_max))
//Jetpack (You hit the jackpot!)
if(pickednum == 50)
new /obj/item/tank/jetpack/carbondioxide(src)
/obj/structure/closet/syndicate/resources/everything
desc = "It's an emergency storage closet for repairs."
/obj/structure/closet/syndicate/resources/everything/PopulateContents()
var/list/resources = list(
/obj/item/stack/sheet/metal,
/obj/item/stack/sheet/glass,
/obj/item/stack/sheet/mineral/gold,
/obj/item/stack/sheet/mineral/silver,
/obj/item/stack/sheet/mineral/plasma,
/obj/item/stack/sheet/mineral/uranium,
/obj/item/stack/sheet/mineral/diamond,
/obj/item/stack/sheet/mineral/bananium,
/obj/item/stack/sheet/plasteel,
/obj/item/stack/sheet/mineral/titanium,
/obj/item/stack/sheet/mineral/plastitanium,
/obj/item/stack/rods
)
for(var/i = 0, i<2, i++)
for(var/res in resources)
var/obj/item/stack/R = new res(src)
R.amount = R.max_amount
/obj/structure/closet/syndicate
name = "armory closet"
desc = "Why is this here?"
icon_state = "syndicate"
/obj/structure/closet/syndicate/personal
desc = "It's a personal storage unit for operative gear."
/obj/structure/closet/syndicate/personal/PopulateContents()
..()
new /obj/item/clothing/under/syndicate(src)
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/radio/headset/syndicate(src)
new /obj/item/ammo_box/magazine/m10mm(src)
new /obj/item/storage/belt/military(src)
new /obj/item/crowbar/red(src)
new /obj/item/clothing/glasses/night(src)
/obj/structure/closet/syndicate/nuclear
desc = "It's a storage unit for a Syndicate boarding party."
/obj/structure/closet/syndicate/nuclear/PopulateContents()
for(var/i in 1 to 5)
new /obj/item/ammo_box/magazine/m10mm(src)
new /obj/item/storage/box/flashbangs(src)
new /obj/item/storage/box/teargas(src)
new /obj/item/storage/backpack/duffelbag/syndie/med(src)
new /obj/item/pda/syndicate(src)
/obj/structure/closet/syndicate/resources
desc = "An old, dusty locker."
/obj/structure/closet/syndicate/resources/PopulateContents()
..()
var/common_min = 30 //Minimum amount of minerals in the stack for common minerals
var/common_max = 50 //Maximum amount of HONK in the stack for HONK common minerals
var/rare_min = 5 //Minimum HONK of HONK in the stack HONK HONK rare minerals
var/rare_max = 20 //Maximum HONK HONK HONK in the HONK for HONK rare HONK
var/pickednum = rand(1, 50)
//Sad trombone
if(pickednum == 1)
var/obj/item/paper/P = new /obj/item/paper(src)
P.name = "\improper IOU"
P.info = "Sorry man, we needed the money so we sold your stash. It's ok, we'll double our money for sure this time!"
//Metal (common ore)
if(pickednum >= 2)
new /obj/item/stack/sheet/metal(src, rand(common_min, common_max))
//Glass (common ore)
if(pickednum >= 5)
new /obj/item/stack/sheet/glass(src, rand(common_min, common_max))
//Plasteel (common ore) Because it has a million more uses then plasma
if(pickednum >= 10)
new /obj/item/stack/sheet/plasteel(src, rand(common_min, common_max))
//Plasma (rare ore)
if(pickednum >= 15)
new /obj/item/stack/sheet/mineral/plasma(src, rand(rare_min, rare_max))
//Silver (rare ore)
if(pickednum >= 20)
new /obj/item/stack/sheet/mineral/silver(src, rand(rare_min, rare_max))
//Gold (rare ore)
if(pickednum >= 30)
new /obj/item/stack/sheet/mineral/gold(src, rand(rare_min, rare_max))
//Uranium (rare ore)
if(pickednum >= 40)
new /obj/item/stack/sheet/mineral/uranium(src, rand(rare_min, rare_max))
//Titanium (rare ore)
if(pickednum >= 40)
new /obj/item/stack/sheet/mineral/titanium(src, rand(rare_min, rare_max))
//Plastitanium (rare ore)
if(pickednum >= 40)
new /obj/item/stack/sheet/mineral/plastitanium(src, rand(rare_min, rare_max))
//Diamond (rare HONK)
if(pickednum >= 45)
new /obj/item/stack/sheet/mineral/diamond(src, rand(rare_min, rare_max))
//Jetpack (You hit the jackpot!)
if(pickednum == 50)
new /obj/item/tank/jetpack/carbondioxide(src)
/obj/structure/closet/syndicate/resources/everything
desc = "It's an emergency storage closet for repairs."
/obj/structure/closet/syndicate/resources/everything/PopulateContents()
var/list/resources = list(
/obj/item/stack/sheet/metal,
/obj/item/stack/sheet/glass,
/obj/item/stack/sheet/mineral/gold,
/obj/item/stack/sheet/mineral/silver,
/obj/item/stack/sheet/mineral/plasma,
/obj/item/stack/sheet/mineral/uranium,
/obj/item/stack/sheet/mineral/diamond,
/obj/item/stack/sheet/mineral/bananium,
/obj/item/stack/sheet/plasteel,
/obj/item/stack/sheet/mineral/titanium,
/obj/item/stack/sheet/mineral/plastitanium,
/obj/item/stack/rods
)
for(var/i = 0, i<2, i++)
for(var/res in resources)
var/obj/item/stack/R = res
new res(src, initial(R.max_amount))
@@ -1,15 +1,14 @@
/obj/structure/closet/crate/large
name = "large crate"
desc = "A hefty wooden crate."
desc = "A hefty wooden crate. You'll need a crowbar to get it open."
icon_state = "largecrate"
density = TRUE
material_drop = /obj/item/stack/sheet/mineral/wood
material_drop_amount = 4
delivery_icon = "deliverybox"
integrity_failure = 0 //Makes the crate break when integrity reaches 0, instead of opening and becoming an invisible sprite.
/obj/structure/closet/crate/large/attack_hand(mob/user)
. = ..()
if(.)
return
add_fingerprint(user)
if(manifest)
tear_manifest(user)
@@ -18,7 +17,6 @@
/obj/structure/closet/crate/large/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/crowbar))
var/turf/T = get_turf(src)
if(manifest)
tear_manifest(user)
@@ -27,11 +25,19 @@
"<span class='italics'>You hear splitting wood.</span>")
playsound(src.loc, 'sound/weapons/slashmiss.ogg', 75, 1)
for(var/i in 1 to rand(2, 5))
var/turf/T = get_turf(src)
for(var/i in 1 to material_drop_amount)
new material_drop(src)
for(var/atom/movable/AM in contents)
AM.forceMove(T)
qdel(src)
else
return ..()
if(user.a_intent == INTENT_HARM) //Only return ..() if intent is harm, otherwise return 0 or just end it.
return ..() //Stops it from opening and turning invisible when items are used on it.
else
to_chat(user, "<span class='warning'>You need a crowbar to pry this open!</span>")
return FALSE //Just stop. Do nothing. Don't turn into an invisible sprite. Don't open like a locker.
//The large crate has no non-attack interactions other than the crowbar, anyway.
+8 -6
View File
@@ -263,12 +263,14 @@
/obj/structure/grille/hitby(AM as mob|obj)
if(isobj(AM))
if(prob(50) && anchored && !broken)
var/turf/T = get_turf(src)
var/obj/structure/cable/C = T.get_cable_node()
if(C)
playsound(src, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
tesla_zap(src, 3, C.powernet.avail * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
C.powernet.load += C.powernet.avail * 0.0375 // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
var/obj/O = AM
if(O.throwforce != 0)//don't want to let people spam tesla bolts, this way it will break after time
var/turf/T = get_turf(src)
var/obj/structure/cable/C = T.get_cable_node()
if(C)
playsound(src, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
tesla_zap(src, 3, C.powernet.avail * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
C.powernet.load += C.powernet.avail * 0.0375 // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
return ..()
/obj/structure/grille/get_dumping_location(datum/component/storage/source,mob/user)
+1
View File
@@ -8,6 +8,7 @@
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50)
max_integrity = 50
layer = LATTICE_LAYER //under pipes
plane = FLOOR_PLANE
var/number_of_rods = 1
canSmoothWith = list(/obj/structure/lattice,
/turf/open/floor,