mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 03:05:30 -04:00
Merge branch 'master' of github.com:MightyPirates/OpenComputers into master-MC1.7.10
This commit is contained in:
commit
326858ff56
@ -86,15 +86,15 @@ object DebugCard {
|
||||
null
|
||||
})
|
||||
|
||||
@Callback(doc = """function():number, number, number -- Get the player's position.""")
|
||||
@Callback(doc = """function():number -- Get the player's health.""")
|
||||
def getHealth(context: Context, args: Arguments): Array[AnyRef] =
|
||||
withPlayer(player => Array(float2Float(player.getHealth)))
|
||||
|
||||
@Callback(doc = """function():number, number, number -- Get the player's position.""")
|
||||
@Callback(doc = """function():number -- Get the player's max health.""")
|
||||
def getMaxHealth(context: Context, args: Arguments): Array[AnyRef] =
|
||||
withPlayer(player => Array(float2Float(player.getMaxHealth)))
|
||||
|
||||
@Callback(doc = """function():number, number, number -- Get the player's position.""")
|
||||
@Callback(doc = """function(health:number) -- Set the player's health.""")
|
||||
def setHealth(context: Context, args: Arguments): Array[AnyRef] =
|
||||
withPlayer(player => {
|
||||
player.setHealth(args.checkDouble(0).toFloat)
|
||||
@ -236,4 +236,4 @@ object DebugCard {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user