Skip to content

Latest commit

 

History

History
143 lines (92 loc) · 3.07 KB

Development.pod

File metadata and controls

143 lines (92 loc) · 3.07 KB

Development Methods

Development is accessible via the URL /development.

The higher the development ministry, the more builds you can put in your build queue.

The list of methods below represents changes and additions to the methods that all Buildings share.

view ( session_id, building_id )

This method is extended to include details about what's in your build queue.

session_id (required)

A session id.

building_id (required)

The ID of the development ministry

RESPONSE

{
  "building" : { ... },
  "status" : { ... },
  "build_queue" : [
    {
      "building_id" : "building-id-goes-here",
      "name" : "Planetary Commmand",
      "to_level" : 8,
      "seconds_remaining" : 537,
      "x" : 0,
      "y" : 0,
      "subsidy_cost" : 3 # the essentia cost to subsidize just this building
    },
    {
      "building_id" : "building-id-goes-here",
      "name" : "Wheat Farm",
      "to_level" : 4,
      "seconds_remaining" : 9748,
      "x" : -1,
      "y" : 5,
      "subsidy_cost" : 2
    }
  ],
  "subsidy_cost" : 4 # the essentia cost to subsidize the whele build queue
}

subsidize_build_queue ( session_id, building_id )

Allows a player to instantly finish all buildings in their build queue. The cost is returned by the view method.

session_id (required)

A session id.

building_id (required)

The id of the development ministry.

RESPONSE

{
  "status" : { ... },
  "essentia_spent" : 8
}

subsidize_one_build ( parameter_hash )

Subsidize the immediate build of one job on the build queue. All later jobs (if any) will be brought forward by the (remaining) time of the subsidized build.

The cost is returned with the building details in the view method.

Note that subsidizing all builds in the queue can often be cheaper than subsidizing each build separately.

This accepts a hash of named arguments.

{
  "session_id" : 1234-123-123,
  "building_id" : 4566,
  "scheduled_id" : 56767,
}

session_id (required)

A session ID,

building_id (required)

The ID of the development ministry.

scheduled_id (required)

The ID of the building scheduled to be build/upgraded that you wish to subsidize.

RESPONSE

{
  "status" : { ... },
  "essentia_spent" : 8
}

cancel_build ( parameter hash )

Cancel a build. All following builds in the build queue will be brought forward. Any resources or plan used when the build/upgrade was requested will not be returned.

This accepts a hash of named arguments.

{
  "session_id" : 1234-123-123,
  "building_id" : 4566,
  "scheduled_id" : 56767,
}

session_id (required)

A session ID,

building_id (required)

The ID of the development ministry.

scheduled_id (optional)

The ID, or array of IDs, of the building(s) scheduled to be build/upgraded that you wish to cancel.

cancel_all (optional)

If set to a true value, cancels all builds currently scheduled.

One of scheduled_id and cancel_all is required.

RESPONSE

Returns the same as the view method.