-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ports Mapping Backend updates (#5165)
# About the pull request Updates most of mapping backend to /tg/ current: * Replaces completely map reader which now has explicit TGM support * Replaces completely reservations backend, they now have a builtin "cordon" area around them * Grafts and updates some missing procs in SSmapping and Shuttles, notably for reservations * Updates nightmare, map templates, interiors, etc, to match new mapper/reservations code * Minor Turf/Atoms stuff such as global init, turf_flags rename, and AfterChange() This shouldn't change much to the game as is, but is meant as a stepping stone toward new features such as planecube that depend on updated mapping code, rather than having to messily strap them to old. Very Testmerge-worth # Testing - [x] General map loading of Ship & Ground - [x] Dropship loading and flight - [x] Fultons reservation launching - [x] Lifeboats launching - [x] Vehicle Interiors instanciation - [x] Interior reservations freeing - [x] Tents templates placement - [x] Nightmare inserts loading - [x] Other maps than LV-624 - [x] Maploading admin verbs - [x] Mass screenshot verb - [x] Runtime Trijent elevators working # Potential TODO - [x] Find a better cordon turf than outer almayer hull, it looks ugly with eg fultons # Changelog :cl: code: Updated mapping backend from /tg/ upstream. /:cl: --------- Co-authored-by: harryob <[email protected]> Co-authored-by: harryob <[email protected]>
- Loading branch information
1 parent
7ec0d9b
commit a3626a6
Showing
59 changed files
with
1,775 additions
and
549 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
//turf_flags values | ||
/// Marks a turf as organic. Used for alien wall and membranes. | ||
#define TURF_ORGANIC (1<<0) | ||
/// If a turf is an usused reservation turf awaiting assignment | ||
#define UNUSED_RESERVATION_TURF (1<<1) | ||
/// If a turf is a reserved turf | ||
#define RESERVATION_TURF (1<<2) | ||
|
||
//ChangeTurf options to change its behavior | ||
#define CHANGETURF_DEFER_CHANGE (1<<0) | ||
/// This flag prevents changeturf from gathering air from nearby turfs to fill the new turf with an approximation of local air | ||
#define CHANGETURF_IGNORE_AIR (1<<1) | ||
#define CHANGETURF_FORCEOP (1<<2) | ||
/// A flag for PlaceOnTop to just instance the new turf instead of calling ChangeTurf. Used for uninitialized turfs NOTHING ELSE | ||
#define CHANGETURF_SKIP (1<<3) | ||
|
||
#define IS_OPAQUE_TURF(turf) (turf.directional_opacity == ALL_CARDINALS) | ||
|
||
/// Marks a turf as organic. Used for alien wall and membranes. | ||
#define TURF_ORGANIC (1<<0) | ||
|
||
|
||
#define REMOVE_CROWBAR (1<<0) | ||
#define BREAK_CROWBAR (1<<1) | ||
#define REMOVE_SCREWDRIVER (1<<2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#define RANGE_TURFS(RADIUS, CENTER) \ | ||
block( \ | ||
locate(max(CENTER.x-(RADIUS),1), max(CENTER.y-(RADIUS),1), CENTER.z), \ | ||
locate(min(CENTER.x+(RADIUS),world.maxx), min(CENTER.y+(RADIUS),world.maxy), CENTER.z) \ | ||
) | ||
|
||
#define RECT_TURFS(H_RADIUS, V_RADIUS, CENTER) \ | ||
block( \ | ||
locate(max((CENTER).x-(H_RADIUS),1), max((CENTER).y-(V_RADIUS),1), (CENTER).z), \ | ||
locate(min((CENTER).x+(H_RADIUS),world.maxx), min((CENTER).y+(V_RADIUS),world.maxy), (CENTER).z) \ | ||
) | ||
|
||
///Returns all turfs in a zlevel | ||
#define Z_TURFS(ZLEVEL) block(locate(1,1,ZLEVEL), locate(world.maxx, world.maxy, ZLEVEL)) | ||
|
||
/// Returns a list of turfs in the rectangle specified by BOTTOM LEFT corner and height/width, checks for being outside the world border for you | ||
#define CORNER_BLOCK(corner, width, height) CORNER_BLOCK_OFFSET(corner, width, height, 0, 0) | ||
|
||
/// Returns a list of turfs similar to CORNER_BLOCK but with offsets | ||
#define CORNER_BLOCK_OFFSET(corner, width, height, offset_x, offset_y) ((block(locate(corner.x + offset_x, corner.y + offset_y, corner.z), locate(min(corner.x + (width - 1) + offset_x, world.maxx), min(corner.y + (height - 1) + offset_y, world.maxy), corner.z)))) | ||
|
||
/// Returns an outline (neighboring turfs) of the given block | ||
#define CORNER_OUTLINE(corner, width, height) ( \ | ||
CORNER_BLOCK_OFFSET(corner, width + 2, 1, -1, -1) + \ | ||
CORNER_BLOCK_OFFSET(corner, width + 2, 1, -1, height) + \ | ||
CORNER_BLOCK_OFFSET(corner, 1, height, -1, 0) + \ | ||
CORNER_BLOCK_OFFSET(corner, 1, height, width, 0)) | ||
|
||
#define TURF_FROM_COORDS_LIST(List) (locate(List[1], List[2], List[3])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
GLOBAL_LIST_EMPTY(string_lists) | ||
|
||
/** | ||
* Caches lists with non-numeric stringify-able values (text or typepath). | ||
*/ | ||
/proc/string_list(list/values) | ||
var/string_id = values.Join("-") | ||
|
||
. = GLOB.string_lists[string_id] | ||
|
||
if(.) | ||
return . | ||
|
||
return GLOB.string_lists[string_id] = values | ||
|
||
///A wrapper for baseturf string lists, to offer support of non list values, and a stack_trace if we have major issues | ||
/proc/baseturfs_string_list(list/values, turf/baseturf_holder) | ||
if(!islist(values)) | ||
return values //baseturf things | ||
// return values | ||
if(length(values) > 10) | ||
return string_list(list(/turf/closed/cordon/debug)) | ||
return string_list(values) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.