From 9d151af53b9decb7a786f7e87fbf66949702e5e5 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 17 Jan 2021 18:25:14 -0500
Subject: [PATCH] rework link formation for abort and baby tats

---
 .../bodyModification/bodyModification.js        | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/facilities/bodyModification/bodyModification.js b/src/facilities/bodyModification/bodyModification.js
index 00cd7c2d5c2..8f6de0ee316 100644
--- a/src/facilities/bodyModification/bodyModification.js
+++ b/src/facilities/bodyModification/bodyModification.js
@@ -579,7 +579,7 @@ App.UI.bodyModification = function(slave, cheat = false) {
 			linkArray = [];
 			if (slave.birthsTat === -1) {
 				r.push(`Have ${him} receive a tattoo each time ${he} gives birth.`);
-				r.push(
+				linkArray.push(
 					App.UI.DOM.link(
 						"Begin keeping track",
 						() => {
@@ -613,7 +613,7 @@ App.UI.bodyModification = function(slave, cheat = false) {
 				} else if (slave.birthsTat === 0) {
 					if (slave.pregKnown === 1) {
 						r.push(`${He} has a single baby-shaped temporary tattoo adorning ${his} stomach.`);
-						r.push(
+						linkArray.push(
 							App.UI.DOM.link(
 								"Remove it",
 								() => {
@@ -627,7 +627,7 @@ App.UI.bodyModification = function(slave, cheat = false) {
 						}
 					} else {
 						r.push(`${He} is scheduled to receive a tattoo each time ${he} gives birth.`);
-						r.push(
+						linkArray.push(
 							App.UI.DOM.link(
 								"Cancel",
 								() => {
@@ -639,13 +639,13 @@ App.UI.bodyModification = function(slave, cheat = false) {
 					}
 				}
 			}
-
+			r.push(App.UI.DOM.generateLinksStrip(linkArray));
 			App.Events.addNode(el, r, "div");
 
 			r = [];
 			if (slave.abortionTat === -1) {
 				r.push(`Have ${him} receive a tattoo for each abortion or miscarriage ${he} has.`);
-				r.push(
+				linkArray.push(
 					App.UI.DOM.link(
 						"Begin keeping track",
 						() => {
@@ -661,7 +661,7 @@ App.UI.bodyModification = function(slave, cheat = false) {
 					} else {
 						r.push(`${He} has a single crossed out baby-shaped tattoo${(slave.pregKnown === 1) ? `, and one uncrossed one,` : ``} adorning ${his} stomach.`);
 					}
-					r.push(
+					linkArray.push(
 						App.UI.DOM.link(
 							"Remove tattoos",
 							() => {
@@ -674,7 +674,7 @@ App.UI.bodyModification = function(slave, cheat = false) {
 				} else if (slave.abortionTat === 0) {
 					if (slave.pregKnown === 1) {
 						r.push(`${He} has a single baby-shaped temporary tattoo adorning ${his} stomach.`);
-						r.push(
+						linkArray.push(
 							App.UI.DOM.link(
 								"Remove it",
 								() => {
@@ -688,7 +688,7 @@ App.UI.bodyModification = function(slave, cheat = false) {
 						}
 					} else {
 						r.push(`${He} is scheduled to receive a tattoo each time ${he} gets an abortion or miscarries.`);
-						r.push(
+						linkArray.push(
 							App.UI.DOM.link(
 								"Cancel",
 								() => {
@@ -701,6 +701,7 @@ App.UI.bodyModification = function(slave, cheat = false) {
 				}
 			}
 
+			r.push(App.UI.DOM.generateLinksStrip(linkArray));
 			App.Events.addNode(el, r, "div");
 			return el;
 		}
-- 
GitLab