Skip to content

Commit

Permalink
Adding PROPDIMENSIONS Iptscrae command.
Browse files Browse the repository at this point in the history
  • Loading branch information
theturtle32 committed Jan 16, 2010
1 parent 311d7d3 commit 546ad4d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions PalaceClient/.flexLibProperties
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
<classEntry path="net.codecomposer.palace.iptscrae.command.SHOWAVATARSCommand"/>
<classEntry path="net.codecomposer.palace.iptscrae.command.GREPSTRCommand"/>
<classEntry path="net.codecomposer.palace.iptscrae.command.PROPOFFSETSCommand"/>
<classEntry path="net.codecomposer.palace.iptscrae.command.PROPDIMENSIONSCommand"/>
</includeClasses>
<includeResources/>
<namespaceManifests/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ package net.codecomposer.palace.iptscrae
"PENSIZE": PENSIZECommand,
"PENTO": PENTOCommand,
"PROPOFFSETS": PROPOFFSETSCommand,
"PROPDIMENSIONS": PROPDIMENSIONSCommand,
"REMOVELOOSEPROP": REMOVELOOSEPROPCommand,
"ROOMHEIGHT": ROOMHEIGHTCommand,
"ROOMWIDTH": ROOMWIDTHCommand,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package net.codecomposer.palace.iptscrae.command
{
import net.codecomposer.palace.model.PalaceProp;
import net.codecomposer.palace.model.PalacePropStore;

import org.openpalace.iptscrae.IptCommand;
import org.openpalace.iptscrae.IptExecutionContext;
import org.openpalace.iptscrae.token.IntegerToken;

public class PROPDIMENSIONSCommand extends IptCommand
{
override public function execute(context:IptExecutionContext) : void {
var propId:IntegerToken = context.stack.popType(IntegerToken);
var prop:PalaceProp = PalacePropStore.getInstance().getProp(null, propId.data);
context.stack.push(new IntegerToken(prop.width));
context.stack.push(new IntegerToken(prop.height));
}
}
}

0 comments on commit 546ad4d

Please sign in to comment.