Merge remote-tracking branch 'upstream/master' into poolit

Conflicts:
	code/game/objects/structures/displaycase.dm
	code/game/objects/structures/grille.dm
	code/game/objects/structures/lamarr_cage.dm
This commit is contained in:
Tigercat2000
2015-06-22 13:40:07 -07:00
104 changed files with 541 additions and 624 deletions
+2 -3
View File
@@ -99,7 +99,6 @@
/obj/structure/alien/resin/hitby(atom/movable/AM)
..()
visible_message("<span class='danger'>[src] was hit by [AM].</span>")
var/tforce = 0
if(!isobj(AM))
tforce = 10
@@ -209,8 +208,8 @@
new /obj/structure/alien/weeds(T, linked_node)
/obj/structure/alien/weeds/ex_act(severity, target)
del(src)
/obj/structure/alien/weeds/ex_act(severity)
qdel(src)
/obj/structure/alien/weeds/attackby(obj/item/I, mob/user, params)
+6 -6
View File
@@ -1100,11 +1100,11 @@ steam.start() -- spawns the effect
qdel(src)
blob_act()
del(src)
qdel(src)
bullet_act()
if(metal==1 || prob(50))
del(src)
qdel(src)
attack_hand(var/mob/user)
if ((HULK in user.mutations) || (prob(75 - metal*25)))
@@ -1113,7 +1113,7 @@ steam.start() -- spawns the effect
if ((O.client && !( O.blinded )))
O << "\red [user] smashes through the foamed metal."
del(src)
qdel(src)
else
user << "\blue You hit the metal foam but bounce off it."
return
@@ -1127,8 +1127,8 @@ steam.start() -- spawns the effect
for(var/mob/O in viewers(src))
if (O.client)
O << "\red [G.assailant] smashes [G.affecting] through the foamed metal wall."
del(I)
del(src)
qdel(I)
qdel(src)
return
if(prob(I.force*20 - metal*25))
@@ -1136,7 +1136,7 @@ steam.start() -- spawns the effect
for(var/mob/O in oviewers(user))
if ((O.client && !( O.blinded )))
O << "\red [user] smashes through the foamed metal."
del(src)
qdel(src)
else
user << "\blue You hit the metal foam to no effect."
+4 -4
View File
@@ -156,15 +156,15 @@
/obj/effect/supermatter_crystal/ex_act(severity)
switch(severity)
if(1.0)
del(src)
qdel(src)
return
if(2.0)
if (prob(50))
del(src)
qdel(src)
return
if(3.0)
if (prob(5))
del(src)
qdel(src)
return
else
return
@@ -176,4 +176,4 @@
/obj/effect/supermatter_crystal/proc/CheckEndurance()
if(endurance <= 0)
del(src)
qdel(src)
+65 -38
View File
@@ -6,7 +6,7 @@
if(dx>=dy) return dx + (0.5*dy) //The longest side add half the shortest side approximates the hypotenuse
else return dy + (0.5*dx)
proc/trange(var/Dist=0,var/turf/Center=null)//alternative to range (ONLY processes turfs and thus less intensive)
/proc/trange(var/Dist=0,var/turf/Center=null)//alternative to range (ONLY processes turfs and thus less intensive)
if(Center==null) return
//var/x1=((Center.x-Dist)<1 ? 1 : Center.x-Dist)
@@ -19,42 +19,60 @@ proc/trange(var/Dist=0,var/turf/Center=null)//alternative to range (ONLY process
return block(x1y1,x2y2)
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, adminlog = 1)
/proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, ignorecap = 0, flame_range = 0 ,silent = 0)
src = null //so we don't abort once src is deleted
epicenter = get_turf(epicenter)
// Archive the uncapped explosion for the doppler array
var/orig_dev_range = devastation_range
var/orig_heavy_range = heavy_impact_range
var/orig_light_range = light_impact_range
if(!ignorecap)
// Clamp all values to MAX_EXPLOSION_RANGE
devastation_range = min (MAX_EX_DEVESTATION_RANGE, devastation_range)
heavy_impact_range = min (MAX_EX_HEAVY_RANGE, heavy_impact_range)
light_impact_range = min (MAX_EX_LIGHT_RANGE, light_impact_range)
flash_range = min (MAX_EX_FLASH_RANGE, flash_range)
flame_range = min (MAX_EX_FLAME_RANGE, flame_range)
spawn(0)
var/start = world.timeofday
epicenter = get_turf(epicenter)
if(!epicenter) return
var/max_range = max(devastation_range, heavy_impact_range, light_impact_range)
var/max_range = max(devastation_range, heavy_impact_range, light_impact_range, flame_range)
// Play sounds; since playsound uses range() for each use, we'll try doing it through the player list.
// Playsound_local will also have an extra bonus of panning the sound, depending on the source. So stereo users will hear the direction of the explosion
for(var/mob/M in player_list)
// Double check for client
if(M && M.client)
var/turf/M_turf = get_turf(M)
if(M_turf && M_turf.z == epicenter.z)
var/dist = get_dist(M_turf, epicenter)
// If inside the blast radius + world.view - 2
if(dist <= round(max_range + world.view - 2, 1))
M.playsound_local(epicenter, "explosion", 100, 1)
// You hear a far explosion if you're outside the blast radius (*5) Small bombs shouldn't be heard all over the station.
else if(dist <= round(max_range * 10, 1))
var/far_volume = Clamp(max_range * 10, 30, 60) // Volume is based on explosion size and dist
far_volume += (dist > max_range * 2 ? 0 : 40) // add 40 volume if the mob is pretty close to the explosion
M.playsound_local(epicenter, 'sound/effects/explosionfar.ogg', far_volume, 1)
var/close = range(world.view+round(devastation_range,1), epicenter)
// to all distanced mobs play a different sound
for(var/mob/M in world) if(M.z == epicenter.z) if(!(M in close))
// check if the mob can hear
if(M.ear_deaf <= 0 || !M.ear_deaf) if(!istype(M.loc,/turf/space))
M << 'sound/effects/explosionfar.ogg'
if(adminlog)
msg_admin_attack("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[epicenter.x];Y=[epicenter.y];Z=[epicenter.z]'>JMP</a>)")
log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ")
message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[epicenter.x];Y=[epicenter.y];Z=[epicenter.z]'>JMP</a>)")
log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z])")
// Play sounds; we want sounds to be different depending on distance so we will manually do it ourselves.
// Stereo users will also hear the direction of the explosion!
// Calculate far explosion sound range. Only allow the sound effect for heavy/devastating explosions.
// 3/7/14 will calculate to 80 + 35
var/far_dist = 0
far_dist += heavy_impact_range * 5
far_dist += devastation_range * 20
if(!silent)
var/frequency = get_rand_frequency()
for(var/mob/M in player_list)
// Double check for client
if(M && M.client)
var/turf/M_turf = get_turf(M)
if(M_turf && M_turf.z == epicenter.z)
var/dist = get_dist(M_turf, epicenter)
// If inside the blast radius + world.view - 2
if(dist <= round(max_range + world.view - 2, 1))
M.playsound_local(epicenter, get_sfx("explosion"), 100, 1, frequency, falloff = 5) // get_sfx() is so that everyone gets the same sound
// You hear a far explosion if you're outside the blast radius. Small bombs shouldn't be heard all over the station.
else if(dist <= far_dist)
var/far_volume = Clamp(far_dist, 30, 50) // Volume is based on explosion size and dist
far_volume += (dist <= far_dist * 0.5 ? 50 : 0) // add 50 volume if the mob is pretty close to the explosion
M.playsound_local(epicenter, 'sound/effects/explosionfar.ogg', far_volume, 1, frequency, falloff = 5)
//Pause the lighting updates for a bit
var/datum/controller/process/lighting = processScheduler.getProcess("lighting")
@@ -74,7 +92,8 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
var/z0 = epicenter.z
for(var/turf/T in trange(max_range, epicenter))
var/dist = sqrt((T.x - x0)**2 + (T.y - y0)**2)
var/dist = cheap_pythag(T.x - x0,T.y - y0)
if(config.reactionary_explosions)
var/turf/Trajectory = T
@@ -87,19 +106,25 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
if(D.density && D.explosion_block)
dist += D.explosion_block
var/flame_dist = 0
var/throw_dist = dist
if(dist < flame_range)
flame_dist = 1
if(dist < devastation_range) dist = 1
else if(dist < heavy_impact_range) dist = 2
else if(dist < light_impact_range) dist = 3
else dist = 0
else dist = 0
//------- TURF FIRES -------
if(T)
for(var/atom_movable in T.contents) //bypass type checking since only atom/movable can be contained by turfs anyway
var/atom/movable/AM = atom_movable
if(AM && AM.simulated) AM.ex_act(dist)
// if(flame_dist && prob(40) && !istype(T, /turf/space) && !T.density)
// PoolOrNew(/obj/effect/hotspot, T) //Mostly for ambience!
if(AM) AM.ex_act(dist)
if(flame_dist && prob(40) && !istype(T, /turf/space) && !T.density)
new/obj/effect/hotspot(T) //Mostly for ambience!
if(dist > 0)
T.ex_act(dist)
@@ -122,7 +147,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
for(var/i,i<=doppler_arrays.len,i++)
var/obj/machinery/doppler_array/Array = doppler_arrays[i]
if(Array)
Array.sense_explosion(x0,y0,z0,devastation_range,heavy_impact_range,light_impact_range,took)
Array.sense_explosion(x0,y0,z0,devastation_range,heavy_impact_range,light_impact_range,took,orig_dev_range,orig_heavy_range,orig_light_range)
sleep(8)
@@ -136,7 +161,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
proc/secondaryexplosion(turf/epicenter, range)
/proc/secondaryexplosion(turf/epicenter, range)
for(var/turf/tile in trange(range, epicenter))
tile.ex_act(2)
@@ -145,8 +170,10 @@ proc/secondaryexplosion(turf/epicenter, range)
set category = "Debug"
var/newmode = alert("Use reactionary explosions?","Check Bomb Impact", "Yes", "No")
var/turf/epicenter = get_turf(mob)
if(!epicenter)
return
var/turf/epicenter = get_turf(usr)
var/dev = 0
var/heavy = 0
var/light = 0
+1 -1
View File
@@ -1293,7 +1293,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (ismob(loc))
var/mob/M = loc
M.show_message("\red Your [src] explodes!", 1)
M.show_message("<span class='danger'>Your [src] explodes!</span>", 1)
if(T)
T.hotspot_expose(700,125)
+2 -2
View File
@@ -134,6 +134,6 @@
if(1.0)
del(src)
if(2.0)
if(prob(50)) del(src)
if(prob(50)) qdel(src)
if(3.0)
if(prob(25)) del(src)
if(prob(25)) qdel(src)
+1 -1
View File
@@ -317,4 +317,4 @@
if(pai)
pai.ex_act(severity)
else
del(src)
qdel(src)
@@ -35,7 +35,7 @@
return
/obj/item/weapon/a_gift/ex_act()
del(src)
qdel(src)
return
/obj/effect/spresent/relaymove(mob/user as mob)
@@ -122,7 +122,7 @@
/obj/item/weapon/grenade/iedcasing/prime() //Blowing that can up
update_mob()
explosion(src.loc,0,0,2,2) //explosion(src.loc,-1,-1,-1, flame_range = range)
explosion(src.loc,-1,-1,-1, flame_range = range) // no explosive damage, only a large fireball.
qdel(src)
/obj/item/weapon/grenade/iedcasing/examine(mob/user)
@@ -9,5 +9,5 @@
/obj/item/weapon/grenade/syndieminibomb/prime()
update_mob()
explosion(src.loc,1,2,4)
del(src)
explosion(src.loc,1,2,4,flame_range = 2)
qdel(src)
@@ -248,13 +248,15 @@
air_contents.react()
pressure = air_contents.return_pressure()
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
range = min(range, MAX_EXPLOSION_RANGE) // was 8 - - - Changed to a configurable define -- TLE
var/turf/epicenter = get_turf(loc)
//world << "\blue Exploding Pressure: [pressure] kPa, intensity: [range]"
explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5))
del(src)
if(istype(src.loc,/obj/item/device/transfer_valve))
qdel(src.loc)
else
qdel(src)
else if(pressure > TANK_RUPTURE_PRESSURE)
//world << "\blue[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]"
@@ -264,7 +266,7 @@
return
T.assume_air(air_contents)
playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
del(src)
qdel(src)
else
integrity--
-4
View File
@@ -19,10 +19,6 @@
if(3.0)
return
/obj/structure/meteorhit(obj/O as obj)
del(src)
/obj/structure/Destroy()
if(hascall(src, "unbuckle"))
src:unbuckle()
@@ -175,13 +175,6 @@
A.loc = src.loc
del(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()
del(src)
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/rcs) && !src.opened)
var/obj/item/weapon/rcs/E = W
@@ -99,12 +99,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_animal(mob/living/simple_animal/user as mob)
@@ -116,21 +119,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, params)
user.changeNext_move(CLICK_CD_MELEE)
health -= I.force
visible_message("\red [user] strikes [src] with [I].")
if(health <= 0)
for(var/mob/M in src)
shatter(M)
check_health()
/obj/structure/closet/statue/MouseDrop_T()
return
@@ -4,7 +4,10 @@
icon_state = "blue"
icon_closed = "blue"
/obj/structure/closet/wardrobe/New()
/obj/structure/closet/wardrobe/generic
// Identical to the base wardrobe, aside from containing some stuff.
/obj/structure/closet/wardrobe/generic/New()
..()
sleep(2)
new /obj/item/clothing/under/color/blue(src)
@@ -267,10 +270,12 @@
new /obj/item/clothing/shoes/white(src)
return
/obj/structure/closet/wardrobe/white/medical
/obj/structure/closet/wardrobe/medical_white
name = "medical doctor's wardrobe"
icon_state = "white"
icon_closed = "white"
/obj/structure/closet/wardrobe/white/medical/New()
/obj/structure/closet/wardrobe/medical_white/New()
..()
sleep(2)
new /obj/item/clothing/under/rank/nursesuit (src)
@@ -181,13 +181,13 @@
switch(severity)
if(1.0)
for(var/obj/O in src.contents)
del(O)
qdel(O)
qdel(src)
return
if(2.0)
for(var/obj/O in src.contents)
if(prob(50))
del(O)
qdel(O)
qdel(src)
return
if(3.0)
+2 -9
View File
@@ -101,7 +101,7 @@
PoolOrNew(/obj/item/weapon/shard, loc)
if (occupant)
dump()
del(src)
qdel(src)
if (2)
if (prob(50))
src.health -= 15
@@ -124,14 +124,7 @@
PoolOrNew(/obj/item/weapon/shard, loc)
if(occupant) dump()
del(src)
/obj/structure/displaycase/meteorhit(obj/O as obj)
PoolOrNew(/obj/item/weapon/shard, loc)
if(occupant) dump()
del(src)
/obj/structure/displaycase/proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
+1 -5
View File
@@ -44,11 +44,7 @@
/obj/structure/grille/blob_act()
qdel(src)
/obj/structure/grille/meteorhit(var/obj/M)
qdel(src)
/obj/structure/grille/Bumped(atom/user)
if(ismob(user)) shock(user, 70)
@@ -62,11 +62,6 @@
blob_act()
deflate(1)
meteorhit()
//world << "glass at [x],[y],[z] Mhit"
deflate(1)
attack_hand(mob/user as mob)
add_fingerprint(user)
return
+1 -8
View File
@@ -38,14 +38,7 @@
PoolOrNew(/obj/item/weapon/shard, loc)
Break()
qdel(src)
/obj/structure/lamarr/meteorhit(obj/O as obj)
PoolOrNew(/obj/item/weapon/shard, loc)
Break()
qdel(src)
/obj/structure/lamarr/proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
-4
View File
@@ -168,10 +168,6 @@ 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"
@@ -905,10 +905,6 @@
W.Move(loc)
return
/obj/structure/rack/meteorhit(obj/O as obj)
del(src)
/obj/structure/table/attack_hand(mob/user)
if(HULK in user.mutations)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
-4
View File
@@ -76,9 +76,6 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
/obj/structure/window/blob_act()
destroy()
/obj/structure/window/meteorhit()
destroy()
/obj/structure/window/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
destroy()
@@ -102,7 +99,6 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
/obj/structure/window/hitby(AM as mob|obj)
..()
visible_message("<span class='danger'>[src] was hit by [AM].</span>")
var/tforce = 0
if(isobj(AM))
var/obj/item/I = AM