Rename sys* fuctions that don't operate on starsystems

Post ideas & suggestions you have pertaining to the game here.
Post Reply
User avatar
Star Weaver
Militia Commander
Militia Commander
Posts: 311
Joined: Sun Nov 07, 2010 10:20 pm
Location: . . . between the stars and the warm black sky . . .

Hi! A while back, I was looking at the function list and realizing that, while most of the three-letter-ish function prefixes were accurate, sys could relate to either star systems or the game system. Also, vector functions don't actually depend on a star system as far as I can remember, and there is now enough of them (and their names are long enough) that they might deserve their own category.

Of course, if this were to happen, all the prior names would be left deprecated until someone feels like breaking backwards compatability. And by someone, I mostly mean George. Pardon me, long week. :)

I didn't just make a ticket for this one because (a) I'm not postive I know everything about all of these functions and (b) it's a mushier proposal than "here's a fairly atomic idea, use it or not". (I should probably link my pending atomic idea tickets back into the forums for interested parties when I have the time, though ....)

Anyway, here's my current reccomendation for new function names. It would only involve changing the ten vector functions and 3-6 univeral ones, everything else seems to actually be star system. Sorry about the crappy formatting ^_^.

Code: Select all


Function                      - Type        - Suggestion

sysPlaySound                  - engine      - unvPlaySound
sysPoolUsage                  - engine      - unvPoolUsage
sysTicks                      - engine      - unvTicks or just deprecate? xel says don't use it
sysStopTime                   - starsystem? - STET unless this dosen't act on current system?
sysStopTime                   - starsystem? - STET unless this dosen't act on current system?
sysGetNodes                   - universe?   - STET or unvGetNodes, or maybe advGetNodes?

sysVectorAdd                  - vector      - vecAdd
sysVectorAngle                - vector      - vecAngle
sysVectorDistance             - vector      - vecDistance
sysVectorDivide               - vector      - vecDivide
sysVectorMultiply             - vector      - vecMultiply
sysVectorPolarOffset          - vector      - vecPolarOffset
sysVectorPolarVelocity        - vector      - vecPolarVelocity
sysVectorRandom               - vector      - vecRandom
sysVectorSpeed                - vector      - vecSpeed
sysVectorSubtract             - vector      - vecSubtract

sysAddEncounterEvent          - starsystem  - STET
sysAddEncounterEventAtDist    - starsystem  - STET
sysAddObjRecurringTimerEvent  - starsystem  - STET
sysAddObjTimerEvent           - starsystem  - STET
sysAddStargateTopology        - starsystem  - STET
sysAddTypeRecurringTimerEvent - starsystem  - STET
sysAddTypeTimerEvent          - starsystem  - STET
sysCalcFireSolution           - starsystem  - STET
sysCalcTravelDistance         - starsystem  - STET
sysCalcTravelTime             - starsystem  - STET
sysCancelTimerEvent           - starsystem  - STET
sysCancelTypeTimerEvent       - starsystem  - STET
sysCreateEffect               - starsystem  - STET
sysCreateEncounter            - starsystem  - STET
sysCreateMarker               - starsystem  - STET
sysCreateShip                 - starsystem  - STET
sysCreateShipwreck            - starsystem  - STET
sysCreateStargate             - starsystem  - STET
sysCreateStation              - starsystem  - STET
sysCreateWeaponFire           - starsystem  - STET
sysFindObject                 - starsystem  - STET
sysGetData                    - starsystem  - STET
sysGetEnvironment             - starsystem  - STET
sysGetLevel                   - starsystem  - STET
sysGetName                    - starsystem  - STET
sysGetNavPathPoint            - starsystem  - STET
sysGetNode                    - starsystem  - STET
sysGetObjectByName            - starsystem  - STET
sysGetRandomOreType           - starsystem  - STET
sysGetStargateDestinationNode - starsystem  - STET
sysGetStargates               - starsystem  - STET
sysGetSystemType              - starsystem  - STET
sysGetTopologyDistance        - starsystem  - STET
sysGlobals                    - starsystem  - STET
sysHasAttribute               - starsystem  - STET
sysIsKNown                    - starsystem  - STET
sysSetData                    - starsystem  - STET
sysSetKNown                   - starsystem  - STET
sysStartTime                  - starsystem  - STET

Image
Image
Image
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Seconded!
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

not a bad idea. i certainly second removing the sys namespace from the vector functions. As regards the others, here are my suggestions:

Code: Select all

sysPlaySounds			- gamePlaySounds
sysPoolUsage			- gamePoolUsage

sysTicks			- unvTicks - this returns time since universe start
unvGetTicks			- gameTicks - this returns internal game tick

sysStopTime
sysStartTime 			- these are relative to the system, so no change

sysGetNodes			- topoGetNodes? - This is actually a topology function

sysGlobals			- gameGlobals?

sysGetTopologyDistance 		- topoGetDistance - this is not tied to systems but nodes, afaik
I bet there are more improvements that can be made, and other functions that could be renamed.
Get your own Galactic Omni Device
Get it now. It's free!!
Image
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

sysPlaySound could probably be renamed to objPlaySound
Post Reply