FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

#12 - Processor Coordinates (ADDED-CLOSED)

 
Post new topic   Reply to topic    Drop Shock Forum Index -> Open Source
View previous topic :: View next topic  
Author Message
Strawberry
Simple


Joined: 27 Jan 2010
Posts: 22

PostPosted: Tue Jul 03, 2012 11:39 am    Post subject: #12 - Processor Coordinates (ADDED-CLOSED) Reply with quote

Files: process_turn.php

This is an attempt to add coordinates so we know which processors are running out of ore/unknown. If the code is incorrect, could someone help me out ? I'm completely new to coding PHP.

For Ore, Line 3376 and Line 3380

Original Code
Line 3376

Code:
if ($effect->i_duration == 5) {
         SetMessage(2, "<fr".$unitdata[$effect->i_target]["c_type"].">".$unitdata[$effect->i_target]["i_type_id"]."</fr".$unitdata[$effect->i_target]["c_type"]."><DIV CLASS='unitDivLR'><font class='helptext'> only has <b>5 turns</b> of Ore remaining!</font></DIV>", $effect->i_owner );
      }


New Code
Line 3376

Code:
if ($effect->i_duration == 5) {
         SetMessage(2, "<fr".$unitdata[$effect->i_target]["c_type"].">".$unitdata[$effect->i_target]["i_type_id"]."</fr".$unitdata[$effect->i_target]["c_type"]."><DIV CLASS='unitDivLR'><font class='helptext'> at (".$unitdata[$effect->i_target]['x_pos'].",".$unitdata[$effect->i_target]['y_pos'].") only has <b>5 turns</b> of Ore remaining!</font></DIV>", $effect->i_owner );
      }



Original Code
Line 3380

Code:
if ($effect->i_duration == 1) {
         SetMessage(2, "<fr".$unitdata[$effect->i_target]["c_type"].">".$unitdata[$effect->i_target]["i_type_id"]."</fr".$unitdata[$effect->i_target]["c_type"]."><DIV CLASS='unitDivLR'><font class='helptext'> is no longer processing Ore!</font></DIV>", $effect->i_owner );
      }


New Code
Line 3380

Code:
if ($effect->i_duration == 1) {
         SetMessage(2, "<fr".$unitdata[$effect->i_target]["c_type"].">".$unitdata[$effect->i_target]["i_type_id"]."</fr".$unitdata[$effect->i_target]["c_type"]."><DIV CLASS='unitDivLR'><font class='helptext'> at (".$unitdata[$effect->i_target]['x_pos'].",".$unitdata[$effect->i_target]['y_pos'].") is no longer processing Ore!</font></DIV>", $effect->i_owner );
      }



For unknown

Original Code
Line 3392

Code:
if ($effect->i_duration == 5) {
         SetMessage(2, "<fr".$unitdata[$effect->i_target]["c_type"].">".$unitdata[$effect->i_target]["i_type_id"]."</fr".$unitdata[$effect->i_target]["c_type"]."><DIV CLASS='unitDivLR'><font class='helptext'> only has <b>5 turns</b> of Unknown remaining!</font></DIV>", $effect->i_owner );
      }


New Code
Line 3392

Code:
if ($effect->i_duration == 5) {
         SetMessage(2, "<fr".$unitdata[$effect->i_target]["c_type"].">".$unitdata[$effect->i_target]["i_type_id"]."</fr".$unitdata[$effect->i_target]["c_type"]."><DIV CLASS='unitDivLR'><font class='helptext'> at (".$unitdata[$effect->i_target]['x_pos'].",".$unitdata[$effect->i_target]['y_pos'].") only has <b>5 turns</b> of Unknown remaining!</font></DIV>", $effect->i_owner );
      }


Original Code
Line 3396

Code:
if ($effect->i_duration == 1) {
         SetMessage(2, "<fr".$unitdata[$effect->i_target]["c_type"].">".$unitdata[$effect->i_target]["i_type_id"]."</fr".$unitdata[$effect->i_target]["c_type"]."><DIV CLASS='unitDivLR'><font class='helptext'> is no longer processing Unknown!</font></DIV>", $effect->i_owner );



New Code
Line 3396

Code:
if ($effect->i_duration == 1) {
         SetMessage(2, "<fr".$unitdata[$effect->i_target]["c_type"].">".$unitdata[$effect->i_target]["i_type_id"]."</fr".$unitdata[$effect->i_target]["c_type"]."><DIV CLASS='unitDivLR'><font class='helptext'> at (".$unitdata[$effect->i_target]['x_pos'].",".$unitdata[$effect->i_target]['y_pos'].") is no longer processing Unknown!</font></DIV>", $effect->i_owner );


Ticket
https://sourceforge.net/p/dropshock/tickets/12/

Hope this works ? Very Happy
-SB
Back to top
View user's profile Send private message
Frizz
Site Admin


Joined: 10 Jun 2005
Posts: 3814

PostPosted: Thu Jul 12, 2012 8:14 am    Post subject: Reply with quote

Added to source,

_f
_________________

Back to top
View user's profile Send private message
J4
Intermediate


Joined: 24 Nov 2011
Posts: 218

PostPosted: Thu Jul 12, 2012 11:35 pm    Post subject: however... Reply with quote

This is good but however, wouldn't it be even better if:

a) it just said in the combat report message if it were a large small or medium proc?

and

b) if it just said in the proc status report how many turns it had left all of the time?

j4
Back to top
View user's profile Send private message
Strawberry
Simple


Joined: 27 Jan 2010
Posts: 22

PostPosted: Fri Jul 13, 2012 8:40 am    Post subject: Reply with quote

Quote:
a) it just said in the combat report message if it were a large small or medium proc?


To my understanding.. the code that is displayed in the message should show the picture, so it would show if it's a large, small, or medium proc. You also have to think of dominus where a faction may have 10 large procs down at a time.

Quote:
b) if it just said in the proc status report how many turns it had left all of the time?


No status code yet Smile

-SB
Back to top
View user's profile Send private message
J4
Intermediate


Joined: 24 Nov 2011
Posts: 218

PostPosted: Fri Jul 13, 2012 4:28 pm    Post subject: yeah Reply with quote

I wasn't thinking of dom.

The picture shows but when they are not right next to each other it's not obvious which is medium and small, in my experience.

The status countdown is really what a player needs in order to plan what to do with the ore and transporters to prevent empty procs.

j4
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Drop Shock Forum Index -> Open Source All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group