summaryrefslogtreecommitdiff
path: root/damageproto.txt
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@fishsoup.net>2008-09-19 09:52:07 -0400
committerAdam Jackson <ajax@redhat.com>2008-09-19 09:52:07 -0400
commitc25bdf1cce48ad1b2bb33ba45969572e6e4d385f (patch)
tree6675125d4078b6021820d7c9f6293cbb6f3f71a9 /damageproto.txt
parentad1a35b351012a347c49246f986655e3a91431df (diff)
Document that 'parts' may be None for DamageSubtract
The server code has handled parts == None since at least 2004.
Diffstat (limited to 'damageproto.txt')
-rw-r--r--damageproto.txt11
1 files changed, 6 insertions, 5 deletions
diff --git a/damageproto.txt b/damageproto.txt
index 54910ad..1f254d4 100644
--- a/damageproto.txt
+++ b/damageproto.txt
@@ -191,20 +191,21 @@ DamageSubtract
damage: DAMAGE
repair: Region or None
- parts: Region
+ parts: Region or None
Synchronously modifies the regions in the following manner:
If repair is None:
- 1) parts = damage
+ 1) if parts is not None, parts = damage
2) damage = <empty>
Otherwise:
- 1) parts = damage INTERSECT repair
- 2) damage = damage - parts
- 3) Generate DamageNotify for remaining damage areas
+ 1) tmp = damage INTERSECT repair
+ 2) damage = damage - tmp
+ 3) if parts is not None, parts = tmp
+ 4) Generate DamageNotify for remaining damage areas
DamageAdd