Files
Paradise/code/__DEFINES/is_helpers.dm
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

181 lines
5.4 KiB
Plaintext

// Datums
#define isdatum(thing) (istype(thing, /datum))
#define isspell(A) (istype(A, /datum/spell))
// Atoms
#define isatom(A) (isloc(A))
// Mobs
//#define ismob(A, B, C...) BYOND proc, can test multiple arguments and only return TRUE if all are mobs
#define isliving(A) (istype(A, /mob/living))
#define isbrain(A) (istype(A, /mob/living/brain))
// Carbon mobs
#define iscarbon(A) (istype(A, /mob/living/carbon))
#define ishuman(A) (istype(A, /mob/living/carbon/human))
#define isalien(A) (istype(A, /mob/living/carbon/alien))
#define islarva(A) (istype(A, /mob/living/carbon/alien/larva))
#define isalienadult(A) (istype(A, /mob/living/carbon/alien/humanoid))
#define isalienhunter(A) (istype(A, /mob/living/carbon/alien/humanoid/hunter))
#define isaliensentinel(A) (istype(A, /mob/living/carbon/alien/humanoid/sentinel))
#define isalienqueen(A) (istype(A, /mob/living/carbon/alien/humanoid/queen))
#define isaicamera(A) (istype(A, /mob/camera/ai_eye))
#define isflockmob(A) (istype(A, /mob/camera/flock) || istype(A, /mob/living/basic/flock))
#define isflockdrone(A) (istype(A, /mob/living/basic/flock/drone))
#define isflockbit(A) (istype(A, /mob/living/basic/flock/bit))
#define isflocktrace(A) (istype(A, /mob/camera/flock/trace))
#define isflockmind(A) (istype(A, /mob/camera/flock/overmind))
#define isflockcontroller(A) (isflockmind(A) || isflocktrace(A))
#define isflockworker(A) (isflockdrone(A) || isflockbit(A))
// Simple animals
#define isanimal(A) (istype(A, /mob/living/simple_animal))
#define ismegafauna(A) istype(A, /mob/living/simple_animal/hostile/megafauna)
#define isshade(A) (istype(A, /mob/living/simple_animal/shade))
#define isconstruct(A) (istype(A, /mob/living/simple_animal/hostile/construct))
#define isslime(A) (istype((A), /mob/living/simple_animal/slime))
#define ispulsedemon(A) (istype(A, /mob/living/basic/demon/pulse_demon))
#define isshadowdemon(A) (istype(A, /mob/living/basic/demon/shadow))
// Basic mobs
#define isbasicmob(A) (istype(A, /mob/living/basic))
// Simple animal -> basic mob migration helpers
#define isanimal_or_basicmob(A) (isanimal(A) || isbasicmob(A))
// Objects
#define isobj(A) istype(A, /obj) //override the byond proc because it returns true on children of /atom/movable that aren't objs
#define isitem(A) (istype(A, /obj/item))
#define ismachinery(A) (istype(A, /obj/machinery))
#define isairlock(A) (istype(A, /obj/machinery/door))
#define isapc(A) (istype(A, /obj/machinery/power/apc))
#define ismecha(A) (istype(A, /obj/mecha))
#define isclowncar(A) (istype(A, /obj/tgvehicle/sealed/car/clowncar))
#define iseffect(A) (istype(A, /obj/effect))
#define isclothing(A) (istype(A, /obj/item/clothing))
#define ismask(A) (istype(A, /obj/item/clothing/mask))
#define isprojectile(A) (istype(A, /obj/projectile))
#define isgun(A) (istype(A, /obj/item/gun))
#define is_pen(W) (istype(W, /obj/item/pen) || istype(W, /obj/item/flashlight/pen))
#define is_pda(W) (istype(W, /obj/item/pda))
#define isspacecash(W) (istype(W, /obj/item/stack/spacecash))
#define isstorage(A) (istype(A, /obj/item/storage))
#define isstack(I) (istype(I, /obj/item/stack))
#define istable(S) (istype(S, /obj/structure/table))
GLOBAL_LIST_INIT(pointed_types, typecacheof(list(
/obj/item/pen,
/obj/item/screwdriver,
/obj/item/reagent_containers/syringe,
/obj/item/kitchen/utensil/fork)))
#define is_pointed(W) (is_type_in_typecache(W, GLOB.pointed_types))
GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list(
/obj/item/stack/sheet/glass,
/obj/item/stack/sheet/rglass,
/obj/item/stack/sheet/plasmaglass,
/obj/item/stack/sheet/plasmarglass,
/obj/item/stack/sheet/titaniumglass,
/obj/item/stack/sheet/plastitaniumglass)))
#define is_glass_sheet(O) (is_type_in_typecache(O, GLOB.glass_sheet_types))
// Turfs
//#define isturf(A, B, C...) BYOND proc, can test multiple arguments and only return TRUE if all are turfs
#define issimulatedturf(A) istype(A, /turf/simulated)
#define isspaceturf(A) istype(A, /turf/space)
#define istransparentturf(A) istype(A, /turf/simulated/floor/transparent)
#define isfloorturf(A) istype(A, /turf/simulated/floor)
#define iswallturf(A) istype(A, /turf/simulated/wall)
#define isreinforcedwallturf(A) istype(A, /turf/simulated/wall/r_wall)
#define ismineralturf(A) istype(A, /turf/simulated/mineral)
#define islava(A) (istype(A, /turf/simulated/floor/lava))
#define ischasm(A) (istype(A, /turf/simulated/floor/chasm))
#define is_ancient_rock(A) (istype(A, /turf/simulated/mineral/ancient))
#define isflockturf(A) (istype(A, /turf/simulated/floor/flock) || istype(A, /turf/simulated/wall/flock))
// Areas
//#define isarea(A, B, C...) BYOND proc, can test multiple arguments and only return TRUE if all are areas
#define isspacearea(A) (istype(A, /area/space))
// Structures
#define isstructure(A) (istype((A), /obj/structure))
// Vehicles
#define isvehicle(A) istype(A, /obj/vehicle)
#define istgvehicle(A) istype(A, /obj/tgvehicle)
// Misc
#define isclient(A) istype(A, /client)
#define isradio(A) istype(A, /obj/item/radio)
#define ispill(A) istype(A, /obj/item/reagent_containers/pill)
#define ispatch(A) istype(A, /obj/item/reagent_containers/patch)
#define isfood(A) istype(A, /obj/item/food)
#define is_color_text(thing) (istext(thing) && GLOB.regex_rgb_text.Find(thing))
// Modsuits
#define ismodcontrol(A) istype(A, /obj/item/mod/control)
#define is_screen_atom(A) istype(A, /atom/movable/screen)
#define is_multi_tile_object(atom) (atom?.bound_width > world.icon_size || atom?.bound_height > world.icon_size)