From ce87986c70259e62bd05a8d2ecfff25d858a6511 Mon Sep 17 00:00:00 2001 From: mekolat Date: Sat, 7 Nov 2015 20:39:07 -0500 Subject: add format to makefile --- GNUmakefile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'GNUmakefile') 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 -- cgit v1.2.3-70-g09d2