Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artifact science stuff #1307

Merged
merged 4 commits into from
Mar 26, 2024
Merged
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
2 changes: 1 addition & 1 deletion _maps/_basemap.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//area#define LOWMEMORYMODE //uncomment this to load centcom and runtime station and thats it.
//#define LOWMEMORYMODE //uncomment this to load centcom and runtime station and thats it.

#include "map_files\generic\CentCom.dmm"

Expand Down
9 changes: 9 additions & 0 deletions code/__DEFINES/~monkestation/asteroids.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/// Used in asteroid composition lists to indicate a skip
#define SKIP "skip"

#define islevelbaseturf(A) istype(A, SSmapping.level_trait(A.z, ZTRAIT_BASETURF) || /turf/open/space)

// Mining template rarities
#define MINING_NO_RANDOM_SPAWN -1
#define MINING_COMMON 1
Expand All @@ -14,3 +16,10 @@
stoplag(); \
SSatoms.map_loader_begin(REF(template)); \
}

// error codes for the asteroid magnet
#define MAGNET_ERROR_KEY_BUSY 1
#define MAGNET_ERROR_KEY_USED_COORD 2
#define MAGNET_ERROR_KEY_COOLDOWN 3
#define MAGNET_ERROR_KEY_MOB 4
#define MAGNET_ERROR_KEY_NO_COORD 5
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

/// Cleanup our currently loaded mining template
/proc/CleanupAsteroidMagnet(turf/center, size)
var/list/turfs_to_destroy = ReserveTurfsForAsteroidGeneration(center, size, space_only = FALSE)
var/list/turfs_to_destroy = ReserveTurfsForAsteroidGeneration(center, size, baseturf_only = FALSE)
for(var/turf/T as anything in turfs_to_destroy)
CHECK_TICK

Expand All @@ -88,12 +88,12 @@
T.ChangeTurf(/turf/baseturf_bottom)

/// Sanitizes a block of turfs to prevent writing over undesired locations
/proc/ReserveTurfsForAsteroidGeneration(turf/center, size, space_only = TRUE)
/proc/ReserveTurfsForAsteroidGeneration(turf/center, size, baseturf_only = TRUE)
. = list()

var/list/turfs = RANGE_TURFS(size, center)
for(var/turf/T as anything in turfs)
if(space_only && !isspaceturf(T))
if(baseturf_only && !islevelbaseturf(T))
continue
if(!(istype(T.loc, /area/station/cargo/mining/asteroid_magnet)))
continue
Expand Down
Loading
Loading