mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-18 21:15:21 +00:00
## About The Pull Request Fixes #72677 and also converted the "Wumborian Fugu" mob to a basic mob rather than a simple one. I will be totally honest: I didn't need to do that in order to fix the bug. I just didn't like looking at the rest of the code in that file. Also I have some kind of sickness which makes me do this. This ended up being one of those "see something related and fix it as well" ones so there's a couple of only tangentially related changes in here. If you want me to split it up I will but I think this one is _probably_ fine because the wide-ranging changes are pretty simple ones? So what this PR does is: - Refactors simple mob into basic mob. - Cleans up its really ugly ability to work in a hopefully nicer way. - A one line fix to the linked issue above. - Modifies the default cooldown on `basic_melee_attack` and `attack_obstructions` to be a widely used cooldown rather than a random value used by no mob that we have. - Renamed behaviour "try_mob_ability" to "targeted_mob_ability" and added a new AI behaviour called "use_mob_ability", the difference between the two being that the former requires a target and the latter does not. I... don't actually use this because I realised after adding it that I still want a target for this mob, but someone will need it eventually. - Change everywhere that is passing references to abilities to actions to pass weak references instead. - Adds an element to handle "spawn this stuff when a related mob dies". - Found a few places where people were setting `environment_smash ` as if it did anything (including me) and replaced them with the proper ai_controller implementation instead, updated the comment to make it clearer although that won't prevent copy/paste errors. - Registered to the "movement speed updated" signal to ensure that basic mobs actually notice that you have applied a movement speed modifier. ## Why It's Good For The Game Fixes a linked issue. Refactors some code which made me sad whenever I saw it. Restores some mob behaviour which nobody noticed was missing, but was. Fixes some apparently unreliable code I added in a recent PR reliant on basic mobs using movespeed modifiers. Adds element we will definitely need again in the future. ## Changelog 🆑 fix: The Fugu Gland can once more be used on Ian, Carp, Giant Spiders, or other basic mobs. fix: Syndicate mobs will once again attack windows to try to reach you, and space ruin spiders won't. fix: Netherworld-themed mobs will correctly adjust their speed as they take damage. refactor: Made the Wumborian Fugu into a basic mob, which should act largely the same way but may have slightly different speed and reaction times. /🆑
140 lines
5.7 KiB
Plaintext
140 lines
5.7 KiB
Plaintext
/obj/structure/spawner
|
|
name = "monster nest"
|
|
icon = 'icons/mob/simple/animal.dmi'
|
|
icon_state = "hole"
|
|
max_integrity = 100
|
|
|
|
move_resist = MOVE_FORCE_EXTREMELY_STRONG
|
|
anchored = TRUE
|
|
density = TRUE
|
|
|
|
var/max_mobs = 5
|
|
var/spawn_time = 30 SECONDS
|
|
var/mob_types = list(/mob/living/basic/carp)
|
|
var/spawn_text = "emerges from"
|
|
var/faction = list("hostile")
|
|
var/spawner_type = /datum/component/spawner
|
|
|
|
/obj/structure/spawner/Initialize(mapload)
|
|
. = ..()
|
|
AddComponent(spawner_type, mob_types, spawn_time, faction, spawn_text, max_mobs)
|
|
|
|
/obj/structure/spawner/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
|
if(faction_check(faction, user.faction, FALSE) && !user.client)
|
|
return
|
|
return ..()
|
|
|
|
|
|
/obj/structure/spawner/syndicate
|
|
name = "warp beacon"
|
|
icon = 'icons/obj/device.dmi'
|
|
icon_state = "syndbeacon"
|
|
spawn_text = "warps in from"
|
|
mob_types = list(/mob/living/basic/syndicate/ranged)
|
|
faction = list(ROLE_SYNDICATE)
|
|
|
|
/obj/structure/spawner/skeleton
|
|
name = "bone pit"
|
|
desc = "A pit full of bones, and some still seem to be moving..."
|
|
icon_state = "hole"
|
|
icon = 'icons/mob/simple/lavaland/nest.dmi'
|
|
max_integrity = 150
|
|
max_mobs = 15
|
|
spawn_time = 15 SECONDS
|
|
mob_types = list(/mob/living/simple_animal/hostile/skeleton)
|
|
spawn_text = "climbs out of"
|
|
faction = list("skeleton")
|
|
|
|
/obj/structure/spawner/clown
|
|
name = "Laughing Larry"
|
|
desc = "A laughing, jovial figure. Something seems stuck in his throat."
|
|
icon_state = "clownbeacon"
|
|
icon = 'icons/obj/device.dmi'
|
|
max_integrity = 200
|
|
max_mobs = 15
|
|
spawn_time = 15 SECONDS
|
|
mob_types = list(/mob/living/simple_animal/hostile/retaliate/clown, /mob/living/simple_animal/hostile/retaliate/clown/fleshclown, /mob/living/simple_animal/hostile/retaliate/clown/clownhulk, /mob/living/simple_animal/hostile/retaliate/clown/longface, /mob/living/simple_animal/hostile/retaliate/clown/clownhulk/chlown, /mob/living/simple_animal/hostile/retaliate/clown/clownhulk/honcmunculus, /mob/living/simple_animal/hostile/retaliate/clown/mutant/glutton, /mob/living/simple_animal/hostile/retaliate/clown/banana, /mob/living/simple_animal/hostile/retaliate/clown/honkling, /mob/living/simple_animal/hostile/retaliate/clown/lube)
|
|
spawn_text = "climbs out of"
|
|
faction = list("clown")
|
|
|
|
/obj/structure/spawner/mining
|
|
name = "monster den"
|
|
desc = "A hole dug into the ground, harboring all kinds of monsters found within most caves or mining asteroids."
|
|
icon_state = "hole"
|
|
max_integrity = 200
|
|
max_mobs = 3
|
|
icon = 'icons/mob/simple/lavaland/nest.dmi'
|
|
spawn_text = "crawls out of"
|
|
mob_types = list(/mob/living/simple_animal/hostile/asteroid/goldgrub, /mob/living/simple_animal/hostile/asteroid/goliath, /mob/living/simple_animal/hostile/asteroid/hivelord, /mob/living/simple_animal/hostile/asteroid/basilisk, /mob/living/basic/wumborian_fugu)
|
|
faction = list("mining")
|
|
|
|
/obj/structure/spawner/mining/goldgrub
|
|
name = "goldgrub den"
|
|
desc = "A den housing a nest of goldgrubs, annoying but arguably much better than anything else you'll find in a nest."
|
|
mob_types = list(/mob/living/simple_animal/hostile/asteroid/goldgrub)
|
|
|
|
/obj/structure/spawner/mining/goliath
|
|
name = "goliath den"
|
|
desc = "A den housing a nest of goliaths, oh god why?"
|
|
mob_types = list(/mob/living/simple_animal/hostile/asteroid/goliath)
|
|
|
|
/obj/structure/spawner/mining/hivelord
|
|
name = "hivelord den"
|
|
desc = "A den housing a nest of hivelords."
|
|
mob_types = list(/mob/living/simple_animal/hostile/asteroid/hivelord)
|
|
|
|
/obj/structure/spawner/mining/basilisk
|
|
name = "basilisk den"
|
|
desc = "A den housing a nest of basilisks, bring a coat."
|
|
mob_types = list(/mob/living/simple_animal/hostile/asteroid/basilisk)
|
|
|
|
/obj/structure/spawner/mining/wumborian
|
|
name = "wumborian fugu den"
|
|
desc = "A den housing a nest of wumborian fugus, how do they all even fit in there?"
|
|
mob_types = list(/mob/living/basic/wumborian_fugu)
|
|
|
|
/obj/structure/spawner/nether
|
|
name = "netherworld link"
|
|
desc = null //see examine()
|
|
icon_state = "nether"
|
|
max_integrity = 50
|
|
spawn_time = 60 SECONDS
|
|
max_mobs = 15
|
|
icon = 'icons/mob/simple/lavaland/nest.dmi'
|
|
spawn_text = "crawls through"
|
|
mob_types = list(/mob/living/basic/migo, /mob/living/basic/creature, /mob/living/basic/blankbody)
|
|
faction = list("nether")
|
|
|
|
/obj/structure/spawner/nether/Initialize(mapload)
|
|
. = ..()
|
|
START_PROCESSING(SSprocessing, src)
|
|
|
|
/obj/structure/spawner/nether/examine(mob/user)
|
|
. = ..()
|
|
if(isskeleton(user) || iszombie(user))
|
|
. += "A direct link to another dimension full of creatures very happy to see you. [span_nicegreen("You can see your house from here!")]"
|
|
else
|
|
. += "A direct link to another dimension full of creatures not very happy to see you. [span_warning("Entering the link would be a very bad idea.")]"
|
|
|
|
/obj/structure/spawner/nether/attack_hand(mob/user, list/modifiers)
|
|
. = ..()
|
|
if(isskeleton(user) || iszombie(user))
|
|
to_chat(user, span_notice("You don't feel like going home yet..."))
|
|
else
|
|
user.visible_message(span_warning("[user] is violently pulled into the link!"), \
|
|
span_userdanger("Touching the portal, you are quickly pulled through into a world of unimaginable horror!"))
|
|
contents.Add(user)
|
|
|
|
/obj/structure/spawner/nether/process(delta_time)
|
|
for(var/mob/living/living_mob in contents)
|
|
if(living_mob)
|
|
playsound(src, 'sound/magic/demon_consume.ogg', 50, TRUE)
|
|
living_mob.adjustBruteLoss(60 * delta_time)
|
|
new /obj/effect/gibspawner/generic(get_turf(living_mob), living_mob)
|
|
if(living_mob.stat == DEAD)
|
|
var/mob/living/basic/blankbody/newmob = new(loc)
|
|
newmob.name = "[living_mob]"
|
|
newmob.desc = "It's [living_mob], but [living_mob.p_their()] flesh has an ashy texture, and [living_mob.p_their()] face is featureless save an eerie smile."
|
|
src.visible_message(span_warning("[living_mob] reemerges from the link!"))
|
|
qdel(living_mob)
|