summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2015-11-07 20:39:07 -0500
committermekolat <mekolat@users.noreply.github.com>2015-11-08 10:10:24 -0500
commitce87986c70259e62bd05a8d2ecfff25d858a6511 (patch)
tree334f38a08fda595ce81ee00be80ab34cee5ddb38
parent7298b839982203090bc9f9a590e2f739f7cd6a97 (diff)
downloadserverdata-ce87986c70259e62bd05a8d2ecfff25d858a6511.tar.gz
serverdata-ce87986c70259e62bd05a8d2ecfff25d858a6511.tar.bz2
serverdata-ce87986c70259e62bd05a8d2ecfff25d858a6511.tar.xz
serverdata-ce87986c70259e62bd05a8d2ecfff25d858a6511.zip
add format to makefile
-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