(This seemed like the right place to post...)
I'd like to tinker with the laser ranges. I've had a little look at the source and found that one of the ShipEntity files contains a few lines that appear to be what I'm after but can't find similar in the PlayerEntity files.
Am I missing something?
Is this more complicated than I realise?
Any help appreciated.
Thanks.
Musings about stuff that I could do to the source code...
Moderators: winston, another_commander
Re: Musings about stuff that I could do to the source code..
PlayerEntity inherits from ShipEntity, so the ShipEntity class contains the laser parameters for both (approximately - energy usage is currently only tracked for the player weapons, so that is in PlayerEntity)Redspear wrote:I'd like to tinker with the laser ranges. I've had a little look at the source and found that one of the ShipEntity files contains a few lines that appear to be what I'm after but can't find similar in the PlayerEntity files.
- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Musings about stuff that I could do to the source code..
Thanks cim
So that's just the weapon ranges at the end of ShipEntity.m then is it?
Once I've edited the file will I need to 'recompile' my build or some such?
Apologies for my 'noobitude' but this is very much new territory for me...
So that's just the weapon ranges at the end of ShipEntity.m then is it?
Once I've edited the file will I need to 'recompile' my build or some such?
Apologies for my 'noobitude' but this is very much new territory for me...
Re: Musings about stuff that I could do to the source code..
Yes. If you run 'Redspear wrote:Once I've edited the file will I need to 'recompile' my build or some such?
make -f Makefile
' again (or XCode's build process, if you're using a Mac) then it'll rebuild ShipEntity (and, though there shouldn't be any this time, any other files which might need rebuilding because of your changes) and then remake the Oolite executable.- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Musings about stuff that I could do to the source code..
Worked a treat. Thankscim wrote:Yes. If you run 'Redspear wrote:Once I've edited the file will I need to 'recompile' my build or some such?make -f Makefile
' again (or XCode's build process, if you're using a Mac) then it'll rebuild ShipEntity (and, though there shouldn't be any this time, any other files which might need rebuilding because of your changes) and then remake the Oolite executable.