Removes simple_animal entirely.

This commit is contained in:
Neerti
2018-10-24 05:20:59 -04:00
parent acebc4ef7b
commit c97c3e7391
29 changed files with 134 additions and 220 deletions

View File

@@ -498,7 +498,7 @@
for(var/thing in holder.selected_mobs)
var/mob/living/unit = thing
var/datum/ai_holder/AI = unit.ai_holder
AI.give_destination(T, pa.Find("shift"))
AI.give_destination(T, 1, pa.Find("shift"))
to_chat(user, span("notice", "Commanded [holder.selected_mobs.len] mob\s to move to \the [T]."))

View File

@@ -65,11 +65,15 @@
/datum/ai_holder/proc/will_threaten(mob/living/the_target)
if(!isliving(the_target))
return FALSE // Turrets don't give a fuck so neither will we.
if(istype(the_target, /mob/living/simple_animal) && istype(holder, /mob/living/simple_animal))
var/mob/living/simple_animal/us = holder
var/mob/living/simple_animal/them = target
/*
// Find a nice way of doing this later.
if(istype(the_target, /mob/living/simple_mob) && istype(holder, /mob/living/simple_mob))
var/mob/living/simple_mob/us = holder
var/mob/living/simple_mob/them = target
if(them.intelligence_level < us.intelligence_level) // Todo: Bitflag these.
return FALSE // Humanoids don't care about drones/animals/etc. Drones don't care about animals, and so on.
*/
return TRUE
// Temp defines to make the below code a bit more readable.

View File

@@ -49,11 +49,6 @@
/mob/living/proc/IIsAlly(mob/living/L)
return src.faction == L.faction
/mob/living/simple_animal/IIsAlly(mob/living/L)
. = ..()
if(!.) // Outside the faction, try to see if they're friends.
return L in friends
/mob/living/simple_mob/IIsAlly(mob/living/L)
. = ..()
if(!.) // Outside the faction, try to see if they're friends.
@@ -61,7 +56,7 @@
/mob/living/proc/IGetID()
/mob/living/simple_animal/IGetID()
/mob/living/simple_mob/IGetID()
if(myid)
return myid.GetID()

View File

@@ -76,13 +76,14 @@
return
/obj/item/weapon/deadringer/proc/deathprevent()
for(var/mob/living/simple_animal/D in oviewers(7, src))
D.LoseTarget()
for(var/mob/living/simple_mob/D in oviewers(7, src))
if(!D.has_AI())
continue
D.ai_holder.lose_target()
watchowner.emote("deathgasp")
watchowner.alpha = 15
makeacorpse(watchowner)
for(var/mob/living/simple_animal/D in oviewers(7, src))
D.LoseTarget()
return
/obj/item/weapon/deadringer/proc/uncloak()

View File

@@ -42,10 +42,10 @@
/datum/event/carp_migration/end()
spawn(0)
for(var/mob/living/simple_animal/hostile/C in spawned_carp)
if(!C.stat)
var/turf/T = get_turf(C)
for(var/mob/living/simple_mob/SM in spawned_carp)
if(!SM.stat)
var/turf/T = get_turf(SM)
if(istype(T, /turf/space))
if(prob(75))
qdel(C)
qdel(SM)
sleep(1)

View File

@@ -187,8 +187,8 @@
var/slab_nutrition = src.occupant.nutrition / 15
// Some mobs have specific meat item types.
if(istype(src.occupant,/mob/living/simple_animal))
var/mob/living/simple_animal/critter = src.occupant
if(istype(src.occupant,/mob/living/simple_mob))
var/mob/living/simple_mob/critter = src.occupant
if(critter.meat_amount)
slab_count = critter.meat_amount
if(critter.meat_type)

View File

@@ -164,17 +164,10 @@
if(!(language && (language.flags & INNATE))) // skip understanding checks for INNATE languages
if(!say_understands(speaker,language))
if(istype(speaker,/mob/living/simple_animal))
var/mob/living/simple_animal/S = speaker
if(S.speak && S.speak.len)
message = pick(S.speak)
else
return
if(language)
message = language.scramble(message)
else
if(language)
message = language.scramble(message)
else
message = stars(message)
message = stars(message)
if(hard_to_hear)
message = stars(message)

View File

@@ -5,7 +5,7 @@
var/maxHealth = 100 //Maximum health that should be possible. Avoid adjusting this if you can, and instead use modifiers datums.
var/health = 100 //A mob's health
var/mob_class = MOB_CLASS_ANIMAL // A mob's "class", e.g. human, mechanical, animal, etc. Used for certain projectile effects. See __defines/mob.dm for available classes.
var/mob_class = null // A mob's "class", e.g. human, mechanical, animal, etc. Used for certain projectile effects. See __defines/mob.dm for available classes.
var/hud_updateflag = 0
@@ -67,4 +67,3 @@
var/makes_dirt = TRUE //FALSE if the mob shouldn't be making dirt on the ground when it walks
var/looking_elsewhere = FALSE //If the mob's view has been relocated to somewhere else, like via a camera or with binocs

