Merge branch 'dev' into ofDryingAndRacks

This commit is contained in:
Kelenius
2015-02-03 20:51:27 +03:00
119 changed files with 991 additions and 674 deletions
-85
View File
@@ -1,85 +0,0 @@
/obj/structure/closet/secure_closet/ert/commander
name = "\improper ERT commander locker"
req_access = list(ACCESS_SECURITY)
icon_state = "capsecure1"
icon_closed = "capsecure"
icon_locked = "capsecure1"
icon_opened = "capsecureopen"
icon_broken = "capsecurebroken"
icon_off = "capsecureoff"
New()
..()
new /obj/item/clothing/head/helmet/space/ert/commander(src)
new /obj/item/clothing/suit/space/ert/commander(src)
new /obj/item/weapon/plastique(src)
new /obj/item/weapon/storage/belt/security/full(src)
new /obj/item/weapon/gun/energy/ionrifle(src)
new /obj/item/weapon/gun/energy/gun/nuclear(src)
new /obj/item/clothing/glasses/thermal(src)
new /obj/item/weapon/flame/lighter/zippo(src)
new /obj/item/weapon/pinpointer(src)
return
/obj/structure/closet/secure_closet/ert/security
name = "\improper ERT security locker"
req_access = list(ACCESS_SECURITY)
icon_state = "sec1"
icon_closed = "sec"
icon_locked = "sec1"
icon_opened = "secopen"
icon_broken = "secbroken"
icon_off = "secoff"
New()
..()
new /obj/item/clothing/head/helmet/space/ert/security(src)
new /obj/item/clothing/suit/space/ert/security(src)
new /obj/item/weapon/plastique(src)
new /obj/item/weapon/storage/belt/security/full(src)
new /obj/item/weapon/gun/energy/ionrifle(src)
new /obj/item/weapon/gun/energy/gun/nuclear(src)
new /obj/item/clothing/glasses/thermal(src)
return
/obj/structure/closet/secure_closet/ert/engineer
name = "\improper ERT engineer locker"
req_access = list(ACCESS_ENGINE)
icon_state = "secureeng1"
icon_closed = "secureeng"
icon_locked = "secureeng1"
icon_opened = "secureengopen"
icon_broken = "secureengbroken"
icon_off = "secureengoff"
New()
..()
new /obj/item/clothing/head/helmet/space/ert/engineer(src)
new /obj/item/clothing/suit/space/ert/engineer(src)
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/weapon/storage/belt/utility/full(src)
new /obj/item/weapon/storage/backpack/industrial/full(src)
new /obj/item/device/t_scanner(src)
new /obj/item/clothing/glasses/meson(src)
return
/obj/structure/closet/secure_closet/ert/medical
name = "\improper ERT medical locker"
req_access = list(ACCESS_MEDICAL)
icon_state = "securemed1"
icon_closed = "securemed"
icon_locked = "securemed1"
icon_opened = "securemedopen"
icon_broken = "securemedbroken"
icon_off = "securemedoff"
New()
..()
new /obj/item/clothing/head/helmet/space/ert/medical(src)
new /obj/item/clothing/suit/space/ert/medical(src)
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/weapon/storage/backpack/medic/full(src)
new /obj/item/weapon/storage/belt/medical(src)
new /obj/item/clothing/glasses/hud/health(src)
return
@@ -1,122 +0,0 @@
/obj/structure/closet/secure_closet/chef_personal
name = "Chef's Locker"
req_access = list(ACCESS_KITCHEN)
New()
..()
new /obj/item/wardrobe/chef(src)
//
var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
var/obj/item/weapon/storage/box/B = new(BPK)
new /obj/item/weapon/pen(B)
new /obj/item/device/radio/headset(src)
/obj/structure/closet/secure_closet/bar
name = "Booze"
req_access = list(ACCESS_BAR)
New()
..()
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
return
/obj/structure/closet/secure_closet/barman_personal
name = "Barman's Locker"
req_access = list(ACCESS_BAR)
New()
..()
new /obj/item/wardrobe/bartender(src)
//
var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
var/obj/item/weapon/storage/box/B = new(BPK)
new /obj/item/weapon/pen(B)
new /obj/item/device/radio/headset(src)
new /obj/item/ammo_casing/shotgun/beanbag(BPK)
new /obj/item/ammo_casing/shotgun/beanbag(BPK)
new /obj/item/ammo_casing/shotgun/beanbag(BPK)
new /obj/item/ammo_casing/shotgun/beanbag(BPK)
/obj/structure/closet/secure_closet/hydro_personal
name = "Botanist's Locker"
req_access = list(ACCESS_HYDROPONICS)
New()
..()
new /obj/item/wardrobe/hydro
//
var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
var/obj/item/weapon/storage/box/B = new(BPK)
new /obj/item/weapon/pen(B)
new /obj/item/device/analyzer/plant_analyzer(src)
new /obj/item/device/radio/headset(src)
/obj/structure/closet/secure_closet/janitor_personal
name = "Janitor's Locker"
req_access = list(ACCESS_JANITOR)
New()
..()
new /obj/item/wardrobe/janitor(src)
//
var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
var/obj/item/weapon/storage/box/B = new(BPK)
new /obj/item/weapon/pen(B)
new /obj/item/device/pda/janitor(src)
/obj/structure/closet/secure_closet/lawyer_personal
name = "Lawyer's Locker"
req_access = list(ACCESS_LAWYER)
New()
..()
new /obj/item/wardrobe/lawyer(src)
//
var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
var/obj/item/weapon/storage/box/B = new(BPK)
new /obj/item/weapon/pen(B)
new /obj/item/device/pda/lawyer(src)
new /obj/item/device/detective_scanner(src)
new /obj/item/weapon/storage/briefcase(src)
/obj/structure/closet/secure_closet/librarian_personal
name = "Librarian's Locker"
req_access = list(ACCESS_LIBRARY)
New()
..()
new /obj/item/wardrobe/librarian(src)
//
var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
var/obj/item/weapon/storage/box/B = new(BPK)
new /obj/item/weapon/pen(B)
new /obj/item/weapon/barcodescanner(src)
/obj/structure/closet/secure_closet/counselor_personal
name = "Counselor's Locker"
req_access = list(ACCESS_CHAPEL_OFFICE)
New()
..()
new /obj/item/wardrobe/chaplain(src)
//
new /obj/item/weapon/storage/backpack/cultpack (src)
var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
var/obj/item/weapon/storage/box/B = new(BPK)
new /obj/item/weapon/pen(B)
new /obj/item/weapon/storage/bible(src)
new /obj/item/device/pda/chaplain(src)
new /obj/item/device/radio/headset(src)
new /obj/item/weapon/candlepack(src)
new /obj/item/weapon/candlepack(src)
@@ -1,47 +0,0 @@
/obj/structure/closet/secure_closet/scientist
name = "Scientist's Locker"
req_access = list(ACCESS_RESEARCH)
icon_state = "secureres1"
icon_closed = "secureres"
icon_locked = "secureres1"
icon_opened = "secureresopen"
icon_broken = "secureresbroken"
icon_off = "secureresoff"
New()
..()
new /obj/item/wardrobe/scientist(src)
//
var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
var/obj/item/weapon/storage/box/B = new(BPK)
new /obj/item/weapon/pen(B)
new /obj/item/device/pda/science(src)
new /obj/item/weapon/tank/oxygen(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/radio/headset/headset_sci(src)
/obj/structure/closet/secure_closet/rd
name = "Research Director's Locker"
req_access = list(ACCESS_RD)
icon_state = "rdsecure1"
icon_closed = "rdsecure"
icon_locked = "rdsecure1"
icon_opened = "rdsecureopen"
icon_broken = "rdsecurebroken"
icon_off = "rdsecureoff"
New()
..()
new /obj/item/wardrobe/rd(src)
//
var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
var/obj/item/weapon/storage/box/B = new(BPK)
new /obj/item/weapon/pen(B)
new /obj/item/weapon/clipboard(src)
new /obj/item/weapon/tank/air(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/flash(src)
new /obj/item/device/radio/headset/heads/rd(src)
//
@@ -114,13 +114,19 @@ var/global/list/image/splatter_cache=list()
amount = 2
/obj/effect/decal/cleanable/blood/drip
name = "drips of blood"
desc = "It's red."
gender = PLURAL
icon = 'icons/effects/drip.dmi'
icon_state = "1"
random_icon_states = list("1","2","3","4","5")
amount = 0
name = "drips of blood"
desc = "It's red."
gender = PLURAL
icon = 'icons/effects/drip.dmi'
icon_state = "1"
random_icon_states = list("1","2","3","4","5")
amount = 0
var/list/drips = list()
/obj/effect/decal/cleanable/blood/drip/New()
..()
spawn(1)
drips |= icon_state
/obj/effect/decal/cleanable/blood/writing
icon_state = "tracks"
+8 -4
View File
@@ -70,8 +70,12 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
var/lighting_controller_was_processing = lighting_controller.processing //Pause the lighting updates for a bit
lighting_controller.processing = 0
var/approximate_intensity = (devastation_range * 3) + (heavy_impact_range * 2) + light_impact_range
var/powernet_rebuild_was_deferred_already = defer_powernet_rebuild
if(defer_powernet_rebuild != 2)
// Large enough explosion. For performance reasons, powernets will be rebuilt manually
if(!defer_powernet_rebuild && (approximate_intensity > 25))
defer_powernet_rebuild = 1
if(heavy_impact_range > 1)
@@ -110,9 +114,9 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
sleep(8)
if(!lighting_controller.processing) lighting_controller.processing = lighting_controller_was_processing
if(!powernet_rebuild_was_deferred_already)
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 0
if(!powernet_rebuild_was_deferred_already && defer_powernet_rebuild)
makepowernets()
defer_powernet_rebuild = 0
return 1
+2 -7
View File
@@ -35,7 +35,7 @@
var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit)
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N
var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
var/list/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
var/list/allowed = null //suit storage stuff.
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
var/zoomdevicename = null //name used for message when binoculars/scope is used
@@ -115,12 +115,7 @@
size = "bulky"
if(5.0)
size = "huge"
else
//if ((CLUMSY in usr.mutations) && prob(50)) t = "funny-looking"
usr << "This is a [blood_DNA ? blood_color != "#030303" ? "bloody " : "oil-stained " : ""]\icon[src][src.name]. It is a [size] item."
if(src.desc)
usr << src.desc
return
return ..(user, distance, "", "It is a [size] item.")
/obj/item/attack_hand(mob/user as mob)
if (!user) return
+9 -2
View File
@@ -464,7 +464,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
data["convo_job"] = sanitize(c["job"])
break
if(mode==41)
data["manifest"] = data_core.get_manifest_json()
data_core.get_manifest_json()
if(mode==3)
@@ -535,12 +535,19 @@ var/global/list/obj/item/device/pda/PDAs = list()
nanoUI = data
// update the ui if it exists, returns null if no ui is passed/found
if(ui)
ui.load_cached_data(ManifestJSON)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "pda.tmpl", title, 520, 400)
// when the ui is first opened this is the data it will use
ui.load_cached_data(ManifestJSON)
ui.set_initial_data(data)
// open the new ui window
ui.open()
@@ -61,6 +61,8 @@
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
overlays.Cut()
return
else
..()
/obj/item/weapon/kitchen/utensil/fork
name = "fork"
+22 -5
View File
@@ -117,10 +117,16 @@
ui_interact(user)
/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/mob/living/carbon/location = null
if(istype(loc, /obj/item/weapon/rig)) // check for tanks in rigs
if(istype(loc.loc, /mob/living/carbon))
location = loc.loc
else if(istype(loc, /mob/living/carbon))
location = loc
var/using_internal
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(istype(location))
if(location.internal==src)
using_internal = 1
@@ -133,9 +139,20 @@
data["valveOpen"] = using_internal ? 1 : 0
data["maskConnected"] = 0
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal == src)
if(istype(location))
var/mask_check = 0
if(location.internal == src) // if tank is current internal
mask_check = 1
else if(src in location) // or if tank is in the mobs possession
if(!location.internal) // and they do not have any active internals
mask_check = 1
else if(istype(src.loc, /obj/item/weapon/rig) && src.loc in location) // or the rig is in the mobs possession
if(!location.internal) // and they do not have any active internals
mask_check = 1
if(mask_check)
if(location.wear_mask && (location.wear_mask.flags & AIRTIGHT))
data["maskConnected"] = 1
else if(istype(location, /mob/living/carbon/human))
+8 -5
View File
@@ -13,7 +13,7 @@
user.put_in_hands(tape)
*/
/obj/item/weapon/tape_roll/proc/stick(var/obj/item/weapon/W, mob/user as mob)
/obj/item/weapon/tape_roll/proc/stick(var/obj/item/weapon/W, mob/user)
if(!istype(W, /obj/item/weapon/paper))
return
@@ -30,14 +30,14 @@
w_class = 1
layer = 4
anchored = 1 //it's sticky, no you cant move it
var/obj/item/weapon/stuck = null
/obj/item/weapon/ducttape/New()
..()
flags |= NOBLUDGEON
/obj/item/weapon/ducttape/examine(mob/user as mob)
/obj/item/weapon/ducttape/examine(mob/user)
return stuck.examine(user)
/obj/item/weapon/ducttape/proc/attach(var/obj/item/weapon/W)
@@ -47,7 +47,7 @@
name = W.name + " (taped)"
overlays = W.overlays
/obj/item/weapon/ducttape/attack_self(mob/user as mob)
/obj/item/weapon/ducttape/attack_self(mob/user)
if(!stuck)
return
@@ -60,7 +60,7 @@
overlays = null
del(src)
/obj/item/weapon/ducttape/afterattack(var/A, mob/user as mob, flag, params)
/obj/item/weapon/ducttape/afterattack(var/A, mob/user, flag, params)
if(!in_range(user, A) || istype(A, /obj/machinery/door) || !stuck)
return
@@ -70,6 +70,9 @@
var/dir_offset = 0
if(target_turf != source_turf)
dir_offset = get_dir(source_turf, target_turf)
if(!(dir_offset in cardinal))
user << "You cannot reach that from here." // can only place stuck papers in cardinal directions, to
return // reduce papers around corners issue.
user.drop_from_inventory(src)
forceMove(source_turf)
@@ -191,7 +191,8 @@
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/weapon/grab))
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
var/obj/item/weapon/grab/G = W
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
if(istype(W,/obj/item/tk_grab))
return 0
if(istype(W, /obj/item/weapon/weldingtool))
@@ -206,6 +207,8 @@
return
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
usr.drop_item()
if(W)
W.loc = src.loc
@@ -66,12 +66,15 @@
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(src.large)
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
else
user << "<span class='notice'>The locker is too small to stuff [W:affecting] into!</span>"
user << "<span class='notice'>The locker is too small to stuff [G.affecting] into!</span>"
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
user.drop_item()
if(W)
W.loc = src.loc
@@ -70,6 +70,8 @@
if(opened)
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
user.drop_item()
if(W)
W.loc = src.loc
+56 -28
View File
@@ -15,25 +15,70 @@
var/basestate
var/shardtype = /obj/item/weapon/shard
var/glasstype = null // Set this in subtypes. Null is assumed strange or otherwise impossible to dismantle, such as for shuttle glass.
// var/silicate = 0 // number of units of silicate
// var/icon/silicateIcon = null // the silicated icon
var/silicate = 0 // number of units of silicate
/obj/structure/window/examine(mob/user)
. = ..(user)
if(health == maxhealth)
user << "<span class='notice'>It looks fully intact.</span>"
else
var/perc = health / maxhealth
if(perc > 0.75)
user << "<span class='notice'>It has a few cracks.</span>"
else if(perc > 0.5)
user << "<span class='warning'>It looks slightly damaged.</span>"
else if(perc > 0.25)
user << "<span class='warning'>It looks moderately damaged.</span>"
else
user << "<span class='danger'>It looks heavily damaged.</span>"
if(silicate)
if (silicate < 30)
user << "<span class='notice'>It has a thin layer of silicate.</span>"
else if (silicate < 70)
user << "<span class='notice'>It is covered in silicate.</span>"
else
user << "<span class='notice'>There is a thick layer of silicate covering it.</span>"
/obj/structure/window/proc/take_damage(var/damage = 0, var/sound_effect = 1)
var/initialhealth = src.health
src.health = max(0, src.health - damage)
if(src.health <= 0)
src.shatter()
var/initialhealth = health
if(silicate)
damage = damage * (1 - silicate / 200)
health = max(0, health - damage)
if(health <= 0)
shatter()
else
if(sound_effect)
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
if(src.health < src.maxhealth / 4 && initialhealth >= src.maxhealth / 4)
if(health < maxhealth / 4 && initialhealth >= maxhealth / 4)
visible_message("[src] looks like it's about to shatter!" )
else if(src.health < src.maxhealth / 2 && initialhealth >= src.maxhealth / 2)
else if(health < maxhealth / 2 && initialhealth >= maxhealth / 2)
visible_message("[src] looks seriously damaged!" )
else if(src.health < src.maxhealth * 3/4 && initialhealth >= src.maxhealth * 3/4)
else if(health < maxhealth * 3/4 && initialhealth >= maxhealth * 3/4)
visible_message("Cracks begin to appear in [src]!" )
return
/obj/structure/window/proc/apply_silicate(var/amount)
if(health < maxhealth) // Mend the damage
health = min(health + amount * 3, maxhealth)
if(health == maxhealth)
visible_message("[src] looks fully repaired." )
else // Reinforce
silicate = min(silicate + amount, 100)
updateSilicate()
/obj/structure/window/proc/updateSilicate()
if (overlays)
overlays.Cut()
var/image/img = image(src.icon, src.icon_state)
img.color = "#ffffff"
img.alpha = silicate * 255 / 100
overlays += img
/obj/structure/window/proc/shatter(var/display_message = 1)
playsound(src, "shatter", 70, 1)
if(display_message)
@@ -251,7 +296,7 @@
update_nearby_tiles(need_rebuild=1) //Compel updates before
set_dir(turn(dir, 90))
// updateSilicate()
updateSilicate()
update_nearby_tiles(need_rebuild=1)
return
@@ -267,27 +312,10 @@
update_nearby_tiles(need_rebuild=1) //Compel updates before
set_dir(turn(dir, 270))
// updateSilicate()
updateSilicate()
update_nearby_tiles(need_rebuild=1)
return
/*
/obj/structure/window/proc/updateSilicate()
if(silicateIcon && silicate)
icon = initial(icon)
var/icon/I = icon(icon,icon_state,dir)
var/r = (silicate / 100) + 1
var/g = (silicate / 70) + 1
var/b = (silicate / 50) + 1
I.SetIntensity(r,g,b)
icon = I
silicateIcon = I
*/
/obj/structure/window/New(Loc, start_dir=null, constructed=0)
..()