mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Refactored random map generator system and added several terrain generators.
Created a global list to track base turfs for explosions/shuttle moves. Remaps the asteroid to be a moonlet. Tidies up some references to 'asteroid', removes moonbase from the accessible z level list.
This commit is contained in:
44
code/modules/random_map/noise/magma.dm
Normal file
44
code/modules/random_map/noise/magma.dm
Normal file
@@ -0,0 +1,44 @@
|
||||
// This is basically filler at this point. Subsidence and all kinds of fun
|
||||
// hazards will be included when it is done.
|
||||
/datum/random_map/noise/volcanism
|
||||
descriptor = "volcanism"
|
||||
smoothing_iterations = 6
|
||||
target_turf_type = /turf/simulated
|
||||
|
||||
// Get rid of those dumb little single-tile volcanic areas.
|
||||
/datum/random_map/noise/volcanism/cleanup()
|
||||
for(var/x = 1, x <= limit_x, x++)
|
||||
for(var/y = 1, y <= limit_y, y++)
|
||||
var/current_cell = get_map_cell(x,y)
|
||||
if(map[current_cell] < 178)
|
||||
continue
|
||||
var/count
|
||||
var/tmp_cell = get_map_cell(x+1,y+1)
|
||||
if(tmp_cell && map[tmp_cell] >= 178) count++
|
||||
tmp_cell = get_map_cell(x-1,y-1)
|
||||
if(tmp_cell && map[tmp_cell] >= 178) count++
|
||||
tmp_cell = get_map_cell(x+1,y-1)
|
||||
if(tmp_cell && map[tmp_cell] >= 178) count++
|
||||
tmp_cell = get_map_cell(x-1,y+1)
|
||||
if(tmp_cell && map[tmp_cell] >= 178) count++
|
||||
tmp_cell = get_map_cell(x-1,y)
|
||||
if(tmp_cell && map[tmp_cell] >= 178) count++
|
||||
tmp_cell = get_map_cell(x,y-1)
|
||||
if(tmp_cell && map[tmp_cell] >= 178) count++
|
||||
tmp_cell = get_map_cell(x+1,y)
|
||||
if(tmp_cell && map[tmp_cell] >= 178) count++
|
||||
tmp_cell = get_map_cell(x,y+1)
|
||||
if(tmp_cell && map[tmp_cell] >= 178) count++
|
||||
if(!count)
|
||||
map[current_cell] = 177
|
||||
|
||||
/datum/random_map/noise/volcanism/get_appropriate_path(var/value)
|
||||
return
|
||||
|
||||
/datum/random_map/noise/volcanism/get_additional_spawns(var/value, var/turf/T)
|
||||
if(value>=178)
|
||||
if(istype(T,/turf/simulated/floor/plating/airless/asteroid))
|
||||
T.ChangeTurf(/turf/simulated/floor/airless/lava)
|
||||
else if(istype(T,/turf/simulated/mineral))
|
||||
var/turf/simulated/mineral/M = T
|
||||
M.mined_turf = /turf/simulated/floor/airless/lava
|
||||
Reference in New Issue
Block a user