From b4615f9f409adfecf9713f7b95753e1981e6349f Mon Sep 17 00:00:00 2001 From: kawoppi <94711066+kawoppi@users.noreply.github.com> Date: Wed, 7 Dec 2022 22:54:32 +0100 Subject: [PATCH] turns axolotls into basic mobs (#71778) ## About The Pull Request Changes axolotls from simple mobs to basic mobs. I'm not well versed on the differences between simple and basic mobs but it looks like axolotls are still working as before. Their idle movement may be slightly different compared to before and now they don't move away while you're pulling them. ## Why It's Good For The Game Basic mobs are better for AI and probably some other stuff as well and there's the freeze thing also. ## Changelog :cl: code: turned axolotls into basic mobs, their idle movement may be slightly different and they won't move while you're pulling them anymore /:cl: --- .../objects/effects/spawners/random/trash.dm | 2 +- .../friendly => basic/vermin}/axolotl.dm | 39 +++++++++++++++---- .../unit_tests/simple_animal_freeze.dm | 1 - tgstation.dme | 2 +- 4 files changed, 33 insertions(+), 11 deletions(-) rename code/modules/mob/living/{simple_animal/friendly => basic/vermin}/axolotl.dm (59%) diff --git a/code/game/objects/effects/spawners/random/trash.dm b/code/game/objects/effects/spawners/random/trash.dm index c9ca7ca2862..3aed7bb0ae3 100644 --- a/code/game/objects/effects/spawners/random/trash.dm +++ b/code/game/objects/effects/spawners/random/trash.dm @@ -143,7 +143,7 @@ /obj/item/reagent_containers/cup/bucket = 2, /obj/effect/decal/cleanable/blood/old = 2, /obj/structure/mop_bucket = 2, - /mob/living/simple_animal/axolotl = 1, + /mob/living/basic/axolotl = 1, ) /obj/effect/spawner/random/trash/graffiti diff --git a/code/modules/mob/living/simple_animal/friendly/axolotl.dm b/code/modules/mob/living/basic/vermin/axolotl.dm similarity index 59% rename from code/modules/mob/living/simple_animal/friendly/axolotl.dm rename to code/modules/mob/living/basic/vermin/axolotl.dm index a9798d97306..63fa841c622 100644 --- a/code/modules/mob/living/simple_animal/friendly/axolotl.dm +++ b/code/modules/mob/living/basic/vermin/axolotl.dm @@ -1,4 +1,4 @@ -/mob/living/simple_animal/axolotl +/mob/living/basic/axolotl name = "axolotl" desc = "Quite the colorful amphibian!" icon_state = "axolotl" @@ -9,24 +9,47 @@ attack_verb_continuous = "nibbles" //their teeth are just for gripping food, not used for self defense nor even chewing attack_verb_simple = "nibble" butcher_results = list(/obj/item/food/nugget = 1) + density = FALSE + pass_flags = PASSTABLE | PASSGRILLE | PASSMOB + mob_size = MOB_SIZE_TINY + mob_biotypes = MOB_ORGANIC | MOB_BEAST + gold_core_spawnable = FRIENDLY_SPAWN + response_help_continuous = "pets" response_help_simple = "pet" response_disarm_continuous = "gently pushes aside" response_disarm_simple = "gently push aside" response_harm_continuous = "splats" response_harm_simple = "splat" - density = FALSE - pass_flags = PASSTABLE | PASSGRILLE | PASSMOB - mob_size = MOB_SIZE_TINY - mob_biotypes = MOB_ORGANIC|MOB_BEAST - gold_core_spawnable = FRIENDLY_SPAWN + can_be_held = TRUE held_w_class = WEIGHT_CLASS_TINY - worn_slot_flags = ITEM_SLOT_HEAD held_lh = 'icons/mob/inhands/animal_item_lefthand.dmi' held_rh = 'icons/mob/inhands/animal_item_righthand.dmi' + worn_slot_flags = ITEM_SLOT_HEAD head_icon = 'icons/mob/clothing/head/pets_head.dmi' -/mob/living/simple_animal/axolotl/Initialize(mapload) + ai_controller = /datum/ai_controller/basic_controller/axolotl + +/mob/living/basic/axolotl/Initialize(mapload) . = ..() ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT) + + var/list/habitable_atmos = string_assoc_list(list( + "min_oxy" = 5, + "max_oxy" = 0, + "min_plas" = 0, + "max_plas" = 1, + "min_co2" = 0, + "max_co2" = 5, + "min_n2" = 0, + "max_n2" = 0, + )) + + AddElement(/datum/element/atmos_requirements, habitable_atmos, unsuitable_atmos_damage = 1) + AddElement(/datum/element/basic_body_temp_sensitive) + +/datum/ai_controller/basic_controller/axolotl + ai_traits = STOP_MOVING_WHEN_PULLED + ai_movement = /datum/ai_movement/basic_avoidance + idle_behavior = /datum/idle_behavior/idle_random_walk diff --git a/code/modules/unit_tests/simple_animal_freeze.dm b/code/modules/unit_tests/simple_animal_freeze.dm index 995ebf3837a..8f455604363 100644 --- a/code/modules/unit_tests/simple_animal_freeze.dm +++ b/code/modules/unit_tests/simple_animal_freeze.dm @@ -5,7 +5,6 @@ // Use the new basic mobs system instead. // If you are refactoring a simple_animal, REMOVE it from this list var/list/allowed_types = list( - /mob/living/simple_animal/axolotl, /mob/living/simple_animal/bot, /mob/living/simple_animal/bot/cleanbot, /mob/living/simple_animal/bot/cleanbot/autopatrol, diff --git a/tgstation.dme b/tgstation.dme index 032826f0540..d443bcaa6f4 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3607,6 +3607,7 @@ #include "code\modules\mob\living\basic\pets\dog.dm" #include "code\modules\mob\living\basic\pets\pet.dm" #include "code\modules\mob\living\basic\ruin_defender\stickman.dm" +#include "code\modules\mob\living\basic\vermin\axolotl.dm" #include "code\modules\mob\living\basic\vermin\cockroach.dm" #include "code\modules\mob\living\basic\vermin\mothroach.dm" #include "code\modules\mob\living\basic\vermin\mouse.dm" @@ -3773,7 +3774,6 @@ #include "code\modules\mob\living\simple_animal\bot\secbot.dm" #include "code\modules\mob\living\simple_animal\bot\SuperBeepsky.dm" #include "code\modules\mob\living\simple_animal\bot\vibebot.dm" -#include "code\modules\mob\living\simple_animal\friendly\axolotl.dm" #include "code\modules\mob\living\simple_animal\friendly\butterfly.dm" #include "code\modules\mob\living\simple_animal\friendly\cat.dm" #include "code\modules\mob\living\simple_animal\friendly\crab.dm"