Files
PollardTheDragon 24845b238a The Divine Flock - DaedalusDock Flockmind Port (#31984)
* Initial commit - FLOCKMIND - Probably has like a billion things to fix

* Do after conversions

* Config

* Moved the files, icon fixes

* Tick everything, language work, event, spawn landmark, role prefs, beginning mob port

* Spans and some other fixes. Also the tickening

* More tickening

* More fixes. Lots of fixes.

* More Fixes

* A whole lot more. Also flock TGUI.

* Fixes fixes fixes fixes fixes

* FIXES

* More fixes - PR ready, still needs a fuckton of testing

* Fixes

* fix incomplete upstream merge

* fix FlockPanel + sort button name

* TGUI review

* Fixes tealprint list

* Fixes

* More fixes

* Incapacitator Fix

* Filenames

* Linters

* Interceptor range buff

* Reagent counts

* Linters

* Fabricator vendor fix

* Keybinds and HUD - Flockdrones, Fixes Vendor Conversion, Cube Materials

* Reworks reagent, adds flock grilles, fixes compute node overlays

* Intent-based flockdrone parts

* Intent based drone parts

* Radial control panel for controlling drones manually, phasing through windows/grilles

* Movement fixes

* Radio talk power, stare fix

* Flock health HUD

* Fixes flock lights, linters

* Unit tests

* Adds countdown to relay

* Relay improvements

* Small fix

* Logic Schmogic

* Relay overlay and looping sound effect

* Ignore air when converting turfs

* Cage fixes and improvements

* Improved flock bolt

* Turret conversions

* Flock bolts taze simple or basic mobs

* Sentience type

* Fixe

* Linter

* tgui review stage 2

* Concentrated Repair Burst

* Improves radio detection

* Removes extra space

* Adds healing visual effect

* Cube tech levels

* Ghooost

* Excess

* Flock doors, chairs, lattices. Centralizes conversion code.  Crafting with Gnesis

* Update code/modules/antagonists/flockmind/ai_behaviors/flock_wander.dm

Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* Fixes the fix

* Astar movement detection

* Fix, extraneous code, language stuff

* Language fixes and wander fix

* Fixes

* Another fix

* Lints

* Another linter

* Language improvement

* More language improvements

* Time requirement and appearing in orbit menu as an antag

* Cube glow

* TGUI

* Minicache

* Linters

* Grammar

* Material ID fix

* Lid fix

* Reagent turf reaction

* Reagent fix

* Butcher results

* Conversion rates

* Flock stare fix

* Fixes stare behavior

* Staring

* Flock mob blood

* Flock mobs gibs and blood. Also some runtime fixes

* Flock mobs now resist out of grabs, buckles, lockers, and more

* Fixes flock orbit, fixes a runtime I think,

* Target mechs, damage mechs, other bug fixes

* Cage fix

* Cage resist change

* Some mind changes, gatecrash buff

* Drones now shoot mechs, stare improvement

* Cut down on spam a little

* Nest fix

* No more resist spam

* Fixed drone death control

* Resist statement

* Makes the relay alarm scarier

* Fixes dead flock camera mobs having no ghost sprite, something with ghosting

* Enhanced flockphasing

* Improved flockmob pathing

* Added required turf restriction to relay

* Increased needed bandwidth for relay construction

* Nerfed drone substrate rate

* Added new status tab items for relay progress

* Another relay cost adjustment

* Improves drone AI responsiveness

* Computer frames now become flock computers

* Improves target finding for conversion, building, and replicating

* Reduced flock event pop requirements

* Adjusts flock protection on structures. Adjusts overlays.

* Relay unlock tweak

* Fixwes flock being able to gib mech'd AIs with one button

* Map conflict

* Flock can no longer be outed by merely existing

* Fied bug causing drones to shoot themselves

* Prevents mobs from attacking while in a cage

* Converter tool can now open closets and crates.

* Adds descriptions to flockdrone tools.

* More informatic blurbs

* Adds xenobiology organs

* Organ lint

* TGUI merge

* bundle and mm

---------

Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Co-authored-by: Toastical <20125180+Toastical@users.noreply.github.com>
Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
2026-07-08 21:31:28 +00:00

189 lines
6.2 KiB
Plaintext

GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new)
/datum/orbit_menu
/datum/orbit_menu/ui_state(mob/user)
return GLOB.observer_state
/datum/orbit_menu/ui_interact(mob/user, datum/tgui/ui = null)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "Orbit", "Orbit")
ui.open()
/datum/orbit_menu/ui_assets(mob/user)
return list(
get_asset_datum(/datum/asset/spritesheet/job_icons)
)
/datum/orbit_menu/ui_act(action, list/params, datum/tgui/ui)
. = ..()
if(.)
return
switch(action)
if("orbit")
var/ref = params["ref"]
var/atom/movable/poi = (locate(ref) in GLOB.mob_list) || (locate(ref) in GLOB.poi_list)
if(poi == null)
. = TRUE
return
var/mob/dead/observer/ghost = ui.user
ghost.manual_follow(poi)
. = TRUE
if("refresh")
update_static_data(ui.user, ui)
. = TRUE
/datum/orbit_menu/ui_static_data(mob/user)
var/list/data = list()
var/list/alive = list()
var/list/highlights = list()
var/list/response_teams = list()
var/list/antagonists = list()
var/list/dead = list()
var/list/ssd = list()
var/list/ghosts = list()
var/list/misc = list()
var/list/npcs = list()
var/list/tourist = list()
var/length_of_ghosts = length(get_observers())
var/list/pois = getpois(mobs_only = FALSE, skip_mindless = FALSE)
for(var/name in pois)
var/mob/M = pois[name]
if(name == null)
if(pois[name] && M.type)
stack_trace("getpois returned something under a null name. Type: [M.type]")
else
stack_trace("getpois returned a null value")
continue
var/list/serialized = list()
serialized["name"] = "[name]" // stringify it; If it's null or something - we'd like to know it and fix getpois()
if(serialized["name"] != name)
stack_trace("getpois returned something under a non-string name [name] - [pois[name]] - [M.type]")
continue
serialized["ref"] = "\ref[M]"
var/list/orbiters = M.get_orbiters_recursive()
if(length(orbiters) > 0)
serialized["orbiters"] = length(orbiters)
if(istype(M))
if(isnewplayer(M)) // People in the lobby screen; only have their ckey as a name.
continue
if(isobserver(M) && M.client)
ghosts += list(serialized)
else if(M.mind == null)
npcs += list(serialized)
else if(M.stat == DEAD)
dead += list(serialized)
else if(!M.client) // this includes mobs which ghosted, but aren't `player_logged`, so that the Alive count is more accurate
ssd += list(serialized)
else
if(length(orbiters) >= 0.2 * length_of_ghosts) // They're important if 20% of observers are watching them
highlights += list(serialized)
serialized["ssd"] = !M.client
alive += list(serialized)
var/datum/mind/mind = M.mind
if(mind.special_role in list(SPECIAL_ROLE_ERT, SPECIAL_ROLE_DEATHSQUAD, SPECIAL_ROLE_SYNDICATE_DEATHSQUAD))
response_teams += list(serialized)
if(mind.special_role == SPECIAL_ROLE_TOURIST)
tourist += list(serialized)
if(user.antagHUD)
/*
If a mind is many antags at once, we'll display all of them, each
under their own antag sub-section.
This is arguably better, than picking one of the antag datums at random.
list of antags that are datumised:
- traitor
- mindslaves/vampire thralls
- vampire
- changelings
- revolutionaries/headrevs
- event
- Heretic (I think?)
*/
for(var/_A in mind.antag_datums)
var/datum/antagonist/A = _A
var/antag_serialized = serialized.Copy()
antag_serialized["antag"] = A.name
antagonists += list(antag_serialized)
// Not-very-datumized antags follow
// Associative list of antag name => whether this mind is this antag
var/list/other_antags = list()
if(SSticker && SSticker.mode)
other_antags += list(
"Blob" = (mind.special_role == SPECIAL_ROLE_BLOB),
"Nuclear Operative" = (mind in SSticker.mode.syndicates)
)
for(var/antag_name in other_antags)
var/is_antag = other_antags[antag_name]
if(!is_antag)
continue
var/antag_serialized = serialized.Copy()
antag_serialized["antag"] = antag_name
antagonists += list(antag_serialized)
// Antaghud? Let them see everyone's role
if(isliving(M))
var/mob/living/L = M
if(L.mind?.has_normal_assigned_role())
serialized["assigned_role"] = L.mind.assigned_role
serialized["assigned_role_sprite"] = ckey(L.mind.get_assigned_role_asset())
// Player terror spiders (and other hostile player-controlled event mobs) have their own category to help see how much there are.
// Not in the above block because terrors can be known whether AHUD is on or not.
if(isterrorspider(M))
var/list/antag_serialized = serialized.Copy()
antag_serialized["antag"] = "Terror Spider"
antagonists += list(antag_serialized)
else if(istype(M, /mob/living/basic/revenant))
var/list/antag_serialized = serialized.Copy()
antag_serialized["antag"] = "Revenant"
antagonists += list(antag_serialized)
else if(isalien(M))
var/list/antag_serialized = serialized.Copy()
antag_serialized["antag"] = "Xenomorph"
antagonists += list(antag_serialized)
else if(isdemon(M))
var/list/antag_serialized = serialized.Copy()
antag_serialized["antag"] = "Demon"
antagonists += list(antag_serialized)
else if(ismorph(M))
var/list/antag_serialized = serialized.Copy()
antag_serialized["antag"] = "Morph"
antagonists += list(antag_serialized)
else if(istype(M, /mob/living/basic/mouse/irradiated_mouse))
var/list/antag_serialized = serialized.Copy()
antag_serialized["antag"] = "Irradiated Mouse"
antagonists += list(antag_serialized)
else if(isflockmob(M))
var/list/antag_serialized = serialized.Copy()
antag_serialized["antag"] = "Divine Flock"
antagonists += list(antag_serialized)
else
if(length(orbiters) >= 0.2 * length_of_ghosts) // If a bunch of people are orbiting an object, like the nuke disk.
highlights += list(serialized)
misc += list(serialized)
data["antagonists"] = antagonists
data["highlights"] = highlights
data["response_teams"] = response_teams
data["tourist"] = tourist
data["alive"] = alive
data["ssd"] = ssd
data["dead"] = dead
data["ghosts"] = ghosts
data["misc"] = misc
data["npcs"] = npcs
return data