AI's that do not name themselves after 20 seconds will default to their starting name.

Added a direction finding algorithm for target, get_dir_to(). Mostly useful for positioning sprites in relation to a target. Such as energy beams, lines, and so on.
Changes to ninjas. Fixed a bunch of bugs and finished content. It is now possible to drag people with you when phase jaunting/shifting. Jaunting/shifting should also kill livestock, huggers, and damage mechs.
Renamed /obj/spell path to obj/proc_holder/spell in order to have a generic proc_holder category. For now it only works for the AI but can be expanded to other mobs.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1566 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
noisomehollow@lycos.com
2011-05-11 02:01:30 +00:00
parent eee1da7cd9
commit 1d8dea2337
29 changed files with 409 additions and 210 deletions
+1 -1
View File
@@ -1409,7 +1409,7 @@
set category = "Fun"
set name = "Give Spell"
set desc = "Gives a spell to a mob."
var/obj/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") in spells
var/obj/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") in spells
T.spell_list += new S
/client/proc/make_sound(var/obj/O in world) // -- TLE
@@ -12,6 +12,7 @@
//For ninjas exploding when they die./N
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:initialize)
src << browse(null, "window=spideros")//Just in case.
var/location = loc
explosion(location, 1, 2, 3, 4)
//src.flags = 0
@@ -2745,10 +2745,12 @@ It can still be worn/put on as normal.
if (istype(id))
return id
/mob/living/carbon/human/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0)
if(src.gloves)
var/obj/item/clothing/gloves/G = src.gloves
siemens_coeff = G.siemens_coefficient
//Added a safety check in case you want to shock a human mob directly through electrocute_act.
/mob/living/carbon/human/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/safety = 0)
if(!safety)
if(gloves)
var/obj/item/clothing/gloves/G = src.gloves
siemens_coeff = G.siemens_coefficient
return ..(shock_damage,source,siemens_coeff)
+7
View File
@@ -8,6 +8,9 @@
anchored = 1
canmove = 0
src.loc = loc
proc_holder_list = new()
if(L)
if (istype(L, /datum/ai_laws))
laws_object = L
@@ -69,6 +72,10 @@
else
stat(null, text("Systems nonfunctional"))
if (proc_holder_list.len)//Generic list for proc_holder objects.
for(var/obj/proc_holder/P in proc_holder_list)
statpanel("[P.panel]","",P)
/mob/living/silicon/ai/proc/ai_alerts()
set category = "AI Commands"
set name = "Show Alerts"
+4 -4
View File
@@ -1744,12 +1744,12 @@ proc/isobserver(A)
var/limit = 2//For only two trailing shadows.
for(var/turf/T in getline(mobloc, mob.loc))
spawn(0)
anim(T,'mob.dmi',mob,"shadow")
anim(T,mob,'mob.dmi',,"shadow")
limit--
if(limit<=0) break
else
spawn(0)
anim(mobloc,'mob.dmi',mob,"shadow")
anim(mobloc,mob,'mob.dmi',,"shadow")
mob.loc = get_step(mob, direct)
mob.dir = direct
return
@@ -2131,9 +2131,9 @@ note dizziness decrements automatically in the mob's Life() proc.
//if (master_controller)
// stat(null, "Loop: [master_controller.loop_freq]")
if (src.spell_list.len)
if (spell_list.len)
for(var/obj/spell/S in src.spell_list)
for(var/obj/proc_holder/spell/S in src.spell_list)
switch(S.charge_type)
if("recharge")
statpanel("Spells","[S.charge_counter/10.0]/[S.charge_max/10]",S)