Buildmode enhancement and removes simple_animal for real this time.

This commit is contained in:
Neerti
2018-10-24 06:49:41 -04:00
parent c97c3e7391
commit c25e94938e
31 changed files with 41 additions and 123 deletions

View File

@@ -462,9 +462,11 @@
if(L in holder.selected_mobs)
// Todo: Select graphic only the admin can see?
holder.selected_mobs -= L
user.client.images -= L.selected_image
to_chat(user, span("notice", "Deselected \the [L]."))
else
holder.selected_mobs += L
user.client.images += L.selected_image
to_chat(user, span("notice", "Selected \the [L]."))
else
to_chat(user, span("warning", "\The [L] is not AI controlled."))

View File

@@ -259,62 +259,6 @@
ai_log("handle_stance_strategical() : Exiting.", AI_LOG_TRACE)
ai_log("++++++++++ Slow Process Ending ++++++++++", AI_LOG_TRACE)
/*
//Yes I'm breaking this into two if()'s for ease of reading
//If we ARE ALLOWED TO
if(returns_home && home_turf && !astarpathing && (world.time - stance_changed) > 10 SECONDS)
if(get_dist(src,home_turf) > wander_distance)
move_to_delay = initial(move_to_delay)*2 //Walk back.
GoHome()
else
stop_automated_movement = 0
*/
/*
// For proccessing the current stance, or setting and processing a new one
/mob/living/simple_animal/proc/handle_stance(var/new_stance)
if(ai_inactive)
stance = STANCE_IDLE
return
if(new_stance)
set_stance(new_stance)
switch(stance)
if(STANCE_IDLE)
target_mob = null
a_intent = I_HELP
annoyed = max(0,annoyed--)
//Yes I'm breaking this into two if()'s for ease of reading
//If we ARE ALLOWED TO
if(returns_home && home_turf && !astarpathing && (world.time - stance_changed) > 10 SECONDS)
if(get_dist(src,home_turf) > wander_distance)
move_to_delay = initial(move_to_delay)*2 //Walk back.
GoHome()
else
stop_automated_movement = 0
//Search for targets while idle
if(hostile)
FindTarget()
if(STANCE_FOLLOW)
annoyed = 15
FollowTarget()
if(follow_until_time && world.time > follow_until_time)
LoseFollow()
return
if(hostile)
FindTarget()
if(STANCE_APPROACH)
annoyed = 50
a_intent = I_HURT
RequestHelp()
MoveToTarget()
if(STANCE_FIGHT)
annoyed = 50
AttackTarget()
*/
// Helper proc to turn AI 'busy' mode on or off without having to check if there is an AI, to simplify writing code.
/mob/living/proc/set_AI_busy(value)

View File

@@ -72,7 +72,7 @@
return
// Spore things
/datum/blob_type/proc/on_spore_death(mob/living/simple_animal/hostile/blob/spore/S)
/datum/blob_type/proc/on_spore_death(mob/living/simple_mob/blob/spore/S)
return

View File

@@ -120,7 +120,7 @@
user << "<span class='danger'>The gibber is locked and running, wait for it to finish.</span>"
return
if(!(istype(victim, /mob/living/carbon)) && !(istype(victim, /mob/living/simple_animal)) )
if(!(istype(victim, /mob/living/carbon)) && !(istype(victim, /mob/living/simple_mob)) )
user << "<span class='danger'>This is not suitable for the gibber!</span>"
return

View File

@@ -238,7 +238,7 @@
/obj/item/weapon/deck/MouseDrop(mob/user as mob) // Code from Paper bin, so you can still pick up the deck
if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
if(!istype(usr, /mob/living/simple_animal))
if(!istype(usr, /mob/living/simple_mob))
if( !usr.get_active_hand() ) //if active hand is empty
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
@@ -256,7 +256,7 @@
/obj/item/weapon/deck/verb_pickup(mob/user as mob) // Snowflaked so pick up verb work as intended
if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
if(!istype(usr, /mob/living/simple_animal))
if(!istype(usr, /mob/living/simple_mob))
if( !usr.get_active_hand() ) //if active hand is empty
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]

View File

@@ -25,7 +25,7 @@
/mob/living/silicon/seen_cult_turfs()
return list()
/mob/living/simple_animal/seen_cult_turfs()
/mob/living/simple_mob/seen_cult_turfs()
return seen_turfs_in_range(src, 1)
/mob/living/simple_mob/construct/shade/seen_cult_turfs()

View File

@@ -206,7 +206,7 @@
else
if(declare_arrests)
var/action = arrest_type ? "detaining" : "arresting"
if(istype(target, /mob/living/simple_animal))
if(istype(target, /mob/living/simple_mob))
action = "fighting"
global_announcer.autosay("[src] is [action] a level [threat] [action != "fighting" ? "suspect" : "threat"] <b>[target_name(target)]</b> in <b>[get_area(src)]</b>.", "[src]", "Security")
UnarmedAttack(target)
@@ -260,8 +260,8 @@
C.handcuffed = new /obj/item/weapon/handcuffs(C)
C.update_inv_handcuffed()
busy = 0
else if(istype(M, /mob/living/simple_animal))
var/mob/living/simple_animal/S = M
else if(istype(M, /mob/living/simple_mob))
var/mob/living/simple_mob/S = M
S.Weaken(xeno_stun_strength)
S.adjustBruteLoss(xeno_harm_strength)
do_attack_animation(M)

