FreeOrion

Forums for the FreeOrion project
It is currently Mon Oct 23, 2017 6:15 am

All times are UTC




Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Sat Sep 30, 2017 4:37 pm 
Offline
Programmer

Joined: Sun Feb 14, 2016 12:08 am
Posts: 333
The Silent One wrote:
So if it has is an unresearched unresearchable prereq, a partially unlocked tech should not show?

Yes, to reword it a little less precisely for others (because it is even confusing to type): A tech with a hidden prereq should also be hidden.


Top
 Profile  
 
PostPosted: Sun Oct 01, 2017 2:45 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4226
Location: Sol III
dbenage-cx wrote:
A tech with a hidden prereq should also be hidden.
Yep, definitely!


Top
 Profile  
 
PostPosted: Thu Oct 05, 2017 2:14 pm 
Offline
Graphics
User avatar

Joined: Tue Jul 01, 2003 8:27 pm
Posts: 698
dbenage-cx wrote:
Yes, to reword it a little less precisely for others (because it is even confusing to type): A tech with a hidden prereq should also be hidden.
Done.

dbenage-cx wrote:
Something I was not expecting was the requirement to click Destroy at the planet each turn, especially after the special is placed.
I've started working on this, but need a little help. My plan is to refresh a planet destruction order if (a) the ship has not been destroyed, (b) still in the system, and (c) the planet hasn't been destroyed. (In all other cases, the ship's or planet's destruction status is reset.) The code for this should execute at the start of a new turn - not sure where to put it, maybe here: ServerApp::PostCombatProcessTurns()? If I put it there, however, I can't issue a new order for destruction, adding #include "../client/human/HumanClientApp.h" needed to issue an order leads to a dozen of "unresolved externals"? Current status of code is on github.

_________________
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.


Top
 Profile  
 
PostPosted: Thu Oct 05, 2017 5:53 pm 
Offline
Space Squid

Joined: Sat Dec 10, 2011 5:46 am
Posts: 52
dbenage-cx wrote:
Something I was not expecting was the requirement to click Destroy at the planet each turn, especially after the special is placed.
I've started working on this, but need a little help. My plan is to refresh a planet destruction order if (a) the ship has not been destroyed, (b) still in the system, and (c) the planet hasn't been destroyed. (In all other cases, the ship's or planet's destruction status is reset.) The code for this should execute at the start of a new turn - not sure where to put it, maybe here: ServerApp::PostCombatProcessTurns()? If I put it there, however, I can't issue a new order for destruction, adding #include "../client/human/HumanClientApp.h" needed to issue an order leads to a dozen of "unresolved externals"? Current status of code is on github.[/quote]

I built code without any issues on graphics-less system even with uncommented
Code:
CleanUpDestructionStateInfo();
. Which errors you gets?

_________________
Gentoo Linux amd64, gcc-5.4.0, boost-1.62.0
Ubuntu Server 16.04.3 x64, gcc-5.4, boost-1.58.0
Welcome to multiplayer public server at 78.47.71.237. Version 2017-10-16.e3039ca
SMAC participant: play multiplayer with us!


Top
 Profile  
 
PostPosted: Thu Oct 05, 2017 7:06 pm 
Offline
Graphics
User avatar

Joined: Tue Jul 01, 2003 8:27 pm
Posts: 698
I get lots of these:
Code:
1>ServerApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: static class HumanClientApp * __cdecl HumanClientApp::GetApp(void)" (?GetApp@HumanClientApp@@SAPAV1@XZ)".
1>ServerApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual void __thiscall GG::BeveledCheckBoxRepresenter::Render(class GG::StateButton const &)const " (?Render@BeveledCheckBoxRepresenter@GG@@UBEXABVStateButton@2@@Z)".
1>ServerApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: __thiscall GG::BeveledCheckBoxRepresenter::BeveledCheckBoxRepresenter(struct GG::Clr)" (??0BeveledCheckBoxRepresenter@GG@@QAE@UClr@1@@Z)".
1>ServerApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual void __thiscall GG::BeveledRadioRepresenter::Render(class GG::StateButton const &)const " (?Render@BeveledRadioRepresenter@GG@@UBEXABVStateButton@2@@Z)".
1>ServerApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: __thiscall GG::BeveledRadioRepresenter::BeveledRadioRepresenter(struct GG::Clr)" (??0BeveledRadioRepresenter@GG@@QAE@UClr@1@@Z)".
1>ServerApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual void __thiscall GG::GL3DVertexBuffer::activate(void)const " (?activate@GL3DVertexBuffer@GG@@UBEXXZ)".


"Nicht aufgelöstes externes Symbol" = unresolved external symbol

Code:
#include "../client/human/HumanClientApp.h"
What's the trouble with this?

_________________
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.


Top
 Profile  
 
PostPosted: Thu Oct 05, 2017 7:40 pm 
Offline
Space Squid

