Mob refactoring.

Updates Bump() code.
Intents now use constants.
Simple animals can now use languages without overriding say().
There is now a difference between being able to smash normal and reinforced walls.
Reworks simple_animal/attackby so that constructs don't need to override it simply to add damage resistance.
This commit is contained in:
PsiOmega
2015-03-29 10:44:31 +02:00
parent ab0ffe7767
commit 464d702d4b
84 changed files with 1314 additions and 1607 deletions
+3 -3
View File
@@ -90,14 +90,14 @@
if(user && user.client && !(A in aim_targets))
var/client/C = user.client
//If help intent is on and we have clicked on an eligible target, switch to aim mode automatically
if(user.a_intent == "help" && isliving(A) && !C.gun_mode)
if(user.a_intent == I_HELP && isliving(A) && !C.gun_mode)
C.ToggleGunMode()
if(C.gun_mode)
aiming = PreFire(A,user,params) //They're using the new gun system, locate what they're aiming at.
if (!aiming)
if(user && user.a_intent == "help") //regardless of what happens, refuse to shoot if help intent is on
if(user && user.a_intent == I_HELP) //regardless of what happens, refuse to shoot if help intent is on
user << "\red You refrain from firing your [src] as your intent is set to help."
else
Fire(A,user,params) //Otherwise, fire normally.
@@ -105,7 +105,7 @@
/obj/item/weapon/gun/attack(atom/A, mob/living/user, def_zone)
if (A == user && user.zone_sel.selecting == "mouth" && !mouthshoot)
handle_suicide(user)
else if(user.a_intent == "hurt") //point blank shooting
else if(user.a_intent == I_HURT) //point blank shooting
Fire(A, user, pointblank=1)
else
return ..() //Pistolwhippin'
@@ -71,7 +71,7 @@
for (var/obj/effect/proc_holder/spell/S in M.spell_list)
new_mob.spell_list += new S.type
new_mob.a_intent = "hurt"
new_mob.a_intent = I_HURT
if(M.mind)
M.mind.transfer_to(new_mob)
else
+1 -1
View File
@@ -85,7 +85,7 @@
return
//reflex firing is disabled when help intent is set
if (M.a_intent == "help")
if (M.a_intent == I_HELP)
M << "\red You refrain from firing your [src] as your intent is set to help."
return