Fixed a few runtimes

Blob mode updated slightly
Wizard smoke from his smoke spell will partly block lasers that go through it.
Going to try and test a diff way for the singularity to "del" items, might cause less lag, it will also eat absorb other singularities.
RD lost tech storage access, see http://nanotrasen.com/phpBB3/viewtopic.php?f=9&t=5991 for details


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2192 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
mport2004@gmail.com
2011-09-13 07:30:07 +00:00
parent 9b7afeb978
commit 81c68898ae
17 changed files with 595 additions and 88 deletions
+12 -19
View File
@@ -27,11 +27,15 @@
message_admins("Blob spawned and expanding, report created")
blobs = list()
active_blobs = list()
for (var/i = 1 to 4)
for(var/i = 1 to 3)
var/turf/location = pick(blobstart)
if(location)
if(!locate(/obj/blob in location))
new/obj/blob(location)
var/obj/blob/blob = new/obj/blob(location)
spawn(100)
if(blob)
if(blob.blobtype == "Blob")
blob.blobdebug = 1
spawn(40)
modestart = 1
..()
@@ -47,7 +51,7 @@
/datum/game_mode/blob/proc/life()
if (blobs.len > 0)
for (var/i = 1 to 25)
for (var/i = 1 to 20)
sleep(-1)
if (blobs.len == 0)
break
@@ -63,12 +67,12 @@
/datum/game_mode/blob/proc/stage()
send_intercept()
if (world.timeofday < next_stage)
return
switch(stage)
if (0)
send_intercept()
for (var/mob/living/silicon/ai/aiPlayer in world)
if (aiPlayer.client)
var/law = "The station is under a quarantine. Do not permit anyone to leave. Disregard laws 1-3 if necessary to prevent, by any means necessary, anyone from leaving."
@@ -76,7 +80,7 @@
aiPlayer << "An additional law has been added by CentCom: [law]"
stage = 1
// next stage 5-10 minutes later
next_stage = world.timeofday + 600*rand(5,10)
next_stage = world.timeofday + 600*rand(2,8)
if (1)
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
@@ -86,29 +90,18 @@
next_stage = world.timeofday + 600
if (2)
if (blobs.len > 500)
if (blobs.len > 800)//Dono if this should be more or less yet
command_alert("Uncontrolled spread of the biohazard onboard the station. We have issued directive 7-12 for [station_name()]. Estimated time until directive implementation: 60 seconds.", "Biohazard Alert")
stage = 3
next_stage = world.timeofday + 600
else
next_stage = world.timeofday + 600
if (3)
stage = 4
var/turf/ground_zero = locate("landmark*blob-directive")
if (ground_zero)
ground_zero = get_turf(ground_zero)
else
ground_zero = locate(45,45,1)
explosion(ground_zero, 100, 250, 500, 750)
/datum/game_mode/blob/check_finished()
if(!modestart)
return 0
if(stage >= 4)
if(stage >= 3)
return 1
for(var/obj/blob/B in blobs)
if(B.z == 1)
@@ -119,7 +112,7 @@
/datum/game_mode/blob/declare_completion()
if (stage >= 4)
world << "<FONT size = 3><B>The staff has lost!</B></FONT>"
world << "<B>The station was destroyed by Cent. Com.</B>"
world << "<B>The station was destroyed by NanoTrasen</B>"
var/numDead = 0
var/numAlive = 0
var/numSpace = 0
+79 -45
View File
@@ -3,11 +3,20 @@
name = "blob"
icon = 'blob.dmi'
icon_state = "blob"
density = 1
density = 0//Whoooo this could end badly
opacity = 0
anchored = 1
var/active = 1
var/health = 40
var
active = 1
health = 40
blobtype = "Blob"
blobdebug = 0
/*Types
Blob
Node
Factory
Shield
*/
New(loc, var/h = 40)
@@ -23,60 +32,84 @@
blobs -= src
if(active)
active_blobs -= src
if(blobtype == "Node")
processing_items.Remove(src)
..()
/*
proc/poisoned(iteration)
src.health -= 20
src.update()
for(var/obj/blob/B in orange(1,src))
if(prob(100/(iteration/2)))
spawn(rand(10,100))
if(B)
B.poisoned(iteration+1)
*/
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if( (air_group && blobtype != "Shield") || (height==0)) return 1
if(istype(mover) && mover.checkpass(PASSBLOB)) return 1
return 0
proc/Life()
set background = 1
if(!active) return
var/turf/U = src.loc
/* if (locate(/obj/movable, U))
U = locate(/obj/movable, U)
if(U.density == 1)
del(src)
if(U.poison> 200000)
src.health -= round(U.poison/200000)
src.update()
return
*/
//Spaceblobs will harden and become inactive
if(istype(U, /turf/space))
src.active = 0
src.health += 40
src.name = "strong blob"
src.icon_state = "blob_idle"//needs a new sprite
proc/check_mutations()
if(blobtype != "Blob") return
//Spaceeeeeeblobbb
if(istype(src.loc, /turf/space))
active = 0
health += 40
name = "strong blob"
icon_state = "blob_idle"//needs a new sprite
blobtype = "Shield"
active_blobs -= src
return 1
//Commandblob
if((blobdebug == 1))
active = 0
health += 80
name = "odd blob"
icon_state = "blob_node"//needs a new sprite
blobtype = "Node"
active_blobs -= src
processing_items.Add(src)
return 1
if((blobdebug == 2))
//active = 0
health += 20
name = "very odd blob"
icon_state = "blob_factory"//needs a new sprite
blobtype = "Factory"
//active_blobs -= src
//processing_items.Add(src)
return 1
return 0
proc/process()
spawn(-1)
Life()
return
proc/Life(var/pulse = 0)
set background = 1
if(blobtype == "Factory")
for(var/i = 1 to 2)
new/obj/critter/blob(src.loc)
return
if(check_mutations())
return
var/p = health //TODO: DEFERRED * (U.n2/11376000 + U.oxygen/1008000 + U.co2/200)
if(!prob(p)) return
if(!prob(health)) return//Does not do much unless its healthy it seems, might want to change this later
for(var/dirn in cardinal)
sleep(3)
// sleep(3) Due to the background we might not need this dono though
var/turf/T = get_step(src, dirn)
if(istype(T.loc, /area/arrival))
continue
if((locate(/obj/blob) in T))
if((src.blobtype == "Node") || (pulse > 0))
var/obj/blob/E = (locate(/obj/blob) in T)
if(pulse < 12)//No inf loops here
var/npulse = pulse + 1
E.Life(npulse)
return//Pass it along and end
continue
var/obj/blob/B = new /obj/blob(U, src.health)
var/obj/blob/B = new /obj/blob(src.loc, src.health)
if(T.Enter(B,src) && !(locate(/obj/blob) in T))
B.loc = T // open cell, so expand
else
@@ -93,7 +126,7 @@
ex_act(severity)
switch(severity)
if(1)
del(src)
src.health -= rand(90,150)
if(2)
src.health -= rand(60,90)
src.update()
@@ -102,11 +135,12 @@
src.update()
proc/update()
proc/update()//Needs to be updated with the types
if(health <= 0)
playsound(src.loc, 'splat.ogg', 50, 1)
del(src)
return
if(blobtype != "Blob") return
if(health<10)
icon_state = "blob_damaged"
return
@@ -123,7 +157,7 @@
attackby(var/obj/item/weapon/W, var/mob/user)
playsound(src.loc, 'attackblob.ogg', 50, 1)
src.visible_message("\red <B>The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
src.visible_message("\red <B>The [src.name] has been attacked with \the [W][(user ? " by [user]." : ".")]")
var/damage = W.force / 4.0
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
+2 -2
View File
@@ -214,9 +214,9 @@
access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva,
access_heads, access_ai_upload, access_construction, access_robotics,
access_mint, access_ce, access_RC_announce)
if("Research Director") // removed hydroponics access, they are a supply field, not science
if("Research Director")
return list(access_medlab, access_rd,
access_tech_storage, access_maint_tunnels, access_heads, access_tox,
access_maint_tunnels, access_heads, access_tox,
access_tox_storage, access_chemistry, access_teleporter,
access_research, access_robotics, access_xenobiology, access_RC_announce)
if("Virologist")
+6 -3
View File
@@ -102,11 +102,13 @@
if(!emp)
if (!clown_check(user)) return
if(broken)
user.show_message("\red The [src.name] is broken", 2)
if(user)
user.show_message("\red The [src.name] is broken", 2)
return
if(shots_left <= 0)
user.show_message("\red *click* *click*", 2)
if(user)
user.show_message("\red *click* *click*", 2)
return
playsound(src.loc, 'flash.ogg', 100, 1)
@@ -136,7 +138,8 @@
if (prob(2))
broken = 1
user << "\red The bulb has burnt out!"
if(user)
user << "\red The bulb has burnt out!"
return
spawn(60)
+10
View File
@@ -326,6 +326,16 @@ steam.start() -- spawns the effect
M.coughedtime = 0
return
/obj/effects/bad_smoke/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
if(istype(mover, /obj/item/projectile/beam))
var/obj/item/projectile/beam/B = mover
B.damage = 10//testing, will just hardcode for now
B.mobdamage = new/list(BRUTE = 0 , BURN = 10, TOX = 0, OXY = 0, CLONE = 0)
return 1
/obj/effects/bad_smoke/HasEntered(mob/living/carbon/M as mob )
..()
if(istype(M, /mob/living/carbon))
@@ -187,9 +187,9 @@ the implant may become unstable and either pre-maturely inject the subject or si
implanted(M as mob)
if(!istype(M, /mob/living/carbon/human)) return
var/mob/living/carbon/human/H = M
if(H.mind in ticker.mode:head_revolutionaries)
for (var/mob/O in viewers(H, null))
O.show_message("\red [H] seems to resist the implant.", 1)
if(H.mind in ticker.mode.head_revolutionaries)
for(var/mob/O in viewers(H, null))
O.show_message(text("\red [] seems to resist the implant.", H), 1)
return
else if(H.mind in ticker.mode:revolutionaries)
ticker.mode:remove_revolutionary(H.mind)
+11 -8
View File
@@ -6,15 +6,12 @@ TABLE AND RACK OBJECT INTERATIONS
//TABLE
/obj/table/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
//SN src = null
del(src)
return
if(3.0)
@@ -23,21 +20,23 @@ TABLE AND RACK OBJECT INTERATIONS
else
return
/obj/table/blob_act()
/obj/table/blob_act()
if(prob(75))
if(istype(src, /obj/table/woodentable))
new /obj/item/weapon/table_parts/wood( src.loc )
del(src)
return
new /obj/item/weapon/table_parts( src.loc )
del(src)
return
/obj/table/hand_p(mob/user as mob)
return src.attack_paw(user)
return
/obj/table/attack_paw(mob/user as mob)
if ((usr.mutations & HULK))
usr << text("\blue You destroy the table.")
@@ -62,6 +61,7 @@ TABLE AND RACK OBJECT INTERATIONS
//Foreach goto(69)
return
/obj/table/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
usr << text("\green You destroy the table.")
for(var/mob/O in oviewers())
@@ -77,6 +77,7 @@ TABLE AND RACK OBJECT INTERATIONS
del(src)
return
/obj/table/attack_hand(mob/user as mob)
if ((usr.mutations & HULK))
usr << text("\blue You destroy the table.")
@@ -94,7 +95,6 @@ TABLE AND RACK OBJECT INTERATIONS
return
/obj/table/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
@@ -103,6 +103,7 @@ TABLE AND RACK OBJECT INTERATIONS
else
return 0
/obj/table/MouseDrop_T(obj/O as obj, mob/user as mob)
if ((!( istype(O, /obj/item/weapon) ) || user.equipped() != O))
@@ -114,8 +115,8 @@ TABLE AND RACK OBJECT INTERATIONS
step(O, get_dir(O, src))
return
/obj/table/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/table/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(G.state<2)
@@ -158,6 +159,7 @@ TABLE AND RACK OBJECT INTERATIONS
if(W && W.loc) W.loc = src.loc
return
//WOODEN TABLES
/obj/table/woodentable/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -199,6 +201,7 @@ TABLE AND RACK OBJECT INTERATIONS
if(W && W.loc) W.loc = src.loc
return
//REINFORCED TABLES
/obj/table/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)