Author Topic: += -= *= /=  (Read 3371 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
+= -= *= /=
« on: April 26, 2009, 12:04:06 PM »
I want to make the following code work from case4 to case7:

Quote
Private Sub ExecuteStores(n As Integer)
   Select Case n
     Case 1 'store
       DNAstore
     Case 2 'inc
       DNAinc
     Case 3 'dec
       DNAdec
     Case 4 '+=
     Case 5 '-=
     Case 6 '*=
     Case 7 '/=
   End Select
End Sub

I will like to know two things before I get started:

1.) How much energy I should charge?
       
Quote
store charges:  - (SimOpts.Costs(COSTSTORE) * SimOpts.Costs(COSTMULTIPLIER))
         inc and dec charge: - (SimOpts.Costs(COSTSTORE) * SimOpts.Costs(COSTMULTIPLIER)) / 10


2.) This is how the /= works if I am not mistaken:
Quote
3
20
/=

is the same as:
Quote
20 *
3
div
20
store

Am I correct?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
+= -= *= /=
« Reply #1 on: April 26, 2009, 07:14:25 PM »
At the moment those commands are no-ops.

But if you want 'em in, it looks like you have the right idea.  Charge 'em as a normal store, and treat them like you did.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
+= -= *= /=
« Reply #2 on: April 26, 2009, 08:01:21 PM »
Sounds like a plan.  

Offline Prsn828

  • Bot Destroyer
  • ***
  • Posts: 139
    • View Profile
+= -= *= /=
« Reply #3 on: April 26, 2009, 08:53:41 PM »
Ooohh! Sounds like something new to play with soon!
Am I right? I hope I am
So, what will it be? Will you submit to my will, or must I bend reality to suit my needs?
Better answer before I do BOTH!

Offline Arzgarb

  • Bot Neophyte
  • *
  • Posts: 8
    • View Profile
+= -= *= /=
« Reply #4 on: April 27, 2009, 02:06:08 PM »
I'd change their names to something like "addstore, substore, multstore, divstore" to better fit in with the current syntax and to avoid confusion with !=, %= etc.