Plasma Python API

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Re: Plasma Python API

Postby diafero » Mon Mar 29, 2010 2:02 am

As I said, this list is automatically generated - and unfortunately, I found no way to get the parameters of a function/method inside Python. Cyan always listed them in the description though. I don't feel like copying >2000 parameter lists manually from the Plasma.py file...
However, if we assume that this "Params" list provided by Cyan is correct (and no "Params:" means that no parameters can be passed to the function), I could adapt the script to parse it and print it in a readable way.
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Plasma Python API

Postby diafero » Fri Apr 02, 2010 3:13 am

I changed the script to beautify the parameters list. The wiki page is now the actual output of the script, no manual search'n'replace was done.

That format you suggested, Hoikas, would make the page even longer than it is now, and I'm not sure whether that adds to readability. Plus, the way the script works, it can not sort the entries, it just prints them in the order it gets from the "dir" function. Since we have only two classes with properties, it's not worth thinking too much about those.
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Plasma Python API

Postby Tsar Hoikas » Fri Apr 02, 2010 1:08 pm

This is good. All it really needs now are section divisions. I can go through and add those... Eventually >.>
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Plasma Python API

Postby diafero » Sat Apr 03, 2010 2:40 am

The problem is that in theory, a class can contain another class, so I can't just make a class "===classname===". But no need for you to do that manually, I think I found a solution: Make the number of "=" signs depend on the indention. Then it would look right even with subclasses. Expect the update today or tomorrow.
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Plasma Python API

Postby Tsar Hoikas » Sat Apr 03, 2010 12:27 pm

I didn't think about that >.> Though I don't remember anywhere in the Plasma module that uses subclasses. You solution sounds good though (I don't have to do anything :P).
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Plasma Python API

Postby diafero » Sat Apr 03, 2010 1:21 pm

No, Plasma doesn't use it, true. I already heavily adapted the script, but at least I want to be sure I don't miss anything - who knows what someone might run this script on one day... :lol:

You solution sounds good though (I don't have to do anything :P).
I knew you were going to like it :D
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Plasma Python API

Postby diafero » Sun Apr 04, 2010 6:28 am

Ok, I updated the site. Does anyone know how to indent the bullets without these strange double-bullets at the beginning?
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Plasma Python API

Postby Chacal » Sun Apr 04, 2010 10:11 am

Good job. Very clear.
I always wondered how "Function: PtAvatarSpawnNext() - Send the avatar to the next spawn point " works. How does it know what the "next" spawn point is? Does it keep a pointer to the last point you spawned at?
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2508
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Plasma Python API

Postby Tsar Hoikas » Sun Apr 04, 2010 12:33 pm

diafero wrote:Ok, I updated the site. Does anyone know how to indent the bullets without these strange double-bullets at the beginning?


I don't think MediaWiki expects you to start off with "**". You could surround single bullets (one asterisk) inside a blockquote. I think the page looks good with a double header (== Class == whereas you were using === Class ===) and single bullets. I see the effect you were going for though; MediaWiki is just being a pain.
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Plasma Python API

Postby diafero » Sun Apr 04, 2010 1:33 pm

I wanted the bullet points to be indented... and I deliberately used 3rd-level headers because level 2 captions get this additional horizontal line and are way bigger, so the page gets longer and longer...
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

PreviousNext

Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron