Files
vgstation13/code/game/gamemodes/blob/blobs/core.dm
elly1989@rocketmail.com fb600f9bce Ok, part 1 of this huge mind datum fix. I need to run over the next part again because I've made a lot inconsistencies in it. This is sort of all the misc stuff that got tidied up whilst I was trying to get my head around how everything related to eachother.
This part focuses on:
-structuring the way silicon mobs initialise upon login (there was some hideous copypasta in Login() and New() which used spawn() to change the order of the calls so it was all jumbled up. I think I've got it sorted now.
-Borgs var/real_name was not initialising as "Cyborg". Meaning the name checks were kind of borked.
-Ghosts are now deleted at logout if they no longer have a key. This will stop unneeded ghosts being left lying around. It will not delete ghosts with keys assigned (so people can't respawn or anything). Removed all the del(ghost_ref) stuff I could find. Generally movign the key from a ghost should be the last thing you do as the ghost will be deleted by Logout. However I've put it in a spawn() to hopefully avoid coders accisentally using it in a way which causes runtimes.
-Fixed clone-plants spawning dud potato-people left, right and centre. They'll now dump seeds if it fails for whatever reason.
-Cultist and Rev status are removed at mob/living/silicon/Login() rather than having to be called on a special-case basis everywhere. This may not be necessary when this stuff is finished.
-Removed a bunch of :
-Commented mob/living/Login() with the rest of the antag-indicator code from cloning.dm and hydroponics.dm for any coders whom feel brave/suicidal to fix the related issues

Next on the agenda, replacing mob/var/original_name with datum/mind/var/name to fix the ticker runtimes
Then, fixing mind/proc/transfer_to(mob) once and for all. (There are issues with duplicate minds, role updates, inconsistent initialisation etc etc *yawn*

There's probably a few obscure bugs in there somewhere. Might want to hold off on the updates for a bit. Coderbus will likely spot them all by the end of the week.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4322 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-05 15:29:15 +00:00

79 lines
1.7 KiB
Plaintext

/obj/effect/blob/core
name = "blob core"
icon = 'icons/mob/blob.dmi'
icon_state = "blob_core"
health = 200
brute_resist = 2
fire_resist = 2
New(loc, var/h = 200)
blobs += src
blob_cores += src
processing_objects.Add(src)
..(loc, h)
Del()
blob_cores -= src
processing_objects.Remove(src)
..()
return
update_icon()
if(health <= 0)
playsound(src.loc, 'splat.ogg', 50, 1)
del(src)
return
return
run_action()
Pulse(0,1)
Pulse(0,2)
Pulse(0,4)
Pulse(0,8)
//Should have the fragments in here somewhere
return 1
proc/create_fragments(var/wave_size = 1)
var/list/candidates = list()
for(var/mob/dead/observer/G in player_list)
if(G.client.be_alien)
if(G.corpse)
if(G.corpse.stat==2)
candidates.Add(G)
else
candidates.Add(G)
for(var/i = 0 to wave_size)
if(!candidates.len) break
var/mob/dead/observer/G = pick(candidates)
var/mob/living/blob/B = new/mob/living/blob(src.loc)
if(G.client)
G.client.screen.len = null
B.ghost_name = G.real_name
B.key = G.key
/*
Pulse(var/pulse = 0, var/origin_dir = 0)//Todo: Fix spaceblob expand
set background = 1
if(pulse > 20) return
//Looking for another blob to pulse
var/list/dirs = list(1,2,4,8)
dirs.Remove(origin_dir)//Dont pulse the guy who pulsed us
for(var/i = 1 to 4)
if(!dirs.len) break
var/dirn = pick(dirs)
dirs.Remove(dirn)
var/turf/T = get_step(src, dirn)
var/obj/effect/blob/B = (locate(/obj/effect/blob) in T)
if(!B)
expand(T)//No blob here so try and expand
return
B.Pulse((pulse+1),get_dir(src.loc,T))
return
return
*/