Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 32 additions & 5 deletions code/controllers/subsystem/overmap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -497,18 +497,45 @@ SUBSYSTEM_DEF(overmap)
/**
* See [/datum/controller/subsystem/overmap/proc/spawn_events], spawns "veins" (like ores) of events
*/
/datum/overmap_star_system/proc/spawn_event_cluster(datum/overmap/event/type, list/location, chance)
/datum/overmap_star_system/proc/spawn_event_cluster(datum/overmap/event/type, list/location, chance, depth = 0)
if(CONFIG_GET(number/max_overmap_events) <= LAZYLEN(events))
return
if(depth >= 5) // Prevent excessive recursion - with halving chance: 75% → 37.5% → 18.75% → 9.4% → 4.7%
return

var/datum/overmap/event/E = new type(location, src)
if(!chance)
chance = E.spread_chance

for(var/dir in GLOB.cardinals)
if(prob(chance))
if(!prob(chance))
continue

if(locate(/datum/overmap) in overmap_container[location["x"]][location["y"]])
continue
spawn_event_cluster(type, location, chance / 2)
// Calculate adjacent coordinates based on direction
var/new_x = location["x"]
var/new_y = location["y"]

switch(dir)
if(NORTH)
new_y++
if(SOUTH)
new_y--
if(EAST)
new_x++
if(WEST)
new_x--

// Check bounds
if(new_x < 1 || new_x > size || new_y < 1 || new_y > size)
continue

// Check if space is already occupied
if(locate(/datum/overmap) in overmap_container[new_x][new_y])
continue

// Recurse with new adjacent location
var/list/new_location = list("x" = new_x, "y" = new_y)
spawn_event_cluster(type, new_location, chance / 2, depth + 1)

/**
* Creates a single outpost somewhere near the center of the system.
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/effects/effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
move_resist = INFINITY
obj_flags = 0
vis_flags = VIS_INHERIT_PLANE
uses_integrity = FALSE

/obj/effect/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
return
Expand Down
2 changes: 1 addition & 1 deletion code/game/turfs/open/lava.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
O.resistance_flags |= FLAMMABLE //Even fireproof things burn up in lava
if(O.resistance_flags & FIRE_PROOF)
O.resistance_flags &= ~FIRE_PROOF
if(O.armor.fire > 50) //obj with 100% fire armor still get slowly burned away.
if(O.armor && O.armor.fire > 50) //obj with 100% fire armor still get slowly burned away.
O.armor = O.armor.setRating(fire = 50)
O.fire_act(10000, 1000 * seconds_per_tick)

Expand Down
1 change: 1 addition & 0 deletions code/modules/overmap/overmap_token.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/obj/overmap
icon = 'icons/misc/overmap.dmi'
uses_integrity = FALSE // PENTEST ADDITION - Overmap tokens are visual markers only, never take damage
///~~If we need to render a map for cameras and helms for this object~~ basically can you look at and use this as a ship or station.
var/render_map = FALSE
/// The parent overmap datum for this overmap token that has all of the actual functionality.
Expand Down
Loading