aliens

Author Topic: So what does checkblock and removeblock actually do?  (Read 1774 times)

Offline Kilkakon

  • Sergeant
  • **
  • Posts: 11
    • View Profile
    • Kilkakon.com
So what does checkblock and removeblock actually do?
« on: July 13, 2019, 08:38:58 am »
There isn't any documentation on either of these two commands on the wiki and neither of the two big mods I have on hand (XPiratez or X-COM Files) use it either...

Any ideas?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8615
    • View Profile
Re: So what does checkblock and removeblock actually do?
« Reply #1 on: July 13, 2019, 11:11:23 am »
1/ checkBlock checks if there is a block of a given quality in a given location

location is defined by rects

quality is defined by:
a/ groups
b/ if there is no groups then by blocks
c/ if there is no groups or blocks, then it simply checks existence of any block

checkBlock returns success as soon as the first matching block is found


2/ removeBlock removes blocks of a given quality in a given location

location and quality are specified the same way as in checkBlock

removeBlock returns success if at least 1 block was removed

Offline Kilkakon

  • Sergeant
  • **
  • Posts: 11
    • View Profile
    • Kilkakon.com
Re: So what does checkblock and removeblock actually do?
« Reply #2 on: July 14, 2019, 10:16:50 am »
Thanks Meridian, good to have this on record.

Some of the more advanced ideas I've had are hard to do with placing things without having 20 or so conditions.