All Downloads are FREE. Search and download functionalities are using the official Maven repository.

APT.all-test.MOUTBot.update-item.soar Maven / Gradle / Ivy

## NOTE: UPDATE TO WORK WITH DECORATIONS

echo "\nLoading upadate-item"

## Update the location of any items that have moved
## Only proposed when position or area has changed 

## NOTE: Tracking position might be nice for some
## decisions.  It could add alot of overhead though, so
## we should examine carefully if we want to do this

sp {unreal*propose*update-item
   (state  ^name unreal
              ^io.input-link.entities.item )
   ( ^item-list.item )
   ( ^name )
   ( ^name )
   ( ^area 
              ^position.x 
              ^position.y 
              ^position.z )
  -( ^area 
           ^position.x 
           ^position.y 
           ^position.z )
   -->
   (write (crlf) |Updating Item: | )
   ( ^operator  + >, =)
   ( ^name update-item
        ^item )
}

sp {unreal*apply*update-item
   (state  ^operator 
              ^item-list.item )
   ( ^name update-item
        ^item )
   ( ^name 
              ^area 
              ^position )
   ( ^name 
           ^position 
           ^area )
   -->
   (write (crlf) |Update item: |  )
   ( ^position  -)
   ( ^area  -)
   ( ^position )
   ( ^area )
}