So I thought I'd give it a shot and learn/see how it works. So am I doing it correctly? I believe I am but I'm quite unsure of myself when it comes to DM.
Anyone wanting to adapt on the profanity code may do so freely, though I imagine there's much better around these parts.
Also note, I realise some of these may be pointless in certain situations.
Code:
mob/var/
test = 5
mob/verb/test()
if(test1(src))
world<<"correct!"
var/test2 = 5
proc
test1(mob/m)
return m.test == test2
//checking to see how it would work with variables in the verb.
mob/verb/testy()
var/T = 5
if(test1(T))
world<<"correcty!"
var/testy2 = 5
proc
testy1(T)
return T == testy2
//test three for profanity
var/swearcheck = 1
mob/verb/profanity()
var/naughty = pick("naughty", "nice","santa")
if(swearcheck)
if(profanity_check(naughty))
world<<"BAD BOY/GIRL/IT"
else if(santa_check(naughty))
world<<"mmmmmm ho ho ho ;)"
else
world << "Good."
var/list/profanity = list("naughty")
proc
profanity_check(naughty)
return profanity.Find(naughty)
santa_check(naughty)
return naughty == "santa"
test1() will return false because you're not passing an M.
If swearcheck is always 1 there's no real point to checking if it's true.
Everything else looked fine at a glance but you're doing all of these assumptions and I'm not entirely sure what the point of all this is.