Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI refactor, Flockmind, and more #1090

Merged
merged 75 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
c5dc87a
setter for current movement target
Kapu1178 Sep 13, 2024
45007d6
return values and idle behaviors
Kapu1178 Sep 13, 2024
ef73c12
basic attack respects attack cooldowns
Kapu1178 Sep 13, 2024
08565ba
hard refs
Kapu1178 Sep 13, 2024
251ff74
add missing flags
Kapu1178 Sep 13, 2024
488d541
flock pt1
Kapu1178 Sep 14, 2024
1c2e70a
massive progress
Kapu1178 Sep 16, 2024
0163ec3
couple more actions + overmind work
Kapu1178 Sep 16, 2024
868b4ab
ignore
Kapu1178 Sep 16, 2024
b6bb50d
oop
Kapu1178 Sep 16, 2024
64fe934
missing icon state
Kapu1178 Sep 16, 2024
6ad1576
button background fix
Kapu1178 Sep 16, 2024
f558a6f
fix issue with convert
Kapu1178 Sep 16, 2024
7121eb0
more content
Kapu1178 Sep 16, 2024
cc5e21a
tweaks
Kapu1178 Sep 16, 2024
02b5c8e
bits
Kapu1178 Sep 17, 2024
632e7c9
basic heal impl
Kapu1178 Sep 17, 2024
f16971d
whoops
Kapu1178 Sep 17, 2024
4c742a3
basic drone control
Kapu1178 Sep 17, 2024
517f41c
progress on control
Kapu1178 Sep 21, 2024
319d550
thanks lang server
Kapu1178 Sep 21, 2024
80d9f96
phasing and other goodies
Kapu1178 Sep 21, 2024
b23b293
change to overlay light or it wont do anything
Kapu1178 Sep 21, 2024
8b3fbb2
I can fix her.
Kapu1178 Sep 21, 2024
70c65b8
mak ui work, theme not work
Kapu1178 Sep 21, 2024
1d505a2
it works now
Kapu1178 Sep 21, 2024
f289d76
some flock ui stuff
Kapu1178 Sep 21, 2024
eaf5af2
stats
Kapu1178 Sep 21, 2024
503691f
cleanup conversion code a bit
Kapu1178 Sep 22, 2024
aa1bf29
flock structure stuff
Kapu1178 Sep 22, 2024
45434bf
tweaks
Kapu1178 Sep 22, 2024
061cf36
flock door
Kapu1178 Sep 22, 2024
b48a22f
gnesis
Kapu1178 Sep 22, 2024
5f344ad
debug flock -> default flock
Kapu1178 Sep 22, 2024
12f48d5
flock lights
Kapu1178 Sep 23, 2024
976f162
flock lights + language qol
Kapu1178 Sep 23, 2024
7e6f0ad
flocksay improvement
Kapu1178 Sep 23, 2024
dc19494
ai changes + flock mob improvements
Kapu1178 Sep 23, 2024
7c6a934
this is better
Kapu1178 Sep 23, 2024
91b1bed
pathing through walls
Kapu1178 Sep 25, 2024
ce2aeb6
flock wall
Kapu1178 Sep 25, 2024
38fb6e6
flock camera hears through walls
Kapu1178 Sep 25, 2024
ae9cdb6
fix pathing not accounting for walls
Kapu1178 Sep 26, 2024
388123d
uncomment
Kapu1178 Sep 30, 2024
75ac527
compute stuffs
Kapu1178 Oct 1, 2024
5b10dec
partition mind + make it compile
Kapu1178 Oct 1, 2024
8aeedda
create rift
Kapu1178 Oct 1, 2024
a412d38
fix conversion visual on walls
Kapu1178 Oct 1, 2024
b40e494
sentinel + refactor zapping
Kapu1178 Oct 2, 2024
18811c5
FIX
Kapu1178 Oct 2, 2024
8396256
electrocute_act small refactor
Kapu1178 Oct 2, 2024
5375b09
galoshes are now shock proof
Kapu1178 Oct 2, 2024
b43ed7d
fix compile
Kapu1178 Oct 2, 2024
793c977
math error
Kapu1178 Oct 2, 2024
da23f84
bumping open doors now uses body siemens instead of hands if you have…
Kapu1178 Oct 2, 2024
f4e8187
fuck
Kapu1178 Oct 2, 2024
a7bb266
fixes
Kapu1178 Oct 2, 2024
75881c4
old code
Kapu1178 Oct 2, 2024
3a541eb
structure stuffs
Kapu1178 Oct 2, 2024
202f5f3
hack fix
Kapu1178 Oct 2, 2024
5777c4f
proxmon + gravity + timestop fixes
Kapu1178 Oct 2, 2024
05bb8bd
fixes, gnesis turret start
Kapu1178 Oct 2, 2024
8a54c73
gnesis dart base
Kapu1178 Oct 2, 2024
d05ef34
gnesis base
Kapu1178 Oct 12, 2024
ca612f0
remove all warnings
Kapu1178 Oct 26, 2024
ce262cd
var edit :/
Kapu1178 Oct 26, 2024
273bc69
sigh
Kapu1178 Oct 26, 2024
92de2b8
fuck off
Kapu1178 Oct 26, 2024
cf01fec
fix timestop
Kapu1178 Oct 26, 2024
4e7ecb1
tick check ai controller planning
Kapu1178 Oct 26, 2024
d05260d
Merge branch 'master' into kapuai
Kapu1178 Oct 26, 2024
0a3a2f9
hard dels
Kapu1178 Oct 26, 2024
304181e
Merge branch 'kapuai' of github.com:Kapu1178/daedalusdock into kapuai
Kapu1178 Oct 26, 2024
8ba8ae7
fix timestop
Kapu1178 Oct 26, 2024
a7d4c59
fix merge type for gnesis glass
Kapu1178 Oct 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions _maps/shuttles/ruin_syndicate_dropship.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
/obj/machinery/door/airlock/hatch{
id_tag = "caravansyndicate3_bolt_port";
name = "External Airlock";
normalspeed = 0;
superspeed = 1;
req_access_txt = "150"
},
/obj/docking_port/mobile{
Expand Down Expand Up @@ -371,7 +371,7 @@
/obj/machinery/door/airlock/hatch{
id_tag = "caravansyndicate3_bolt_starboard";
name = "External Airlock";
normalspeed = 0;
superspeed = 1;
req_access_txt = "150"
},
/obj/effect/mapping_helpers/airlock/cyclelink_helper{
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/ruin_syndicate_fighter_shiv.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
/obj/machinery/door/airlock/hatch{
id_tag = "caravansyndicate1_bolt";
name = "External Airlock";
normalspeed = 0;
superspeed = 1;
req_access_txt = "150"
},
/obj/effect/decal/cleanable/dirt,
Expand Down
40 changes: 37 additions & 3 deletions code/__DEFINES/ai.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#define GET_AI_BEHAVIOR(behavior_type) SSai_behaviors.ai_behaviors[behavior_type]
#define HAS_AI_CONTROLLER_TYPE(thing, type) istype(thing?.ai_controller, type)

#ifdef DEBUG_AI
#define DEBUG_AI_LOG(controller, message) if(controller.debug_focus) { to_chat(world, span_debug("AI DBG: [message]")) }
#else
#define DEBUG_AI_LOG(...)
#endif

#define AI_STATUS_ON 1
#define AI_STATUS_OFF 2

Expand All @@ -14,6 +20,12 @@
///Flags for ai_behavior new()
#define AI_CONTROLLER_INCOMPATIBLE (1<<0)

//Flags for behavior/perform()
#define BEHAVIOR_PERFORM_INSTANT (NONE)
#define BEHAVIOR_PERFORM_COOLDOWN (1<<0)
#define BEHAVIOR_PERFORM_SUCCESS (1<<1)
#define BEHAVIOR_PERFORM_FAILURE (1<<2)

///Does this task require movement from the AI before it can be performed?
#define AI_BEHAVIOR_REQUIRE_MOVEMENT (1<<0)
///Does this task let you perform the action while you move closer? (Things like moving and shooting)
Expand All @@ -22,6 +34,8 @@
#define AI_BEHAVIOR_KEEP_MOVE_TARGET_ON_FINISH (1<<2)
///Does finishing this task make the AI stop moving towards the target?
#define AI_BEHAVIOR_KEEP_MOVING_TOWARDS_TARGET_ON_FINISH (1<<3)
///Does this behavior NOT block planning?
#define AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION (1<<4)

///AI flags
#define STOP_MOVING_WHEN_PULLED (1<<0)
Expand All @@ -48,7 +62,15 @@
#define BB_FOOD_TARGET "bb_food_target"
///Path we should use next time we use the JPS movement datum
#define BB_PATH_TO_USE "BB_path_to_use"

///Max path length we should use next time we use the JPS movement datum
#define BB_PATH_MAX_LENGTH "BB_path_max_length"
///Diagonal handling we should use next time we use the JPS movement datum
#define BB_PATH_DIAGONAL_HANDLING "BB_path_diagonal_handling"
/// Typecache of refs to mobs this mob is friends with, will follow their instructions and won't attack them
#define BB_FRIENDS_LIST "BB_FRIENDS_LIST"
/// World.time of the last movement + the pawn's movement delay
#define BB_NEXT_MOVE_TIME "BB_NEXT_MOVE_TIME"
s
//for songs

///song instrument blackboard, set by instrument subtrees
Expand Down Expand Up @@ -157,9 +179,8 @@

#define BB_SIMPLE_CARRY_ITEM "BB_SIMPLE_CARRY_ITEM"
#define BB_FETCH_TARGET "BB_FETCH_TARGET"
#define BB_FETCH_IGNORE_LIST "BB_FETCH_IGNORE_LISTlist"
#define BB_FETCH_IGNORE_LIST "BB_FETCH_IGNORE_LIST"
#define BB_FETCH_DELIVER_TO "BB_FETCH_DELIVER_TO"
#define BB_DOG_FRIENDS "BB_DOG_FRIENDS"
#define BB_DOG_ORDER_MODE "BB_DOG_ORDER_MODE"
#define BB_DOG_PLAYING_DEAD "BB_DOG_PLAYING_DEAD"
#define BB_DOG_HARASS_TARGET "BB_DOG_HARASS_TARGET"
Expand Down Expand Up @@ -218,3 +239,16 @@
#define BB_BASIC_MOB_CURRENT_TARGET "BB_basic_current_target"
#define BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION "BB_basic_current_target_hiding_location"
#define BB_TARGETTING_DATUM "targetting_datum"

/// The list of behaviors for the planners to select from. THIS IS ACTUALLY A SUBKEY!! See _behavior_planner.dm
#define BB_PLANNER_BEHAVIORS "BB_planner_behaviors"

#define BB_FLOCK_STARING_ACTIVE "BB_flock_staring"
#define BB_FLOCK_STARE_TARGET "BB_flock_stare_target"
#define BB_FLOCK_WANDERING "BB_flock_wandering"
#define BB_FLOCK_STARE_CD "BB_flock_stare_cooldown"
#define BB_FLOCK_CONVERT_TARGET "BB_flock_convert_target"
#define BB_FLOCK_WANDER_FRUSTRATION "BB_flock_wander_frustration"
#define BB_FLOCK_HEAL_TARGET "BB_flock_heal_target"
#define BB_FLOCK_HEAL_FRUSTRATION "BB_flock_heal_frustation"
#define BB_FLOCK_OVERMIND_CONTROL "BB_flock_overmind_control"
2 changes: 2 additions & 0 deletions code/__DEFINES/ai_planner.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// Default behavior score
#define BEHAVIOR_SCORE_DEFAULT 0
2 changes: 2 additions & 0 deletions code/__DEFINES/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ GLOBAL_LIST_INIT(ai_employers, list(
#define FACTION_SYNDICATE "syndicate"
///all the employers that are nanotrasen
#define FACTION_NANOTRASEN "nanotrasen"
///flock mobs
#define FACTION_FLOCK "flock"

#define UPLINK_THEME_SYNDICATE "syndicate"

Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals/signals_flock.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#define COMSIG_FLOCK_PROTECTION_TRIGGER "comsig_flock_protection_trigger"
#define COMPONENT_FLOCK_DENY_ATTACK (1<<0)

#define COMSIG_TURF_CLAIMED_BY_FLOCK "comsig_turf_claimed_by_flock"
6 changes: 6 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,9 @@

/// from base of [/mob/living/changeNext_Move()] (next_move)
#define COMSIG_LIVING_CHANGENEXT_MOVE "living_changenext_move"

/// From /mob/living/befriend() : (mob/living/new_friend)
#define COMSIG_LIVING_BEFRIENDED "living_befriended"

/// From /mob/living/unfriend() : (mob/living/old_friend)
#define COMSIG_LIVING_UNFRIENDED "living_unfriended"
11 changes: 11 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob_ai.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/// Signal sent when a blackboard key is set to a new value
#define COMSIG_AI_BLACKBOARD_KEY_SET(blackboard_key) "ai_blackboard_key_set_[blackboard_key]"

///Signal sent before a blackboard key is cleared
#define COMSIG_AI_BLACKBOARD_KEY_PRECLEAR(blackboard_key) "ai_blackboard_key_pre_clear_[blackboard_key]"

/// Signal sent when a blackboard key is cleared
#define COMSIG_AI_BLACKBOARD_KEY_CLEARED(blackboard_key) "ai_blackboard_key_clear_[blackboard_key]"

/// Signal sent when a mob's AI turns on or off.
#define COMSIG_AI_STATUS_CHANGE "ai_status_change"
12 changes: 11 additions & 1 deletion code/__DEFINES/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define PASSITEM (1<<12)
/// Do not intercept click attempts during Adjacent() checks. See [turf/proc/ClickCross].
#define LETPASSCLICKS (1<<13)
/// Pass through flock objects and mobs
#define PASSFLOCK (1<<14)

//Movement Types
#define GROUND (1<<0)
Expand Down Expand Up @@ -187,11 +189,19 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define ZAP_GENERATES_POWER (1<<5)
/// Zaps with this flag will generate less power through tesla coils
#define ZAP_LOW_POWER_GEN (1<<6)
#define ZAP_NO_COOLDOWN (1<<7)

#define ZAP_DEFAULT_FLAGS ZAP_MOB_STUN | ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE
#define ZAP_DEFAULT_FLAGS ZAP_MOB_STUN | ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_NO_COOLDOWN
#define ZAP_ENERGYBALL_FLAGS ((ZAP_DEFAULT_FLAGS) &~ ZAP_NO_COOLDOWN)
#define ZAP_FUSION_FLAGS ZAP_OBJ_DAMAGE | ZAP_MOB_DAMAGE | ZAP_MOB_STUN
#define ZAP_SUPERMATTER_FLAGS ZAP_GENERATES_POWER

/// Convert a power value to mob damage
#define TESLA_MOB_DAMAGE_COEFF 600
#define TESLA_POWER_TO_MOB_DAMAGE(power) floor(power / TESLA_MOB_DAMAGE_COEFF)
/// Convert a desired damage value into the required power amount
#define TESLA_MOB_DAMAGE_TO_POWER(desired_damage) floor(desired_damage * TESLA_MOB_DAMAGE_COEFF)

//EMP protection
#define EMP_PROTECT_SELF (1<<0)
#define EMP_PROTECT_CONTENTS (1<<1)
Expand Down
21 changes: 21 additions & 0 deletions code/__DEFINES/flock_defines.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#define FLOCK_TYPE_OVERMIND "overmind"
#define FLOCK_TYPE_TRACE "trace"
#define FLOCK_TYPE_DRONE "drone"
#define FLOCK_TYPE_BIT "bit"

#define FLOCK_NOTICE_RESERVED "reserved"
#define FLOCK_NOTICE_PRIORITY "priority"
#define FLOCK_NOTICE_ENEMY "enemy"
#define FLOCK_NOTICE_IGNORE "ignore"
#define FLOCK_NOTICE_FLOCKTRACE_CONTROL "flocktrace_control"
#define FLOCK_NOTICE_FLOCKMIND_CONTROL "flockmind_control"
#define FLOCK_NOTICE_HEALTH "flock_health"

#define FLOCK_UI_DRONES "drones"
#define FLOCK_UI_TRACES "traces"
#define FLOCK_UI_ENEMIES "enemies"
#define FLOCK_UI_STRUCTURES "structures"

#define FLOCK_COMPUTE_COST_FLOCKTRACE 100
#define FLOCK_COMPUTE_COST_DRONE 10
#define FLOCK_COMPUTE_COST_RELAY 500
7 changes: 7 additions & 0 deletions code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(

#define istransparentturf(A) (TURF_IS_MIMICKING(A))

#define isflockturf(A) (istype(A, /turf/open/floor/flock) || istype(A, /turf/closed/wall/flock))

//Mobs
#define isliving(A) (istype(A, /mob/living))

Expand Down Expand Up @@ -184,6 +186,11 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(

#define isaicamera(A) (istype(A, /mob/camera/ai_eye))

#define isflockmob(A) (istype(A, /mob/camera/flock) || istype(A, /mob/living/simple_animal/flock))
#define isflockdrone(A) (istype(A, /mob/living/simple_animal/flock/drone))
#define isflockbit(A) (istype(A, /mob/living/simple_animal/flock/bit))
#define isflocktrace(A) (istype(A, /mob/camera/flock/trace))

//Objects
#define isobj(A) istype(A, /obj) //override the byond proc because it returns true on children of /atom/movable that aren't objs

Expand Down
8 changes: 4 additions & 4 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,10 @@

///Flags used by the flags parameter of electrocute act.

///Makes it so that the shock doesn't take gloves into account.
#define SHOCK_NOGLOVES (1 << 0)
///Used when the shock is from a tesla bolt.
#define SHOCK_TESLA (1 << 1)
/// The shock is applied by hands, check gloves siemen coeff
#define SHOCK_HANDS (1 << 0)
/// Shock damage is reduced by the average siemen's coeff
#define SHOCK_USE_AVG_SIEMENS (1 << 4)
///Used when an illusion shocks something. Makes the shock deal stamina damage and not trigger certain secondary effects.
#define SHOCK_ILLUSION (1 << 2)
///The shock doesn't stun.
Expand Down
3 changes: 1 addition & 2 deletions code/__DEFINES/path.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
* A helper macro to see if it's possible to step from the first turf into the second one, minding things like door access and directional windows.
* Note that this can only be used inside the [datum/pathfind][pathfind datum] since it uses variables from said datum.
* If you really want to optimize things, optimize this, cuz this gets called a lot.
* We do early next.density check despite it being already checked in LinkBlockedWithAccess for short-circuit performance
*/
#define CAN_STEP(cur_turf, next, simulated_only, pass_info, avoid) (next && (next != avoid) && !next.density && !(simulated_only && isspaceturf(next)) && !cur_turf.LinkBlockedWithAccess(next, pass_info))
#define CAN_STEP(cur_turf, next, simulated_only, pass_info, avoid) (next && (next != avoid) && !(simulated_only && isspaceturf(next)) && !cur_turf.LinkBlockedWithAccess(next, pass_info))
/// Another helper macro for JPS, for telling when a node has forced neighbors that need expanding
#define STEP_NOT_HERE_BUT_THERE(cur_turf, dirA, dirB) ((!CAN_STEP(cur_turf, get_step(cur_turf, dirA), simulated_only, pass_info, avoid) && CAN_STEP(cur_turf, get_step(cur_turf, dirB), simulated_only, pass_info, avoid)))

Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/power.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ GLOBAL_LIST_EMPTY(powernets)

/// How much the bullets damage should be multiplied by when it is added to the internal variables
#define SUPERMATTER_BULLET_ENERGY 10 //This is 5x greater than Baystation's to account for emitters doing about 5x less damage

#define ARC_DAMAGE_TO_POWER(desired_damage) (desired_damage * 25000)
1 change: 1 addition & 0 deletions code/__DEFINES/role_preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define ROLE_THIEF "Thief"
#define ROLE_TRAITOR "Traitor"
#define ROLE_WIZARD "Wizard"
#define ROLE_FLOCK "Flock"

// Midround roles
#define ROLE_ABDUCTOR "Abductor"
Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/sight.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
#define INVISIBLITY_VISIBLE 0

#define SEE_INVISIBLE_MINIMUM 5

#define INVISIBILITY_LIGHTING 20

#define SEE_INVISIBLE_LIVING 25

#define INVISIBILITY_FLOCK 30
#define SEE_INVISIBLE_FLOCK 30

//#define SEE_INVISIBLE_LEVEL_ONE 35 //currently unused
//#define INVISIBILITY_LEVEL_ONE 35 //currently unused

Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/span.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#define span_drone(str) ("<span class='drone'>" + str + "</span>")
#define span_engradio(str) ("<span class='engradio'>" + str + "</span>")
#define span_extremelybig(str) ("<span class='extremelybig'>" + str + "</span>")
#define span_flocksay(str) ("<span class='flocksay'>" + str + "</span>")
#define span_ghostalert(str) ("<span class='ghostalert'>" + str + "</span>")
#define span_green(str) ("<span class='green'>" + str + "</span>")
#define span_greenannounce(str) ("<span class='greenannounce'>" + str + "</span>")
Expand Down
18 changes: 18 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_TESLA_SHOCKIMMUNE "tesla_shock_immunity"
// Is this atom being actively shocked? Used to prevent repeated shocks.
#define TRAIT_BEING_SHOCKED "shocked"
/// The above but for the flock sentinel
#define TRAIT_SHOCKED_BY_SENTINEL "shocked_by_flock_sentinel"
/// You cannot ENTER cardiac arrest.
#define TRAIT_STABLEHEART "stable_heart"
/// Prevents you from leaving your corpse
Expand Down Expand Up @@ -255,6 +257,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_NO_ADDICTION "no_addiction"
/// Makes whispers clearly heard from seven tiles away, the full hearing range
#define TRAIT_GOOD_HEARING "good_hearing"
/// This mob's speech is heard through walls by dead players/observers even if it has no client. Idk a better name
#define TRAIT_IMPORTANT_SPEAKER "important_speaker"

// Stops the mob from slipping on water, or banana peels, or pretty much anything that doesn't have [GALOSHES_DONT_HELP] set
#define TRAIT_NO_SLIP_WATER "NO_SLIP_WATER"
Expand All @@ -276,6 +280,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_FEARLESS "fearless"
/// Ignores darkness for hearing
#define TRAIT_HEAR_THROUGH_DARKNESS "hear_through_darkness"
/// Ignores line of sight for the purposes of send_speech()
#define TRAIT_HEAR_THROUGH_WALLS "hear_through_walls"
/// These are used for brain-based paralysis, where replacing the limb won't fix it
#define TRAIT_PARALYSIS_L_ARM "para-l-arm"
#define TRAIT_PARALYSIS_R_ARM "para-r-arm"
Expand Down Expand Up @@ -987,3 +993,15 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai

/// Given to items that are bodyparts attached to a mob, organs attached to a mob or inside a bodypart
#define TRAIT_INSIDE_BODY "inside_body"

/// trait that prevents AI controllers from planning detached from ai_status to prevent weird state stuff.
#define TRAIT_AI_PAUSED "TRAIT_AI_PAUSED"
/// trait that prevents AI controllers from making new plans, but not executing plans
#define TRAIT_AI_DISABLE_PLANNING "TRAIT_AI_DISABLE_PLANNING"

// Flock trait sources
/// Under control
#define FLOCK_CONTROLLED_BY_OVERMIND_SOURCE "FLOCK_CONTROLLED_BY_OVERMIND_SOURCE"

#define TRAIT_FLOCKPHASE "TRAIT_FLOCKPHASE"
#define TRAIT_FLOCK_THING "TRAIT_FLOCK_THING"
8 changes: 8 additions & 0 deletions code/__HELPERS/_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
* Sorting
*/

// Generic listoflist safe add and removal macros:
///If value is a list, wrap it in a list so it can be used with list add/remove operations
#define LIST_VALUE_WRAP_LISTS(value) (islist(value) ? list(value) : value)
///Add an untyped item to a list, taking care to handle list items by wrapping them in a list to remove the footgun
#define UNTYPED_LIST_ADD(list, item) (list += LIST_VALUE_WRAP_LISTS(item))
///Remove an untyped item to a list, taking care to handle list items by wrapping them in a list to remove the footgun
#define UNTYPED_LIST_REMOVE(list, item) (list -= LIST_VALUE_WRAP_LISTS(item))

/*
* Misc
*/
Expand Down
Loading
Loading