View File

@@ -542,10 +542,8 @@ proc/is_blind(A)
if(. == SAFE_PERP)
return SAFE_PERP
if(!istype(src, /mob/living/simple_mob/animal/goat))
if(hostile)
if(faction != "neutral") // Otherwise Runtime gets killed.
threatcount += 4
if(has_AI() && ai_holder.hostile && faction != "neutral") // Otherwise Runtime gets killed.
threatcount += 4
return threatcount
// Beepsky will (try to) only beat 'bad' slimes.

View File

@@ -143,7 +143,7 @@
if(!user.IsAdvancedToolUser())
return 0
if(isanimal(user))
var/mob/living/simple_animal/S = user
var/mob/living/simple_mob/S = user
if(!S.IsHumanoidToolUser(src))
return 0

View File

@@ -198,10 +198,10 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
if(findNullRod(T))
return 0
if(istype(user, /mob/living/simple_animal) && holder == user)
var/mob/living/simple_animal/SA = user
if(SA.purge)
SA << "<span class='warning'>The nullrod's power interferes with your own!</span>"
if(istype(user, /mob/living/simple_mob) && holder == user)
var/mob/living/simple_mob/SM = user
if(SM.purge)
SM << "<span class='warning'>The nullrod's power interferes with your own!</span>"
return 0
if(!src.check_charge(skipcharge, user)) //sees if we can cast based on charges alone

View File

@@ -9,35 +9,42 @@
/atom/movable/proc/guess_threat_level(var/mob/living/threatened)
return 0
/mob/living/simple_animal
/mob/living/simple_mob
var/threat_level = null // Set this if you want an explicit danger rating.
/mob/living/simple_animal/guess_threat_level(var/mob/living/threatened)
/mob/living/simple_mob/guess_threat_level(var/mob/living/threatened)
if(threat_level) // If they have a predefined number, use it.
return threat_level
// Otherwise we need to guess how scary this thing is.
var/threat_guess = 0
// First lets consider their attack ability.
var/will_point_blank = FALSE
if(has_AI())
will_point_blank = ai_holder.pointblank
var/potential_damage = 0
if(!ranged) //Melee damage.
if(!projectiletype || ( get_dist(src, threatened >= 1) && !will_point_blank ) ) // Melee damage.
potential_damage = (melee_damage_lower + melee_damage_upper) / 2
// Treat potential_damage as estimated DPS. If the enemy attacks twice as fast as usual, it will double the number.
potential_damage *= 1 SECOND / (base_attack_cooldown + melee_attack_delay)
else
if(projectiletype)
var/obj/item/projectile/P = new projectiletype(src)
if(P.nodamage || P.taser_effect) // Tasers are somewhat less scary.
potential_damage = P.agony / 2
else
potential_damage = P.damage
if(P.damage_type == HALLOSS) // Not sure if any projectiles do this, but can't be too safe.
potential_damage /= 2
// Rubber bullets, I guess.
potential_damage += P.agony / 2
var/obj/item/projectile/P = new projectiletype(src)
if(P.nodamage || P.taser_effect) // Tasers are somewhat less scary.
potential_damage = P.agony / 2
else
potential_damage = P.damage
if(P.damage_type == HALLOSS) // Not sure if any projectiles do this, but can't be too safe.
potential_damage /= 2
// Rubber bullets, I guess.
potential_damage += P.agony / 2
qdel(P)
if(rapid) // This makes them shoot three times per cycle.
potential_damage *= 3
potential_damage *= 1 SECOND / (base_attack_cooldown + ranged_attack_delay)
// Special attacks are ultra-specific to the mob so a generic threat assessment isn't really possible.
qdel(P)
threat_guess += potential_damage
// Then consider their defense.
@@ -50,11 +57,12 @@
return 0
/mob/living/simple_animal/get_threat(var/mob/living/threatened)
/mob/living/simple_mob/get_threat(var/mob/living/threatened)
. = ..()
if(!hostile)
return 0 // Can't hurt anyone.
if(has_AI())
if(!ai_holder.hostile)
return 0 // Can't hurt anyone.
if(incapacitated(INCAPACITATION_DISABLED))
return 0 // Can't currently hurt you if it's stunned.
@@ -86,7 +94,7 @@
// Handle ability to harm.
// Being five tiles away from some spiders is a lot less scary than being in melee range of five spiders at once.
if(!ranged)
if(!projectiletype)
threat /= max(get_dist(src, threatened), 1)
return threat