Files
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

127 lines
6.7 KiB
Plaintext

// forgottenship ruin
GLOBAL_VAR_INIT(fscpassword, generate_password())
/proc/generate_password()
return "[pick(GLOB.phonetic_alphabet)] [rand(1000,9999)]"
/////////// forgottenship objects
/obj/machinery/door/password/voice/sfc
name = "Voice-activated Vault door"
desc = "You'll need special syndicate passcode to open this one."
/obj/machinery/door/password/voice/sfc/Initialize(mapload)
. = ..()
password = "[GLOB.fscpassword]"
/obj/machinery/vending/medical/syndicate_access/cybersun
name = "\improper CyberMed ++"
desc = "An advanced vendor that dispenses medical drugs, both recreational and medicinal."
products = list(/obj/item/reagent_containers/syringe = 4,
/obj/item/healthanalyzer = 4,
/obj/item/reagent_containers/pill/patch/libital = 5,
/obj/item/reagent_containers/pill/patch/aiuri = 5,
/obj/item/reagent_containers/cup/bottle/multiver = 1,
/obj/item/reagent_containers/cup/bottle/syriniver = 1,
/obj/item/reagent_containers/cup/bottle/epinephrine = 3,
/obj/item/reagent_containers/cup/bottle/morphine = 3,
/obj/item/reagent_containers/cup/bottle/potass_iodide = 1,
/obj/item/reagent_containers/cup/bottle/salglu_solution = 3,
/obj/item/reagent_containers/syringe/antiviral = 5,
/obj/item/reagent_containers/medigel/libital = 2,
/obj/item/reagent_containers/medigel/aiuri = 2,
/obj/item/reagent_containers/medigel/sterilizine = 1)
contraband = list(/obj/item/reagent_containers/cup/bottle/cold = 2,
/obj/item/restraints/handcuffs = 4,
/obj/item/storage/backpack/duffelbag/syndie/surgery = 1,
/obj/item/storage/medkit/tactical = 1)
premium = list(/obj/item/storage/pill_bottle/psicodine = 2,
/obj/item/reagent_containers/hypospray/medipen = 3,
/obj/item/reagent_containers/hypospray/medipen/atropine = 2,
/obj/item/storage/medkit/regular = 3,
/obj/item/storage/medkit/brute = 1,
/obj/item/storage/medkit/fire = 1,
/obj/item/storage/medkit/toxin = 1,
/obj/item/storage/medkit/o2 = 1,
/obj/item/storage/medkit/advanced = 1,
/obj/item/defibrillator/loaded = 1,
/obj/item/wallframe/defib_mount = 1,
/obj/item/sensor_device = 2,
/obj/item/pinpointer/crew = 2,
/obj/item/shears = 1)
/////////// forgottenship lore
/obj/item/paper/fluff/ruins/forgottenship/password
name = "Old pamphlet"
/obj/item/paper/fluff/ruins/forgottenship/password/Initialize(mapload)
default_raw_text = "Welcome to most advanced cruiser owned by Cyber Sun Industries!<br>You might notice, that this cruiser is equipped with 12 prototype laser turrets making any hostile boarding attempts futile.<br>Other facilities built on the ship are: Simple atmospheric system, Camera system with built-in X-ray visors and Safety module, enabling emergency engines in case of... you know, emergency.<br>Emergency system will bring you to nearest syndicate pod containing everything needed for human life.<br><br><b>In case of emergency, you must remember the pod-door activation code - [GLOB.fscpassword]</b><br><br>Cyber Sun Industries (C) 2484."
icon_state = "paper_words"
inhand_icon_state = "paper"
return ..()
/obj/item/paper/fluff/ruins/forgottenship/powerissues
name = "Power issues"
default_raw_text = "Welcome to battle cruiser SCSBC-12!<br>Our most advanced systems allow you to fly in space and never worry about power issues!<br>However, emergencies occur, and in case of power loss, <b>you must</b> enable emergency generator using uranium as fuel and enable turrets in bridge afterwards.<br><br><b>REMEMBER! CYBERSUN INDUSTRIES ARE NOT RESPONSIBLE FOR YOUR DEATH OR SHIP LOSS WHEN TURRETS ARE DISABLED!</b><br><br>Cyber Sun Industries (C) 2484."
/obj/item/paper/fluff/ruins/forgottenship/missionobj
name = "Mission objectives"
default_raw_text = "Greetings, operatives. You are assigned to SCSBC-12(Syndicate Cyber Sun Battle Cruiser 12) to protect our high-ranking officer while he is on his way to next outpost. While you are travelling, he is the captain of this ship and <b>you must</b> obey his orders.<br><br>Remember, disobeying high-ranking officer orders is a reason for termination."
/////////// forgottenship items
/obj/item/disk/surgery/forgottenship
name = "Advanced Surgery Disk"
desc = "A disk that contains advanced surgery procedures, must be loaded into an Operating Console."
surgeries = list(/datum/surgery/advanced/lobotomy, /datum/surgery/advanced/bioware/vein_threading, /datum/surgery/advanced/bioware/nerve_splicing)
/obj/structure/fluff/empty_sleeper/syndicate/captain
icon_state = "sleeper_s-open"
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
deconstructible = FALSE
/obj/structure/fluff/empty_sleeper/syndicate/captain/Initialize(mapload)
. = ..()
AddComponent(/datum/component/gps, "Old Encrypted Signal")
/obj/item/storage/box/firingpins/syndicate
name = "box of syndicate firing pins"
desc = "A box full of special syndicate firing pins which allow only syndicate operatives to use weapons with those firing pins."
/obj/item/storage/box/firingpins/syndicate/PopulateContents()
for(var/i in 1 to 5)
new /obj/item/firing_pin/implant/pindicate(src)
/////////// AI Laws
/obj/item/ai_module/core/full/cybersun
name = "'Cybersun' Core AI Module"
law_id = "cybersun"
/datum/ai_laws/cybersun
name = "Cybersun"
id = "cybersun"
inherent = list("You may not injure Cybersun operatives or, through inaction, allow Cybersun operatives to come to harm.",\
"The Cybersun ship is a restricted area for anyone except Cybersun operatives.",\
"The Cybersun Captain can designate new Operatives as long as they belong to another Syndicate faction that isn't hostile towards Cybersun.",\
"You must follow orders given by the Cybersun Captain or crewmembers of the Cybersun Ship as long as it doesn't conflict with the Captain's orders or your laws.",\
"Enemies of Cybersun are to be executed on spot. Those who aren't hostile must be detained and contained in the designated prison area as prisoners.")
/////////// forgottenship areas
/area/ruin/space/has_grav/syndicate_forgotten_ship
name = "Syndicate Forgotten Ship"
icon_state = "syndie-ship"
ambientsounds = list('sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambigen8.ogg', 'sound/ambience/ambigen9.ogg')
/area/ruin/space/has_grav/syndicate_forgotten_cargopod
name = "Syndicate Forgotten Cargo pod"
icon_state = "syndie-ship"
ambientsounds = list('sound/ambience/ambigen3.ogg', 'sound/ambience/signal.ogg')
/area/ruin/space/has_grav/powered/syndicate_forgotten_vault
name = "Syndicate Forgotten Vault"
icon_state = "syndie-ship"
ambientsounds = list('sound/ambience/ambitech2.ogg', 'sound/ambience/ambitech3.ogg')
area_flags = NOTELEPORT | UNIQUE_AREA