Joined: Sat Dec 10, 2011 5:46 am
Posts: 52
The Silent One wrote:
I get lots of these:
Code:
1>ServerApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: static class HumanClientApp * __cdecl HumanClientApp::GetApp(void)" (?GetApp@HumanClientApp@@SAPAV1@XZ)".
1>ServerApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual void __thiscall GG::BeveledCheckBoxRepresenter::Render(class GG::StateButton const &)const " (?Render@BeveledCheckBoxRepresenter@GG@@UBEXABVStateButton@2@@Z)".
1>ServerApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: __thiscall GG::BeveledCheckBoxRepresenter::BeveledCheckBoxRepresenter(struct GG::Clr)" (??0BeveledCheckBoxRepresenter@GG@@QAE@UClr@1@@Z)".
1>ServerApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual void __thiscall GG::BeveledRadioRepresenter::Render(class GG::StateButton const &)const " (?Render@BeveledRadioRepresenter@GG@@UBEXABVStateButton@2@@Z)".
1>ServerApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: __thiscall GG::BeveledRadioRepresenter::BeveledRadioRepresenter(struct GG::Clr)" (??0BeveledRadioRepresenter@GG@@QAE@UClr@1@@Z)".
1>ServerApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual void __thiscall GG::GL3DVertexBuffer::activate(void)const " (?activate@GL3DVertexBuffer@GG@@UBEXXZ)".


"Nicht aufgelöstes externes Symbol" = unresolved external symbol

Looks like you trying to do something with UI in server process.
The Silent One wrote:
Code:
#include "../client/human/HumanClientApp.h"
What's the trouble with this?

It will break headless compilation.

_________________
Gentoo Linux amd64, gcc-5.4.0, boost-1.62.0
Ubuntu Server 16.04.3 x64, gcc-5.4, boost-1.58.0
Welcome to multiplayer public server at 78.47.71.237. Version 2017-10-16.e3039ca
SMAC participant: play multiplayer with us!


Top
 Profile  
 
PostPosted: Sat Oct 07, 2017 5:26 pm 
Offline
Graphics
User avatar

Joined: Tue Jul 01, 2003 8:27 pm
Posts: 698
dbenage-cx wrote:
Something I was not expecting was the requirement to click Destroy at the planet each turn, especially after the special is placed.
I'd like to do something about this, but I'm unsure how to tackle it. Basically, the information about ongoing planet destructions must be stored somewhere, since old orders are discarded at the end of the turn. What would be the right location for that? Maybe in the empire class, with something like empire->LastTurnPlanetDestructionOrders()?
And secondly, orders must be recreated/refreshed at the start of next turn. Also not sure where in the code this should happen. Can someone who's more familiar with the code than me give me a hint?

_________________
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.


Top
 Profile  
 
PostPosted: Sat Oct 07, 2017 6:07 pm 
Offline
Space Squid

Joined: Sat Dec 10, 2011 5:46 am
Posts: 52
Do you want to decrement countdown by Order system?

Is it possible to have a planet trait "Destroy Countdown n" which automatically move to "Destroy Countdown n-1" each turn?

_________________
Gentoo Linux amd64, gcc-5.4.0, boost-1.62.0
Ubuntu Server 16.04.3 x64, gcc-5.4, boost-1.58.0
Welcome to multiplayer public server at 78.47.71.237. Version 2017-10-16.e3039ca
SMAC participant: play multiplayer with us!


Top
 Profile  
 
PostPosted: Sun Oct 08, 2017 7:27 am 
Offline
Graphics
User avatar

Joined: Tue Jul 01, 2003 8:27 pm
Posts: 698
o01eg wrote:
Is it possible to have a planet trait "Destroy Countdown n" which automatically move to "Destroy Countdown n-1" each turn?
I'm looking for a solution that can be used for bombardment as well.

_________________
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.


Top
 Profile  
 
PostPosted: Sun Oct 08, 2017 2:14 pm 
Offline
Programmer

Joined: Mon Feb 29, 2016 8:37 pm
Posts: 195
The Silent One,
You could try this. I don't know if it will work for sure, but it is where I would start.

In Orders.h add a protected virtual function shouldOrderPersist() with a default implementation similar to UndoImpl() that by default does not persist an order (i.e. returns false). Orders like bombard, colonize and destroy would then implement an override that checks their particular conditions for persistence and returns true when the order is still not completed, but possible to complete.

Then in OrderSet.h add a function ResetNonPersistenOrders() that removes all orders that return shouldOrderPersist() false.

Then in ClientApp::HandleTurnPhaseUpdate() change the Message::WAITING_FOR_PLAYERS case from m_orders.Reset() to be m_orders.ResetNonPersistentOrders().


Top
 Profile  
 
PostPosted: Sun Oct 08, 2017 4:23 pm 
Offline
Graphics
User avatar

Joined: Tue Jul 01, 2003 8:27 pm
Posts: 698
Thank you, I'll try that.

_________________
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group