OpenXcom Forum

Modding => Help => Topic started by: Kilkakon on July 13, 2019, 08:38:58 am

Title: So what does checkblock and removeblock actually do?
Post by: Kilkakon 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?
Title: Re: So what does checkblock and removeblock actually do?
Post by: Meridian 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
Title: Re: So what does checkblock and removeblock actually do?
Post by: Kilkakon 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.