From abd2bd59405498ef9ede891331cb806dcb371fbd Mon Sep 17 00:00:00 2001 From: arookas Date: Fri, 29 Jan 2016 17:12:08 -0500 Subject: [PATCH] Added incSystemFlag and decSystemFlag. --- stdlib/system.sun | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stdlib/system.sun b/stdlib/system.sun index 3a2c90f..05c5d57 100644 --- a/stdlib/system.sun +++ b/stdlib/system.sun @@ -21,6 +21,14 @@ builtin setSystemFlag(flag, value); function setOnSystemFlag(flag) { setSystemFlag(flag, true); } function setOffSystemFlag(flag) { setSystemFlag(flag, false); } +// [arookas] custom utility +function incSystemFlag(flag) { + setSystemFlag(flag, getSystemFlag(flag) + 1); +} +function decSystemFlag(flag) { + setSystemFlag(flag, getSystemFlag(flag) - 1); +} + // ================================================= \\ // POLLUTION // ================================================= \\