Skip to content

Commit

Permalink
Fix runtimes related to mineral regrowth (#2231)
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy authored Jun 13, 2024
1 parent a055d12 commit b9ca7d0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions monkestation/code/modules/liquids/liquid_ocean.dm
Original file line number Diff line number Diff line change
Expand Up @@ -732,8 +732,9 @@ GLOBAL_VAR_INIT(lavaland_points_generated, 0)
defer_change = TRUE


/turf/closed/mineral/random/regrowth/New(loc, _mineral_increase)
mineralChance += _mineral_increase
/turf/closed/mineral/random/regrowth/New(loc, mineral_increase)
if(isnum(mineral_increase))
src.mineralChance += mineral_increase
. = ..()

/turf/closed/mineral/random/regrowth/Destroy(force)
Expand All @@ -745,7 +746,8 @@ GLOBAL_VAR_INIT(lavaland_points_generated, 0)
var/mineral_increase = 0
if(GLOB.lavaland_points_generated > 55000)
mineral_increase = min(87, (GLOB.lavaland_points_generated - 55000) / 1000)
new /turf/closed/mineral/random/regrowth(location , mineral_increase)
var/turf/closed/mineral/random/regrowth/regrowth_turf = location.ChangeTurf(/turf/closed/mineral/random/regrowth, flags = CHANGETURF_INHERIT_AIR)
regrowth_turf?.mineralChance += mineral_increase

/turf/closed/mineral/random/regrowth/underwater
turf_type = /turf/open/floor/plating/ocean/dark
Expand Down

0 comments on commit b9ca7d0

Please sign in to comment.