From 66098c2bb4a12016e2623b2b3814ff1890b935ab Mon Sep 17 00:00:00 2001 From: expwnent Date: Fri, 27 Jun 2014 01:40:36 -0400 Subject: [PATCH] Fixed wrong documentation on repeating scripts. --- scripts/feeding-timers.lua | 4 ++-- scripts/growthbug.lua | 6 +++--- scripts/removewear.lua | 4 ++-- scripts/repeat.lua | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/feeding-timers.lua b/scripts/feeding-timers.lua index d0aa4cc6e..b679dc953 100644 --- a/scripts/feeding-timers.lua +++ b/scripts/feeding-timers.lua @@ -10,9 +10,9 @@ if args[1] ~= nil then print(" reset the feeding timers of all units as appropriate") print(" feeding-timers help") print(" print this help message") - print(" repeat enable [n] [years/months/ticks/days/etc] feeding-timers") + print(" repeat -time [n] [years/months/ticks/days/etc] -command feeding-timers") print(" run this script every n time units") - print(" repeat disable feeding-timers") + print(" repeat -cancel feeding-timers") print(" stop automatically running this script") return end diff --git a/scripts/growthbug.lua b/scripts/growthbug.lua index 791dd110e..949cc1411 100644 --- a/scripts/growthbug.lua +++ b/scripts/growthbug.lua @@ -1,5 +1,5 @@ --growthbug: units only grow when the current tick is 0 mod 10, so only 1/10 units will grow naturally. this script periodically sets the birth time of each unit so that it will grow ---to run periodically, use "repeat enable 2 months growthBug now". see repeat.lua for details +--to run periodically, use "repeat -time 2 months -command growthBug now". see repeat.lua for details -- author expwnent local args = {...} @@ -9,9 +9,9 @@ if args[1] ~= nil then print(" fix the growth bug for all units on the map") print(" growthbug help") print(" print this help message") - print(" repeat enable [n] [years/months/ticks/days/etc] growthbug") + print(" repeat -time [n] [years/months/ticks/days/etc] -command growthbug") print(" run this script every n time units") - print(" repeat disable growthbug") + print(" repeat -cancel growthbug") print(" stop automatically running this script") end diff --git a/scripts/removewear.lua b/scripts/removewear.lua index b6bc959dd..66d427e48 100644 --- a/scripts/removewear.lua +++ b/scripts/removewear.lua @@ -11,7 +11,7 @@ removewear all remove wear from all items removewear n1 n2 n3 ... remove wear from items with the given ids. order does not matter -repeat enable 2 months removewear all +repeat -time 2 months -command removewear all remove wear from all items every 2 months. see repeat.lua for details ]]) do return end @@ -23,7 +23,7 @@ elseif args[1] == 'all' then count = count+1 end end - print('removewear removed wear from 'count' objects') + print('removewear removed wear from '..count..' objects') else local argIndex = 1 local isCompleted = {} diff --git a/scripts/repeat.lua b/scripts/repeat.lua index 046e27489..d982594c6 100644 --- a/scripts/repeat.lua +++ b/scripts/repeat.lua @@ -1,8 +1,8 @@ -- repeat.lua --- repeatedly calls a lua script, eg "repeat enable 1 months cleanowned"; to disable "repeat disable cleanowned" +-- repeatedly calls a lua script, eg "repeat -time 1 months -command cleanowned"; to disable "repeat -cancel cleanowned" +-- repeat -help for details -- author expwnent -- vaguely based on a script by Putnam --- repeat -help for details local repeatUtil = require 'plugins.repeatUtil'