View File

@@ -16,6 +16,8 @@
dsma.blend_mode = BLEND_ADD
dsoverlay.appearance = dsma
selected_image = image(icon = 'icons/mob/screen1.dmi', loc = src, icon_state = "centermarker")
/mob/living/Destroy()
dsoverlay.loc = null //I'll take my coat with me
dsoverlay = null
@@ -29,6 +31,7 @@
nest = null
if(buckled)
buckled.unbuckle_mob(src, TRUE)
qdel(selected_image)
return ..()
//mob verbs are faster than object verbs. See mob/verb/examine.

View File

@@ -340,7 +340,7 @@
return
adjustBruteLoss(damage)
add_attack_logs(user,src,"Generic attack (probably animal)", admin_notify = FALSE) //Usually due to simple_animal attacks
add_attack_logs(user,src,"Generic attack (probably animal)", admin_notify = FALSE) //Usually due to simple_mob attacks
if(ai_holder)
ai_holder.react_to_attack(user)
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")

View File

@@ -67,3 +67,5 @@
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
var/image/selected_image = null // Used for buildmode AI control stuff.

View File

@@ -111,34 +111,6 @@
return active_spell.on_ranged_cast(A, src)
return ..()
/*
// Used to cast spells.
/mob/living/simple_animal/technomancer_golem/RangedAttack(var/atom/A, var/params)
if(active_spell)
spellcast_pre_animation()
if(active_spell.cast_methods & CAST_RANGED)
active_spell.on_ranged_cast(A, src)
spellcast_post_animation()
/mob/living/simple_animal/technomancer_golem/UnarmedAttack(var/atom/A, var/proximity)
if(proximity)
if(active_spell)
spellcast_pre_animation()
if(!Adjacent(A)) // Need to check again since they might've moved while 'warming up'.
spellcast_post_animation()
return
var/effective_cooldown = round(active_spell.cooldown * core.cooldown_modifier, 5)
if(active_spell.cast_methods & CAST_MELEE)
active_spell.on_melee_cast(A, src)
else if(active_spell.cast_methods & CAST_RANGED)
active_spell.on_ranged_cast(A, src)
spellcast_post_animation()
src.setClickCooldown(effective_cooldown)
else
..()
*/
/mob/living/simple_mob/mechanical/technomancer_golem/melee_pre_animation(atom/A)
if(active_spell && active_spell.cast_methods & CAST_MELEE|CAST_RANGED) // If they're trying to melee-cast a spell, use the special animation instead.
special_pre_animation(A)

View File

@@ -537,7 +537,7 @@ proc/is_blind(A)
return threatcount
/mob/living/simple_animal/assess_perp(var/obj/access_obj, var/check_access, var/auth_weapons, var/check_records, var/check_arrest)
/mob/living/simple_mob/assess_perp(var/obj/access_obj, var/check_access, var/auth_weapons, var/check_records, var/check_arrest)
var/threatcount = ..()
if(. == SAFE_PERP)
return SAFE_PERP

View File

@@ -237,7 +237,7 @@
/mob/living/carbon/human/Animalize()
var/list/mobtypes = typesof(/mob/living/simple_animal)
var/list/mobtypes = typesof(/mob/living/simple_mob)
var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") in mobtypes
if(!safe_animal(mobpath))
@@ -271,7 +271,7 @@
/mob/proc/Animalize()
var/list/mobtypes = typesof(/mob/living/simple_animal)
var/list/mobtypes = typesof(/mob/living/simple_mob)
var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") in mobtypes
if(!safe_animal(mobpath))

View File

@@ -19,7 +19,7 @@
/obj/item/weapon/paper_bin/MouseDrop(mob/user as mob)
if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
if(!istype(usr, /mob/living/simple_animal))
if(!istype(usr, /mob/living/simple_mob))
if( !usr.get_active_hand() ) //if active hand is empty
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]

View File

@@ -185,7 +185,6 @@
/obj/machinery/atmospherics,
/obj/machinery/power/emitter,
/obj/machinery/field_generator,
/mob/living/simple_animal,
/obj/machinery/door/blast,
/obj/machinery/particle_accelerator/control_box,
/obj/structure/particle_accelerator/fuel_chamber,

View File

@@ -211,7 +211,7 @@
for(var/mob/living/carbon/bug in destination)
bug.gib()
for(var/mob/living/simple_animal/pest in destination)
for(var/mob/living/simple_mob/pest in destination)
pest.gib()
origin.move_contents_to(destination, direction=direction)