From d280067fa5011ac106abeca82e5a7260d4c20302 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Tue, 20 Feb 2018 18:02:18 -0500 Subject: [PATCH] Everything is now a container - no raw objects allowed --- game.js | 4 ++-- recursive-macro.js | 33 ++++++++++++++------------------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/game.js b/game.js index a424cff..5944031 100644 --- a/game.js +++ b/game.js @@ -492,11 +492,11 @@ function getOnePrey(biome,area) for (var i=0; i 1) { - return new Container(result); - } else if (result.length == 1) { - return result[0]; - } else { - return new Person(1); - } + return new Container(result); } // describes everything in the container @@ -379,18 +373,6 @@ function defaultAddContent(thing) { } function DefaultEntity() { - this.stomp = defaultStomp; - this.eat = defaultEat; - this.kick = defaultKick; - this.anal_vore = defaultAnalVore; - this.buttcrush = defaultButtcrush; - this.breast_crush = defaultBreastCrush; - this.unbirth = defaultUnbirth; - this.cockslap = defaultCockslap; - this.cock_vore = defaultCockVore; - this.ball_smother = defaultBallSmother; - this.male_orgasm = defaultMaleOrgasm; - this.female_orgasm = defaultFemaleOrgasm; this.sum = defaultSum; this.area = defaultArea; this.mass = defaultMass; @@ -441,6 +423,19 @@ function Container(contents = []) { return line; }; + this.stomp = defaultStomp(this); + this.eat = defaultEat(this); + this.kick = defaultKick(this); + this.anal_vore = defaultAnalVore(this); + this.buttcrush = defaultButtcrush(this); + this.breast_crush = defaultBreastCrush(this); + this.unbirth = defaultUnbirth(this); + this.cockslap = defaultCockslap(this); + this.cock_vore = defaultCockVore(this); + this.ball_smother = defaultBallSmother(this); + this.male_orgasm = defaultMaleOrgasm(this); + this.female_orgasm = defaultFemaleOrgasm(this); + return this; }