summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2015-11-21 21:09:41 -0500
committermekolat <mekolat@users.noreply.github.com>2015-11-21 21:09:41 -0500
commit8543642cbfc34f90bfbcd4a6c5988ea86e6bed08 (patch)
tree6796f1046e027cffc78a79dc7798e31df2c1323f /GNUmakefile
parent0ce97ae5fa9e3b7cf985d9964a888032fbec96ce (diff)
parentb8504da5be467f979490d3c55b5f32a612ca830d (diff)
downloadserverdata-8543642cbfc34f90bfbcd4a6c5988ea86e6bed08.tar.gz
serverdata-8543642cbfc34f90bfbcd4a6c5988ea86e6bed08.tar.bz2
serverdata-8543642cbfc34f90bfbcd4a6c5988ea86e6bed08.tar.xz
serverdata-8543642cbfc34f90bfbcd4a6c5988ea86e6bed08.zip
Merge pull request #431 from mekolat/format
add format to makefile
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 415d91a4..d5a29c2a 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -17,6 +17,14 @@ world/map/conf/magic-secrets.sex: world/map/conf/magic-secrets.sex.template worl
cd world/map/conf && ./build-magic.sh
world/map/conf/secrets-build:
+format:
+ find world/map/npc -type f -exec sed -ri \
+ -e "s%([^|]+)\|script\|([^|]+)\|-1%\1|script|\2|32767%ig" \
+ -e "s/\.gat//g" -e "s/\r\n/\n/g" -e "s/\t/ /g" \
+ -e "s%([^|]+)\|script\|([^|]+)\|([0-9]+)(,[0-9]+)?(,[0-9]+)?[^{]*\{%\1|script|\2|\3\4\5\n{%ig" \
+ -e "s%function\|script\|([^| {]+)[^{]*\{%function|script|\1\n{%ig" \
+ {} \; -exec vi -escwq {} \; -print
+
mobxp: mobxp-impl indent-mobs
mobxp-impl:
mv world/map/db/mob_db.txt world/map/db/mob_db.old