From 8153fe37528174a31c0669ee8fb3ab978ab5909f Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 9 Dec 2020 12:48:13 -0300 Subject: [skip ci] While we are at it, deprecate g() and raise an error. Show a random value, but as the proper function is any(), it is an unexpected behavior, therefore faulty, therefore, an error. (instead of a warning) --- npc/functions/main.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 28b61c7c..8029f3eb 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -54,8 +54,8 @@ function script mesq { } function script g { - // TODO: remove gendered lines from NPCs, or use any(getarg(0), getarg(1)) to make it random - return BodyType == 0 ? getarg(0) : getarg(1); + consolemes(CONSOLEMES_ERROR, "Deprecated function \"g\" used, results are not reliable."); + return rand(1000) % 2 ? getarg(0) : getarg(1); } function script b { -- cgit v1.2.3-70-g09d2