mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 00:23:29 +01:00
Add required configuration for automated map merge script. (#19484)
* Update merge_driver script. * Actually tick and compile new files. * Improve marker description.
This commit is contained in:
committed by
GitHub
parent
4ace2d6c2b
commit
274ef027dc
@@ -0,0 +1,2 @@
|
||||
## Merger hooks, run tools/hooks/install.bat or install.sh to set up
|
||||
*.dmm text eol=lf merge=dmm
|
||||
@@ -0,0 +1,17 @@
|
||||
// Used by mapmerge2 to denote the existence of a merge conflict (or when it has to complete a "best intent" merge where it dumps the movable contents of an old key and a new key on the same tile).
|
||||
// We define it explicitly here to ensure that it shows up on the highest possible plane (while giving off a verbose icon) to aide mappers in resolving these conflicts.
|
||||
// DO NOT USE THIS IN NORMAL MAPPING!!! Linters WILL fail.
|
||||
|
||||
/obj/merge_conflict_marker
|
||||
name = "Merge Conflict Marker - DO NOT USE"
|
||||
icon = 'icons/effects/mapping_helpers.dmi'
|
||||
icon_state = "merge_conflict_marker"
|
||||
desc = "If you are seeing this in-game: someone REALLY, REALLY, REALLY fucked up. Please make an issue report on GitHub or contact a coder as soon as possible."
|
||||
plane = POINT_PLANE
|
||||
|
||||
///We REALLY do not want un-addressed merge conflicts in maps for an inexhaustible list of reasons. This should help ensure that this will not be missed in case linters fail to catch it for any reason what-so-ever.
|
||||
/obj/merge_conflict_marker/Initialize(mapload)
|
||||
. = ..()
|
||||
var/msg = "HEY, LISTEN!!! Merge Conflict Marker detected at [AREACOORD(src)]! Please manually address all potential merge conflicts!!!"
|
||||
warning(msg)
|
||||
to_chat(world, "<span class='boldannounce'>[msg]</span>")
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.6 KiB |
@@ -1782,6 +1782,7 @@
|
||||
#include "code\modules\mapping\cyberiad.dm"
|
||||
#include "code\modules\mapping\delta.dm"
|
||||
#include "code\modules\mapping\mapping_helpers.dm"
|
||||
#include "code\modules\mapping\merge_conflicts.dm"
|
||||
#include "code\modules\mapping\metastation.dm"
|
||||
#include "code\modules\mapping\test_tiny.dm"
|
||||
#include "code\modules\martial_arts\adminfu.dm"
|
||||
|
||||
@@ -31,6 +31,15 @@ if grep -P '^/*var/' code/**/*.dm; then
|
||||
echo "ERROR: Unmanaged global var use detected in code, please use the helpers."
|
||||
st=1
|
||||
fi;
|
||||
# Check for merge conflict markers and their associated description text.
|
||||
if grep -P 'Merge Conflict Marker' _maps/**/*.dmm; then
|
||||
echo "ERROR: Merge conflict markers detected in map, please resolve all merge failures!"
|
||||
st=1
|
||||
fi;
|
||||
if grep -P '/obj/merge_conflict_marker' _maps/**/*.dmm; then
|
||||
echo "ERROR: Merge conflict markers detected in map, please resolve all merge failures!"
|
||||
st=1
|
||||
fi;
|
||||
nl='
|
||||
'
|
||||
nl=$'\n'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys, collections
|
||||
import sys
|
||||
import collections
|
||||
from . import dmm, mapmerge
|
||||
from hooks.merge_frontend import MergeDriver
|
||||
|
||||
@@ -74,9 +75,13 @@ def three_way_merge(base, left, right):
|
||||
print(f" C: Both sides touch the tile at {coord}")
|
||||
|
||||
if merged_movables is None:
|
||||
obj_name = "---Merge conflict marker---"
|
||||
merged_movables = left_movables + [f'/obj{{name = "{obj_name}"}}'] + right_movables
|
||||
print(f" Left and right movable groups are split by an `/obj` named \"{obj_name}\"")
|
||||
# Note that if you do not have an object that matches this path in your DME, the invalid path may be discarded when the map is loaded into a map editor.
|
||||
# To rectify this, either add an object with this same path, or create a new object/denote an existing object in the obj_path define.
|
||||
obj_path = "/obj/merge_conflict_marker"
|
||||
obj_name = "---Merge Conflict Marker---"
|
||||
obj_desc = "A best-effort merge was performed. You must resolve this conflict yourself (manually) and remove this object once complete."
|
||||
merged_movables = left_movables + [f'{obj_path}{{name = "{obj_name}";\n\tdesc = "{obj_desc}"}}'] + right_movables
|
||||
print(f" Left and right movable groups are split by an `{obj_path}` named \"{obj_name}\"")
|
||||
if merged_turfs is None:
|
||||
merged_turfs = left_turfs
|
||||
print(f" Saving turf: {', '.join(left_turfs)}")
|
||||
|
||||
Reference in New Issue
Block a user