lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, 02 Nov 2009 21:38:09 +0100
Petite Abeille <petite_abeille@mac.com> wrote:

> 
> On Nov 2, 2009, at 9:27 PM, Javier Guerra wrote:
> 
> > how to make day-time hallucinations bring me caffeinated beverages.
> 
> Heard good things about mescaline
> 

Well, he already has hallucinations, and wants to tame them for
practical purposes...

Maybe something like:

local hmt = getmetatable(hallucinations)

if hmt.__call then local run_hallucination = hmt.__call

function hmt:__call(...)
	if self.patient.caffeine <= CAFFEINE_CRITICAL then
		self.patient.nurse.pump_caffeine( LOTS_OF_CAFFEINE )

	run_hallucination(...)
end