mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 19:56:17 -04:00
Merge pull request #572 from natedogith1/master
Fixed some docstrings on debug card callbacks.
This commit is contained in:
commit
b96f93cfdf
@ -84,15 +84,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