Where the heck is getStr() defined?

All development conversation and discussion takes place here

Moderator: Moderator

Post Reply
Message
Author
ibanix
Wyrmic
Posts: 244
Joined: Thu May 23, 2013 12:25 am

Where the heck is getStr() defined?

#1 Post by ibanix »

I'm trying to improve wiki documentation, and try as I might I can not find the definition for getStr (or getDex, getCon, etc).

Filename?

Thanks.
Please help with the ToME wiki!

ibanix
Wyrmic
Posts: 244
Joined: Thu May 23, 2013 12:25 am

Re: Where the heck is getStr() defined?

#2 Post by ibanix »

Apparently uses _M:getStat in \games\engines\default\engine\interface\ActorStats.lua as by:

-- Note that the engine also auto-defines stat specific methods on the form: self:getShortname().
-- If you stat short name is STR then it becomes getStr()


Which, I have to say, is really annoying for anyone code diving :/
Please help with the ToME wiki!

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: Where the heck is getStr() defined?

#3 Post by HousePet »

Some functions seem to be auto generating.
My feedback meter decays into coding. Give me feedback and I make mods.

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: Where the heck is getStr() defined?

#4 Post by Doctornull »

In the larger projects I've worked on, when we auto-generate code, we also try to auto-generate the documentation for that code, because it's kind of horrible to ask people to read auto-generated code.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Where the heck is getStr() defined?

#5 Post by darkgod »

Thing is it doesnt autogen code, it autogen the functions themselves at runtime (and this is said somewher in the actorstats docs IIRC)
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply