diff --git a/code/__DEFINES/dcs/signals/signals_mob/signals_mob_spawner.dm b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_spawner.dm index 6ff8b1e8d61..2e1b157ec11 100644 --- a/code/__DEFINES/dcs/signals/signals_mob/signals_mob_spawner.dm +++ b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_spawner.dm @@ -2,5 +2,8 @@ /// called when a spawner spawns a mob #define COMSIG_SPAWNER_SPAWNED "spawner_spawned" +/// Called when a spawner spawns a mob in a turf peel, but we need to use the default case. +#define COMSIG_SPAWNER_SPAWNED_DEFAULT "spawner_spawned_default" + /// called when a ghost clicks a spawner role: (mob/living) #define COMSIG_GHOSTROLE_SPAWNED "ghostrole_spawned" diff --git a/code/__HELPERS/spatial_info.dm b/code/__HELPERS/spatial_info.dm index 98e11b483ba..c23e3a408a5 100644 --- a/code/__HELPERS/spatial_info.dm +++ b/code/__HELPERS/spatial_info.dm @@ -468,5 +468,8 @@ if(possible_spawn in inner) continue peel += possible_spawn + + if(!length(peel)) + return center //Offer the center only as a default case when we don't have a valid circle. return peel diff --git a/code/datums/components/spawner.dm b/code/datums/components/spawner.dm index 7c85c1a5b2b..29767d11ce6 100644 --- a/code/datums/components/spawner.dm +++ b/code/datums/components/spawner.dm @@ -72,6 +72,8 @@ picked_spot = pick(turf_peel(spawn_distance, spawn_distance_exclude, spawner.loc, view_based = TRUE)) if(!picked_spot) picked_spot = pick(circle_range_turfs(spawner.loc, spawn_distance)) + if(picked_spot == spawner.loc) + SEND_SIGNAL(spawner, COMSIG_SPAWNER_SPAWNED_DEFAULT) created = new chosen_mob_type(picked_spot) else if (spawn_distance >= 1) picked_spot = pick(circle_range_turfs(spawner.loc, spawn_distance)) diff --git a/code/game/objects/structures/lavaland/ore_vent.dm b/code/game/objects/structures/lavaland/ore_vent.dm index c8961a5769c..55b160e0109 100644 --- a/code/game/objects/structures/lavaland/ore_vent.dm +++ b/code/game/objects/structures/lavaland/ore_vent.dm @@ -82,6 +82,8 @@ icon_state = icon_state_tapped update_appearance(UPDATE_ICON_STATE) add_overlay(mutable_appearance('icons/obj/mining_zones/terrain.dmi', "well", ABOVE_MOB_LAYER)) + + RegisterSignal(src, COMSIG_SPAWNER_SPAWNED_DEFAULT, PROC_REF(anti_cheese)) return ..() /obj/structure/ore_vent/Destroy() @@ -407,6 +409,13 @@ COOLDOWN_START(src, manual_vent_cooldown, 10 SECONDS) return new_rock +/** + * When the ore vent cannot spawn a mob due to being blocked from all sides, we cause some MILD, MILD explosions. + * Explosion matches a gibtonite light explosion, as a way to clear neartby solid structures, with a high likelyhood of breaking the NODE drone. + */ +/obj/structure/ore_vent/proc/anti_cheese() + explosion(src, heavy_impact_range = 1, light_impact_range = 3, flame_range = 0, flash_range = 0, adminlog = FALSE) + //comes with the station, and is already tapped. /obj/structure/ore_vent/starter_resources name = "active ore vent" diff --git a/code/modules/mob/living/basic/lavaland/node_drone/node_drone.dm b/code/modules/mob/living/basic/lavaland/node_drone/node_drone.dm index d85ad69682c..8559fc82b68 100644 --- a/code/modules/mob/living/basic/lavaland/node_drone/node_drone.dm +++ b/code/modules/mob/living/basic/lavaland/node_drone/node_drone.dm @@ -17,8 +17,8 @@ icon_living = "mining_node_active" icon_dead = "mining_node_active" - maxHealth = 500 - health = 500 + maxHealth = 300 // We adjust the max health based on the vent size in the arrive() proc. + health = 300 density = TRUE pass_flags = PASSTABLE|PASSGRILLE|PASSMOB mob_size = MOB_SIZE_LARGE @@ -74,6 +74,8 @@ /mob/living/basic/node_drone/proc/arrive(obj/structure/ore_vent/parent_vent) attached_vent = parent_vent + maxHealth = 300 + ((attached_vent.boulder_size/BOULDER_SIZE_SMALL) * 100) + health = maxHealth flying_state = FLY_IN_STATE update_appearance(UPDATE_ICON_STATE) pixel_z = 400