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:
Zuhayr
2015-06-03 04:36:19 +09:30
parent d4327658ab
commit ebe62cefd8
47 changed files with 1453 additions and 1175 deletions

View 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