Metroids:

- Their AI has been fixed. Previously, when they began "starving" they would lock up when they located a target. This was because I was only allowing Metroids to attack people when they were only attacked themselves.
     - Small stun time added to wrestling Metroids off or beating them off with objects.
     - You should now not be able to enter mechas, cryos and sleepers if you have Metroid on your head.


Cargo:
     - You can now cancel cargo orders.


Miscellaneous:
     - Manifests no longer show "unassigned" for everyone on round start.
     - The manifest is updated realtime, in that when new arrivals arrive or a job is changed, the information gets passed onto the central database.
     - New arrivals now generate security records, medical records, etc. Jubilations!
     - I, perhaps, have increased the efficiency of the reaction system. Preliminary tests confirmed that it's slightly faster, but I worry about whether I may have ruined someone's vision of a perfect multiple reaction system. This "change" is nothing more than adding a break; line to the end of a loop. If this proves too buggy, I'll just revert it.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1952 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
vageyenaman@gmail.com
2011-07-29 22:08:52 +00:00
parent 65f78c74d2
commit 7e77eb4a85
13 changed files with 248 additions and 70 deletions
+37 -9
View File
@@ -74,16 +74,13 @@
if(attacked <= 0)
Target = null
if(Victim && !Target)
Victim = null
if(Victim) return // if it's eating someone already, continue eating!
if(prob(5))
emote(pick("click","chatter","sway","light","vibrate","chatter","shriek"))
if(AIproc) return
if(AIproc && SStun) return
var/hungry = 0 // determines if the metroid is hungry
@@ -101,8 +98,12 @@
if(starving && !client) // if a metroid is starving, it starts losing its friends
if(prob(45))
if(Friends.len > 0)
if(prob(45) && Friends.len > 0)
var/friendnum = 0
for(var/mob/M in Friends)
friendnum++
if(friendnum > 0)
var/mob/nofriend = pick(Friends)
Friends -= nofriend
@@ -138,6 +139,22 @@
if(!notarget) targets += C
for(var/mob/living/silicon/C in view(12,src))
if(C.stat != 2)
var/notarget = 0
if(C in Friends)
notarget = 1
if(!istype(src, /mob/living/carbon/metroid/adult))
if(!starving && Discipline > 0)
notarget = 1
break
if(tame)
notarget = 1
if(!notarget) targets += C
@@ -199,22 +216,33 @@
var/Tempstun = 0 // temporary temperature stuns
var/Discipline = 0 // if a metroid has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
var/turf/Charging = null // turf a metroid is "charging" at
var/SStun = 0 // stun variable
proc
AIprocess() // the master AI process
if(AIproc) return
var/hungry = 0
var/starving = 0
if(istype(src, /mob/living/carbon/metroid/adult))
switch(nutrition)
if(400 to 800) hungry = 1
if(0 to 399)
starving = 1
else
switch(nutrition)
if(150 to 500) hungry = 1
if(0 to 149) starving = 1
AIproc = 1
while(AIproc && stat != 2 && attacked > 0)
while(AIproc && stat != 2 && (attacked > 0 || starving || hungry))
if(Victim) // can't eat AND have this little process at the same time
break
if(attacked <= 0 || !Target)
if(!Target)
break
if(Target.health <= -70 || Target.stat == 2)
Target = null
AIproc = 0
@@ -449,6 +449,11 @@
if(prob(90) && !client)
Discipline++
spawn()
SStun = 1
sleep(rand(25,50))
SStun = 0
Victim = null
anchored = 0
step_away(src,M)
@@ -629,6 +634,11 @@
if(Discipline == 1)
attacked = 0
spawn()
SStun = 1
sleep(rand(5,20))
SStun = 0
spawn(0)
step_away(src,M,15)
@@ -286,6 +286,8 @@ mob/new_player
character.Robotize()
else//Adds late joiners to minds so they can be linked to objectives.
ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc.
data_core.manifest_inject(character) // add all the necessary stuff into the manifest
del(src)
else