Skip to content

Commit

Permalink
hooks: rewrite so dct initializes from hooks
Browse files Browse the repository at this point in the history
It seems DCS has several bugs where scripts in the .miz might be run by
the client. To fix this remove the requirement to have mission designers
apply the `dct-mission-init.lua` script as a do-script-from-file mission
start trigger. It is expected only servers will have the hooks installed
and so this should avoid the client side issues.

As part of the rewrite the dct hooks dropped support for exporting data
about the server. There are several other third-party server monitoring
tools/hooks out there that provide far greater capability than the dct
hook could provide.
  • Loading branch information
jtoppins committed Dec 29, 2022
1 parent b97eafb commit acc6d26
Show file tree
Hide file tree
Showing 8 changed files with 627 additions and 751 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ check:

build:
mkdir -p $(BUILDPATH)/Mods/Tech/DCT/lua
cp -a $(SRCPATH)/src/dct.lua $(SRCPATH)/src/dct/ $(BUILDPATH)/Mods/Tech/DCT/lua
cp -a $(SRCPATH)/src/dct/ $(SRCPATH)/src/dcthooks.lua \
$(BUILDPATH)/Mods/Tech/DCT/lua
sed -e "s:%VERSION%:$(VERSION):" $(SRCPATH)/entry.lua.tpl > \
$(BUILDPATH)/Mods/Tech/DCT/entry.lua
sed -e "s:%VERSION%:$(VERSION):" $(SRCPATH)/src/dct.lua > \
$(BUILDPATH)/Mods/Tech/DCT/lua/dct.lua
mkdir -p $(BUILDPATH)/Scripts/Hooks
cp -a $(SRCPATH)/mission/* $(BUILDPATH)/Scripts/
cp -a $(SRCPATH)/hooks/* $(BUILDPATH)/Scripts/Hooks/
mkdir -p $(BUILDPATH)/Config/
cp -a $(SRCPATH)/data/Config/dct.cfg $(BUILDPATH)/Config/dct.cfg
Expand All @@ -31,7 +31,6 @@ build:
(mkdir -p $(BUILDPATH)/demomiz; \
cd $(BUILDPATH)/demomiz; \
cp -a $(SRCPATH)/data/mission/* .; \
cp $(SRCPATH)/mission/* l10n/DEFAULT/; \
zip -r "../Missions/dct-demo-mission.miz" .)
cp $(SRCPATH)/README.md $(BUILDPATH)/
mkdir -p $(BUILDPATH)/temp
Expand Down
Loading

0 comments on commit acc6d26

Please sign in to comment.