Skip to content

Commit

Permalink
Merge upstream 09.11.24 part 2 (#670)
Browse files Browse the repository at this point in the history
## About The Pull Request
Вышли еще фиксики
  • Loading branch information
larentoun authored Nov 9, 2024
2 parents 479a458 + 0dab8ed commit a96f99a
Show file tree
Hide file tree
Showing 133 changed files with 527 additions and 465 deletions.
8 changes: 4 additions & 4 deletions .github/guides/ISSUE_MANAGER.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ When examining new issues you should immediately notify a maintainer if you see
- **Server Lagging** [[1]](https://github.com/tgstation/tgstation/issues/60193) [[2]](https://github.com/tgstation/tgstation/issues/51927) [[3]](https://github.com/tgstation/tgstation/issues/32762) - Something that is causing a _severe_ amount of lag during the game

#### Runtime Issue Reports
If an issue reports a runtime, it must have the actual runtime call stack provided by round logging or in-game debug menu (https://github.com/tgstation/tgstation/issues/70329#issuecomment-1279853883).
If an issue reports a runtime, it must have the actual runtime call stack provided by round logging or in-game debug menu (https://github.com/tgstation/tgstation/issues/70329#issuecomment-1279853883).
<details>
<summary>Example runtime call stack</summary>

```
[2022-10-15 16:12:38.902] runtime error: Cannot execute null.add().
- proc name: visibility (/datum/cameranet/proc/visibility)
Expand All @@ -28,8 +28,8 @@ If an issue reports a runtime, it must have the actual runtime call stack provid
- usr.loc: the floor (150,25,4) (/turf/open/floor/circuit)
- call stack:
- Camera Net (/datum/cameranet): visibility(/list (/list), null, /list (/list), 1)
- AI (/mob/living/silicon/ai): camera visibility(Inactive AI Eye (/mob/camera/ai_eye))
- Inactive AI Eye (/mob/camera/ai_eye): setLoc(the floor (150,25,4) (/turf/open/floor/circuit), 0)
- AI (/mob/living/silicon/ai): camera visibility(Inactive AI Eye (/mob/eye/ai_eye))
- Inactive AI Eye (/mob/eye/ai_eye): setLoc(the floor (150,25,4) (/turf/open/floor/circuit), 0)
- AI (/mob/living/silicon/ai): create eye()
- AI (/mob/living/silicon/ai): Initialize(0, null, TagGamerGame2 (/mob/dead/new_player))
- Atoms (/datum/controller/subsystem/atoms): InitAtom(AI (/mob/living/silicon/ai), 0, /list (/list))
Expand Down
8 changes: 5 additions & 3 deletions code/__DEFINES/ai/ai_blackboard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@
#define BB_BANE_BATMAN "BB_bane_batman"
//yep that's it

///Hunting BB keys
//Hunting BB keys
///key that holds our current hunting target
#define BB_CURRENT_HUNTING_TARGET "BB_current_hunting_target"
///key that holds our less priority hunting target
#define BB_LOW_PRIORITY_HUNTING_TARGET "BB_low_priority_hunting_target"
#define BB_HUNTING_COOLDOWN "BB_HUNTING_COOLDOWN"

///key that holds the cooldown for our hunting subtree
#define BB_HUNTING_COOLDOWN(type) "BB_HUNTING_COOLDOWN_[type]"
///Basic Mob Keys

///Targeting subtrees
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/dcs/signals/signals_blob.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// Signal sent when a blob overmind picked a new strain (/mob/camera/blob/overmind, /datum/blobstrain/new_strain)
/// Signal sent when a blob overmind picked a new strain (/mob/eye/blob/overmind, /datum/blobstrain/new_strain)
#define COMSIG_BLOB_SELECTED_STRAIN "blob_selected_strain"
/// Signal sent by a blob spore when it creates a zombie (/mob/living/basic/blob_minion/spore/spore, //mob/living/basic/blob_minion/zombie/zombie)
#define COMSIG_BLOB_ZOMBIFIED "blob_zombified"
2 changes: 1 addition & 1 deletion code/__DEFINES/dcs/signals/signals_reagent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#define COMSIG_REAGENT_EXPOSE_ATOM "reagent_expose_atom"
///from base of [/datum/reagent/proc/expose_atom]: (/obj, reac_volume)
#define COMSIG_REAGENT_EXPOSE_OBJ "reagent_expose_obj"
///from base of [/datum/reagent/proc/expose_atom]: (/mob/living, reac_volume, methods, show_message, touch_protection, /mob/camera/blob) // ovemind arg is only used by blob reagents.
///from base of [/datum/reagent/proc/expose_atom]: (/mob/living, reac_volume, methods, show_message, touch_protection, /mob/eye/blob) // ovemind arg is only used by blob reagents.
#define COMSIG_REAGENT_EXPOSE_MOB "reagent_expose_mob"
///from base of [/datum/reagent/proc/expose_atom]: (/turf, reac_volume)
#define COMSIG_REAGENT_EXPOSE_TURF "reagent_expose_turf"
Expand Down
8 changes: 4 additions & 4 deletions code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,13 @@ GLOBAL_LIST_INIT(turfs_pass_meteor, typecacheof(list(

#define isnewplayer(A) (istype(A, /mob/dead/new_player))

#define isovermind(A) (istype(A, /mob/camera/blob))
#define isovermind(A) (istype(A, /mob/eye/blob))

#define issentientdisease(A) (istype(A, /mob/camera/disease))
#define issentientdisease(A) (istype(A, /mob/eye/disease))

#define iscameramob(A) (istype(A, /mob/camera))
#define iseyemob(A) (istype(A, /mob/eye))

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

//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
11 changes: 1 addition & 10 deletions code/__DEFINES/maths.dm
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
// Remove these once we have Byond implementation.
// ------------------------------------
#define IS_NAN(a) (a != a)

#define IS_INF__UNSAFE(a) (a == a && a-a != a-a)
#define IS_INF(a) (isnum(a) && IS_INF__UNSAFE(a))

#define IS_FINITE__UNSAFE(a) (a-a == a-a)
#define IS_FINITE__UNSAFE(a) (!isinf(a) && !isnan(a))
#define IS_FINITE(a) (isnum(a) && IS_FINITE__UNSAFE(a))
// ------------------------------------
// Aight dont remove the rest

// Credits to Nickr5 for the useful procs I've taken from his library resource.
// This file is quadruple wrapped for your pleasure
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ GLOBAL_LIST_INIT(skin_tone_names, list(
var/list/sortmob = sort_names(GLOB.mob_list)
for(var/mob/living/silicon/ai/mob_to_sort in sortmob)
moblist += mob_to_sort
for(var/mob/camera/mob_to_sort in sortmob)
for(var/mob/eye/mob_to_sort in sortmob)
moblist += mob_to_sort
for(var/mob/living/silicon/pai/mob_to_sort in sortmob)
moblist += mob_to_sort
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/paths/path.dm
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@
src.can_ventcrawl = HAS_TRAIT(living_construct, TRAIT_VENTCRAWLER_ALWAYS) || HAS_TRAIT(living_construct, TRAIT_VENTCRAWLER_NUDE)
src.mob_size = living_construct.mob_size
src.incorporeal_move = living_construct.incorporeal_move
if(iscameramob(construct_from))
if(iseyemob(construct_from))
src.camera_type = construct_from.type
src.is_bot = isbot(construct_from)

Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/roundend.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ GLOBAL_LIST_INIT(achievements_unlocked, list())
var/json_file = file("[GLOB.log_directory]/round_end_data.json")
// All but npcs sublists and ghost category contain only mobs with minds
var/list/file_data = list("escapees" = list("humans" = list(), "silicons" = list(), "others" = list(), "npcs" = list()), "abandoned" = list("humans" = list(), "silicons" = list(), "others" = list(), "npcs" = list()), "ghosts" = list(), "additional data" = list())
var/num_survivors = 0 //Count of non-brain non-camera mobs with mind that are alive
var/num_survivors = 0 //Count of non-brain non-eye mobs with mind that are alive
var/num_escapees = 0 //Above and on centcom z
var/num_shuttle_escapees = 0 //Above and on escape shuttle
var/list/area/shuttle_areas
Expand All @@ -32,7 +32,7 @@ GLOBAL_LIST_INIT(achievements_unlocked, list())
if(M.mind)
count_only = FALSE
mob_data["ckey"] = M.mind.key
if(M.stat != DEAD && !isbrain(M) && !iscameramob(M))
if(M.stat != DEAD && !isbrain(M) && !iseyemob(M))
num_survivors++
if(EMERGENCY_ESCAPED_OR_ENDGAMED && (M.onCentCom() || M.onSyndieBase()))
num_escapees++
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/admin_tooling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_EXPANDED_FOV" = TRAIT_EXPANDED_FOV,
"TRAIT_EXPERT_FISHER" = TRAIT_EXPERT_FISHER,
"TRAIT_EXTROVERT" = TRAIT_EXTROVERT,
"TRAIT_EVIL" = TRAIT_EVIL,
"TRAIT_FAKEDEATH" = TRAIT_FAKEDEATH,
"TRAIT_FASTMED" = TRAIT_FASTMED,
"TRAIT_FAST_CUFFING" = TRAIT_FAST_CUFFING,
Expand Down
20 changes: 10 additions & 10 deletions code/_onclick/hud/blob_overmind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/atom/movable/screen/blob/jump_to_node/Click()
if(!isovermind(usr))
return FALSE
var/mob/camera/blob/blob = usr
var/mob/eye/blob/blob = usr
blob.jump_to_node()

/atom/movable/screen/blob/jump_to_core
Expand All @@ -27,7 +27,7 @@

/atom/movable/screen/blob/jump_to_core/MouseEntered(location,control,params)
if(hud?.mymob && isovermind(hud.mymob))
var/mob/camera/blob/B = hud.mymob
var/mob/eye/blob/B = hud.mymob
if(!B.placed)
name = "Place Blob Core"
desc = "Attempt to place your blob core at this location."
Expand All @@ -39,7 +39,7 @@
/atom/movable/screen/blob/jump_to_core/Click()
if(!isovermind(usr))
return FALSE
var/mob/camera/blob/blob = usr
var/mob/eye/blob/blob = usr
if(!blob.placed)
blob.place_blob_core(BLOB_NORMAL_PLACEMENT)
blob.transport_core()
Expand All @@ -58,7 +58,7 @@
/atom/movable/screen/blob/blobbernaut/Click()
if(!isovermind(usr))
return FALSE
var/mob/camera/blob/blob = usr
var/mob/eye/blob/blob = usr
blob.create_blobbernaut()

/atom/movable/screen/blob/resource_blob
Expand All @@ -75,7 +75,7 @@
/atom/movable/screen/blob/resource_blob/Click()
if(!isovermind(usr))
return FALSE
var/mob/camera/blob/blob = usr
var/mob/eye/blob/blob = usr
blob.create_special(BLOB_STRUCTURE_RESOURCE_COST, /obj/structure/blob/special/resource, BLOB_RESOURCE_MIN_DISTANCE, TRUE)

/atom/movable/screen/blob/node_blob
Expand All @@ -92,7 +92,7 @@
/atom/movable/screen/blob/node_blob/Click()
if(!isovermind(usr))
return FALSE
var/mob/camera/blob/blob = usr
var/mob/eye/blob/blob = usr
blob.create_special(BLOB_STRUCTURE_NODE_COST, /obj/structure/blob/special/node, BLOB_NODE_MIN_DISTANCE, FALSE)

/atom/movable/screen/blob/factory_blob
Expand All @@ -109,7 +109,7 @@
/atom/movable/screen/blob/factory_blob/Click()
if(!isovermind(usr))
return FALSE
var/mob/camera/blob/blob = usr
var/mob/eye/blob/blob = usr
blob.create_special(BLOB_STRUCTURE_FACTORY_COST, /obj/structure/blob/special/factory, BLOB_FACTORY_MIN_DISTANCE, TRUE)

/atom/movable/screen/blob/readapt_strain
Expand All @@ -120,7 +120,7 @@

/atom/movable/screen/blob/readapt_strain/MouseEntered(location,control,params)
if(hud?.mymob && isovermind(hud.mymob))
var/mob/camera/blob/B = hud.mymob
var/mob/eye/blob/B = hud.mymob
if(B.free_strain_rerolls)
name = "[initial(name)] (FREE)"
desc = "Randomly rerolls your strain for free."
Expand All @@ -131,7 +131,7 @@

/atom/movable/screen/blob/readapt_strain/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
var/mob/eye/blob/B = usr
B.strain_reroll()

/atom/movable/screen/blob/relocate_core
Expand All @@ -147,7 +147,7 @@

/atom/movable/screen/blob/relocate_core/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
var/mob/eye/blob/B = usr
B.relocate_core()

/datum/hud/blob_overmind/New(mob/owner)
Expand Down
8 changes: 4 additions & 4 deletions code/_onclick/overmind.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Blob Overmind Controls


/mob/camera/blob/ClickOn(atom/A, params) //Expand blob
/mob/eye/blob/ClickOn(atom/A, params) //Expand blob
var/list/modifiers = params2list(params)
if(LAZYACCESS(modifiers, MIDDLE_CLICK))
MiddleClickOn(A, params)
Expand All @@ -19,18 +19,18 @@
if(T)
expand_blob(T)

/mob/camera/blob/MiddleClickOn(atom/A) //Rally spores
/mob/eye/blob/MiddleClickOn(atom/A) //Rally spores
. = ..()
var/turf/T = get_turf(A)
if(T)
rally_spores(T)

/mob/camera/blob/CtrlClickOn(atom/A) //Create a shield
/mob/eye/blob/CtrlClickOn(atom/A) //Create a shield
var/turf/T = get_turf(A)
if(T)
create_shield(T)

/mob/camera/blob/proc/blob_click_alt(atom/A) //Remove a blob
/mob/eye/blob/proc/blob_click_alt(atom/A) //Remove a blob
var/turf/T = get_turf(A)
if(T)
remove_blob(T)
2 changes: 1 addition & 1 deletion code/controllers/subsystem/points_of_interest.dm
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ SUBSYSTEM_DEF(points_of_interest)
/datum/point_of_interest/mob_poi/proc/get_type_sort_priority()
if(isAI(target))
return 0
if(iscameramob(target))
if(iseyemob(target))
return 1
if(ispAI(target))
return 2
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ SUBSYSTEM_DEF(ticker)
if(STATION_NUKED)
// There was a blob on board, guess it was nuked to stop it
if(length(GLOB.overminds))
for(var/mob/camera/blob/overmind as anything in GLOB.overminds)
for(var/mob/eye/blob/overmind as anything in GLOB.overminds)
if(overmind.max_count < overmind.announcement_size)
continue

Expand Down
15 changes: 5 additions & 10 deletions code/datums/ai/hunting_behavior/hunting_behaviors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,11 @@
/datum/ai_planning_subtree/find_and_hunt_target/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
if(!SPT_PROB(hunt_chance, seconds_per_tick))
return
if(controller.blackboard[BB_HUNTING_COOLDOWN] >= world.time)
return
var/mob/living/living_pawn = controller.pawn
// We can't hunt if we're indisposed
if(HAS_TRAIT(controller.pawn, TRAIT_HANDS_BLOCKED) || living_pawn.stat != CONSCIOUS)

if(controller.blackboard[BB_HUNTING_COOLDOWN(type)] >= world.time)
return

var/atom/hunted = controller.blackboard[target_key]
// We're not hunting anything, look around for something
if(isnull(hunted))
if(!controller.blackboard_key_exists(target_key))
controller.queue_behavior(finding_behavior, target_key, hunt_targets, hunt_range)
return

Expand All @@ -44,7 +39,7 @@
// we may accidentally be executing another tree's hunt - not ideal,
// try to set a unique target key if you have multiple

controller.queue_behavior(hunting_behavior, target_key, BB_HUNTING_COOLDOWN)
controller.queue_behavior(hunting_behavior, target_key, BB_HUNTING_COOLDOWN(type))
if(finish_planning)
return SUBTREE_RETURN_FINISH_PLANNING //If we're hunting we're too busy for anything else

Expand Down Expand Up @@ -115,7 +110,7 @@

/datum/ai_behavior/hunt_target/finish_action(datum/ai_controller/controller, succeeded, hunting_target_key, hunting_cooldown_key)
. = ..()
if(succeeded)
if(succeeded && hunting_cooldown_key)
controller.set_blackboard_key(hunting_cooldown_key, world.time + hunt_cooldown)
else if(hunting_target_key)
controller.clear_blackboard_key(hunting_target_key)
Expand Down
Loading

0 comments on commit a96f99a

Please sign in to comment.