[MIRROR] Turns lightgeists into a basic mob [MDB IGNORE] (#21429)

* Turns lightgeists into a basic mob (#75626)

## About The Pull Request

https://www.youtube.com/watch?v=bcUuqKrnvVY <- me getting rid of every
simple animal one thing at a time

Turns lightgeists into a basic mob. There are a few key advantages into
its implementation that was previously impossible in the simple animal
framework, which is entirely possible now.
## Why It's Good For The Game

Lightgeists can actually have a bit of AI now, as a treat. They didn't
have it prior because I assume if they attacked anything, they would end
up healing it, and we didn't really have an option in the simple animal
AI to say "do not attack"... This really fixes that so they can wander
around a bit and look cute if some admin decides to spawn them in (but
the only way to get them outright is to use the anomalous crystal, which
auto-assigns a player). You don't see the AI if a player ghosts out of
the lightgeist because the lightgeist will delete itself on ghost
(previous behavior).

It also gets rid of some janky AttackingTarget() override that was
completely un-needed post-#73202.
## Changelog
Nothing really player facing.

* Turns lightgeists into a basic mob

---------

Co-authored-by: san7890 <the@san7890.com>
This commit is contained in:
SkyratBot
2023-05-26 11:11:08 +01:00
committed by GitHub
co-authored by san7890
parent 11be4a60e0
commit 24ac869ffc
7 changed files with 37 additions and 35 deletions
@@ -52,8 +52,7 @@
/turf/open/misc/grass/lavaland,
/area/ruin/unpowered/gaia)
"p" = (
/mob/living/simple_animal/hostile/lightgeist{
AIStatus = 1;
/mob/living/basic/lightgeist{
light_color = "#42ECFF"
},
/turf/open/misc/grass/lavaland,
@@ -89,8 +88,7 @@
/area/ruin/unpowered/gaia)
"B" = (
/obj/structure/flora/grass/jungle/a/style_random,
/mob/living/simple_animal/hostile/lightgeist{
AIStatus = 1;
/mob/living/basic/lightgeist{
light_color = "#42ECFF"
},
/turf/open/misc/grass/lavaland,
+3 -3
View File
@@ -210,10 +210,10 @@
/datum/round_event/scrubber_clog/strange/get_mob()
var/static/list/mob_list = list(
/mob/living/simple_animal/hostile/retaliate/goose, //Janitors HATE geese.
/mob/living/basic/lightgeist,
/mob/living/simple_animal/hostile/bear,
/mob/living/simple_animal/pet/gondola,
/mob/living/simple_animal/hostile/mushroom,
/mob/living/simple_animal/hostile/lightgeist,
/mob/living/simple_animal/hostile/retaliate/goose, //Janitors HATE geese.
/mob/living/simple_animal/pet/gondola,
)
return pick(mob_list)
@@ -1,14 +1,15 @@
/**
* A small critter meant to heal other living mobs and unable to interact with almost everything else.
* The procs related to its unarmed attacks can be found in _onclick/other_mobs.dm (attack_lightgeist)
* ## Lightgeists
*
* Small critters meant to heal other living mobs and unable to interact with almost everything else.
*
*/
/mob/living/simple_animal/hostile/lightgeist
/mob/living/basic/lightgeist
name = "lightgeist"
desc = "This small floating creature is a completely unknown form of life... being near it fills you with a sense of tranquility."
icon_state = "lightgeist"
icon_living = "lightgeist"
icon_dead = "butterfly_dead"
turns_per_move = 1
response_help_continuous = "waves away"
response_help_simple = "wave away"
response_disarm_continuous = "brushes aside"
@@ -18,12 +19,12 @@
speak_emote = list("oscillates")
maxHealth = 2
health = 2
harm_intent_damage = 5
melee_damage_lower = 5
melee_damage_upper = 5
friendly_verb_continuous = "taps"
friendly_verb_simple = "tap"
density = FALSE
basic_mob_flags = DEL_ON_DEATH
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
mob_size = MOB_SIZE_TINY
gold_core_spawnable = HOSTILE_SPAWN
@@ -35,17 +36,24 @@
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
light_range = 4
faction = list(FACTION_NEUTRAL)
del_on_death = TRUE
unsuitable_atmos_damage = 0
minbodytemp = 0
maxbodytemp = 1500
minimum_survivable_temperature = 0
maximum_survivable_temperature = 1500
obj_damage = 0
environment_smash = ENVIRONMENT_SMASH_NONE
AIStatus = AI_OFF
stop_automated_movement = TRUE
/mob/living/simple_animal/hostile/lightgeist/Initialize(mapload)
ai_controller = /datum/ai_controller/basic_controller/lightgeist
/mob/living/basic/lightgeist/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
remove_verb(src, /mob/living/verb/pulled)
remove_verb(src, /mob/verb/me_verb)
var/datum/atom_hud/medical_sensor = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
medical_sensor.show_to(src)
AddElement(/datum/element/simple_flying)
AddComponent(\
/datum/component/healing_touch,\
@@ -57,19 +65,15 @@
complete_text = "%TARGET%'s wounds mend together.",\
)
remove_verb(src, /mob/living/verb/pulled)
remove_verb(src, /mob/verb/me_verb)
var/datum/atom_hud/medsensor = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
medsensor.show_to(src)
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
/mob/living/simple_animal/hostile/lightgeist/ghost()
/mob/living/basic/lightgeist/ghost()
. = ..()
if(.)
death()
/mob/living/simple_animal/hostile/lightgeist/AttackingTarget()
if(istype(target, /obj/structure/ladder)) //special case where lightgeists can use ladders properly.
var/obj/structure/ladder/laddy = target
laddy.use(src)
/// This is a bit neutered since these aren't intended to exist outside of player control, but it's a bit weird to just have these guys be completely stationary.
/// No attacking or anything like that, though. Just something so they seem alive.
/datum/ai_controller/basic_controller/lightgeist
ai_traits = STOP_MOVING_WHEN_PULLED
ai_movement = /datum/ai_movement/basic_avoidance
idle_behavior = /datum/idle_behavior/idle_random_walk/less_walking
@@ -526,10 +526,10 @@
if(.)
return
if(ready_to_deploy)
var/be_helper = tgui_alert(usr,"Become a Lightgeist? (Warning, You can no longer be revived!)",,list("Yes","No"))
if(be_helper == "Yes" && !QDELETED(src) && isobserver(user))
var/mob/living/simple_animal/hostile/lightgeist/W = new /mob/living/simple_animal/hostile/lightgeist(get_turf(loc))
W.key = user.key
var/be_helper = tgui_alert(usr, "Become a Lightgeist? (Warning, You can no longer be revived!)", "Lightgeist Deployment", list("Yes", "No"))
if((be_helper == "Yes") && !QDELETED(src) && isobserver(user))
var/mob/living/basic/lightgeist/deployable = new(get_turf(loc))
deployable.key = user.key
/obj/machinery/anomalous_crystal/helpers/Topic(href, href_list)
@@ -185,7 +185,6 @@
/mob/living/simple_animal/hostile/jungle/mega_arachnid,
/mob/living/simple_animal/hostile/jungle/mook,
/mob/living/simple_animal/hostile/jungle/seedling,
/mob/living/simple_animal/hostile/lightgeist,
/mob/living/simple_animal/hostile/megafauna,
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner,
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/doom,
+1 -1
View File
@@ -4033,6 +4033,7 @@
#include "code\modules\mob\living\basic\space_fauna\garden_gnome.dm"
#include "code\modules\mob\living\basic\space_fauna\ghost.dm"
#include "code\modules\mob\living\basic\space_fauna\killer_tomato.dm"
#include "code\modules\mob\living\basic\space_fauna\lightgeist.dm"
#include "code\modules\mob\living\basic\space_fauna\carp\carp.dm"
#include "code\modules\mob\living\basic\space_fauna\carp\carp_abilities.dm"
#include "code\modules\mob\living\basic\space_fauna\carp\carp_ai_actions.dm"
@@ -4281,7 +4282,6 @@
#include "code\modules\mob\living\simple_animal\hostile\hivebot.dm"
#include "code\modules\mob\living\simple_animal\hostile\hostile.dm"
#include "code\modules\mob\living\simple_animal\hostile\illusion.dm"
#include "code\modules\mob\living\simple_animal\hostile\lightgeist.dm"
#include "code\modules\mob\living\simple_animal\hostile\mimic.dm"
#include "code\modules\mob\living\simple_animal\hostile\morph.dm"
#include "code\modules\mob\living\simple_animal\hostile\mushroom.dm"
@@ -0,0 +1 @@
/mob/living/simple_animal/hostile/lightgeist : /mob/living/basic/lightgeist{@OLD;AIStatus=@SKIP}