mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 11:15:12 -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
|
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] =
|
def getHealth(context: Context, args: Arguments): Array[AnyRef] =
|
||||||
withPlayer(player => Array(float2Float(player.getHealth)))
|
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] =
|
def getMaxHealth(context: Context, args: Arguments): Array[AnyRef] =
|
||||||
withPlayer(player => Array(float2Float(player.getMaxHealth)))
|
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] =
|
def setHealth(context: Context, args: Arguments): Array[AnyRef] =
|
||||||
withPlayer(player => {
|
withPlayer(player => {
|
||||||
player.setHealth(args.checkDouble(0).toFloat)
|
player.setHealth(args.checkDouble(0).toFloat)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user