Merge branch 'dev' into ofSleepersAndNano

Conflicts:
	code/game/machinery/Sleeper.dm
	maps/exodus-1.dmm
This commit is contained in:
Kelenius
2015-08-13 09:20:51 +03:00
259 changed files with 3708 additions and 2372 deletions
@@ -236,20 +236,20 @@
electronics = null
else if(istype(W, /obj/item/stack/material) && !glass)
var/obj/item/stack/material/S = W
var/obj/item/stack/S = W
var/material_name = S.get_material_name()
if (S)
if (S.get_amount() >= 1)
if(istype(S, /obj/item/stack/material/glass/reinforced))
if(material_name == "rglass")
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass)
if (S.use(1))
user << "<span class='notice'>You installed reinforced glass windows into the airlock assembly.</span>"
glass = 1
else if(istype(S, /obj/item/stack/material) && S.default_type)
var/M = S.default_type
else if(material_name)
// Ugly hack, will suffice for now. Need to fix it upstream as well, may rewrite mineral walls. ~Z
if(M in list("mhydrogen","osmium","tritium","platinum","iron"))
if(!(material_name in list("gold", "silver", "diamond", "uranium", "phoron", "sandstone")))
user << "You cannot make an airlock out of that material."
return
if(S.get_amount() >= 2)
@@ -257,8 +257,8 @@
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass)
if (S.use(2))
user << "<span class='notice'>You installed [M] plating into the airlock assembly.</span>"
glass = "[M]"
user << "<span class='notice'>You installed [material_display_name(material_name)] plating into the airlock assembly.</span>"
glass = material_name
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
+4 -4
View File
@@ -25,7 +25,7 @@
/obj/structure/girder/bullet_act(var/obj/item/projectile/Proj)
//Girders only provide partial cover. There's a chance that the projectiles will just pass through. (unless you are trying to shoot the girder)
if(Proj.original != src && !prob(cover))
return -1 //pass through
return PROJECTILE_CONTINUE //pass through
//Tasers and the like should not damage girders.
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
@@ -108,11 +108,11 @@
else if(istype(W, /obj/item/stack/material))
var/obj/item/stack/material/S = W
var/obj/item/stack/S = W
if(S.get_amount() < 2)
return ..()
var/material/M = name_to_material[S.default_type]
var/material/M = S.get_material()
if(!istype(M))
return ..()
@@ -183,7 +183,7 @@
user << "There is not enough material here to reinforce the girder."
return
var/material/M = name_to_material[S.default_type]
var/material/M = S.get_material()
if(!istype(M) || M.integrity < 50)
user << "You cannot reinforce \the [src] with that; it is too soft."
return
+1 -1
View File
@@ -91,7 +91,7 @@
passthrough = 1
if(passthrough)
. = -1
. = PROJECTILE_CONTINUE
damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage
src.health -= damage*0.2
+1 -1
View File
@@ -17,7 +17,7 @@
var/datum/nano_module/appearance_changer/AC = ui_users[user]
if(!AC)
AC = new(src, user)
AC.name = "SalonPro Nano-Mirror(TM)"
AC.name = "SalonPro Nano-Mirror&trade;"
ui_users[user] = AC
AC.ui_interact(user)
+23 -17
View File
@@ -40,21 +40,21 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
if(3.0)
if (prob(5))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
@@ -64,7 +64,7 @@
if (src.connected)
for(var/atom/movable/A as mob|obj in src.connected.loc)
if (!( A.anchored ))
A.loc = src
A.forceMove(src)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
qdel(src.connected)
src.connected = null
@@ -78,7 +78,7 @@
src.connected.connected = src
src.icon_state = "morgue0"
for(var/atom/movable/A as mob|obj in src)
A.loc = src.connected.loc
A.forceMove(src.connected.loc)
src.connected.icon_state = "morguet"
src.connected.set_dir(src.dir)
else
@@ -114,7 +114,7 @@
src.connected.connected = src
src.icon_state = "morgue0"
for(var/atom/movable/A as mob|obj in src)
A.loc = src.connected.loc
A.forceMove(src.connected.loc)
src.connected.icon_state = "morguet"
else
qdel(src.connected)
@@ -146,7 +146,7 @@
if (src.connected)
for(var/atom/movable/A as mob|obj in src.loc)
if (!( A.anchored ))
A.loc = src.connected
A.forceMove(src.connected)
//Foreach goto(26)
src.connected.connected = null
src.connected.update()
@@ -163,7 +163,7 @@
return
if (!ismob(user) || user.stat || user.lying || user.stunned)
return
O.loc = src.loc
O.forceMove(src.loc)
if (user != O)
for(var/mob/B in viewers(user, 3))
if ((B.client && !( B.blinded )))
@@ -207,21 +207,21 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
if(3.0)
if (prob(5))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
@@ -240,7 +240,7 @@
if ((src.connected) && (src.locked == 0))
for(var/atom/movable/A as mob|obj in src.connected.loc)
if (!( A.anchored ))
A.loc = src
A.forceMove(src)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
//src.connected = null
qdel(src.connected)
@@ -254,7 +254,7 @@
src.connected.connected = src
src.icon_state = "crema0"
for(var/atom/movable/A as mob|obj in src)
A.loc = src.connected.loc
A.forceMove(src.connected.loc)
src.connected.icon_state = "cremat"
else
//src.connected = null
@@ -288,7 +288,7 @@
src.connected.connected = src
src.icon_state = "crema0"
for(var/atom/movable/A as mob|obj in src)
A.loc = src.connected.loc
A.forceMove(src.connected.loc)
src.connected.icon_state = "cremat"
else
qdel(src.connected)
@@ -360,11 +360,17 @@
anchored = 1
throwpass = 1
/obj/structure/c_tray/Destroy()
if(connected && connected.connected == src)
connected.connected = null
connected = null
return ..()
/obj/structure/c_tray/attack_hand(mob/user as mob)
if (src.connected)
for(var/atom/movable/A as mob|obj in src.loc)
if (!( A.anchored ))
A.loc = src.connected
A.forceMove(src.connected)
//Foreach goto(26)
src.connected.connected = null
src.connected.update()
@@ -381,7 +387,7 @@
return
if (!ismob(user) || user.stat || user.lying || user.stunned)
return
O.loc = src.loc
O.forceMove(src.loc)
if (user != O)
for(var/mob/B in viewers(user, 3))
if ((B.client && !( B.blinded )))
@@ -400,7 +406,7 @@
/obj/machinery/button/crematorium/attack_hand(mob/user as mob)
if(..())
return
if(src.allowed(usr))
if(src.allowed(user))
for (var/obj/structure/crematorium/C in world)
if (C.id == id)
if (!C.cremating)
@@ -44,6 +44,9 @@
update_nearby_tiles()
..()
/obj/structure/simple_door/get_material()
return material
/obj/structure/simple_door/Bumped(atom/user)
..()
if(!state)
@@ -33,6 +33,9 @@
padding_material = get_material_by_name(new_padding_material)
update_icon()
/obj/structure/bed/get_material()
return material
// Reuse the cache/code from stools, todo maybe unify.
/obj/structure/bed/update_icon()
// Prep icon.
@@ -0,0 +1,89 @@
// Ported from Haine and WrongEnd with much gratitude!
/* ._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._. */
/*-=-=-=-=-=-=-=-=-=-=-=-=-=WHAT-EVER=-=-=-=-=-=-=-=-=-=-=-=-=-*/
/* '~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~' */
/obj/effect/wingrille_spawn
name = "window grille spawner"
icon = 'icons/obj/structures.dmi'
icon_state = "wingrille"
density = 1
anchored = 1.0
pressure_resistance = 4*ONE_ATMOSPHERE
var/win_path = /obj/structure/window/basic
var/activated
/obj/effect/wingrille_spawn/attack_hand()
attack_generic()
/obj/effect/wingrille_spawn/attack_ghost()
attack_generic()
/obj/effect/wingrille_spawn/attack_generic()
activate()
/obj/effect/wingrille_spawn/initialize()
..()
if(!win_path)
return
if(ticker && ticker.current_state < GAME_STATE_PLAYING)
activate()
/obj/effect/wingrille_spawn/proc/activate()
if(activated) return
if (!locate(/obj/structure/grille) in get_turf(src))
var/obj/structure/grille/G = PoolOrNew(/obj/structure/grille, src.loc)
handle_grille_spawn(G)
var/list/neighbours = list()
for (var/dir in cardinal)
var/turf/T = get_step(src, dir)
var/obj/effect/wingrille_spawn/other = locate(/obj/effect/wingrille_spawn) in T
if(!other)
var/found_connection
if(locate(/obj/structure/grille) in T)
for(var/obj/structure/window/W in T)
if(W.type == win_path && W.dir == get_dir(T,src))
found_connection = 1
qdel(W)
if(!found_connection)
var/obj/structure/window/new_win = PoolOrNew(win_path, src.loc)
new_win.set_dir(dir)
handle_window_spawn(new_win)
else
neighbours |= other
activated = 1
for(var/obj/effect/wingrille_spawn/other in neighbours)
if(!other.activated) other.activate()
qdel(src)
/obj/effect/wingrille_spawn/proc/handle_window_spawn(var/obj/structure/window/W)
return
// Currently unused, could be useful for pre-wired electrified windows.
/obj/effect/wingrille_spawn/proc/handle_grille_spawn(var/obj/structure/grille/G)
return
/obj/effect/wingrille_spawn/reinforced
name = "reinforced window grille spawner"
icon_state = "r-wingrille"
win_path = /obj/structure/window/reinforced
/obj/effect/wingrille_spawn/phoron
name = "phoron window grille spawner"
icon_state = "p-wingrille"
win_path = /obj/structure/window/phoronbasic
/obj/effect/wingrille_spawn/reinforced_phoron
name = "reinforced phoron window grille spawner"
icon_state = "pr-wingrille"
win_path = /obj/structure/window/phoronreinforced
/obj/effect/wingrille_spawn/reinforced/polarized
name = "polarized window grille spawner"
color = "#444444"
win_path = /obj/structure/window/reinforced/polarized
var/id
/obj/effect/wingrille_spawn/reinforced/polarized/handle_window_spawn(var/obj/structure/window/reinforced/polarized/P)
if(id)
P.id = id