From 8971a917ccc6ee00f12e1c23d2c144ba48bdb026 Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Thu, 11 Mar 2021 00:52:36 +0100 Subject: [PATCH 3/3] sandbox: use Lua teleport side effect control. Have using the ancient transport network scare any huts at the target tile as the unit emerges. Allow teleporting to and from a transport. Forbid city or extra conquest - at least for now. See osdn #41731 --- data/sandbox/script.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/data/sandbox/script.lua b/data/sandbox/script.lua index 3164c5549c..cacead1d48 100644 --- a/data/sandbox/script.lua +++ b/data/sandbox/script.lua @@ -461,7 +461,17 @@ signal.connect("action_started_unit_unit", "action_started_unit_unit_callback") -- Use Ancient Transportation Network function transport_network(action, actor, target) local actor_name = actor.utype:name_translation() - local survived = actor:teleport(target) + local survived = actor:teleport(target, + -- allow transport to transport + find.transport_unit(actor.owner, + actor.utype, target), + true, + -- assume cities and castles considered + -- the ancient hub when they were built + false, false, + -- a unit appearing from the Ancient + -- Transportation Network is scary to see + false, true) if not survived then notify.event(actor.owner, target, -- 2.20.1