Files
Bubberstation/code/modules/procedural_mapping/mapGenerators/syndicate.dm
SkyratBot c056f4dac9 [MIRROR] Nanotrasen basic mobs. [MDB IGNORE] (#24573)
* Nanotrasen basic mobs. (#78917)

## About The Pull Request

First and foremost, converts all Nanotrasen simplemobs into basic mobs.

To avoid messy and redundant code, or god forbid, making Nanotrasen mobs
a subtype of Syndicate ones, I've made Syndicate, Russian, and
Nanotrasen mobs all share a unified "Trooper" parent. This should have
no effect on their behaviors, but makes things much easier to extend
further in the future.

While most of this PR is pretty cut-and-dry, I've done a couple notable
things. For one, all types of ranged trooper will now avoid friendly
fire, instead of shooting their friends in the back. Even the Russians
have trigger discipline.

I've also created a new AI subtree that allows mobs to call for
reinforcements. I've hopefully made this easy to extend, but the
existing version works as follows:

- A mob with this subtree that gains a target that is also a mob will
call out to all mobs within 15 tiles.
- If they share a faction, mobs receiving the call will have the target
added to their retaliate list, and have a new key set targeting the
calling mob.
- If they have the correct subtree in their AI controller, called-to
mobs will then run over to help out.

Sadly, this behavior is currently used only by a few completely unused
Nanotrasen mobs, so in practice it will not yet be seen.

Finally, I've fixed a minor issue where melee Russian mobs punch people
to death despite holding a knife. They now use the proper effects for
stabbing instead of punching.
## Why It's Good For The Game

Removes 8 more simple animals from the list.

As said above, making all "trooper" type mobs share a common parent cuts
down on code reuse, ensures consistency of behavior, and makes it much
easier to add new troopers not affiliated with these groups. I expect
that I'll make pirates share this same parent next.

The new "reinforcements" behavior, though extremely powerful, opens up
exciting new opportunities in the future. There aren't many existing
behaviors that allow basic mobs to work _together_ in interesting ways,
and I think adding some enemy teamwork could be fun.
## Changelog
🆑
refactor: Hostile Nanotrasen mobs now use the basic mob framework. This
should make them a little smarter and more dangerous. Please report any
bugs.
fix: Russian mobs will now actually use those knives they're holding.
/🆑

* Nanotrasen basic mobs.

* Modular

---------

Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-10-24 21:42:47 -04:00

57 lines
2.3 KiB
Plaintext

// Modules
/datum/map_generator_module/bottom_layer/syndie_floor
spawnableTurfs = list(/turf/open/floor/mineral/plastitanium/red = 100)
/datum/map_generator_module/border/syndie_walls
spawnableAtoms = list()
spawnableTurfs = list(/turf/closed/wall/r_wall/syndicate = 100)
/datum/map_generator_module/syndie_furniture
clusterCheckFlags = CLUSTER_CHECK_ALL
spawnableTurfs = list()
spawnableAtoms = list(/obj/structure/table = 20,/obj/structure/chair = 15,/obj/structure/chair/stool = 10, \
/obj/structure/frame/computer = 15, /obj/item/storage/toolbox/syndicate = 15 ,\
/obj/structure/closet/syndicate = 25, /obj/machinery/suit_storage_unit/syndicate = 15)
/datum/map_generator_module/splatter_layer/syndie_mobs
spawnableAtoms = list(
/mob/living/basic/trooper/syndicate = 30,
/mob/living/basic/trooper/syndicate/melee = 20,
/mob/living/basic/trooper/syndicate/ranged = 20,
/mob/living/basic/viscerator = 30
)
spawnableTurfs = list()
// Generators
/datum/map_generator/syndicate/empty //walls and floor only
modules = list(/datum/map_generator_module/bottom_layer/syndie_floor, \
/datum/map_generator_module/border/syndie_walls,\
/datum/map_generator_module/bottom_layer/repressurize)
buildmode_name = "Pattern: Shuttle Room: Syndicate"
/datum/map_generator/syndicate/mobsonly
modules = list(/datum/map_generator_module/bottom_layer/syndie_floor, \
/datum/map_generator_module/border/syndie_walls,\
/datum/map_generator_module/splatter_layer/syndie_mobs, \
/datum/map_generator_module/bottom_layer/repressurize)
buildmode_name = "Pattern: Shuttle Room: Syndicate: Mobs"
/datum/map_generator/syndicate/furniture
modules = list(/datum/map_generator_module/bottom_layer/syndie_floor, \
/datum/map_generator_module/border/syndie_walls,\
/datum/map_generator_module/syndie_furniture, \
/datum/map_generator_module/bottom_layer/repressurize)
buildmode_name = "Pattern: Shuttle Room: Syndicate: Furniture"
/datum/map_generator/syndicate/full
modules = list(/datum/map_generator_module/bottom_layer/syndie_floor, \
/datum/map_generator_module/border/syndie_walls,\
/datum/map_generator_module/syndie_furniture, \
/datum/map_generator_module/splatter_layer/syndie_mobs, \
/datum/map_generator_module/bottom_layer/repressurize)
buildmode_name = "Pattern: Shuttle Room: Syndicate: All"