Author Topic: set-jumpnode-name SEXP  (Read 1332 times)

0 Members and 1 Guest are viewing this topic.

Offline CommanderDJ

  • Software engineer
  • 210
    • Minecraft
set-jumpnode-name SEXP
Hey guys,
So in light of this guide created by The_E for writing new SEXPs, I decided to try my hand at writing my first ever SEXP: set-jumpnode-name.

It does what you think it does, but here's the description text anyway:
Code: [Select]
Sets the name of a jump node. Takes 2 arguments...
1: Name of jump node to change name for
2: New name for jump node

Now, I've tested it and it works, the only thing is that SEXPs referencing the old jump node name will obviously not work after the name change. That, and I have no idea whether I've done something inherently dangerous with the code. This being my first FSO coding endeavour, I need feedback, so here's a link to a .patch file showing the changes I've made. Any feedback and constructive criticism is greatly appreciated.

CommanderDJ

EDIT: .patch file updated with The_E's corrections.

« Last Edit: April 28, 2011, 11:19:56 am by CommanderDJ »
[16:57] <CommanderDJ> What prompted the decision to split WiH into acts?
[16:58] <battuta> it was long, we wanted to release something
[16:58] <battuta> it felt good to have a target to hit
[17:00] <RangerKarl> not sure if talking about strike mission, or jerking off
[17:00] <CommanderDJ> WUT
[17:00] <CommanderDJ> hahahahaha
[17:00] <battuta> hahahaha
[17:00] <RangerKarl> same thing really, if you think about it

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: set-jumpnode-name SEXP
Committed to trunk in revision 7155.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: set-jumpnode-name SEXP
Awesome. Did DJ's note get included in the help text?

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: set-jumpnode-name SEXP
Nice 1 CDJ
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline CommanderDJ

  • Software engineer
  • 210
    • Minecraft
Re: set-jumpnode-name SEXP
Thanks for the commit!

I've actually updated the SEXP so it's now multiplayer compatible. I've also added the relevant note to the help text.

Here's an updated .patch file. In it, I also took the liberty of correcting a spelling error in another sexp (it used muli_sexp instead of multi_sexp).

EDIT: Thanks headdie.
« Last Edit: April 29, 2011, 11:46:45 am by CommanderDJ »
[16:57] <CommanderDJ> What prompted the decision to split WiH into acts?
[16:58] <battuta> it was long, we wanted to release something
[16:58] <battuta> it felt good to have a target to hit
[17:00] <RangerKarl> not sure if talking about strike mission, or jerking off
[17:00] <CommanderDJ> WUT
[17:00] <CommanderDJ> hahahahaha
[17:00] <battuta> hahahaha
[17:00] <RangerKarl> same thing really, if you think about it

  

Offline Echelon9

  • 210
Re: set-jumpnode-name SEXP
Alternative solution provided by The_E
« Last Edit: May 01, 2011, 10:02:33 am by Echelon9 »