Skip to content

Commit 5cc3501

Browse files
VmpOS2NHSkhkejA9Wrill
andauthored
Remove nonfunctional, unused code for golem waves and burrows + misc fixes and adjustments (#8546)
* Update deep_drill.dm * Update deep_drill.dm * kill waves now that the drill is debloated * purge more references to the drill and controller * FIX ANSIBLE GOLEMS this should not have taken me 4 hours but it did so here we are. * uranium golems also heal burn damage * adjust drill turf checks * replace floor turfs under the drill with asteroid, instead of just damaging them * adjust the drill's checks * fix uranium regen --------- Co-authored-by: Wrill <86113712+WrillWasTaken@users.noreply.github.com>
1 parent b74e822 commit 5cc3501

File tree

11 files changed

+104
-614
lines changed

11 files changed

+104
-614
lines changed

cev_eris.dme

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,9 +1848,6 @@
18481848
#include "code\modules\mining\drilling\cave_generator.dm"
18491849
#include "code\modules\mining\drilling\cave_mineral.dm"
18501850
#include "code\modules\mining\drilling\deep_drill.dm"
1851-
#include "code\modules\mining\drilling\golem_burrow.dm"
1852-
#include "code\modules\mining\drilling\golem_controller.dm"
1853-
#include "code\modules\mining\drilling\golem_wave.dm"
18541851
#include "code\modules\mining\drilling\scanner.dm"
18551852
#include "code\modules\mob\animations.dm"
18561853
#include "code\modules\mob\death.dm"

code/modules/mining/drilling/cave_generator.dm

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
x1_new = x0_new
140140
y0_new = rand(CAVE_MARGIN, y0)
141141
y1_new = rand(y0, CAVE_SIZE - CAVE_MARGIN)
142-
draw_recursive_corridor(x0_new, x1_new, y0_new, y1_new, N - 1)
142+
draw_recursive_corridor(x0_new, x1_new, y0_new, y1_new, N - 1)
143143

144144
// Run one iteration of the cellular automata that processes the initial random noise
145145
/obj/cave_generator/proc/run_cellular_automata()
@@ -159,7 +159,7 @@
159159
return CAVE_FREE
160160
else if(num_walls >= 5)
161161
return CAVE_WALL
162-
162+
163163
return CAVE_FREE
164164

165165
// Get number of walls in a given range around the target tile
@@ -172,7 +172,7 @@
172172
return num_walls
173173

174174
// Place points of interest on the map
175-
/obj/cave_generator/proc/generate_pois(seismic_lvl)
175+
/obj/cave_generator/proc/generate_pois(seismic_lvl)
176176

177177
// Reset pois lists
178178
pois_placed = list()
@@ -217,26 +217,26 @@
217217
pois_placed_pos += list(list(x_corner_bl, y_corner_bl, x_corner_tr, y_corner_tr))
218218

219219
// Check if a potential poi does not overlap with already placed pois
220-
/obj/cave_generator/proc/check_poi_overlap(x_bl, y_bl, size_x, size_y)
220+
/obj/cave_generator/proc/check_poi_overlap(x_bl, y_bl, size_x, size_y)
221221
if(!pois_placed.len)
222222
// No overlap since no poi has been placed yet
223223
return TRUE
224-
224+
225225
var/x_tr = x_bl + size_x
226226
var/y_tr = y_bl + size_y
227227
for(var/k = 1 to pois_placed.len)
228228
// If bottom left corner is on the right or above the top right corner of already placed poi, then it's clear
229229
// If top right corner is on the left or under the bottom left corner of already placed poi, then it's clear
230230
// Otherwise it means they overlap
231231
var/list/placed_pos = pois_placed_pos[k]
232-
232+
233233
if(!(x_bl > placed_pos[3] || y_bl > placed_pos[4] || x_tr < placed_pos[1] || y_tr < placed_pos[2]))
234234
return FALSE
235235
// No overlap
236236
return TRUE
237237

238238
// Generate mineral veins once cave layout has been decided
239-
/obj/cave_generator/proc/generate_mineral_veins(seismic_lvl)
239+
/obj/cave_generator/proc/generate_mineral_veins(seismic_lvl)
240240
var/x_vein = 0
241241
var/y_vein = 0
242242
var/N_veins = rand(15, 20 * (1 + 0.5 * (seismic_lvl - SEISMIC_MIN) / (SEISMIC_MAX - SEISMIC_MIN)))
@@ -250,7 +250,7 @@
250250
// Find a free spot in the cave
251251
/obj/cave_generator/proc/find_free_spot(x_start, y_start, x_margin = 0, y_margin = 0)
252252

253-
var/x0 = x_start - 1
253+
var/x0 = x_start - 1
254254
var/x1 = x_start + 1
255255
var/y0 = y_start - 1
256256
var/y1 = y_start + 1
@@ -270,14 +270,14 @@
270270
y_start = y1
271271
else
272272
found = FALSE
273-
273+
274274
if(!found)
275275
x0--
276276
x1++
277277
y0--
278278
y1++
279279
edge = (x0 <= 1 + x_margin) || (x1 >= CAVE_SIZE - x_margin) || (y0 <= 1 + y_margin) || (y1 >= CAVE_SIZE - y_margin)
280-
280+
281281
// Hit an edge before finding an available spot
282282
if(!found)
283283
return list(FALSE, 0, 0)
@@ -421,7 +421,7 @@
421421

422422
// Find closest available spot (wall tile near a free tile)
423423
var/search_for = map[x_start][y_start] == CAVE_FREE ? CAVE_WALL : CAVE_FREE
424-
var/x0 = x_start - 1
424+
var/x0 = x_start - 1
425425
var/x1 = x_start + 1
426426
var/y0 = y_start - 1
427427
var/y1 = y_start + 1
@@ -447,14 +447,14 @@
447447
y_start = y1
448448
else
449449
found = FALSE
450-
450+
451451
if(!found)
452452
x0--
453453
x1++
454454
y0--
455455
y1++
456456
edge = (x0 == 1) || (x1 == CAVE_SIZE) || (y0 == 1) || (y1 == CAVE_SIZE)
457-
457+
458458
// Hit an edge before finding an available spot
459459
if(!found)
460460
return 0
@@ -477,7 +477,7 @@
477477
var/datum/cave_vein/CV = new vein_path()
478478

479479
// Place mineral vein at the available spot in a recursive manner
480-
place_recursive_mineral(x_start, y_start, CV.p_spread, CV.size_max, CV.size_min, CV.mineral)
480+
place_recursive_mineral(x_start, y_start, CV.p_spread, CV.size_max, CV.size_min, CV.mineral)
481481
return 1
482482

483483
// Place a mineral vein in a recursive manner
@@ -580,7 +580,7 @@
580580
/obj/cave_generator/proc/place_pois()
581581
if(!LAZYLEN(pois_placed))
582582
return
583-
583+
584584
for(var/k = 1 to LAZYLEN(pois_placed))
585585
var/turf/corner_turf = get_turf(locate(x + pois_placed_pos[k][1], y + pois_placed_pos[k][2], z))
586586
pois_placed[k].load(corner_turf)
@@ -597,7 +597,7 @@
597597
else
598598
golem_type = pick(GLOB.golems_normal)
599599
// Spawn golem at free location
600-
new golem_type(get_turf(locate(x + i, y + j, z)), drill=null, parent=null)
600+
new golem_type(get_turf(locate(x + i, y + j, z)))
601601

602602
//////////////////////////////
603603
// Mineral veins for the cave generator

0 commit comments

Comments
 (0)