mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 19:25:20 -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
|
||||
})
|
||||
|
||||
@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)
|
||||
@ -231,4 +231,4 @@ object DebugCard {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user