aboutsummaryrefslogtreecommitdiffstats
path: root/inc/craftmine.inc
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2016-04-24 22:17:13 +0200
committerpiernov <piernov@piernov.org>2016-04-24 22:17:13 +0200
commitbd688fc969dfdda43e180db17095733d6f63da56 (patch)
tree29054f1a642e6dead044236c835483a4ef24c3d7 /inc/craftmine.inc
parent9b618abd14b69bd56e64bd998de8f9ccb722fba7 (diff)
downloadcandybox-bd688fc969dfdda43e180db17095733d6f63da56.tar.gz
candybox-bd688fc969dfdda43e180db17095733d6f63da56.tar.bz2
candybox-bd688fc969dfdda43e180db17095733d6f63da56.tar.xz
candybox-bd688fc969dfdda43e180db17095733d6f63da56.zip
Send gold, shop and inventory infos from PHP all at once when requested on loading by client
Diffstat (limited to 'inc/craftmine.inc')
-rw-r--r--inc/craftmine.inc14
1 files changed, 14 insertions, 0 deletions
diff --git a/inc/craftmine.inc b/inc/craftmine.inc
new file mode 100644
index 0000000..a30538c
--- /dev/null
+++ b/inc/craftmine.inc
@@ -0,0 +1,14 @@
+<?php
+
+require_once("mine.inc");
+require_once("shop.inc");
+
+function sendCraftMine() {
+ $data = array("gold" => sendMine(),
+ "shop" => sendShop(),
+ "inventory" => Inventory::sendContent(),
+ );
+ echo json_encode($data);
+}
+
+?>